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_NO_EXEC_STACK
 727 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 728 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 729 OPENJDK_BUILD_JDKEXE_LIBS
 730 OPENJDK_BUILD_JDKLIB_LIBS
 731 OPENJDK_BUILD_LDFLAGS_JDKEXE
 732 OPENJDK_BUILD_LDFLAGS_JDKLIB
 733 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 734 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 735 OPENJDK_BUILD_CFLAGS_JDKEXE
 736 OPENJDK_BUILD_CFLAGS_JDKLIB
 737 OPENJDK_BUILD_CXXSTD_CXXFLAG
 738 JVM_LIBS
 739 JVM_ASFLAGS
 740 JVM_LDFLAGS
 741 JVM_CFLAGS
 742 LDFLAGS_NO_EXEC_STACK
 743 LDFLAGS_HASH_STYLE
 744 LDFLAGS_CXX_JDK
 745 JDKEXE_LIBS
 746 JDKLIB_LIBS
 747 LDFLAGS_JDKEXE
 748 LDFLAGS_JDKLIB
 749 CXXFLAGS_JDKEXE
 750 CXXFLAGS_JDKLIB
 751 CFLAGS_JDKEXE
 752 CFLAGS_JDKLIB
 753 MACOSX_VERSION_MAX
 754 MACOSX_VERSION_MIN
 755 CXXSTD_CXXFLAG
 756 JDK_ARCH_ABI_PROP_NAME
 757 CXX_O_FLAG_SIZE
 758 CXX_O_FLAG_NONE
 759 CXX_O_FLAG_DEBUG
 760 CXX_O_FLAG_NORM
 761 CXX_O_FLAG_HI
 762 CXX_O_FLAG_HIGHEST
 763 CXX_O_FLAG_HIGHEST_JVM
 764 C_O_FLAG_SIZE
 765 C_O_FLAG_NONE
 766 C_O_FLAG_DEBUG
 767 C_O_FLAG_NORM
 768 C_O_FLAG_HI
 769 C_O_FLAG_HIGHEST
 770 C_O_FLAG_HIGHEST_JVM
 771 JVM_CFLAGS_SYMBOLS
 772 CXXFLAGS_DEBUG_SYMBOLS
 773 CFLAGS_DEBUG_SYMBOLS
 774 CXX_FLAG_DEPS
 775 C_FLAG_DEPS
 776 SHARED_LIBRARY_FLAGS
 777 SET_SHARED_LIBRARY_MAPFILE
 778 SET_SHARED_LIBRARY_NAME
 779 SET_SHARED_LIBRARY_ORIGIN
 780 SET_EXECUTABLE_ORIGIN
 781 CXX_FLAG_REORDER
 782 C_FLAG_REORDER
 783 JVM_RCFLAGS
 784 RC_FLAGS
 785 AR_OUT_OPTION
 786 LD_OUT_OPTION
 787 EXE_OUT_OPTION
 788 CC_OUT_OPTION
 789 STRIPFLAGS
 790 ARFLAGS
 791 COMPILER_BINDCMD_FILE_FLAG
 792 COMPILER_COMMAND_FILE_FLAG
 793 COMPILER_TARGET_BITS_FLAG
 794 JIB_JAR
 795 JT_HOME
 796 JTREGEXE
 797 HOTSPOT_TOOLCHAIN_TYPE
 798 USING_BROKEN_SUSE_LD
 799 PACKAGE_PATH
 800 BUILD_AS
 801 BUILD_LDCXX
 802 BUILD_LD
 803 BUILD_STRIP
 804 BUILD_OBJCOPY
 805 BUILD_AR
 806 BUILD_NM
 807 BUILD_CXX
 808 BUILD_CC
 809 BUILD_SYSROOT_LDFLAGS
 810 BUILD_SYSROOT_CFLAGS
 811 ac_ct_OBJDUMP
 812 OBJDUMP
 813 ac_ct_OBJCOPY
 814 OBJCOPY
 815 ac_ct_NM
 816 ac_ct_STRIP
 817 GNM
 818 NM
 819 STRIP
 820 MSBUILD
 821 DUMPBIN
 822 RC
 823 MT
 824 LIPO
 825 ac_ct_AR
 826 AR
 827 AS
 828 LDCXX
 829 LD
 830 CXXCPP
 831 CPP
 832 CXX_VERSION_NUMBER
 833 CC_VERSION_NUMBER
 834 ac_ct_CXX
 835 CXXFLAGS
 836 CXX
 837 TOOLCHAIN_PATH_CXX
 838 POTENTIAL_CXX
 839 OBJEXT
 840 EXEEXT
 841 ac_ct_CC
 842 CPPFLAGS
 843 LDFLAGS
 844 CFLAGS
 845 CC
 846 TOOLCHAIN_PATH_CC
 847 POTENTIAL_CC
 848 TOOLCHAIN_VERSION
 849 VS_LIB
 850 VS_INCLUDE
 851 VS_PATH
 852 CYGWIN_LINK
 853 SYSROOT_LDFLAGS
 854 SYSROOT_CFLAGS
 855 EXTRA_LDFLAGS
 856 EXTRA_CXXFLAGS
 857 EXTRA_CFLAGS
 858 EXE_SUFFIX
 859 OBJ_SUFFIX
 860 STATIC_LIBRARY
 861 SHARED_LIBRARY
 862 STATIC_LIBRARY_SUFFIX
 863 SHARED_LIBRARY_SUFFIX
 864 LIBRARY_PREFIX
 865 TOOLCHAIN_TYPE
 866 STATIC_BUILD
 867 IMPORT_MODULES_MAKE
 868 IMPORT_MODULES_SRC
 869 IMPORT_MODULES_MAN
 870 IMPORT_MODULES_LEGAL
 871 IMPORT_MODULES_CONF
 872 IMPORT_MODULES_LIBS
 873 IMPORT_MODULES_CMDS
 874 IMPORT_MODULES_CLASSES
 875 EXTERNAL_BUILDJDK
 876 BUILD_JDK
 877 CREATE_BUILDJDK
 878 JLINK
 879 JMOD
 880 JAVAC_FLAGS
 881 BOOT_JDK_SOURCETARGET
 882 JARSIGNER
 883 JAR
 884 JAVAH
 885 JAVAC
 886 JAVA
 887 BOOT_JDK
 888 JAVA_CHECK
 889 JAVAC_CHECK
 890 VERSION_IS_GA
 891 VERSION_SHORT
 892 VERSION_STRING
 893 VERSION_NUMBER_FOUR_POSITIONS
 894 VERSION_NUMBER
 895 VERSION_OPT
 896 VERSION_BUILD
 897 VERSION_PRE
 898 VERSION_PATCH
 899 VERSION_SECURITY
 900 VERSION_MINOR
 901 VERSION_MAJOR
 902 MACOSX_BUNDLE_ID_BASE
 903 MACOSX_BUNDLE_NAME_BASE
 904 HOTSPOT_VM_DISTRO
 905 COMPANY_NAME
 906 JDK_RC_PLATFORM_NAME
 907 PRODUCT_SUFFIX
 908 PRODUCT_NAME
 909 LAUNCHER_NAME
 910 JLINK_KEEP_PACKAGED_MODULES
 911 COPYRIGHT_YEAR
 912 COMPRESS_JARS
 913 INCLUDE_SA
 914 UNLIMITED_CRYPTO
 915 CACERTS_FILE
 916 ENABLE_FULL_DOCS
 917 ENABLE_HEADLESS_ONLY
 918 DEFAULT_MAKE_TARGET
 919 OS_VERSION_MICRO
 920 OS_VERSION_MINOR
 921 OS_VERSION_MAJOR
 922 PKG_CONFIG
 923 BASH_ARGS
 924 SETFILE
 925 CODESIGN
 926 XATTR
 927 DSYMUTIL
 928 IS_GNU_TIME
 929 PATCH
 930 DTRACE
 931 FLOCK
 932 TIME
 933 STAT
 934 HG
 935 DOT
 936 READELF
 937 OTOOL
 938 LDD
 939 ZIPEXE
 940 UNZIP
 941 TAR_SUPPORTS_TRANSFORM
 942 TAR_INCLUDE_PARAM
 943 TAR_CREATE_EXTRA_PARAM
 944 TAR_TYPE
 945 FIND_DELETE
 946 OUTPUT_SYNC
 947 OUTPUT_SYNC_SUPPORTED
 948 CHECK_TOOLSDIR_MAKE
 949 CHECK_TOOLSDIR_GMAKE
 950 CHECK_MAKE
 951 CHECK_GMAKE
 952 MAKE
 953 PKGHANDLER
 954 CONFIGURESUPPORT_OUTPUTDIR
 955 OUTPUTDIR
 956 CONF_NAME
 957 SPEC
 958 SDKROOT
 959 XCODEBUILD
 960 JVM_VARIANT_MAIN
 961 VALID_JVM_VARIANTS
 962 JVM_VARIANTS
 963 DEBUG_LEVEL
 964 HOTSPOT_DEBUG_LEVEL
 965 JDK_VARIANT
 966 USERNAME
 967 CANONICAL_TOPDIR
 968 ORIGINAL_TOPDIR
 969 TOPDIR
 970 PATH_SEP
 971 HOTSPOT_BUILD_CPU_DEFINE
 972 HOTSPOT_BUILD_CPU_ARCH
 973 HOTSPOT_BUILD_CPU
 974 HOTSPOT_BUILD_OS_TYPE
 975 HOTSPOT_BUILD_OS
 976 OPENJDK_BUILD_BUNDLE_PLATFORM
 977 OPENJDK_BUILD_OS_EXPORT_DIR
 978 OPENJDK_BUILD_CPU_OSARCH
 979 OPENJDK_BUILD_CPU_ISADIR
 980 OPENJDK_BUILD_CPU_LEGACY_LIB
 981 OPENJDK_BUILD_CPU_LEGACY
 982 HOTSPOT_TARGET_CPU_DEFINE
 983 HOTSPOT_TARGET_CPU_ARCH
 984 HOTSPOT_TARGET_CPU
 985 HOTSPOT_TARGET_OS_TYPE
 986 HOTSPOT_TARGET_OS
 987 DEFINE_CROSS_COMPILE_ARCH
 988 OPENJDK_TARGET_BUNDLE_PLATFORM
 989 OPENJDK_TARGET_OS_EXPORT_DIR
 990 OPENJDK_TARGET_CPU_OSARCH
 991 OPENJDK_TARGET_CPU_ISADIR
 992 OPENJDK_TARGET_CPU_LEGACY_LIB
 993 OPENJDK_TARGET_CPU_LEGACY
 994 RELEASE_FILE_OS_ARCH
 995 RELEASE_FILE_OS_NAME
 996 OPENJDK_MODULE_TARGET_PLATFORM
 997 COMPILE_TYPE
 998 OPENJDK_TARGET_CPU_ENDIAN
 999 OPENJDK_TARGET_CPU_BITS
1000 OPENJDK_TARGET_CPU_ARCH
1001 OPENJDK_TARGET_CPU
1002 OPENJDK_TARGET_OS_ENV
1003 OPENJDK_TARGET_OS_TYPE
1004 OPENJDK_TARGET_OS
1005 OPENJDK_BUILD_CPU_ENDIAN
1006 OPENJDK_BUILD_CPU_BITS
1007 OPENJDK_BUILD_CPU_ARCH
1008 OPENJDK_BUILD_CPU
1009 OPENJDK_BUILD_OS_ENV
1010 OPENJDK_BUILD_OS_TYPE
1011 OPENJDK_BUILD_OS
1012 OPENJDK_BUILD_AUTOCONF_NAME
1013 OPENJDK_TARGET_AUTOCONF_NAME
1014 target_os
1015 target_vendor
1016 target_cpu
1017 target
1018 host_os
1019 host_vendor
1020 host_cpu
1021 host
1022 build_os
1023 build_vendor
1024 build_cpu
1025 build
1026 PANDOC
1027 NICE
1028 CPIO
1029 DF
1030 READLINK
1031 CYGPATH
1032 SED
1033 FGREP
1034 EGREP
1035 GREP
1036 AWK
1037 XARGS
1038 WHICH
1039 WC
1040 UNIQ
1041 UNAME
1042 TR
1043 TOUCH
1044 TEE
1045 TAR
1046 TAIL
1047 SORT
1048 SH
1049 RMDIR
1050 RM
1051 PRINTF
1052 NAWK
1053 MV
1054 MKTEMP
1055 MKDIR
1056 LS
1057 LN
1058 GZIP
1059 GUNZIP
1060 HEAD
1061 FIND
1062 FILE
1063 EXPR
1064 ECHO
1065 DIRNAME
1066 DIFF
1067 DATE
1068 CUT
1069 CP
1070 COMM
1071 CMP
1072 CHMOD
1073 CAT
1074 BASH
1075 BASENAME
1076 DATE_WHEN_CONFIGURED
1077 ORIGINAL_PATH
1078 CONFIGURE_COMMAND_LINE
1079 target_alias
1080 host_alias
1081 build_alias
1082 LIBS
1083 ECHO_T
1084 ECHO_N
1085 ECHO_C
1086 DEFS
1087 mandir
1088 localedir
1089 libdir
1090 psdir
1091 pdfdir
1092 dvidir
1093 htmldir
1094 infodir
1095 docdir
1096 oldincludedir
1097 includedir
1098 localstatedir
1099 sharedstatedir
1100 sysconfdir
1101 datadir
1102 datarootdir
1103 libexecdir
1104 sbindir
1105 bindir
1106 program_transform_name
1107 prefix
1108 exec_prefix
1109 PACKAGE_URL
1110 PACKAGE_BUGREPORT
1111 PACKAGE_STRING
1112 PACKAGE_VERSION
1113 PACKAGE_TARNAME
1114 PACKAGE_NAME
1115 PATH_SEPARATOR
1116 SHELL'
1117 ac_subst_files=''
1118 ac_user_opts='
1119 enable_option_checking
1120 with_target_bits
1121 enable_openjdk_only
1122 with_custom_make_dir
1123 with_jdk_variant
1124 enable_debug
1125 with_debug_level
1126 with_jvm_variants
1127 with_cpu_port
1128 with_devkit
1129 with_sys_root
1130 with_sysroot
1131 with_tools_dir
1132 with_toolchain_path
1133 with_extra_path
1134 with_sdk_name
1135 with_conf_name
1136 with_output_base_dir
1137 with_output_sync
1138 with_default_make_target
1139 enable_headless_only
1140 enable_full_docs
1141 with_cacerts_file
1142 enable_unlimited_crypto
1143 with_copyright_year
1144 enable_keep_packaged_modules
1145 with_milestone
1146 with_update_version
1147 with_user_release_suffix
1148 with_build_number
1149 with_version_string
1150 with_version_pre
1151 with_version_opt
1152 with_version_build
1153 with_version_major
1154 with_version_minor
1155 with_version_security
1156 with_version_patch
1157 with_boot_jdk
1158 with_build_jdk
1159 with_import_modules
1160 enable_static_build
1161 with_toolchain_type
1162 with_extra_cflags
1163 with_extra_cxxflags
1164 with_extra_ldflags
1165 with_toolchain_version
1166 with_build_devkit
1167 with_jtreg
1168 with_jib
1169 with_abi_profile
1170 with_macosx_version_max
1171 enable_warnings_as_errors
1172 with_native_debug_symbols
1173 enable_debug_symbols
1174 enable_zip_debug_info
1175 enable_native_coverage
1176 enable_dtrace
1177 enable_aot
1178 enable_cds
1179 enable_hotspot_gtest
1180 with_stdc__lib
1181 with_msvcr_dll
1182 with_msvcp_dll
1183 with_x
1184 with_cups
1185 with_cups_include
1186 with_freetype
1187 with_freetype_include
1188 with_freetype_lib
1189 with_freetype_src
1190 enable_freetype_bundling
1191 with_freetype_license
1192 with_alsa
1193 with_alsa_include
1194 with_alsa_lib
1195 with_libffi
1196 with_libffi_include
1197 with_libffi_lib
1198 enable_libffi_bundling
1199 with_libjpeg
1200 with_giflib
1201 with_libpng
1202 with_zlib
1203 with_lcms
1204 with_dxsdk
1205 with_dxsdk_lib
1206 with_dxsdk_include
1207 with_jvm_features
1208 with_jvm_interpreter
1209 enable_jtreg_failure_handler
1210 enable_generate_classlist
1211 with_num_cores
1212 with_memory_size
1213 with_jobs
1214 with_test_jobs
1215 with_boot_jdk_jvmargs
1216 with_sjavac_server_java
1217 enable_sjavac
1218 enable_javac_server
1219 enable_icecc
1220 enable_precompiled_headers
1221 enable_ccache
1222 with_ccache_dir
1223 '
1224       ac_precious_vars='build_alias
1225 host_alias
1226 target_alias
1227 BASENAME
1228 BASH
1229 CAT
1230 CHMOD
1231 CMP
1232 COMM
1233 CP
1234 CUT
1235 DATE
1236 DIFF
1237 DIRNAME
1238 ECHO
1239 EXPR
1240 FILE
1241 FIND
1242 HEAD
1243 GUNZIP
1244 GZIP
1245 LN
1246 LS
1247 MKDIR
1248 MKTEMP
1249 MV
1250 NAWK
1251 PRINTF
1252 RM
1253 RMDIR
1254 SH
1255 SORT
1256 TAIL
1257 TAR
1258 TEE
1259 TOUCH
1260 TR
1261 UNAME
1262 UNIQ
1263 WC
1264 WHICH
1265 XARGS
1266 AWK
1267 GREP
1268 EGREP
1269 FGREP
1270 SED
1271 CYGPATH
1272 READLINK
1273 DF
1274 CPIO
1275 NICE
1276 PANDOC
1277 MAKE
1278 UNZIP
1279 ZIPEXE
1280 LDD
1281 OTOOL
1282 READELF
1283 DOT
1284 HG
1285 STAT
1286 TIME
1287 FLOCK
1288 DTRACE
1289 PATCH
1290 DSYMUTIL
1291 XATTR
1292 CODESIGN
1293 SETFILE
1294 PKG_CONFIG
1295 JAVA
1296 JAVAC
1297 JAVAH
1298 JAR
1299 JARSIGNER
1300 CC
1301 CFLAGS
1302 LDFLAGS
1303 LIBS
1304 CPPFLAGS
1305 CXX
1306 CXXFLAGS
1307 CCC
1308 CPP
1309 CXXCPP
1310 AS
1311 AR
1312 LIPO
1313 STRIP
1314 NM
1315 GNM
1316 OBJCOPY
1317 OBJDUMP
1318 BUILD_CC
1319 BUILD_CXX
1320 BUILD_NM
1321 BUILD_AR
1322 BUILD_OBJCOPY
1323 BUILD_STRIP
1324 JTREGEXE
1325 XMKMF
1326 FREETYPE_CFLAGS
1327 FREETYPE_LIBS
1328 ALSA_CFLAGS
1329 ALSA_LIBS
1330 LIBFFI_CFLAGS
1331 LIBFFI_LIBS
1332 PNG_CFLAGS
1333 PNG_LIBS
1334 LCMS_CFLAGS
1335 LCMS_LIBS
1336 ICECC_CMD
1337 ICECC_CREATE_ENV
1338 ICECC_WRAPPER
1339 CCACHE'
1340 
1341 
1342 # Initialize some variables set by options.
1343 ac_init_help=
1344 ac_init_version=false
1345 ac_unrecognized_opts=
1346 ac_unrecognized_sep=
1347 # The variables have the same names as the options, with
1348 # dashes changed to underlines.
1349 cache_file=/dev/null
1350 exec_prefix=NONE
1351 no_create=
1352 no_recursion=
1353 prefix=NONE
1354 program_prefix=NONE
1355 program_suffix=NONE
1356 program_transform_name=s,x,x,
1357 silent=
1358 site=
1359 srcdir=
1360 verbose=
1361 x_includes=NONE
1362 x_libraries=NONE
1363 
1364 # Installation directory options.
1365 # These are left unexpanded so users can "make install exec_prefix=/foo"
1366 # and all the variables that are supposed to be based on exec_prefix
1367 # by default will actually change.
1368 # Use braces instead of parens because sh, perl, etc. also accept them.
1369 # (The list follows the same order as the GNU Coding Standards.)
1370 bindir='${exec_prefix}/bin'
1371 sbindir='${exec_prefix}/sbin'
1372 libexecdir='${exec_prefix}/libexec'
1373 datarootdir='${prefix}/share'
1374 datadir='${datarootdir}'
1375 sysconfdir='${prefix}/etc'
1376 sharedstatedir='${prefix}/com'
1377 localstatedir='${prefix}/var'
1378 includedir='${prefix}/include'
1379 oldincludedir='/usr/include'
1380 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1381 infodir='${datarootdir}/info'
1382 htmldir='${docdir}'
1383 dvidir='${docdir}'
1384 pdfdir='${docdir}'
1385 psdir='${docdir}'
1386 libdir='${exec_prefix}/lib'
1387 localedir='${datarootdir}/locale'
1388 mandir='${datarootdir}/man'
1389 
1390 ac_prev=
1391 ac_dashdash=
1392 for ac_option
1393 do
1394   # If the previous option needs an argument, assign it.
1395   if test -n "$ac_prev"; then
1396     eval $ac_prev=\$ac_option
1397     ac_prev=
1398     continue
1399   fi
1400 
1401   case $ac_option in
1402   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1403   *=)   ac_optarg= ;;
1404   *)    ac_optarg=yes ;;
1405   esac
1406 
1407   # Accept the important Cygnus configure options, so we can diagnose typos.
1408 
1409   case $ac_dashdash$ac_option in
1410   --)
1411     ac_dashdash=yes ;;
1412 
1413   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1414     ac_prev=bindir ;;
1415   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1416     bindir=$ac_optarg ;;
1417 
1418   -build | --build | --buil | --bui | --bu)
1419     ac_prev=build_alias ;;
1420   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1421     build_alias=$ac_optarg ;;
1422 
1423   -cache-file | --cache-file | --cache-fil | --cache-fi \
1424   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1425     ac_prev=cache_file ;;
1426   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1427   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1428     cache_file=$ac_optarg ;;
1429 
1430   --config-cache | -C)
1431     cache_file=config.cache ;;
1432 
1433   -datadir | --datadir | --datadi | --datad)
1434     ac_prev=datadir ;;
1435   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1436     datadir=$ac_optarg ;;
1437 
1438   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1439   | --dataroo | --dataro | --datar)
1440     ac_prev=datarootdir ;;
1441   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1442   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1443     datarootdir=$ac_optarg ;;
1444 
1445   -disable-* | --disable-*)
1446     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1447     # Reject names that are not valid shell variable names.
1448     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1449       as_fn_error $? "invalid feature name: $ac_useropt"
1450     ac_useropt_orig=$ac_useropt
1451     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1452     case $ac_user_opts in
1453       *"
1454 "enable_$ac_useropt"
1455 "*) ;;
1456       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1457          ac_unrecognized_sep=', ';;
1458     esac
1459     eval enable_$ac_useropt=no ;;
1460 
1461   -docdir | --docdir | --docdi | --doc | --do)
1462     ac_prev=docdir ;;
1463   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1464     docdir=$ac_optarg ;;
1465 
1466   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1467     ac_prev=dvidir ;;
1468   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1469     dvidir=$ac_optarg ;;
1470 
1471   -enable-* | --enable-*)
1472     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1473     # Reject names that are not valid shell variable names.
1474     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1475       as_fn_error $? "invalid feature name: $ac_useropt"
1476     ac_useropt_orig=$ac_useropt
1477     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1478     case $ac_user_opts in
1479       *"
1480 "enable_$ac_useropt"
1481 "*) ;;
1482       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1483          ac_unrecognized_sep=', ';;
1484     esac
1485     eval enable_$ac_useropt=\$ac_optarg ;;
1486 
1487   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1488   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1489   | --exec | --exe | --ex)
1490     ac_prev=exec_prefix ;;
1491   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1492   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1493   | --exec=* | --exe=* | --ex=*)
1494     exec_prefix=$ac_optarg ;;
1495 
1496   -gas | --gas | --ga | --g)
1497     # Obsolete; use --with-gas.
1498     with_gas=yes ;;
1499 
1500   -help | --help | --hel | --he | -h)
1501     ac_init_help=long ;;
1502   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1503     ac_init_help=recursive ;;
1504   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1505     ac_init_help=short ;;
1506 
1507   -host | --host | --hos | --ho)
1508     ac_prev=host_alias ;;
1509   -host=* | --host=* | --hos=* | --ho=*)
1510     host_alias=$ac_optarg ;;
1511 
1512   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1513     ac_prev=htmldir ;;
1514   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1515   | --ht=*)
1516     htmldir=$ac_optarg ;;
1517 
1518   -includedir | --includedir | --includedi | --included | --include \
1519   | --includ | --inclu | --incl | --inc)
1520     ac_prev=includedir ;;
1521   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1522   | --includ=* | --inclu=* | --incl=* | --inc=*)
1523     includedir=$ac_optarg ;;
1524 
1525   -infodir | --infodir | --infodi | --infod | --info | --inf)
1526     ac_prev=infodir ;;
1527   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1528     infodir=$ac_optarg ;;
1529 
1530   -libdir | --libdir | --libdi | --libd)
1531     ac_prev=libdir ;;
1532   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1533     libdir=$ac_optarg ;;
1534 
1535   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1536   | --libexe | --libex | --libe)
1537     ac_prev=libexecdir ;;
1538   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1539   | --libexe=* | --libex=* | --libe=*)
1540     libexecdir=$ac_optarg ;;
1541 
1542   -localedir | --localedir | --localedi | --localed | --locale)
1543     ac_prev=localedir ;;
1544   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1545     localedir=$ac_optarg ;;
1546 
1547   -localstatedir | --localstatedir | --localstatedi | --localstated \
1548   | --localstate | --localstat | --localsta | --localst | --locals)
1549     ac_prev=localstatedir ;;
1550   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1551   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1552     localstatedir=$ac_optarg ;;
1553 
1554   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1555     ac_prev=mandir ;;
1556   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1557     mandir=$ac_optarg ;;
1558 
1559   -nfp | --nfp | --nf)
1560     # Obsolete; use --without-fp.
1561     with_fp=no ;;
1562 
1563   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1564   | --no-cr | --no-c | -n)
1565     no_create=yes ;;
1566 
1567   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1568   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1569     no_recursion=yes ;;
1570 
1571   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1572   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1573   | --oldin | --oldi | --old | --ol | --o)
1574     ac_prev=oldincludedir ;;
1575   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1576   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1577   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1578     oldincludedir=$ac_optarg ;;
1579 
1580   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1581     ac_prev=prefix ;;
1582   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1583     prefix=$ac_optarg ;;
1584 
1585   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1586   | --program-pre | --program-pr | --program-p)
1587     ac_prev=program_prefix ;;
1588   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1589   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1590     program_prefix=$ac_optarg ;;
1591 
1592   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1593   | --program-suf | --program-su | --program-s)
1594     ac_prev=program_suffix ;;
1595   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1596   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1597     program_suffix=$ac_optarg ;;
1598 
1599   -program-transform-name | --program-transform-name \
1600   | --program-transform-nam | --program-transform-na \
1601   | --program-transform-n | --program-transform- \
1602   | --program-transform | --program-transfor \
1603   | --program-transfo | --program-transf \
1604   | --program-trans | --program-tran \
1605   | --progr-tra | --program-tr | --program-t)
1606     ac_prev=program_transform_name ;;
1607   -program-transform-name=* | --program-transform-name=* \
1608   | --program-transform-nam=* | --program-transform-na=* \
1609   | --program-transform-n=* | --program-transform-=* \
1610   | --program-transform=* | --program-transfor=* \
1611   | --program-transfo=* | --program-transf=* \
1612   | --program-trans=* | --program-tran=* \
1613   | --progr-tra=* | --program-tr=* | --program-t=*)
1614     program_transform_name=$ac_optarg ;;
1615 
1616   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1617     ac_prev=pdfdir ;;
1618   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1619     pdfdir=$ac_optarg ;;
1620 
1621   -psdir | --psdir | --psdi | --psd | --ps)
1622     ac_prev=psdir ;;
1623   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1624     psdir=$ac_optarg ;;
1625 
1626   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1627   | -silent | --silent | --silen | --sile | --sil)
1628     silent=yes ;;
1629 
1630   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1631     ac_prev=sbindir ;;
1632   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1633   | --sbi=* | --sb=*)
1634     sbindir=$ac_optarg ;;
1635 
1636   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1637   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1638   | --sharedst | --shareds | --shared | --share | --shar \
1639   | --sha | --sh)
1640     ac_prev=sharedstatedir ;;
1641   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1642   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1643   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1644   | --sha=* | --sh=*)
1645     sharedstatedir=$ac_optarg ;;
1646 
1647   -site | --site | --sit)
1648     ac_prev=site ;;
1649   -site=* | --site=* | --sit=*)
1650     site=$ac_optarg ;;
1651 
1652   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1653     ac_prev=srcdir ;;
1654   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1655     srcdir=$ac_optarg ;;
1656 
1657   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1658   | --syscon | --sysco | --sysc | --sys | --sy)
1659     ac_prev=sysconfdir ;;
1660   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1661   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1662     sysconfdir=$ac_optarg ;;
1663 
1664   -target | --target | --targe | --targ | --tar | --ta | --t)
1665     ac_prev=target_alias ;;
1666   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1667     target_alias=$ac_optarg ;;
1668 
1669   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1670     verbose=yes ;;
1671 
1672   -version | --version | --versio | --versi | --vers | -V)
1673     ac_init_version=: ;;
1674 
1675   -with-* | --with-*)
1676     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1677     # Reject names that are not valid shell variable names.
1678     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1679       as_fn_error $? "invalid package name: $ac_useropt"
1680     ac_useropt_orig=$ac_useropt
1681     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1682     case $ac_user_opts in
1683       *"
1684 "with_$ac_useropt"
1685 "*) ;;
1686       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1687          ac_unrecognized_sep=', ';;
1688     esac
1689     eval with_$ac_useropt=\$ac_optarg ;;
1690 
1691   -without-* | --without-*)
1692     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1693     # Reject names that are not valid shell variable names.
1694     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1695       as_fn_error $? "invalid package name: $ac_useropt"
1696     ac_useropt_orig=$ac_useropt
1697     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1698     case $ac_user_opts in
1699       *"
1700 "with_$ac_useropt"
1701 "*) ;;
1702       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1703          ac_unrecognized_sep=', ';;
1704     esac
1705     eval with_$ac_useropt=no ;;
1706 
1707   --x)
1708     # Obsolete; use --with-x.
1709     with_x=yes ;;
1710 
1711   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1712   | --x-incl | --x-inc | --x-in | --x-i)
1713     ac_prev=x_includes ;;
1714   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1715   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1716     x_includes=$ac_optarg ;;
1717 
1718   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1719   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1720     ac_prev=x_libraries ;;
1721   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1722   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1723     x_libraries=$ac_optarg ;;
1724 
1725   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1726 Try \`$0 --help' for more information"
1727     ;;
1728 
1729   *=*)
1730     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1731     # Reject names that are not valid shell variable names.
1732     case $ac_envvar in #(
1733       '' | [0-9]* | *[!_$as_cr_alnum]* )
1734       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1735     esac
1736     eval $ac_envvar=\$ac_optarg
1737     export $ac_envvar ;;
1738 
1739   *)
1740     # FIXME: should be removed in autoconf 3.0.
1741     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1742     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1743       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1744     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1745     ;;
1746 
1747   esac
1748 done
1749 
1750 if test -n "$ac_prev"; then
1751   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1752   as_fn_error $? "missing argument to $ac_option"
1753 fi
1754 
1755 if test -n "$ac_unrecognized_opts"; then
1756   case $enable_option_checking in
1757     no) ;;
1758     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1759     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1760   esac
1761 fi
1762 
1763 # Check all directory arguments for consistency.
1764 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1765                 datadir sysconfdir sharedstatedir localstatedir includedir \
1766                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1767                 libdir localedir mandir
1768 do
1769   eval ac_val=\$$ac_var
1770   # Remove trailing slashes.
1771   case $ac_val in
1772     */ )
1773       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1774       eval $ac_var=\$ac_val;;
1775   esac
1776   # Be sure to have absolute directory names.
1777   case $ac_val in
1778     [\\/$]* | ?:[\\/]* )  continue;;
1779     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1780   esac
1781   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1782 done
1783 
1784 # There might be people who depend on the old broken behavior: `$host'
1785 # used to hold the argument of --host etc.
1786 # FIXME: To remove some day.
1787 build=$build_alias
1788 host=$host_alias
1789 target=$target_alias
1790 
1791 # FIXME: To remove some day.
1792 if test "x$host_alias" != x; then
1793   if test "x$build_alias" = x; then
1794     cross_compiling=maybe
1795   elif test "x$build_alias" != "x$host_alias"; then
1796     cross_compiling=yes
1797   fi
1798 fi
1799 
1800 ac_tool_prefix=
1801 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1802 
1803 test "$silent" = yes && exec 6>/dev/null
1804 
1805 
1806 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1807 ac_ls_di=`ls -di .` &&
1808 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1809   as_fn_error $? "working directory cannot be determined"
1810 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1811   as_fn_error $? "pwd does not report name of working directory"
1812 
1813 
1814 # Find the source files, if location was not specified.
1815 if test -z "$srcdir"; then
1816   ac_srcdir_defaulted=yes
1817   # Try the directory containing this script, then the parent directory.
1818   ac_confdir=`$as_dirname -- "$as_myself" ||
1819 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1820          X"$as_myself" : 'X\(//\)[^/]' \| \
1821          X"$as_myself" : 'X\(//\)$' \| \
1822          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1823 $as_echo X"$as_myself" |
1824     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1825             s//\1/
1826             q
1827           }
1828           /^X\(\/\/\)[^/].*/{
1829             s//\1/
1830             q
1831           }
1832           /^X\(\/\/\)$/{
1833             s//\1/
1834             q
1835           }
1836           /^X\(\/\).*/{
1837             s//\1/
1838             q
1839           }
1840           s/.*/./; q'`
1841   srcdir=$ac_confdir
1842   if test ! -r "$srcdir/$ac_unique_file"; then
1843     srcdir=..
1844   fi
1845 else
1846   ac_srcdir_defaulted=no
1847 fi
1848 if test ! -r "$srcdir/$ac_unique_file"; then
1849   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1850   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1851 fi
1852 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1853 ac_abs_confdir=`(
1854         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1855         pwd)`
1856 # When building in place, set srcdir=.
1857 if test "$ac_abs_confdir" = "$ac_pwd"; then
1858   srcdir=.
1859 fi
1860 # Remove unnecessary trailing slashes from srcdir.
1861 # Double slashes in file names in object file debugging info
1862 # mess up M-x gdb in Emacs.
1863 case $srcdir in
1864 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1865 esac
1866 for ac_var in $ac_precious_vars; do
1867   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1868   eval ac_env_${ac_var}_value=\$${ac_var}
1869   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1870   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1871 done
1872 
1873 #
1874 # Report the --help message.
1875 #
1876 if test "$ac_init_help" = "long"; then
1877   # Omit some internal or obsolete options to make the list less imposing.
1878   # This message is too long to be a string in the A/UX 3.1 sh.
1879   cat <<_ACEOF
1880 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1881 
1882 Usage: $0 [OPTION]... [VAR=VALUE]...
1883 
1884 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1885 VAR=VALUE.  See below for descriptions of some of the useful variables.
1886 
1887 Defaults for the options are specified in brackets.
1888 
1889 Configuration:
1890   -h, --help              display this help and exit
1891       --help=short        display options specific to this package
1892       --help=recursive    display the short help of all the included packages
1893   -V, --version           display version information and exit
1894   -q, --quiet, --silent   do not print \`checking ...' messages
1895       --cache-file=FILE   cache test results in FILE [disabled]
1896   -C, --config-cache      alias for \`--cache-file=config.cache'
1897   -n, --no-create         do not create output files
1898       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1899 
1900 Installation directories:
1901   --prefix=PREFIX         install architecture-independent files in PREFIX
1902                           [$ac_default_prefix]
1903   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1904                           [PREFIX]
1905 
1906 By default, \`make install' will install all the files in
1907 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1908 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1909 for instance \`--prefix=\$HOME'.
1910 
1911 For better control, use the options below.
1912 
1913 Fine tuning of the installation directories:
1914   --bindir=DIR            user executables [EPREFIX/bin]
1915   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1916   --libexecdir=DIR        program executables [EPREFIX/libexec]
1917   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1918   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1919   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1920   --libdir=DIR            object code libraries [EPREFIX/lib]
1921   --includedir=DIR        C header files [PREFIX/include]
1922   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1923   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1924   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1925   --infodir=DIR           info documentation [DATAROOTDIR/info]
1926   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1927   --mandir=DIR            man documentation [DATAROOTDIR/man]
1928   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1929   --htmldir=DIR           html documentation [DOCDIR]
1930   --dvidir=DIR            dvi documentation [DOCDIR]
1931   --pdfdir=DIR            pdf documentation [DOCDIR]
1932   --psdir=DIR             ps documentation [DOCDIR]
1933 _ACEOF
1934 
1935   cat <<\_ACEOF
1936 
1937 X features:
1938   --x-includes=DIR    X include files are in DIR
1939   --x-libraries=DIR   X library files are in DIR
1940 
1941 System types:
1942   --build=BUILD     configure for building on BUILD [guessed]
1943   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1944   --target=TARGET   configure for building compilers for TARGET [HOST]
1945 _ACEOF
1946 fi
1947 
1948 if test -n "$ac_init_help"; then
1949   case $ac_init_help in
1950      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1951    esac
1952   cat <<\_ACEOF
1953 
1954 Optional Features:
1955   --disable-option-checking  ignore unrecognized --enable/--with options
1956   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1957   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1958   --enable-openjdk-only   suppress building custom source even if present
1959                           [disabled]
1960   --enable-debug          set the debug level to fastdebug (shorthand for
1961                           --with-debug-level=fastdebug) [disabled]
1962   --enable-headless-only  only build headless (no GUI) support [disabled]
1963   --enable-full-docs      build complete documentation [enabled if all tools
1964                           found]
1965   --disable-unlimited-crypto
1966                           Disable unlimited crypto policy [enabled]
1967   --disable-keep-packaged-modules
1968                           Do not keep packaged modules in jdk image [enable]
1969   --enable-static-build   enable static library build [disabled]
1970   --disable-warnings-as-errors
1971                           do not consider native warnings to be an error
1972                           [enabled]
1973   --enable-debug-symbols  Deprecated. Option is kept for backwards
1974                           compatibility and is ignored
1975   --enable-zip-debug-info Deprecated. Option is kept for backwards
1976                           compatibility and is ignored
1977   --enable-native-coverage
1978                           enable native compilation with code coverage
1979                           data[disabled]
1980   --enable-dtrace[=yes/no/auto]
1981                           enable dtrace. Default is auto, where dtrace is
1982                           enabled if all dependencies are present.
1983   --enable-aot[=yes/no/auto]
1984                           enable ahead of time compilation feature. Default is
1985                           auto, where aot is enabled if all dependencies are
1986                           present.
1987   --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
1988                           Default is yes.
1989   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1990   --disable-freetype-bundling
1991                           disable bundling of the freetype library with the
1992                           build result [enabled on Windows or when using
1993                           --with-freetype, disabled otherwise]
1994   --enable-libffi-bundling
1995                           enable bundling of libffi.so to make the built JDK
1996                           runnable on more systems
1997   --enable-jtreg-failure-handler
1998                           forces build of the jtreg failure handler to be
1999                           enabled, missing dependencies become fatal errors.
2000                           Default is auto, where the failure handler is built
2001                           if all dependencies are present and otherwise just
2002                           disabled.
2003   --disable-generate-classlist
2004                           forces enabling or disabling of the generation of a
2005                           CDS classlist at build time. Default is to generate
2006                           it when either the server or client JVMs are built
2007                           and enable-cds is true.
2008   --enable-sjavac         use sjavac to do fast incremental compiles
2009                           [disabled]
2010   --disable-javac-server  disable javac server [enabled]
2011   --enable-icecc          enable distribted compilation of native code using
2012                           icecc/icecream [disabled]
2013   --disable-precompiled-headers
2014                           disable using precompiled headers when compiling C++
2015                           [enabled]
2016   --enable-ccache         enable using ccache to speed up recompilations
2017                           [disabled]
2018 
2019 Optional Packages:
2020   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2021   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2022   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2023                           support it), e.g. --with-target-bits=32 [guessed]
2024   --with-custom-make-dir  Deprecated. Option is kept for backwards
2025                           compatibility and is ignored
2026   --with-jdk-variant      JDK variant to build (normal) [normal]
2027   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2028                           optimized) [release]
2029   --with-jvm-variants     JVM variants (separated by commas) to build
2030                           (server,client,minimal,core,zero,zeroshark,custom)
2031                           [server]
2032   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2033                           (arm64,aarch64) [aarch64]
2034   --with-devkit           use this devkit for compilers, tools and resources
2035   --with-sys-root         alias for --with-sysroot for backwards compatability
2036   --with-sysroot          use this directory as sysroot
2037   --with-tools-dir        alias for --with-toolchain-path for backwards
2038                           compatibility
2039   --with-toolchain-path   prepend these directories when searching for
2040                           toolchain binaries (compilers etc)
2041   --with-extra-path       prepend these directories to the default path
2042   --with-sdk-name         use the platform SDK of the given name. [macosx]
2043   --with-conf-name        use this as the name of the configuration [generated
2044                           from important configuration options]
2045   --with-output-base-dir  override the default output base directory [./build]
2046   --with-output-sync      set make output sync type if supported by make.
2047                           [recurse]
2048   --with-default-make-target
2049                           set the default make target [exploded-image]
2050   --with-cacerts-file     specify alternative cacerts file
2051   --with-copyright-year   Set copyright year value for build [current year]
2052   --with-milestone        Deprecated. Option is kept for backwards
2053                           compatibility and is ignored
2054   --with-update-version   Deprecated. Option is kept for backwards
2055                           compatibility and is ignored
2056   --with-user-release-suffix
2057                           Deprecated. Option is kept for backwards
2058                           compatibility and is ignored
2059   --with-build-number     Deprecated. Option is kept for backwards
2060                           compatibility and is ignored
2061   --with-version-string   Set version string [calculated]
2062   --with-version-pre      Set the base part of the version 'PRE' field
2063                           (pre-release identifier) ['internal']
2064   --with-version-opt      Set version 'OPT' field (build metadata)
2065                           [<timestamp>.<user>.<dirname>]
2066   --with-version-build    Set version 'BUILD' field (build number) [not
2067                           specified]
2068   --with-version-major    Set version 'MAJOR' field (first number) [current
2069                           source value]
2070   --with-version-minor    Set version 'MINOR' field (second number) [current
2071                           source value]
2072   --with-version-security Set version 'SECURITY' field (third number) [current
2073                           source value]
2074   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2075                           specified]
2076   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2077   --with-build-jdk        path to JDK of same version as is being built[the
2078                           newly built JDK]
2079   --with-import-modules   import a set of prebuilt modules either as a zip
2080                           file or an exploded directory
2081   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2082                           to show possible values [platform dependent]
2083   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2084   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2085   --with-extra-ldflags    extra flags to be used when linking jdk
2086   --with-toolchain-version
2087                           the version of the toolchain to look for, use
2088                           '--help' to show possible values [platform
2089                           dependent]
2090   --with-build-devkit     Devkit to use for the build platform toolchain
2091   --with-jtreg            Regression Test Harness [probed]
2092   --with-jib              Jib dependency management tool [not used]
2093   --with-abi-profile      specify ABI profile for ARM builds
2094                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2095                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2096                           [toolchain dependent]
2097   --with-macosx-version-max
2098                           error on use of newer functionality. [macosx]
2099   --with-native-debug-symbols
2100                           set the native debug symbol configuration (none,
2101                           internal, external, zipped) [varying]
2102   --with-stdc++lib=<static>,<dynamic>,<default>
2103                           force linking of the C++ runtime on Linux to either
2104                           static or dynamic, default is static with dynamic as
2105                           fallback
2106   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2107                           (Windows only) [probed]
2108   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2109                           (Windows only) [probed]
2110   --with-x                use the X Window System
2111   --with-cups             specify prefix directory for the cups package
2112                           (expecting the headers under PATH/include)
2113   --with-cups-include     specify directory for the cups include files
2114   --with-freetype         specify prefix directory for the freetype package
2115                           (expecting the libraries under PATH/lib and the
2116                           headers under PATH/include)
2117   --with-freetype-include specify directory for the freetype include files
2118   --with-freetype-lib     specify directory for the freetype library
2119   --with-freetype-src     specify directory with freetype sources to
2120                           automatically build the library (experimental,
2121                           Windows-only)
2122   --with-freetype-license if bundling freetype, also bundle this license file
2123   --with-alsa             specify prefix directory for the alsa package
2124                           (expecting the libraries under PATH/lib and the
2125                           headers under PATH/include)
2126   --with-alsa-include     specify directory for the alsa include files
2127   --with-alsa-lib         specify directory for the alsa library
2128   --with-libffi           specify prefix directory for the libffi package
2129                           (expecting the libraries under PATH/lib and the
2130                           headers under PATH/include)
2131   --with-libffi-include   specify directory for the libffi include files
2132   --with-libffi-lib       specify directory for the libffi library
2133   --with-libjpeg          use libjpeg from build system or OpenJDK source
2134                           (system, bundled) [bundled]
2135   --with-giflib           use giflib from build system or OpenJDK source
2136                           (system, bundled) [bundled]
2137   --with-libpng           use libpng from build system or OpenJDK source
2138                           (system, bundled) [bundled]
2139   --with-zlib             use zlib from build system or OpenJDK source
2140                           (system, bundled) [bundled]
2141   --with-lcms             use lcms2 from build system or OpenJDK source
2142                           (system, bundled) [bundled]
2143   --with-dxsdk            Deprecated. Option is kept for backwards
2144                           compatibility and is ignored
2145   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2146                           compatibility and is ignored
2147   --with-dxsdk-include    Deprecated. Option is kept for backwards
2148                           compatibility and is ignored
2149   --with-jvm-features     additional JVM features to enable (separated by
2150                           comma), use '--help' to show possible values [none]
2151   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2152                           compatibility and is ignored
2153   --with-num-cores        number of cores in the build system, e.g.
2154                           --with-num-cores=8 [probed]
2155   --with-memory-size      memory (in MB) available in the build system, e.g.
2156                           --with-memory-size=1024 [probed]
2157   --with-jobs             number of parallel jobs to let make run [calculated
2158                           based on cores and memory]
2159   --with-test-jobs        number of parallel tests jobs to run [based on build
2160                           jobs]
2161   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2162                           invocations of boot JDK, overriding the default
2163                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2164                           -enableassertions"
2165   --with-sjavac-server-java
2166                           use this java binary for running the sjavac
2167                           background server [Boot JDK java]
2168   --with-ccache-dir       where to store ccache files [~/.ccache]
2169 
2170 Some influential environment variables:
2171   BASENAME    Override default value for BASENAME
2172   BASH        Override default value for BASH
2173   CAT         Override default value for CAT
2174   CHMOD       Override default value for CHMOD
2175   CMP         Override default value for CMP
2176   COMM        Override default value for COMM
2177   CP          Override default value for CP
2178   CUT         Override default value for CUT
2179   DATE        Override default value for DATE
2180   DIFF        Override default value for DIFF
2181   DIRNAME     Override default value for DIRNAME
2182   ECHO        Override default value for ECHO
2183   EXPR        Override default value for EXPR
2184   FILE        Override default value for FILE
2185   FIND        Override default value for FIND
2186   HEAD        Override default value for HEAD
2187   GUNZIP      Override default value for GUNZIP
2188   GZIP        Override default value for GZIP
2189   LN          Override default value for LN
2190   LS          Override default value for LS
2191   MKDIR       Override default value for MKDIR
2192   MKTEMP      Override default value for MKTEMP
2193   MV          Override default value for MV
2194   NAWK        Override default value for NAWK
2195   PRINTF      Override default value for PRINTF
2196   RM          Override default value for RM
2197   RMDIR       Override default value for RMDIR
2198   SH          Override default value for SH
2199   SORT        Override default value for SORT
2200   TAIL        Override default value for TAIL
2201   TAR         Override default value for TAR
2202   TEE         Override default value for TEE
2203   TOUCH       Override default value for TOUCH
2204   TR          Override default value for TR
2205   UNAME       Override default value for UNAME
2206   UNIQ        Override default value for UNIQ
2207   WC          Override default value for WC
2208   WHICH       Override default value for WHICH
2209   XARGS       Override default value for XARGS
2210   AWK         Override default value for AWK
2211   GREP        Override default value for GREP
2212   EGREP       Override default value for EGREP
2213   FGREP       Override default value for FGREP
2214   SED         Override default value for SED
2215   CYGPATH     Override default value for CYGPATH
2216   READLINK    Override default value for READLINK
2217   DF          Override default value for DF
2218   CPIO        Override default value for CPIO
2219   NICE        Override default value for NICE
2220   PANDOC      Override default value for PANDOC
2221   MAKE        Override default value for MAKE
2222   UNZIP       Override default value for UNZIP
2223   ZIPEXE      Override default value for ZIPEXE
2224   LDD         Override default value for LDD
2225   OTOOL       Override default value for OTOOL
2226   READELF     Override default value for READELF
2227   DOT         Override default value for DOT
2228   HG          Override default value for HG
2229   STAT        Override default value for STAT
2230   TIME        Override default value for TIME
2231   FLOCK       Override default value for FLOCK
2232   DTRACE      Override default value for DTRACE
2233   PATCH       Override default value for PATCH
2234   DSYMUTIL    Override default value for DSYMUTIL
2235   XATTR       Override default value for XATTR
2236   CODESIGN    Override default value for CODESIGN
2237   SETFILE     Override default value for SETFILE
2238   PKG_CONFIG  path to pkg-config utility
2239   JAVA        Override default value for JAVA
2240   JAVAC       Override default value for JAVAC
2241   JAVAH       Override default value for JAVAH
2242   JAR         Override default value for JAR
2243   JARSIGNER   Override default value for JARSIGNER
2244   CC          C compiler command
2245   CFLAGS      C compiler flags
2246   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2247               nonstandard directory <lib dir>
2248   LIBS        libraries to pass to the linker, e.g. -l<library>
2249   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2250               you have headers in a nonstandard directory <include dir>
2251   CXX         C++ compiler command
2252   CXXFLAGS    C++ compiler flags
2253   CPP         C preprocessor
2254   CXXCPP      C++ preprocessor
2255   AS          Override default value for AS
2256   AR          Override default value for AR
2257   LIPO        Override default value for LIPO
2258   STRIP       Override default value for STRIP
2259   NM          Override default value for NM
2260   GNM         Override default value for GNM
2261   OBJCOPY     Override default value for OBJCOPY
2262   OBJDUMP     Override default value for OBJDUMP
2263   BUILD_CC    Override default value for BUILD_CC
2264   BUILD_CXX   Override default value for BUILD_CXX
2265   BUILD_NM    Override default value for BUILD_NM
2266   BUILD_AR    Override default value for BUILD_AR
2267   BUILD_OBJCOPY
2268               Override default value for BUILD_OBJCOPY
2269   BUILD_STRIP Override default value for BUILD_STRIP
2270   JTREGEXE    Override default value for JTREGEXE
2271   XMKMF       Path to xmkmf, Makefile generator for X Window System
2272   FREETYPE_CFLAGS
2273               C compiler flags for FREETYPE, overriding pkg-config
2274   FREETYPE_LIBS
2275               linker flags for FREETYPE, overriding pkg-config
2276   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2277   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2278   LIBFFI_CFLAGS
2279               C compiler flags for LIBFFI, overriding pkg-config
2280   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2281   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2282   PNG_LIBS    linker flags for PNG, overriding pkg-config
2283   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2284   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2285   ICECC_CMD   Override default value for ICECC_CMD
2286   ICECC_CREATE_ENV
2287               Override default value for ICECC_CREATE_ENV
2288   ICECC_WRAPPER
2289               Override default value for ICECC_WRAPPER
2290   CCACHE      Override default value for CCACHE
2291 
2292 Use these variables to override the choices made by `configure' or to help
2293 it to find libraries and programs with nonstandard names/locations.
2294 
2295 Report bugs to <build-dev@openjdk.java.net>.
2296 OpenJDK home page: <http://openjdk.java.net>.
2297 _ACEOF
2298 ac_status=$?
2299 fi
2300 
2301 if test "$ac_init_help" = "recursive"; then
2302   # If there are subdirs, report their specific --help.
2303   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2304     test -d "$ac_dir" ||
2305       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2306       continue
2307     ac_builddir=.
2308 
2309 case "$ac_dir" in
2310 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2311 *)
2312   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2313   # A ".." for each directory in $ac_dir_suffix.
2314   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2315   case $ac_top_builddir_sub in
2316   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2317   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2318   esac ;;
2319 esac
2320 ac_abs_top_builddir=$ac_pwd
2321 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2322 # for backward compatibility:
2323 ac_top_builddir=$ac_top_build_prefix
2324 
2325 case $srcdir in
2326   .)  # We are building in place.
2327     ac_srcdir=.
2328     ac_top_srcdir=$ac_top_builddir_sub
2329     ac_abs_top_srcdir=$ac_pwd ;;
2330   [\\/]* | ?:[\\/]* )  # Absolute name.
2331     ac_srcdir=$srcdir$ac_dir_suffix;
2332     ac_top_srcdir=$srcdir
2333     ac_abs_top_srcdir=$srcdir ;;
2334   *) # Relative name.
2335     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2336     ac_top_srcdir=$ac_top_build_prefix$srcdir
2337     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2338 esac
2339 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2340 
2341     cd "$ac_dir" || { ac_status=$?; continue; }
2342     # Check for guested configure.
2343     if test -f "$ac_srcdir/configure.gnu"; then
2344       echo &&
2345       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2346     elif test -f "$ac_srcdir/configure"; then
2347       echo &&
2348       $SHELL "$ac_srcdir/configure" --help=recursive
2349     else
2350       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2351     fi || ac_status=$?
2352     cd "$ac_pwd" || { ac_status=$?; break; }
2353   done
2354 fi
2355 
2356 test -n "$ac_init_help" && exit $ac_status
2357 if $ac_init_version; then
2358   cat <<\_ACEOF
2359 OpenJDK configure jdk9
2360 generated by GNU Autoconf 2.69
2361 
2362 Copyright (C) 2012 Free Software Foundation, Inc.
2363 This configure script is free software; the Free Software Foundation
2364 gives unlimited permission to copy, distribute and modify it.
2365 _ACEOF
2366   exit
2367 fi
2368 
2369 ## ------------------------ ##
2370 ## Autoconf initialization. ##
2371 ## ------------------------ ##
2372 
2373 # ac_fn_c_try_compile LINENO
2374 # --------------------------
2375 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2376 ac_fn_c_try_compile ()
2377 {
2378   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379   rm -f conftest.$ac_objext
2380   if { { ac_try="$ac_compile"
2381 case "(($ac_try" in
2382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383   *) ac_try_echo=$ac_try;;
2384 esac
2385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386 $as_echo "$ac_try_echo"; } >&5
2387   (eval "$ac_compile") 2>conftest.err
2388   ac_status=$?
2389   if test -s conftest.err; then
2390     grep -v '^ *+' conftest.err >conftest.er1
2391     cat conftest.er1 >&5
2392     mv -f conftest.er1 conftest.err
2393   fi
2394   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395   test $ac_status = 0; } && {
2396          test -z "$ac_c_werror_flag" ||
2397          test ! -s conftest.err
2398        } && test -s conftest.$ac_objext; then :
2399   ac_retval=0
2400 else
2401   $as_echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403 
2404         ac_retval=1
2405 fi
2406   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2407   as_fn_set_status $ac_retval
2408 
2409 } # ac_fn_c_try_compile
2410 
2411 # ac_fn_cxx_try_compile LINENO
2412 # ----------------------------
2413 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2414 ac_fn_cxx_try_compile ()
2415 {
2416   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2417   rm -f conftest.$ac_objext
2418   if { { ac_try="$ac_compile"
2419 case "(($ac_try" in
2420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2421   *) ac_try_echo=$ac_try;;
2422 esac
2423 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2424 $as_echo "$ac_try_echo"; } >&5
2425   (eval "$ac_compile") 2>conftest.err
2426   ac_status=$?
2427   if test -s conftest.err; then
2428     grep -v '^ *+' conftest.err >conftest.er1
2429     cat conftest.er1 >&5
2430     mv -f conftest.er1 conftest.err
2431   fi
2432   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2433   test $ac_status = 0; } && {
2434          test -z "$ac_cxx_werror_flag" ||
2435          test ! -s conftest.err
2436        } && test -s conftest.$ac_objext; then :
2437   ac_retval=0
2438 else
2439   $as_echo "$as_me: failed program was:" >&5
2440 sed 's/^/| /' conftest.$ac_ext >&5
2441 
2442         ac_retval=1
2443 fi
2444   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2445   as_fn_set_status $ac_retval
2446 
2447 } # ac_fn_cxx_try_compile
2448 
2449 # ac_fn_c_try_cpp LINENO
2450 # ----------------------
2451 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2452 ac_fn_c_try_cpp ()
2453 {
2454   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2455   if { { ac_try="$ac_cpp conftest.$ac_ext"
2456 case "(($ac_try" in
2457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2458   *) ac_try_echo=$ac_try;;
2459 esac
2460 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2461 $as_echo "$ac_try_echo"; } >&5
2462   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2463   ac_status=$?
2464   if test -s conftest.err; then
2465     grep -v '^ *+' conftest.err >conftest.er1
2466     cat conftest.er1 >&5
2467     mv -f conftest.er1 conftest.err
2468   fi
2469   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470   test $ac_status = 0; } > conftest.i && {
2471          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2472          test ! -s conftest.err
2473        }; then :
2474   ac_retval=0
2475 else
2476   $as_echo "$as_me: failed program was:" >&5
2477 sed 's/^/| /' conftest.$ac_ext >&5
2478 
2479     ac_retval=1
2480 fi
2481   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2482   as_fn_set_status $ac_retval
2483 
2484 } # ac_fn_c_try_cpp
2485 
2486 # ac_fn_cxx_try_cpp LINENO
2487 # ------------------------
2488 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2489 ac_fn_cxx_try_cpp ()
2490 {
2491   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492   if { { ac_try="$ac_cpp conftest.$ac_ext"
2493 case "(($ac_try" in
2494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2495   *) ac_try_echo=$ac_try;;
2496 esac
2497 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2498 $as_echo "$ac_try_echo"; } >&5
2499   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2500   ac_status=$?
2501   if test -s conftest.err; then
2502     grep -v '^ *+' conftest.err >conftest.er1
2503     cat conftest.er1 >&5
2504     mv -f conftest.er1 conftest.err
2505   fi
2506   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507   test $ac_status = 0; } > conftest.i && {
2508          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2509          test ! -s conftest.err
2510        }; then :
2511   ac_retval=0
2512 else
2513   $as_echo "$as_me: failed program was:" >&5
2514 sed 's/^/| /' conftest.$ac_ext >&5
2515 
2516     ac_retval=1
2517 fi
2518   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519   as_fn_set_status $ac_retval
2520 
2521 } # ac_fn_cxx_try_cpp
2522 
2523 # ac_fn_c_try_link LINENO
2524 # -----------------------
2525 # Try to link conftest.$ac_ext, and return whether this succeeded.
2526 ac_fn_c_try_link ()
2527 {
2528   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529   rm -f conftest.$ac_objext conftest$ac_exeext
2530   if { { ac_try="$ac_link"
2531 case "(($ac_try" in
2532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2533   *) ac_try_echo=$ac_try;;
2534 esac
2535 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2536 $as_echo "$ac_try_echo"; } >&5
2537   (eval "$ac_link") 2>conftest.err
2538   ac_status=$?
2539   if test -s conftest.err; then
2540     grep -v '^ *+' conftest.err >conftest.er1
2541     cat conftest.er1 >&5
2542     mv -f conftest.er1 conftest.err
2543   fi
2544   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2545   test $ac_status = 0; } && {
2546          test -z "$ac_c_werror_flag" ||
2547          test ! -s conftest.err
2548        } && test -s conftest$ac_exeext && {
2549          test "$cross_compiling" = yes ||
2550          test -x conftest$ac_exeext
2551        }; then :
2552   ac_retval=0
2553 else
2554   $as_echo "$as_me: failed program was:" >&5
2555 sed 's/^/| /' conftest.$ac_ext >&5
2556 
2557         ac_retval=1
2558 fi
2559   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2560   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2561   # interfere with the next link command; also delete a directory that is
2562   # left behind by Apple's compiler.  We do this before executing the actions.
2563   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2564   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2565   as_fn_set_status $ac_retval
2566 
2567 } # ac_fn_c_try_link
2568 
2569 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2570 # ---------------------------------------------------------
2571 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2572 # the include files in INCLUDES and setting the cache variable VAR
2573 # accordingly.
2574 ac_fn_cxx_check_header_mongrel ()
2575 {
2576   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2577   if eval \${$3+:} false; then :
2578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2579 $as_echo_n "checking for $2... " >&6; }
2580 if eval \${$3+:} false; then :
2581   $as_echo_n "(cached) " >&6
2582 fi
2583 eval ac_res=\$$3
2584                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2585 $as_echo "$ac_res" >&6; }
2586 else
2587   # Is the header compilable?
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2589 $as_echo_n "checking $2 usability... " >&6; }
2590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591 /* end confdefs.h.  */
2592 $4
2593 #include <$2>
2594 _ACEOF
2595 if ac_fn_cxx_try_compile "$LINENO"; then :
2596   ac_header_compiler=yes
2597 else
2598   ac_header_compiler=no
2599 fi
2600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2602 $as_echo "$ac_header_compiler" >&6; }
2603 
2604 # Is the header present?
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2606 $as_echo_n "checking $2 presence... " >&6; }
2607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608 /* end confdefs.h.  */
2609 #include <$2>
2610 _ACEOF
2611 if ac_fn_cxx_try_cpp "$LINENO"; then :
2612   ac_header_preproc=yes
2613 else
2614   ac_header_preproc=no
2615 fi
2616 rm -f conftest.err conftest.i conftest.$ac_ext
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2618 $as_echo "$ac_header_preproc" >&6; }
2619 
2620 # So?  What about this header?
2621 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2622   yes:no: )
2623     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2624 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2625     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2626 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2627     ;;
2628   no:yes:* )
2629     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2630 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2631     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2632 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2633     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2634 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2635     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2636 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2637     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2638 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2639 ( $as_echo "## ----------------------------------------- ##
2640 ## Report this to build-dev@openjdk.java.net ##
2641 ## ----------------------------------------- ##"
2642      ) | sed "s/^/$as_me: WARNING:     /" >&2
2643     ;;
2644 esac
2645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2646 $as_echo_n "checking for $2... " >&6; }
2647 if eval \${$3+:} false; then :
2648   $as_echo_n "(cached) " >&6
2649 else
2650   eval "$3=\$ac_header_compiler"
2651 fi
2652 eval ac_res=\$$3
2653                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2654 $as_echo "$ac_res" >&6; }
2655 fi
2656   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2657 
2658 } # ac_fn_cxx_check_header_mongrel
2659 
2660 # ac_fn_cxx_try_run LINENO
2661 # ------------------------
2662 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2663 # that executables *can* be run.
2664 ac_fn_cxx_try_run ()
2665 {
2666   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2667   if { { ac_try="$ac_link"
2668 case "(($ac_try" in
2669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2670   *) ac_try_echo=$ac_try;;
2671 esac
2672 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2673 $as_echo "$ac_try_echo"; } >&5
2674   (eval "$ac_link") 2>&5
2675   ac_status=$?
2676   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2677   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2678   { { case "(($ac_try" in
2679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2680   *) ac_try_echo=$ac_try;;
2681 esac
2682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2683 $as_echo "$ac_try_echo"; } >&5
2684   (eval "$ac_try") 2>&5
2685   ac_status=$?
2686   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2687   test $ac_status = 0; }; }; then :
2688   ac_retval=0
2689 else
2690   $as_echo "$as_me: program exited with status $ac_status" >&5
2691        $as_echo "$as_me: failed program was:" >&5
2692 sed 's/^/| /' conftest.$ac_ext >&5
2693 
2694        ac_retval=$ac_status
2695 fi
2696   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2697   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2698   as_fn_set_status $ac_retval
2699 
2700 } # ac_fn_cxx_try_run
2701 
2702 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2703 # ---------------------------------------------------------
2704 # Tests whether HEADER exists and can be compiled using the include files in
2705 # INCLUDES, setting the cache variable VAR accordingly.
2706 ac_fn_cxx_check_header_compile ()
2707 {
2708   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2710 $as_echo_n "checking for $2... " >&6; }
2711 if eval \${$3+:} false; then :
2712   $as_echo_n "(cached) " >&6
2713 else
2714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2715 /* end confdefs.h.  */
2716 $4
2717 #include <$2>
2718 _ACEOF
2719 if ac_fn_cxx_try_compile "$LINENO"; then :
2720   eval "$3=yes"
2721 else
2722   eval "$3=no"
2723 fi
2724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2725 fi
2726 eval ac_res=\$$3
2727                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2728 $as_echo "$ac_res" >&6; }
2729   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730 
2731 } # ac_fn_cxx_check_header_compile
2732 
2733 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2734 # ----------------------------------------------
2735 # Tries to find the compile-time value of EXPR in a program that includes
2736 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2737 # computed
2738 ac_fn_cxx_compute_int ()
2739 {
2740   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2741   if test "$cross_compiling" = yes; then
2742     # Depending upon the size, compute the lo and hi bounds.
2743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744 /* end confdefs.h.  */
2745 $4
2746 int
2747 main ()
2748 {
2749 static int test_array [1 - 2 * !(($2) >= 0)];
2750 test_array [0] = 0;
2751 return test_array [0];
2752 
2753   ;
2754   return 0;
2755 }
2756 _ACEOF
2757 if ac_fn_cxx_try_compile "$LINENO"; then :
2758   ac_lo=0 ac_mid=0
2759   while :; do
2760     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2761 /* end confdefs.h.  */
2762 $4
2763 int
2764 main ()
2765 {
2766 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2767 test_array [0] = 0;
2768 return test_array [0];
2769 
2770   ;
2771   return 0;
2772 }
2773 _ACEOF
2774 if ac_fn_cxx_try_compile "$LINENO"; then :
2775   ac_hi=$ac_mid; break
2776 else
2777   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2778                         if test $ac_lo -le $ac_mid; then
2779                           ac_lo= ac_hi=
2780                           break
2781                         fi
2782                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2783 fi
2784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2785   done
2786 else
2787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2788 /* end confdefs.h.  */
2789 $4
2790 int
2791 main ()
2792 {
2793 static int test_array [1 - 2 * !(($2) < 0)];
2794 test_array [0] = 0;
2795 return test_array [0];
2796 
2797   ;
2798   return 0;
2799 }
2800 _ACEOF
2801 if ac_fn_cxx_try_compile "$LINENO"; then :
2802   ac_hi=-1 ac_mid=-1
2803   while :; do
2804     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805 /* end confdefs.h.  */
2806 $4
2807 int
2808 main ()
2809 {
2810 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2811 test_array [0] = 0;
2812 return test_array [0];
2813 
2814   ;
2815   return 0;
2816 }
2817 _ACEOF
2818 if ac_fn_cxx_try_compile "$LINENO"; then :
2819   ac_lo=$ac_mid; break
2820 else
2821   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2822                         if test $ac_mid -le $ac_hi; then
2823                           ac_lo= ac_hi=
2824                           break
2825                         fi
2826                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2827 fi
2828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2829   done
2830 else
2831   ac_lo= ac_hi=
2832 fi
2833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2834 fi
2835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2836 # Binary search between lo and hi bounds.
2837 while test "x$ac_lo" != "x$ac_hi"; do
2838   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h.  */
2841 $4
2842 int
2843 main ()
2844 {
2845 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2846 test_array [0] = 0;
2847 return test_array [0];
2848 
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 if ac_fn_cxx_try_compile "$LINENO"; then :
2854   ac_hi=$ac_mid
2855 else
2856   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2857 fi
2858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2859 done
2860 case $ac_lo in #((
2861 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2862 '') ac_retval=1 ;;
2863 esac
2864   else
2865     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866 /* end confdefs.h.  */
2867 $4
2868 static long int longval () { return $2; }
2869 static unsigned long int ulongval () { return $2; }
2870 #include <stdio.h>
2871 #include <stdlib.h>
2872 int
2873 main ()
2874 {
2875 
2876   FILE *f = fopen ("conftest.val", "w");
2877   if (! f)
2878     return 1;
2879   if (($2) < 0)
2880     {
2881       long int i = longval ();
2882       if (i != ($2))
2883         return 1;
2884       fprintf (f, "%ld", i);
2885     }
2886   else
2887     {
2888       unsigned long int i = ulongval ();
2889       if (i != ($2))
2890         return 1;
2891       fprintf (f, "%lu", i);
2892     }
2893   /* Do not output a trailing newline, as this causes \r\n confusion
2894      on some platforms.  */
2895   return ferror (f) || fclose (f) != 0;
2896 
2897   ;
2898   return 0;
2899 }
2900 _ACEOF
2901 if ac_fn_cxx_try_run "$LINENO"; then :
2902   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2903 else
2904   ac_retval=1
2905 fi
2906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2907   conftest.$ac_objext conftest.beam conftest.$ac_ext
2908 rm -f conftest.val
2909 
2910   fi
2911   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2912   as_fn_set_status $ac_retval
2913 
2914 } # ac_fn_cxx_compute_int
2915 
2916 # ac_fn_cxx_try_link LINENO
2917 # -------------------------
2918 # Try to link conftest.$ac_ext, and return whether this succeeded.
2919 ac_fn_cxx_try_link ()
2920 {
2921   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2922   rm -f conftest.$ac_objext conftest$ac_exeext
2923   if { { ac_try="$ac_link"
2924 case "(($ac_try" in
2925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2926   *) ac_try_echo=$ac_try;;
2927 esac
2928 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2929 $as_echo "$ac_try_echo"; } >&5
2930   (eval "$ac_link") 2>conftest.err
2931   ac_status=$?
2932   if test -s conftest.err; then
2933     grep -v '^ *+' conftest.err >conftest.er1
2934     cat conftest.er1 >&5
2935     mv -f conftest.er1 conftest.err
2936   fi
2937   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2938   test $ac_status = 0; } && {
2939          test -z "$ac_cxx_werror_flag" ||
2940          test ! -s conftest.err
2941        } && test -s conftest$ac_exeext && {
2942          test "$cross_compiling" = yes ||
2943          test -x conftest$ac_exeext
2944        }; then :
2945   ac_retval=0
2946 else
2947   $as_echo "$as_me: failed program was:" >&5
2948 sed 's/^/| /' conftest.$ac_ext >&5
2949 
2950         ac_retval=1
2951 fi
2952   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2953   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2954   # interfere with the next link command; also delete a directory that is
2955   # left behind by Apple's compiler.  We do this before executing the actions.
2956   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2957   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2958   as_fn_set_status $ac_retval
2959 
2960 } # ac_fn_cxx_try_link
2961 
2962 # ac_fn_cxx_check_func LINENO FUNC VAR
2963 # ------------------------------------
2964 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2965 ac_fn_cxx_check_func ()
2966 {
2967   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2969 $as_echo_n "checking for $2... " >&6; }
2970 if eval \${$3+:} false; then :
2971   $as_echo_n "(cached) " >&6
2972 else
2973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2974 /* end confdefs.h.  */
2975 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2976    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2977 #define $2 innocuous_$2
2978 
2979 /* System header to define __stub macros and hopefully few prototypes,
2980     which can conflict with char $2 (); below.
2981     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2982     <limits.h> exists even on freestanding compilers.  */
2983 
2984 #ifdef __STDC__
2985 # include <limits.h>
2986 #else
2987 # include <assert.h>
2988 #endif
2989 
2990 #undef $2
2991 
2992 /* Override any GCC internal prototype to avoid an error.
2993    Use char because int might match the return type of a GCC
2994    builtin and then its argument prototype would still apply.  */
2995 #ifdef __cplusplus
2996 extern "C"
2997 #endif
2998 char $2 ();
2999 /* The GNU C library defines this for functions which it implements
3000     to always fail with ENOSYS.  Some functions are actually named
3001     something starting with __ and the normal name is an alias.  */
3002 #if defined __stub_$2 || defined __stub___$2
3003 choke me
3004 #endif
3005 
3006 int
3007 main ()
3008 {
3009 return $2 ();
3010   ;
3011   return 0;
3012 }
3013 _ACEOF
3014 if ac_fn_cxx_try_link "$LINENO"; then :
3015   eval "$3=yes"
3016 else
3017   eval "$3=no"
3018 fi
3019 rm -f core conftest.err conftest.$ac_objext \
3020     conftest$ac_exeext conftest.$ac_ext
3021 fi
3022 eval ac_res=\$$3
3023                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3024 $as_echo "$ac_res" >&6; }
3025   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3026 
3027 } # ac_fn_cxx_check_func
3028 
3029 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3030 # -------------------------------------------------------
3031 # Tests whether HEADER exists and can be compiled using the include files in
3032 # INCLUDES, setting the cache variable VAR accordingly.
3033 ac_fn_c_check_header_compile ()
3034 {
3035   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3037 $as_echo_n "checking for $2... " >&6; }
3038 if eval \${$3+:} false; then :
3039   $as_echo_n "(cached) " >&6
3040 else
3041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3042 /* end confdefs.h.  */
3043 $4
3044 #include <$2>
3045 _ACEOF
3046 if ac_fn_c_try_compile "$LINENO"; then :
3047   eval "$3=yes"
3048 else
3049   eval "$3=no"
3050 fi
3051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052 fi
3053 eval ac_res=\$$3
3054                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3055 $as_echo "$ac_res" >&6; }
3056   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3057 
3058 } # ac_fn_c_check_header_compile
3059 cat >config.log <<_ACEOF
3060 This file contains any messages produced by compilers while
3061 running configure, to aid debugging if configure makes a mistake.
3062 
3063 It was created by OpenJDK $as_me jdk9, which was
3064 generated by GNU Autoconf 2.69.  Invocation command line was
3065 
3066   $ $0 $@
3067 
3068 _ACEOF
3069 exec 5>>config.log
3070 {
3071 cat <<_ASUNAME
3072 ## --------- ##
3073 ## Platform. ##
3074 ## --------- ##
3075 
3076 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3077 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3078 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3079 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3080 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3081 
3082 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3083 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3084 
3085 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3086 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3087 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3088 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3089 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3090 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3091 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3092 
3093 _ASUNAME
3094 
3095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3096 for as_dir in $PATH
3097 do
3098   IFS=$as_save_IFS
3099   test -z "$as_dir" && as_dir=.
3100     $as_echo "PATH: $as_dir"
3101   done
3102 IFS=$as_save_IFS
3103 
3104 } >&5
3105 
3106 cat >&5 <<_ACEOF
3107 
3108 
3109 ## ----------- ##
3110 ## Core tests. ##
3111 ## ----------- ##
3112 
3113 _ACEOF
3114 
3115 
3116 # Keep a trace of the command line.
3117 # Strip out --no-create and --no-recursion so they do not pile up.
3118 # Strip out --silent because we don't want to record it for future runs.
3119 # Also quote any args containing shell meta-characters.
3120 # Make two passes to allow for proper duplicate-argument suppression.
3121 ac_configure_args=
3122 ac_configure_args0=
3123 ac_configure_args1=
3124 ac_must_keep_next=false
3125 for ac_pass in 1 2
3126 do
3127   for ac_arg
3128   do
3129     case $ac_arg in
3130     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3131     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3132     | -silent | --silent | --silen | --sile | --sil)
3133       continue ;;
3134     *\'*)
3135       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3136     esac
3137     case $ac_pass in
3138     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3139     2)
3140       as_fn_append ac_configure_args1 " '$ac_arg'"
3141       if test $ac_must_keep_next = true; then
3142         ac_must_keep_next=false # Got value, back to normal.
3143       else
3144         case $ac_arg in
3145           *=* | --config-cache | -C | -disable-* | --disable-* \
3146           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3147           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3148           | -with-* | --with-* | -without-* | --without-* | --x)
3149             case "$ac_configure_args0 " in
3150               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3151             esac
3152             ;;
3153           -* ) ac_must_keep_next=true ;;
3154         esac
3155       fi
3156       as_fn_append ac_configure_args " '$ac_arg'"
3157       ;;
3158     esac
3159   done
3160 done
3161 { ac_configure_args0=; unset ac_configure_args0;}
3162 { ac_configure_args1=; unset ac_configure_args1;}
3163 
3164 # When interrupted or exit'd, cleanup temporary files, and complete
3165 # config.log.  We remove comments because anyway the quotes in there
3166 # would cause problems or look ugly.
3167 # WARNING: Use '\'' to represent an apostrophe within the trap.
3168 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3169 trap 'exit_status=$?
3170   # Save into config.log some information that might help in debugging.
3171   {
3172     echo
3173 
3174     $as_echo "## ---------------- ##
3175 ## Cache variables. ##
3176 ## ---------------- ##"
3177     echo
3178     # The following way of writing the cache mishandles newlines in values,
3179 (
3180   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3181     eval ac_val=\$$ac_var
3182     case $ac_val in #(
3183     *${as_nl}*)
3184       case $ac_var in #(
3185       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3186 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3187       esac
3188       case $ac_var in #(
3189       _ | IFS | as_nl) ;; #(
3190       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3191       *) { eval $ac_var=; unset $ac_var;} ;;
3192       esac ;;
3193     esac
3194   done
3195   (set) 2>&1 |
3196     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3197     *${as_nl}ac_space=\ *)
3198       sed -n \
3199         "s/'\''/'\''\\\\'\'''\''/g;
3200           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3201       ;; #(
3202     *)
3203       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3204       ;;
3205     esac |
3206     sort
3207 )
3208     echo
3209 
3210     $as_echo "## ----------------- ##
3211 ## Output variables. ##
3212 ## ----------------- ##"
3213     echo
3214     for ac_var in $ac_subst_vars
3215     do
3216       eval ac_val=\$$ac_var
3217       case $ac_val in
3218       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3219       esac
3220       $as_echo "$ac_var='\''$ac_val'\''"
3221     done | sort
3222     echo
3223 
3224     if test -n "$ac_subst_files"; then
3225       $as_echo "## ------------------- ##
3226 ## File substitutions. ##
3227 ## ------------------- ##"
3228       echo
3229       for ac_var in $ac_subst_files
3230       do
3231         eval ac_val=\$$ac_var
3232         case $ac_val in
3233         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3234         esac
3235         $as_echo "$ac_var='\''$ac_val'\''"
3236       done | sort
3237       echo
3238     fi
3239 
3240     if test -s confdefs.h; then
3241       $as_echo "## ----------- ##
3242 ## confdefs.h. ##
3243 ## ----------- ##"
3244       echo
3245       cat confdefs.h
3246       echo
3247     fi
3248     test "$ac_signal" != 0 &&
3249       $as_echo "$as_me: caught signal $ac_signal"
3250     $as_echo "$as_me: exit $exit_status"
3251   } >&5
3252   rm -f core *.core core.conftest.* &&
3253     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3254     exit $exit_status
3255 ' 0
3256 for ac_signal in 1 2 13 15; do
3257   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3258 done
3259 ac_signal=0
3260 
3261 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3262 rm -f -r conftest* confdefs.h
3263 
3264 $as_echo "/* confdefs.h */" > confdefs.h
3265 
3266 # Predefined preprocessor variables.
3267 
3268 cat >>confdefs.h <<_ACEOF
3269 #define PACKAGE_NAME "$PACKAGE_NAME"
3270 _ACEOF
3271 
3272 cat >>confdefs.h <<_ACEOF
3273 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3274 _ACEOF
3275 
3276 cat >>confdefs.h <<_ACEOF
3277 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3278 _ACEOF
3279 
3280 cat >>confdefs.h <<_ACEOF
3281 #define PACKAGE_STRING "$PACKAGE_STRING"
3282 _ACEOF
3283 
3284 cat >>confdefs.h <<_ACEOF
3285 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3286 _ACEOF
3287 
3288 cat >>confdefs.h <<_ACEOF
3289 #define PACKAGE_URL "$PACKAGE_URL"
3290 _ACEOF
3291 
3292 
3293 # Let the site file select an alternate cache file if it wants to.
3294 # Prefer an explicitly selected file to automatically selected ones.
3295 ac_site_file1=NONE
3296 ac_site_file2=NONE
3297 if test -n "$CONFIG_SITE"; then
3298   # We do not want a PATH search for config.site.
3299   case $CONFIG_SITE in #((
3300     -*)  ac_site_file1=./$CONFIG_SITE;;
3301     */*) ac_site_file1=$CONFIG_SITE;;
3302     *)   ac_site_file1=./$CONFIG_SITE;;
3303   esac
3304 elif test "x$prefix" != xNONE; then
3305   ac_site_file1=$prefix/share/config.site
3306   ac_site_file2=$prefix/etc/config.site
3307 else
3308   ac_site_file1=$ac_default_prefix/share/config.site
3309   ac_site_file2=$ac_default_prefix/etc/config.site
3310 fi
3311 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3312 do
3313   test "x$ac_site_file" = xNONE && continue
3314   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3315     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3316 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3317     sed 's/^/| /' "$ac_site_file" >&5
3318     . "$ac_site_file" \
3319       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3321 as_fn_error $? "failed to load site script $ac_site_file
3322 See \`config.log' for more details" "$LINENO" 5; }
3323   fi
3324 done
3325 
3326 if test -r "$cache_file"; then
3327   # Some versions of bash will fail to source /dev/null (special files
3328   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3329   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3330     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3331 $as_echo "$as_me: loading cache $cache_file" >&6;}
3332     case $cache_file in
3333       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3334       *)                      . "./$cache_file";;
3335     esac
3336   fi
3337 else
3338   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3339 $as_echo "$as_me: creating cache $cache_file" >&6;}
3340   >$cache_file
3341 fi
3342 
3343 # Check that the precious variables saved in the cache have kept the same
3344 # value.
3345 ac_cache_corrupted=false
3346 for ac_var in $ac_precious_vars; do
3347   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3348   eval ac_new_set=\$ac_env_${ac_var}_set
3349   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3350   eval ac_new_val=\$ac_env_${ac_var}_value
3351   case $ac_old_set,$ac_new_set in
3352     set,)
3353       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3354 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3355       ac_cache_corrupted=: ;;
3356     ,set)
3357       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3358 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3359       ac_cache_corrupted=: ;;
3360     ,);;
3361     *)
3362       if test "x$ac_old_val" != "x$ac_new_val"; then
3363         # differences in whitespace do not lead to failure.
3364         ac_old_val_w=`echo x $ac_old_val`
3365         ac_new_val_w=`echo x $ac_new_val`
3366         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3367           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3368 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3369           ac_cache_corrupted=:
3370         else
3371           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3372 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3373           eval $ac_var=\$ac_old_val
3374         fi
3375         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3376 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3377         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3378 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3379       fi;;
3380   esac
3381   # Pass precious variables to config.status.
3382   if test "$ac_new_set" = set; then
3383     case $ac_new_val in
3384     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3385     *) ac_arg=$ac_var=$ac_new_val ;;
3386     esac
3387     case " $ac_configure_args " in
3388       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3389       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3390     esac
3391   fi
3392 done
3393 if $ac_cache_corrupted; then
3394   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3396   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3397 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3398   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3399 fi
3400 ## -------------------- ##
3401 ## Main body of script. ##
3402 ## -------------------- ##
3403 
3404 ac_ext=c
3405 ac_cpp='$CPP $CPPFLAGS'
3406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3409 
3410 
3411 
3412 ac_aux_dir=
3413 for ac_dir in $TOPDIR/make/autoconf/build-aux "$srcdir"/$TOPDIR/make/autoconf/build-aux; do
3414   if test -f "$ac_dir/install-sh"; then
3415     ac_aux_dir=$ac_dir
3416     ac_install_sh="$ac_aux_dir/install-sh -c"
3417     break
3418   elif test -f "$ac_dir/install.sh"; then
3419     ac_aux_dir=$ac_dir
3420     ac_install_sh="$ac_aux_dir/install.sh -c"
3421     break
3422   elif test -f "$ac_dir/shtool"; then
3423     ac_aux_dir=$ac_dir
3424     ac_install_sh="$ac_aux_dir/shtool install -c"
3425     break
3426   fi
3427 done
3428 if test -z "$ac_aux_dir"; then
3429   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
3430 fi
3431 
3432 # These three variables are undocumented and unsupported,
3433 # and are intended to be withdrawn in a future Autoconf release.
3434 # They can cause serious problems if a builder's source tree is in a directory
3435 # whose full name contains unusual characters.
3436 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3437 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3438 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3439 
3440 
3441 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3442 
3443 #
3444 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3445 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3446 #
3447 # This code is free software; you can redistribute it and/or modify it
3448 # under the terms of the GNU General Public License version 2 only, as
3449 # published by the Free Software Foundation.  Oracle designates this
3450 # particular file as subject to the "Classpath" exception as provided
3451 # by Oracle in the LICENSE file that accompanied this code.
3452 #
3453 # This code is distributed in the hope that it will be useful, but WITHOUT
3454 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3455 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3456 # version 2 for more details (a copy is included in the LICENSE file that
3457 # accompanied this code).
3458 #
3459 # You should have received a copy of the GNU General Public License version
3460 # 2 along with this work; if not, write to the Free Software Foundation,
3461 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3462 #
3463 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3464 # or visit www.oracle.com if you need additional information or have any
3465 # questions.
3466 #
3467 
3468 #
3469 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3470 #
3471 # This program is free software; you can redistribute it and/or modify
3472 # it under the terms of the GNU General Public License as published by
3473 # the Free Software Foundation; either version 2 of the License, or
3474 # (at your option) any later version.
3475 #
3476 # This program is distributed in the hope that it will be useful, but
3477 # WITHOUT ANY WARRANTY; without even the implied warranty of
3478 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3479 # General Public License for more details.
3480 #
3481 # You should have received a copy of the GNU General Public License
3482 # along with this program; if not, write to the Free Software
3483 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3484 #
3485 # As a special exception to the GNU General Public License, if you
3486 # distribute this file as part of a program that contains a
3487 # configuration script generated by Autoconf, you may include it under
3488 # the same distribution terms that you use for the rest of that program.
3489 
3490 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3491 # ----------------------------------
3492 # PKG_PROG_PKG_CONFIG
3493 
3494 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3495 #
3496 # Check to see whether a particular set of modules exists.  Similar
3497 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3498 #
3499 #
3500 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3501 # this or PKG_CHECK_MODULES is called, or make sure to call
3502 # PKG_CHECK_EXISTS manually
3503 # --------------------------------------------------------------
3504 
3505 
3506 
3507 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3508 # ---------------------------------------------
3509 # _PKG_CONFIG
3510 
3511 # _PKG_SHORT_ERRORS_SUPPORTED
3512 # -----------------------------
3513 # _PKG_SHORT_ERRORS_SUPPORTED
3514 
3515 
3516 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3517 # [ACTION-IF-NOT-FOUND])
3518 #
3519 #
3520 # Note that if there is a possibility the first call to
3521 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3522 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3523 #
3524 #
3525 # --------------------------------------------------------------
3526 # PKG_CHECK_MODULES
3527 
3528 
3529 # Include these first...
3530 #
3531 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3532 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3533 #
3534 # This code is free software; you can redistribute it and/or modify it
3535 # under the terms of the GNU General Public License version 2 only, as
3536 # published by the Free Software Foundation.  Oracle designates this
3537 # particular file as subject to the "Classpath" exception as provided
3538 # by Oracle in the LICENSE file that accompanied this code.
3539 #
3540 # This code is distributed in the hope that it will be useful, but WITHOUT
3541 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3542 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3543 # version 2 for more details (a copy is included in the LICENSE file that
3544 # accompanied this code).
3545 #
3546 # You should have received a copy of the GNU General Public License version
3547 # 2 along with this work; if not, write to the Free Software Foundation,
3548 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3549 #
3550 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3551 # or visit www.oracle.com if you need additional information or have any
3552 # questions.
3553 #
3554 
3555 # Create a function/macro that takes a series of named arguments. The call is
3556 # similar to AC_DEFUN, but the setup of the function looks like this:
3557 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3558 # ... do something
3559 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3560 # ])
3561 # A star (*) in front of a named argument means that it is required and it's
3562 # presence will be verified. To pass e.g. the first value as a normal indexed
3563 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3564 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3565 # "ARG_FOO".
3566 #
3567 # The generated function can be called like this:
3568 # MYFUNC(FOO: [foo-val],
3569 #     BAR: [
3570 #         $ECHO hello world
3571 #     ])
3572 # Note that the argument value must start on the same line as the argument name.
3573 #
3574 # Argument 1: Name of the function to define
3575 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3576 # Argument 3: Argument array to treat as named, typically $@
3577 # Argument 4: The main function body
3578 
3579 
3580 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3581 # If so, then append $1 to $2 \
3582 # Also set JVM_ARG_OK to true/false depending on outcome.
3583 
3584 
3585 # Appends a string to a path variable, only adding the : when needed.
3586 
3587 
3588 # Prepends a string to a path variable, only adding the : when needed.
3589 
3590 
3591 # This will make sure the given variable points to a full and proper
3592 # path. This means:
3593 # 1) There will be no spaces in the path. On unix platforms,
3594 #    spaces in the path will result in an error. On Windows,
3595 #    the path will be rewritten using short-style to be space-free.
3596 # 2) The path will be absolute, and it will be in unix-style (on
3597 #     cygwin).
3598 # $1: The name of the variable to fix
3599 
3600 
3601 # This will make sure the given variable points to a executable
3602 # with a full and proper path. This means:
3603 # 1) There will be no spaces in the path. On unix platforms,
3604 #    spaces in the path will result in an error. On Windows,
3605 #    the path will be rewritten using short-style to be space-free.
3606 # 2) The path will be absolute, and it will be in unix-style (on
3607 #     cygwin).
3608 # Any arguments given to the executable is preserved.
3609 # If the input variable does not have a directory specification, then
3610 # it need to be in the PATH.
3611 # $1: The name of the variable to fix
3612 
3613 
3614 
3615 
3616 # Register a --with argument but mark it as deprecated
3617 # $1: The name of the with argument to deprecate, not including --with-
3618 
3619 
3620 # Register a --enable argument but mark it as deprecated
3621 # $1: The name of the with argument to deprecate, not including --enable-
3622 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3623 # $3: Messages to user.
3624 
3625 
3626 
3627 
3628 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3629 # $1: variable to check
3630 
3631 
3632 # Check that there are no unprocessed overridden variables left.
3633 # If so, they are an incorrect argument and we will exit with an error.
3634 
3635 
3636 # Setup a tool for the given variable. If correctly specified by the user,
3637 # use that value, otherwise search for the tool using the supplied code snippet.
3638 # $1: variable to set
3639 # $2: code snippet to call to look for the tool
3640 # $3: code snippet to call if variable was used to find tool
3641 
3642 
3643 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3644 # $1: variable to set
3645 # $2: executable name (or list of names) to look for
3646 # $3: [path]
3647 
3648 
3649 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3650 # $1: variable to set
3651 # $2: executable name (or list of names) to look for
3652 
3653 
3654 # Like BASIC_PATH_PROGS but fails if no tool was found.
3655 # $1: variable to set
3656 # $2: executable name (or list of names) to look for
3657 # $3: [path]
3658 
3659 
3660 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3661 # $1: variable to set
3662 # $2: autoconf macro to call to look for the special tool
3663 
3664 
3665 # Setup the most fundamental tools that relies on not much else to set up,
3666 # but is used by much of the early bootstrap code.
3667 
3668 
3669 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3670 
3671 
3672 # Evaluates platform specific overrides for devkit variables.
3673 # $1: Name of variable
3674 
3675 
3676 
3677 
3678 
3679 
3680 #%%% Simple tools %%%
3681 
3682 # Check if we have found a usable version of make
3683 # $1: the path to a potential make binary (or empty)
3684 # $2: the description on how we found this
3685 
3686 
3687 
3688 
3689 # Goes looking for a usable version of GNU make.
3690 
3691 
3692 
3693 
3694 
3695 
3696 
3697 
3698 
3699 
3700 # Check if build directory is on local disk. If not possible to determine,
3701 # we prefer to claim it's local.
3702 # Argument 1: directory to test
3703 # Argument 2: what to do if it is on local disk
3704 # Argument 3: what to do otherwise (remote disk or failure)
3705 
3706 
3707 # Check that source files have basic read permissions set. This might
3708 # not be the case in cygwin in certain conditions.
3709 
3710 
3711 
3712 
3713 # Check for support for specific options in bash
3714 
3715 
3716 ################################################################################
3717 #
3718 # Default make target
3719 #
3720 
3721 
3722 # Code to run after AC_OUTPUT
3723 
3724 
3725 #
3726 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3727 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3728 #
3729 # This code is free software; you can redistribute it and/or modify it
3730 # under the terms of the GNU General Public License version 2 only, as
3731 # published by the Free Software Foundation.  Oracle designates this
3732 # particular file as subject to the "Classpath" exception as provided
3733 # by Oracle in the LICENSE file that accompanied this code.
3734 #
3735 # This code is distributed in the hope that it will be useful, but WITHOUT
3736 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3737 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3738 # version 2 for more details (a copy is included in the LICENSE file that
3739 # accompanied this code).
3740 #
3741 # You should have received a copy of the GNU General Public License version
3742 # 2 along with this work; if not, write to the Free Software Foundation,
3743 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3744 #
3745 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3746 # or visit www.oracle.com if you need additional information or have any
3747 # questions.
3748 #
3749 
3750 
3751 
3752 
3753 
3754 # Helper function which possibly converts a path using DOS-style short mode.
3755 # If so, the updated path is stored in $new_path.
3756 # $1: The path to check
3757 
3758 
3759 # Helper function which possibly converts a path using DOS-style short mode.
3760 # If so, the updated path is stored in $new_path.
3761 # $1: The path to check
3762 
3763 
3764 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3765 # and could probably be heavily simplified. However, all changes in this
3766 # area tend to need lot of testing in different scenarios, and in lack of
3767 # proper unit testing, cleaning this up has not been deemed worth the effort
3768 # at the moment.
3769 
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 
3778 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3779 
3780 
3781 
3782 
3783 # ... then the rest
3784 #
3785 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3786 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3787 #
3788 # This code is free software; you can redistribute it and/or modify it
3789 # under the terms of the GNU General Public License version 2 only, as
3790 # published by the Free Software Foundation.  Oracle designates this
3791 # particular file as subject to the "Classpath" exception as provided
3792 # by Oracle in the LICENSE file that accompanied this code.
3793 #
3794 # This code is distributed in the hope that it will be useful, but WITHOUT
3795 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3796 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3797 # version 2 for more details (a copy is included in the LICENSE file that
3798 # accompanied this code).
3799 #
3800 # You should have received a copy of the GNU General Public License version
3801 # 2 along with this work; if not, write to the Free Software Foundation,
3802 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3803 #
3804 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3805 # or visit www.oracle.com if you need additional information or have any
3806 # questions.
3807 #
3808 
3809 ########################################################################
3810 # This file handles detection of the Boot JDK. The Boot JDK detection
3811 # process has been developed as a response to solve a complex real-world
3812 # problem. Initially, it was simple, but it has grown as platform after
3813 # platform, idiosyncracy after idiosyncracy has been supported.
3814 #
3815 # The basic idea is this:
3816 # 1) You need an acceptable *) JDK to use as a Boot JDK
3817 # 2) There are several ways to locate a JDK, that are mostly platform
3818 #    dependent **)
3819 # 3) You can have multiple JDKs installed
3820 # 4) If possible, configure should try to dig out an acceptable JDK
3821 #    automatically, without having to resort to command-line options
3822 #
3823 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3824 #     javac) and not a JRE, etc.
3825 #
3826 # **) On Windows we typically use a well-known path.
3827 #     On MacOSX we typically use the tool java_home.
3828 #     On Linux we typically find javac in the $PATH, and then follow a
3829 #     chain of symlinks that often ends up in a real JDK.
3830 #
3831 # This leads to the code where we check in different ways to locate a
3832 # JDK, and if one is found, check if it is acceptable. If not, we print
3833 # our reasons for rejecting it (useful when debugging non-working
3834 # configure situations) and continue checking the next one.
3835 ########################################################################
3836 
3837 # Execute the check given as argument, and verify the result
3838 # If the Boot JDK was previously found, do nothing
3839 # $1 A command line (typically autoconf macro) to execute
3840 
3841 
3842 # Test: Is bootjdk explicitly set by command line arguments?
3843 
3844 
3845 # Test: Is $JAVA_HOME set?
3846 
3847 
3848 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3849 
3850 
3851 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3852 # $1: Argument to the java_home binary (optional)
3853 
3854 
3855 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3856 
3857 
3858 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3859 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3860 # $1 = Path to directory containing jdk installations.
3861 # $2 = String to append to the found JDK directory to get the proper JDK home
3862 
3863 
3864 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3865 # environmental variable as base for where to look.
3866 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3867 
3868 
3869 # Test: Is there a JDK installed in default, well-known locations?
3870 
3871 
3872 # Check that a command-line tool in the Boot JDK is correct
3873 # $1 = name of variable to assign
3874 # $2 = name of binary
3875 
3876 
3877 ###############################################################################
3878 #
3879 # We need a Boot JDK to bootstrap the build.
3880 #
3881 
3882 
3883 
3884 
3885 
3886 # BUILD_JDK: the location of the latest JDK that can run
3887 #   on the host system and supports the target class file version
3888 #   generated in this JDK build.  This variable should only be
3889 #   used after the launchers are built.
3890 #
3891 
3892 # Execute the check given as argument, and verify the result.
3893 # If the JDK was previously found, do nothing.
3894 # $1 A command line (typically autoconf macro) to execute
3895 
3896 
3897 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3898 # is different than the host system doing the build (e.g. cross-compilation),
3899 # a special BUILD_JDK is built as part of the build process.  An external
3900 # prebuilt BUILD_JDK can also be supplied.
3901 
3902 
3903 #
3904 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3905 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3906 #
3907 # This code is free software; you can redistribute it and/or modify it
3908 # under the terms of the GNU General Public License version 2 only, as
3909 # published by the Free Software Foundation.  Oracle designates this
3910 # particular file as subject to the "Classpath" exception as provided
3911 # by Oracle in the LICENSE file that accompanied this code.
3912 #
3913 # This code is distributed in the hope that it will be useful, but WITHOUT
3914 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3915 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3916 # version 2 for more details (a copy is included in the LICENSE file that
3917 # accompanied this code).
3918 #
3919 # You should have received a copy of the GNU General Public License version
3920 # 2 along with this work; if not, write to the Free Software Foundation,
3921 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3922 #
3923 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3924 # or visit www.oracle.com if you need additional information or have any
3925 # questions.
3926 #
3927 
3928 
3929 
3930 
3931 
3932 
3933 
3934 
3935 
3936 
3937 
3938 
3939 
3940 
3941 
3942 
3943 
3944 ################################################################################
3945 #
3946 # Runs icecc-create-env once and prints the error if it fails
3947 #
3948 # $1: arguments to icecc-create-env
3949 # $2: log file
3950 #
3951 
3952 
3953 ################################################################################
3954 #
3955 # Optionally enable distributed compilation of native code using icecc/icecream
3956 #
3957 
3958 
3959 
3960 
3961 
3962 
3963 
3964 #
3965 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3966 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3967 #
3968 # This code is free software; you can redistribute it and/or modify it
3969 # under the terms of the GNU General Public License version 2 only, as
3970 # published by the Free Software Foundation.  Oracle designates this
3971 # particular file as subject to the "Classpath" exception as provided
3972 # by Oracle in the LICENSE file that accompanied this code.
3973 #
3974 # This code is distributed in the hope that it will be useful, but WITHOUT
3975 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3976 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3977 # version 2 for more details (a copy is included in the LICENSE file that
3978 # accompanied this code).
3979 #
3980 # You should have received a copy of the GNU General Public License version
3981 # 2 along with this work; if not, write to the Free Software Foundation,
3982 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3983 #
3984 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3985 # or visit www.oracle.com if you need additional information or have any
3986 # questions.
3987 #
3988 
3989 ################################################################################
3990 #
3991 # Setup ABI profile (for arm)
3992 #
3993 
3994 
3995 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3996 # corresponding configure arguments instead
3997 
3998 
3999 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4000 # that configure can use them while detecting compilers.
4001 # TOOLCHAIN_TYPE is available here.
4002 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4003 
4004 
4005 
4006 
4007 
4008 
4009 # Documentation on common flags used for solstudio in HIGHEST.
4010 #
4011 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4012 #          done with care, there are some assumptions below that need to
4013 #          be understood about the use of pointers, and IEEE behavior.
4014 #
4015 # -fns: Use non-standard floating point mode (not IEEE 754)
4016 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4017 # -fsingle: Use single precision floating point with 'float'
4018 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4019 #   (Source with excessing pointer casting and data access with mixed
4020 #    pointer types are not recommended)
4021 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4022 #   (If you expect perfect errno behavior, do not use this)
4023 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4024 # -xrestrict: Pointer parameters to functions do not overlap
4025 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4026 #    If you pass in multiple pointers to the same data, do not use this)
4027 # -xlibmil: Inline some library routines
4028 #   (If you expect perfect errno behavior, do not use this)
4029 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4030 #   (If you expect perfect errno behavior, do not use this)
4031 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4032 
4033     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4034     # Bug?
4035     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4036     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4037     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4038     #fi
4039 
4040 
4041 
4042 
4043 
4044 
4045 ################################################################################
4046 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4047 #      conditionals against.
4048 # $2 - Optional prefix for each variable defined.
4049 
4050 
4051 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4052 #                                  IF_FALSE: [RUN-IF-FALSE])
4053 # ------------------------------------------------------------
4054 # Check that the C compiler supports an argument
4055 
4056 
4057 
4058 
4059 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060 #                                    IF_FALSE: [RUN-IF-FALSE])
4061 # ------------------------------------------------------------
4062 # Check that the C++ compiler supports an argument
4063 
4064 
4065 
4066 
4067 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068 #                                IF_FALSE: [RUN-IF-FALSE])
4069 # ------------------------------------------------------------
4070 # Check that the C and C++ compilers support an argument
4071 
4072 
4073 
4074 
4075 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076 #                                   IF_FALSE: [RUN-IF-FALSE])
4077 # ------------------------------------------------------------
4078 # Check that the linker support an argument
4079 
4080 
4081 
4082 
4083 
4084 
4085 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4086 # Arguments:
4087 # $1 - Optional prefix for each variable defined.
4088 
4089 
4090 #
4091 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4092 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4093 #
4094 # This code is free software; you can redistribute it and/or modify it
4095 # under the terms of the GNU General Public License version 2 only, as
4096 # published by the Free Software Foundation.  Oracle designates this
4097 # particular file as subject to the "Classpath" exception as provided
4098 # by Oracle in the LICENSE file that accompanied this code.
4099 #
4100 # This code is distributed in the hope that it will be useful, but WITHOUT
4101 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4102 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4103 # version 2 for more details (a copy is included in the LICENSE file that
4104 # accompanied this code).
4105 #
4106 # You should have received a copy of the GNU General Public License version
4107 # 2 along with this work; if not, write to the Free Software Foundation,
4108 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4109 #
4110 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4111 # or visit www.oracle.com if you need additional information or have any
4112 # questions.
4113 #
4114 
4115 
4116 
4117 
4118 
4119 cygwin_help() {
4120   case $1 in
4121     unzip)
4122       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4123       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4124       ;;
4125     zip)
4126       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4127       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4128       ;;
4129     make)
4130       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4131       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132       ;;
4133     freetype)
4134       HELP_MSG="
4135 The freetype library can now be build during the configure process.
4136 Download the freetype sources and unpack them into an arbitrary directory:
4137 
4138 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4139 tar -xzf freetype-2.5.3.tar.gz
4140 
4141 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4142 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4143 builds or into '<freetype_src>/lib32' for 32-bit builds.
4144 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4145 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4146 
4147 Alternatively you can unpack the sources like this to use the default directory:
4148 
4149 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4150       ;;
4151   esac
4152 }
4153 
4154 msys_help() {
4155   PKGHANDLER_COMMAND=""
4156 }
4157 
4158 apt_help() {
4159   case $1 in
4160     reduced)
4161       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4162     devkit)
4163       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4164     openjdk)
4165       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4166     alsa)
4167       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4168     cups)
4169       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4170     freetype)
4171       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4172     ffi)
4173       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4174     x11)
4175       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4176     ccache)
4177       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4178     dtrace)
4179       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4180   esac
4181 }
4182 
4183 yum_help() {
4184   case $1 in
4185     devkit)
4186       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4187     openjdk)
4188       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4189     alsa)
4190       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4191     cups)
4192       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4193     freetype)
4194       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4195     x11)
4196       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4197     ccache)
4198       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4199   esac
4200 }
4201 
4202 brew_help() {
4203   case $1 in
4204     openjdk)
4205       PKGHANDLER_COMMAND="brew cask install java" ;;
4206     freetype)
4207       PKGHANDLER_COMMAND="brew install freetype" ;;
4208     ccache)
4209       PKGHANDLER_COMMAND="brew install ccache" ;;
4210   esac
4211 }
4212 
4213 port_help() {
4214   PKGHANDLER_COMMAND=""
4215 }
4216 
4217 pkgutil_help() {
4218   PKGHANDLER_COMMAND=""
4219 }
4220 
4221 pkgadd_help() {
4222   PKGHANDLER_COMMAND=""
4223 }
4224 
4225 # This function will check if we're called from the "configure" wrapper while
4226 # printing --help. If so, we will print out additional information that can
4227 # only be extracted within the autoconf script, and then exit. This must be
4228 # called at the very beginning in configure.ac.
4229 
4230 
4231 
4232 
4233 
4234 
4235 #
4236 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4237 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4238 #
4239 # This code is free software; you can redistribute it and/or modify it
4240 # under the terms of the GNU General Public License version 2 only, as
4241 # published by the Free Software Foundation.  Oracle designates this
4242 # particular file as subject to the "Classpath" exception as provided
4243 # by Oracle in the LICENSE file that accompanied this code.
4244 #
4245 # This code is distributed in the hope that it will be useful, but WITHOUT
4246 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4247 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4248 # version 2 for more details (a copy is included in the LICENSE file that
4249 # accompanied this code).
4250 #
4251 # You should have received a copy of the GNU General Public License version
4252 # 2 along with this work; if not, write to the Free Software Foundation,
4253 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4254 #
4255 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4256 # or visit www.oracle.com if you need additional information or have any
4257 # questions.
4258 #
4259 
4260 # All valid JVM features, regardless of platform
4261 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4262     graal vm-structs jni-check services management all-gcs nmt cds \
4263     static-build link-time-opt aot"
4264 
4265 # All valid JVM variants
4266 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4267 
4268 ###############################################################################
4269 # Check if the specified JVM variant should be built. To be used in shell if
4270 # constructs, like this:
4271 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4272 #
4273 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4274 
4275 # Definition kept in one line to allow inlining in if statements.
4276 # Additional [] needed to keep m4 from mangling shell constructs.
4277 
4278 
4279 ###############################################################################
4280 # Check if the specified JVM features are explicitly enabled. To be used in
4281 # shell if constructs, like this:
4282 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4283 #
4284 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4285 
4286 # Definition kept in one line to allow inlining in if statements.
4287 # Additional [] needed to keep m4 from mangling shell constructs.
4288 
4289 
4290 ###############################################################################
4291 # Check which variants of the JVM that we want to build. Available variants are:
4292 #   server: normal interpreter, and a tiered C1/C2 compiler
4293 #   client: normal interpreter, and C1 (no C2 compiler)
4294 #   minimal: reduced form of client with optional features stripped out
4295 #   core: normal interpreter only, no compiler
4296 #   zero: C++ based interpreter only, no compiler
4297 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4298 #   custom: baseline JVM with no default features
4299 #
4300 
4301 
4302 ###############################################################################
4303 # Check if dtrace should be enabled and has all prerequisites present.
4304 #
4305 
4306 
4307 ################################################################################
4308 # Check if AOT should be enabled
4309 #
4310 
4311 
4312 ################################################################################
4313 # Allow to disable CDS
4314 #
4315 
4316 
4317 ###############################################################################
4318 # Set up all JVM features for each JVM variant.
4319 #
4320 
4321 
4322 ###############################################################################
4323 # Validate JVM features once all setup is complete, including custom setup.
4324 #
4325 
4326 
4327 ################################################################################
4328 #
4329 # Specify which sources will be used to build the 64-bit ARM port
4330 #
4331 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4332 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4333 #
4334 
4335 
4336 
4337 ################################################################################
4338 # Check if gtest should be built
4339 #
4340 
4341 
4342 #
4343 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4344 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4345 #
4346 # This code is free software; you can redistribute it and/or modify it
4347 # under the terms of the GNU General Public License version 2 only, as
4348 # published by the Free Software Foundation.  Oracle designates this
4349 # particular file as subject to the "Classpath" exception as provided
4350 # by Oracle in the LICENSE file that accompanied this code.
4351 #
4352 # This code is distributed in the hope that it will be useful, but WITHOUT
4353 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4354 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4355 # version 2 for more details (a copy is included in the LICENSE file that
4356 # accompanied this code).
4357 #
4358 # You should have received a copy of the GNU General Public License version
4359 # 2 along with this work; if not, write to the Free Software Foundation,
4360 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4361 #
4362 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4363 # or visit www.oracle.com if you need additional information or have any
4364 # questions.
4365 #
4366 
4367 ###############################################################################
4368 # Check which variant of the JDK that we want to build.
4369 # Currently we have:
4370 #    normal:   standard edition
4371 # but the custom make system may add other variants
4372 #
4373 # Effectively the JDK variant gives a name to a specific set of
4374 # modules to compile into the JDK.
4375 
4376 
4377 ###############################################################################
4378 # Set the debug level
4379 #    release: no debug information, all optimizations, no asserts.
4380 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4381 #    fastdebug: debug information (-g), all optimizations, all asserts
4382 #    slowdebug: debug information (-g), no optimizations, all asserts
4383 
4384 
4385 ###############################################################################
4386 #
4387 # Should we build only OpenJDK even if closed sources are present?
4388 #
4389 
4390 
4391 
4392 
4393 ###############################################################################
4394 #
4395 # Enable or disable the elliptic curve crypto implementation
4396 #
4397 
4398 
4399 
4400 
4401 ################################################################################
4402 #
4403 # Gcov coverage data for hotspot
4404 #
4405 
4406 
4407 ################################################################################
4408 #
4409 # Static build support.  When enabled will generate static
4410 # libraries instead of shared libraries for all JDK libs.
4411 #
4412 
4413 
4414 ################################################################################
4415 #
4416 # jlink options.
4417 # We always keep packaged modules in JDK image.
4418 #
4419 
4420 
4421 ################################################################################
4422 #
4423 # Check if building of the jtreg failure handler should be enabled.
4424 #
4425 
4426 
4427 ################################################################################
4428 #
4429 # Enable or disable generation of the classlist at build time
4430 #
4431 
4432 
4433 #
4434 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4435 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4436 #
4437 # This code is free software; you can redistribute it and/or modify it
4438 # under the terms of the GNU General Public License version 2 only, as
4439 # published by the Free Software Foundation.  Oracle designates this
4440 # particular file as subject to the "Classpath" exception as provided
4441 # by Oracle in the LICENSE file that accompanied this code.
4442 #
4443 # This code is distributed in the hope that it will be useful, but WITHOUT
4444 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4445 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4446 # version 2 for more details (a copy is included in the LICENSE file that
4447 # accompanied this code).
4448 #
4449 # You should have received a copy of the GNU General Public License version
4450 # 2 along with this work; if not, write to the Free Software Foundation,
4451 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4452 #
4453 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4454 # or visit www.oracle.com if you need additional information or have any
4455 # questions.
4456 #
4457 
4458 ###############################################################################
4459 #
4460 # Setup version numbers
4461 #
4462 
4463 # Verify that a given string represents a valid version number, and assign it
4464 # to a variable.
4465 
4466 # Argument 1: the variable to assign to
4467 # Argument 2: the value given by the user
4468 
4469 
4470 
4471 
4472 #
4473 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475 #
4476 # This code is free software; you can redistribute it and/or modify it
4477 # under the terms of the GNU General Public License version 2 only, as
4478 # published by the Free Software Foundation.  Oracle designates this
4479 # particular file as subject to the "Classpath" exception as provided
4480 # by Oracle in the LICENSE file that accompanied this code.
4481 #
4482 # This code is distributed in the hope that it will be useful, but WITHOUT
4483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485 # version 2 for more details (a copy is included in the LICENSE file that
4486 # accompanied this code).
4487 #
4488 # You should have received a copy of the GNU General Public License version
4489 # 2 along with this work; if not, write to the Free Software Foundation,
4490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491 #
4492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493 # or visit www.oracle.com if you need additional information or have any
4494 # questions.
4495 #
4496 
4497 # Major library component reside in separate files.
4498 #
4499 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4500 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4501 #
4502 # This code is free software; you can redistribute it and/or modify it
4503 # under the terms of the GNU General Public License version 2 only, as
4504 # published by the Free Software Foundation.  Oracle designates this
4505 # particular file as subject to the "Classpath" exception as provided
4506 # by Oracle in the LICENSE file that accompanied this code.
4507 #
4508 # This code is distributed in the hope that it will be useful, but WITHOUT
4509 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4510 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4511 # version 2 for more details (a copy is included in the LICENSE file that
4512 # accompanied this code).
4513 #
4514 # You should have received a copy of the GNU General Public License version
4515 # 2 along with this work; if not, write to the Free Software Foundation,
4516 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4517 #
4518 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4519 # or visit www.oracle.com if you need additional information or have any
4520 # questions.
4521 #
4522 
4523 ################################################################################
4524 # Setup alsa (Advanced Linux Sound Architecture)
4525 ################################################################################
4526 
4527 
4528 #
4529 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4530 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4531 #
4532 # This code is free software; you can redistribute it and/or modify it
4533 # under the terms of the GNU General Public License version 2 only, as
4534 # published by the Free Software Foundation.  Oracle designates this
4535 # particular file as subject to the "Classpath" exception as provided
4536 # by Oracle in the LICENSE file that accompanied this code.
4537 #
4538 # This code is distributed in the hope that it will be useful, but WITHOUT
4539 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4540 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4541 # version 2 for more details (a copy is included in the LICENSE file that
4542 # accompanied this code).
4543 #
4544 # You should have received a copy of the GNU General Public License version
4545 # 2 along with this work; if not, write to the Free Software Foundation,
4546 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4547 #
4548 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4549 # or visit www.oracle.com if you need additional information or have any
4550 # questions.
4551 #
4552 
4553 ################################################################################
4554 # Setup bundled libraries.
4555 #
4556 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4557 # OpenJDK repository. Default is to use these libraries as bundled, but they
4558 # might be replaced by en external version by the user.
4559 ################################################################################
4560 
4561 
4562 ################################################################################
4563 # Setup libjpeg
4564 ################################################################################
4565 
4566 
4567 ################################################################################
4568 # Setup giflib
4569 ################################################################################
4570 
4571 
4572 ################################################################################
4573 # Setup libpng
4574 ################################################################################
4575 
4576 
4577 ################################################################################
4578 # Setup zlib
4579 ################################################################################
4580 
4581 
4582 ################################################################################
4583 # Setup lcms (Little CMS)
4584 ################################################################################
4585 
4586 
4587 #
4588 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4589 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4590 #
4591 # This code is free software; you can redistribute it and/or modify it
4592 # under the terms of the GNU General Public License version 2 only, as
4593 # published by the Free Software Foundation.  Oracle designates this
4594 # particular file as subject to the "Classpath" exception as provided
4595 # by Oracle in the LICENSE file that accompanied this code.
4596 #
4597 # This code is distributed in the hope that it will be useful, but WITHOUT
4598 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4599 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4600 # version 2 for more details (a copy is included in the LICENSE file that
4601 # accompanied this code).
4602 #
4603 # You should have received a copy of the GNU General Public License version
4604 # 2 along with this work; if not, write to the Free Software Foundation,
4605 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4606 #
4607 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4608 # or visit www.oracle.com if you need additional information or have any
4609 # questions.
4610 #
4611 
4612 ################################################################################
4613 # Setup cups (Common Unix Printing System)
4614 ################################################################################
4615 
4616 
4617 #
4618 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4619 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4620 #
4621 # This code is free software; you can redistribute it and/or modify it
4622 # under the terms of the GNU General Public License version 2 only, as
4623 # published by the Free Software Foundation.  Oracle designates this
4624 # particular file as subject to the "Classpath" exception as provided
4625 # by Oracle in the LICENSE file that accompanied this code.
4626 #
4627 # This code is distributed in the hope that it will be useful, but WITHOUT
4628 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4629 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4630 # version 2 for more details (a copy is included in the LICENSE file that
4631 # accompanied this code).
4632 #
4633 # You should have received a copy of the GNU General Public License version
4634 # 2 along with this work; if not, write to the Free Software Foundation,
4635 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4636 #
4637 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4638 # or visit www.oracle.com if you need additional information or have any
4639 # questions.
4640 #
4641 
4642 ################################################################################
4643 # Setup libffi (Foreign Function Interface)
4644 ################################################################################
4645 
4646 
4647 #
4648 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4649 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4650 #
4651 # This code is free software; you can redistribute it and/or modify it
4652 # under the terms of the GNU General Public License version 2 only, as
4653 # published by the Free Software Foundation.  Oracle designates this
4654 # particular file as subject to the "Classpath" exception as provided
4655 # by Oracle in the LICENSE file that accompanied this code.
4656 #
4657 # This code is distributed in the hope that it will be useful, but WITHOUT
4658 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4659 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4660 # version 2 for more details (a copy is included in the LICENSE file that
4661 # accompanied this code).
4662 #
4663 # You should have received a copy of the GNU General Public License version
4664 # 2 along with this work; if not, write to the Free Software Foundation,
4665 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4666 #
4667 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4668 # or visit www.oracle.com if you need additional information or have any
4669 # questions.
4670 #
4671 
4672 ################################################################################
4673 # Build the freetype lib from source
4674 ################################################################################
4675 
4676 
4677 ################################################################################
4678 # Check if a potential freeype library match is correct and usable
4679 ################################################################################
4680 
4681 
4682 ################################################################################
4683 # Setup freetype (The FreeType2 font rendering library)
4684 ################################################################################
4685 
4686 
4687 #
4688 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4689 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4690 #
4691 # This code is free software; you can redistribute it and/or modify it
4692 # under the terms of the GNU General Public License version 2 only, as
4693 # published by the Free Software Foundation.  Oracle designates this
4694 # particular file as subject to the "Classpath" exception as provided
4695 # by Oracle in the LICENSE file that accompanied this code.
4696 #
4697 # This code is distributed in the hope that it will be useful, but WITHOUT
4698 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4699 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4700 # version 2 for more details (a copy is included in the LICENSE file that
4701 # accompanied this code).
4702 #
4703 # You should have received a copy of the GNU General Public License version
4704 # 2 along with this work; if not, write to the Free Software Foundation,
4705 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4706 #
4707 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4708 # or visit www.oracle.com if you need additional information or have any
4709 # questions.
4710 #
4711 
4712 ################################################################################
4713 # Setup the standard C/C++ runtime libraries.
4714 #
4715 # Most importantly, determine if stdc++ should be linked statically or
4716 # dynamically.
4717 ################################################################################
4718 
4719 
4720 #
4721 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4722 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4723 #
4724 # This code is free software; you can redistribute it and/or modify it
4725 # under the terms of the GNU General Public License version 2 only, as
4726 # published by the Free Software Foundation.  Oracle designates this
4727 # particular file as subject to the "Classpath" exception as provided
4728 # by Oracle in the LICENSE file that accompanied this code.
4729 #
4730 # This code is distributed in the hope that it will be useful, but WITHOUT
4731 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4732 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4733 # version 2 for more details (a copy is included in the LICENSE file that
4734 # accompanied this code).
4735 #
4736 # You should have received a copy of the GNU General Public License version
4737 # 2 along with this work; if not, write to the Free Software Foundation,
4738 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4739 #
4740 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4741 # or visit www.oracle.com if you need additional information or have any
4742 # questions.
4743 #
4744 
4745 ################################################################################
4746 # Setup X11 Windows system
4747 ################################################################################
4748 
4749 
4750 
4751 ################################################################################
4752 # Determine which libraries are needed for this configuration
4753 ################################################################################
4754 
4755 
4756 ################################################################################
4757 # Parse library options, and setup needed libraries
4758 ################################################################################
4759 
4760 
4761 ################################################################################
4762 # Setup llvm (Low-Level VM)
4763 ################################################################################
4764 
4765 
4766 ################################################################################
4767 # Setup various libraries, typically small system libraries
4768 ################################################################################
4769 
4770 
4771 ################################################################################
4772 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4773 # redistribute it in the test image.
4774 ################################################################################
4775 
4776 
4777 
4778 #
4779 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4780 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4781 #
4782 # This code is free software; you can redistribute it and/or modify it
4783 # under the terms of the GNU General Public License version 2 only, as
4784 # published by the Free Software Foundation.  Oracle designates this
4785 # particular file as subject to the "Classpath" exception as provided
4786 # by Oracle in the LICENSE file that accompanied this code.
4787 #
4788 # This code is distributed in the hope that it will be useful, but WITHOUT
4789 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4790 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4791 # version 2 for more details (a copy is included in the LICENSE file that
4792 # accompanied this code).
4793 #
4794 # You should have received a copy of the GNU General Public License version
4795 # 2 along with this work; if not, write to the Free Software Foundation,
4796 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4797 #
4798 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4799 # or visit www.oracle.com if you need additional information or have any
4800 # questions.
4801 #
4802 
4803 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4804 # Converts autoconf style CPU name to OpenJDK style, into
4805 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4806 
4807 
4808 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4809 # Converts autoconf style OS name to OpenJDK style, into
4810 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4811 
4812 
4813 # Expects $host_os $host_cpu $build_os and $build_cpu
4814 # and $with_target_bits to have been setup!
4815 #
4816 # Translate the standard triplet(quadruplet) definition
4817 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4818 # OPENJDK_BUILD_OS, etc.
4819 
4820 
4821 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4822 # accordingly. Must be done after setting up build and target system, but before
4823 # doing anything else with these values.
4824 
4825 
4826 # Setup the legacy variables, for controlling the old makefiles.
4827 #
4828 
4829 
4830 # $1 - Either TARGET or BUILD to setup the variables for.
4831 
4832 
4833 
4834 
4835 
4836 
4837 #%%% Build and target systems %%%
4838 
4839 
4840 
4841 
4842 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4843 # Add -mX to various FLAGS variables.
4844 
4845 
4846 
4847 
4848 
4849 
4850 #
4851 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4852 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4853 #
4854 # This code is free software; you can redistribute it and/or modify it
4855 # under the terms of the GNU General Public License version 2 only, as
4856 # published by the Free Software Foundation.  Oracle designates this
4857 # particular file as subject to the "Classpath" exception as provided
4858 # by Oracle in the LICENSE file that accompanied this code.
4859 #
4860 # This code is distributed in the hope that it will be useful, but WITHOUT
4861 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4862 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4863 # version 2 for more details (a copy is included in the LICENSE file that
4864 # accompanied this code).
4865 #
4866 # You should have received a copy of the GNU General Public License version
4867 # 2 along with this work; if not, write to the Free Software Foundation,
4868 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4869 #
4870 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4871 # or visit www.oracle.com if you need additional information or have any
4872 # questions.
4873 #
4874 
4875 
4876 
4877 ################################################################################
4878 # Define a mechanism for importing extra prebuilt modules
4879 #
4880 
4881 
4882 
4883 #
4884 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4885 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4886 #
4887 # This code is free software; you can redistribute it and/or modify it
4888 # under the terms of the GNU General Public License version 2 only, as
4889 # published by the Free Software Foundation.  Oracle designates this
4890 # particular file as subject to the "Classpath" exception as provided
4891 # by Oracle in the LICENSE file that accompanied this code.
4892 #
4893 # This code is distributed in the hope that it will be useful, but WITHOUT
4894 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4895 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4896 # version 2 for more details (a copy is included in the LICENSE file that
4897 # accompanied this code).
4898 #
4899 # You should have received a copy of the GNU General Public License version
4900 # 2 along with this work; if not, write to the Free Software Foundation,
4901 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4902 #
4903 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4904 # or visit www.oracle.com if you need additional information or have any
4905 # questions.
4906 #
4907 
4908 ########################################################################
4909 # This file is responsible for detecting, verifying and setting up the
4910 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4911 # proper paths to the binaries, but it will not setup any flags.
4912 #
4913 # The binaries used is determined by the toolchain type, which is the family of
4914 # compilers and related tools that are used.
4915 ########################################################################
4916 
4917 
4918 # All valid toolchains, regardless of platform (used by help.m4)
4919 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4920 
4921 # These toolchains are valid on different platforms
4922 VALID_TOOLCHAINS_linux="gcc clang"
4923 VALID_TOOLCHAINS_solaris="solstudio"
4924 VALID_TOOLCHAINS_macosx="gcc clang"
4925 VALID_TOOLCHAINS_aix="xlc"
4926 VALID_TOOLCHAINS_windows="microsoft"
4927 
4928 # Toolchain descriptions
4929 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4930 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4931 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4932 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4933 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4934 
4935 # Minimum supported versions, empty means unspecified
4936 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4937 TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4938 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4939 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4940 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4941 
4942 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4943 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4944 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4945 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4946 
4947 
4948 # Check if the configured compiler (C and C++) is of a specific version or
4949 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4950 #
4951 # Arguments:
4952 #   VERSION:   The version string to check against the found version
4953 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4954 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4955 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4956 
4957 
4958 
4959 
4960 # Setup a number of variables describing how native output files are
4961 # named on this platform/toolchain.
4962 
4963 
4964 # Determine which toolchain type to use, and make sure it is valid for this
4965 # platform. Setup various information about the selected toolchain.
4966 
4967 
4968 # Before we start detecting the toolchain executables, we might need some
4969 # special setup, e.g. additional paths etc.
4970 
4971 
4972 # Restore path, etc
4973 
4974 
4975 # Check if a compiler is of the toolchain type we expect, and save the version
4976 # information from it. If the compiler does not match the expected type,
4977 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4978 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4979 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4980 #
4981 # $1 = compiler to test (CC or CXX)
4982 # $2 = human readable name of compiler (C or C++)
4983 
4984 
4985 # Try to locate the given C or C++ compiler in the path, or otherwise.
4986 #
4987 # $1 = compiler to test (CC or CXX)
4988 # $2 = human readable name of compiler (C or C++)
4989 # $3 = compiler name to search for
4990 
4991 
4992 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4993 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4994 # archiver (AR). Verify that the compilers are correct according to the
4995 # toolchain type.
4996 
4997 
4998 # Setup additional tools that is considered a part of the toolchain, but not the
4999 # core part. Many of these are highly platform-specific and do not exist,
5000 # and/or are not needed on all platforms.
5001 
5002 
5003 # Setup the build tools (i.e, the compiler and linker used to build programs
5004 # that should be run on the build platform, not the target platform, as a build
5005 # helper). Since the non-cross-compile case uses the normal, target compilers
5006 # for this, we can only do this after these have been setup.
5007 
5008 
5009 # Do some additional checks on the detected tools.
5010 
5011 
5012 # Setup the JTReg Regression Test Harness.
5013 
5014 
5015 # Setup the JIB dependency resolver
5016 
5017 
5018 #
5019 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5020 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5021 #
5022 # This code is free software; you can redistribute it and/or modify it
5023 # under the terms of the GNU General Public License version 2 only, as
5024 # published by the Free Software Foundation.  Oracle designates this
5025 # particular file as subject to the "Classpath" exception as provided
5026 # by Oracle in the LICENSE file that accompanied this code.
5027 #
5028 # This code is distributed in the hope that it will be useful, but WITHOUT
5029 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5030 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5031 # version 2 for more details (a copy is included in the LICENSE file that
5032 # accompanied this code).
5033 #
5034 # You should have received a copy of the GNU General Public License version
5035 # 2 along with this work; if not, write to the Free Software Foundation,
5036 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5037 #
5038 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5039 # or visit www.oracle.com if you need additional information or have any
5040 # questions.
5041 #
5042 
5043 ################################################################################
5044 # The order of these defines the priority by which we try to find them.
5045 VALID_VS_VERSIONS="2013 2012 2010"
5046 
5047 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5048 VS_VERSION_INTERNAL_2010=100
5049 VS_MSVCR_2010=msvcr100.dll
5050 # We don't use msvcp on Visual Studio 2010
5051 #VS_MSVCP_2010=msvcp100.dll
5052 VS_ENVVAR_2010="VS100COMNTOOLS"
5053 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5054 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5055 VS_VS_PLATFORM_NAME_2010="v100"
5056 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5057 
5058 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5059 VS_VERSION_INTERNAL_2012=110
5060 VS_MSVCR_2012=msvcr110.dll
5061 VS_MSVCP_2012=msvcp110.dll
5062 VS_ENVVAR_2012="VS110COMNTOOLS"
5063 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5064 VS_SDK_INSTALLDIR_2012=
5065 VS_VS_PLATFORM_NAME_2012="v110"
5066 VS_SDK_PLATFORM_NAME_2012=
5067 
5068 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5069 VS_VERSION_INTERNAL_2013=120
5070 VS_MSVCR_2013=msvcr120.dll
5071 VS_MSVCP_2013=msvcp120.dll
5072 VS_ENVVAR_2013="VS120COMNTOOLS"
5073 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5074 VS_SDK_INSTALLDIR_2013=
5075 VS_VS_PLATFORM_NAME_2013="v120"
5076 VS_SDK_PLATFORM_NAME_2013=
5077 
5078 ################################################################################
5079 
5080 
5081 
5082 ################################################################################
5083 
5084 
5085 
5086 ################################################################################
5087 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5088 # build environment and assigns it to VS_ENV_CMD
5089 
5090 
5091 ################################################################################
5092 
5093 
5094 
5095 ################################################################################
5096 # Check if the VS env variables were setup prior to running configure.
5097 # If not, then find vcvarsall.bat and run it automatically, and integrate
5098 # the set env variables into the spec file.
5099 
5100 
5101 
5102 
5103 
5104 
5105 
5106 
5107 
5108 
5109 
5110 
5111 
5112 
5113 # This line needs to be here, verbatim, after all includes and the dummy hook
5114 # definitions. It is replaced with custom functionality when building
5115 # custom sources.
5116 #CUSTOM_AUTOCONF_INCLUDE
5117 
5118 # Do not change or remove the following line, it is needed for consistency checks:
5119 DATE_WHEN_GENERATED=1507292425
5120 
5121 ###############################################################################
5122 #
5123 # Initialization / Boot-strapping
5124 #
5125 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5126 # thus it jumps back and forth, each time gaining something needed later on.
5127 #
5128 ###############################################################################
5129 
5130 # If we are requested to print additional help, do that and then exit.
5131 # This must be the very first call.
5132 
5133   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5134 
5135     # Print available toolchains
5136     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5137     $PRINTF "Which are valid to use depends on the build platform.\n"
5138     for toolchain in $VALID_TOOLCHAINS_all; do
5139       # Use indirect variable referencing
5140       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5141       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5142       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5143     done
5144     $PRINTF "\n"
5145 
5146     # Print available jvm features
5147     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5148     $PRINTF "Which are valid to use depends on the target platform.\n  "
5149     $PRINTF "%s " $VALID_JVM_FEATURES
5150     $PRINTF "\n"
5151 
5152     # And now exit directly
5153     exit 0
5154   fi
5155 
5156 
5157 # Basic initialization that must happen first of all in the normal process.
5158 
5159   # Save the original command line. This is passed to us by the wrapper configure script.
5160 
5161   # Save the path variable before it gets changed
5162   ORIGINAL_PATH="$PATH"
5163 
5164   DATE_WHEN_CONFIGURED=`LANG=C date`
5165 
5166   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5167 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5168   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5169 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5170 
5171 
5172   # Start with tools that do not need have cross compilation support
5173   # and can be expected to be found in the default PATH. These tools are
5174   # used by configure.
5175 
5176   # First are all the simple required tools.
5177 
5178 
5179 
5180   # Publish this variable in the help.
5181 
5182 
5183   if [ -z "${BASENAME+x}" ]; then
5184     # The variable is not set by user, try to locate tool using the code snippet
5185     for ac_prog in basename
5186 do
5187   # Extract the first word of "$ac_prog", so it can be a program name with args.
5188 set dummy $ac_prog; ac_word=$2
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5190 $as_echo_n "checking for $ac_word... " >&6; }
5191 if ${ac_cv_path_BASENAME+:} false; then :
5192   $as_echo_n "(cached) " >&6
5193 else
5194   case $BASENAME in
5195   [\\/]* | ?:[\\/]*)
5196   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5197   ;;
5198   *)
5199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200 for as_dir in $PATH
5201 do
5202   IFS=$as_save_IFS
5203   test -z "$as_dir" && as_dir=.
5204     for ac_exec_ext in '' $ac_executable_extensions; do
5205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5206     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5208     break 2
5209   fi
5210 done
5211   done
5212 IFS=$as_save_IFS
5213 
5214   ;;
5215 esac
5216 fi
5217 BASENAME=$ac_cv_path_BASENAME
5218 if test -n "$BASENAME"; then
5219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5220 $as_echo "$BASENAME" >&6; }
5221 else
5222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5223 $as_echo "no" >&6; }
5224 fi
5225 
5226 
5227   test -n "$BASENAME" && break
5228 done
5229 
5230   else
5231     # The variable is set, but is it from the command line or the environment?
5232 
5233     # Try to remove the string !BASENAME! from our list.
5234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5236       # If it failed, the variable was not from the command line. Ignore it,
5237       # but warn the user (except for BASH, which is always set by the calling BASH).
5238       if test "xBASENAME" != xBASH; then
5239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5240 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5241       fi
5242       # Try to locate tool using the code snippet
5243       for ac_prog in basename
5244 do
5245   # Extract the first word of "$ac_prog", so it can be a program name with args.
5246 set dummy $ac_prog; ac_word=$2
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248 $as_echo_n "checking for $ac_word... " >&6; }
5249 if ${ac_cv_path_BASENAME+:} false; then :
5250   $as_echo_n "(cached) " >&6
5251 else
5252   case $BASENAME in
5253   [\\/]* | ?:[\\/]*)
5254   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5255   ;;
5256   *)
5257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258 for as_dir in $PATH
5259 do
5260   IFS=$as_save_IFS
5261   test -z "$as_dir" && as_dir=.
5262     for ac_exec_ext in '' $ac_executable_extensions; do
5263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5264     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5266     break 2
5267   fi
5268 done
5269   done
5270 IFS=$as_save_IFS
5271 
5272   ;;
5273 esac
5274 fi
5275 BASENAME=$ac_cv_path_BASENAME
5276 if test -n "$BASENAME"; then
5277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5278 $as_echo "$BASENAME" >&6; }
5279 else
5280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281 $as_echo "no" >&6; }
5282 fi
5283 
5284 
5285   test -n "$BASENAME" && break
5286 done
5287 
5288     else
5289       # If it succeeded, then it was overridden by the user. We will use it
5290       # for the tool.
5291 
5292       # First remove it from the list of overridden variables, so we can test
5293       # for unknown variables in the end.
5294       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5295 
5296       # Check if we try to supply an empty value
5297       if test "x$BASENAME" = x; then
5298         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5299 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5300         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5301 $as_echo_n "checking for BASENAME... " >&6; }
5302         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5303 $as_echo "disabled" >&6; }
5304       else
5305         # Check if the provided tool contains a complete path.
5306         tool_specified="$BASENAME"
5307         tool_basename="${tool_specified##*/}"
5308         if test "x$tool_basename" = "x$tool_specified"; then
5309           # A command without a complete path is provided, search $PATH.
5310           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5311 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5312           # Extract the first word of "$tool_basename", so it can be a program name with args.
5313 set dummy $tool_basename; ac_word=$2
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5315 $as_echo_n "checking for $ac_word... " >&6; }
5316 if ${ac_cv_path_BASENAME+:} false; then :
5317   $as_echo_n "(cached) " >&6
5318 else
5319   case $BASENAME in
5320   [\\/]* | ?:[\\/]*)
5321   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5322   ;;
5323   *)
5324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325 for as_dir in $PATH
5326 do
5327   IFS=$as_save_IFS
5328   test -z "$as_dir" && as_dir=.
5329     for ac_exec_ext in '' $ac_executable_extensions; do
5330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5331     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5333     break 2
5334   fi
5335 done
5336   done
5337 IFS=$as_save_IFS
5338 
5339   ;;
5340 esac
5341 fi
5342 BASENAME=$ac_cv_path_BASENAME
5343 if test -n "$BASENAME"; then
5344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5345 $as_echo "$BASENAME" >&6; }
5346 else
5347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348 $as_echo "no" >&6; }
5349 fi
5350 
5351 
5352           if test "x$BASENAME" = x; then
5353             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5354           fi
5355         else
5356           # Otherwise we believe it is a complete path. Use it as it is.
5357           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5358 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5359           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5360 $as_echo_n "checking for BASENAME... " >&6; }
5361           if test ! -x "$tool_specified"; then
5362             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5363 $as_echo "not found" >&6; }
5364             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5365           fi
5366           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5367 $as_echo "$tool_specified" >&6; }
5368         fi
5369       fi
5370     fi
5371 
5372   fi
5373 
5374 
5375 
5376   if test "x$BASENAME" = x; then
5377     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5378   fi
5379 
5380 
5381 
5382 
5383 
5384   # Publish this variable in the help.
5385 
5386 
5387   if [ -z "${BASH+x}" ]; then
5388     # The variable is not set by user, try to locate tool using the code snippet
5389     for ac_prog in bash
5390 do
5391   # Extract the first word of "$ac_prog", so it can be a program name with args.
5392 set dummy $ac_prog; ac_word=$2
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394 $as_echo_n "checking for $ac_word... " >&6; }
5395 if ${ac_cv_path_BASH+:} false; then :
5396   $as_echo_n "(cached) " >&6
5397 else
5398   case $BASH in
5399   [\\/]* | ?:[\\/]*)
5400   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5401   ;;
5402   *)
5403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404 for as_dir in $PATH
5405 do
5406   IFS=$as_save_IFS
5407   test -z "$as_dir" && as_dir=.
5408     for ac_exec_ext in '' $ac_executable_extensions; do
5409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412     break 2
5413   fi
5414 done
5415   done
5416 IFS=$as_save_IFS
5417 
5418   ;;
5419 esac
5420 fi
5421 BASH=$ac_cv_path_BASH
5422 if test -n "$BASH"; then
5423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5424 $as_echo "$BASH" >&6; }
5425 else
5426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427 $as_echo "no" >&6; }
5428 fi
5429 
5430 
5431   test -n "$BASH" && break
5432 done
5433 
5434   else
5435     # The variable is set, but is it from the command line or the environment?
5436 
5437     # Try to remove the string !BASH! from our list.
5438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5440       # If it failed, the variable was not from the command line. Ignore it,
5441       # but warn the user (except for BASH, which is always set by the calling BASH).
5442       if test "xBASH" != xBASH; then
5443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5444 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5445       fi
5446       # Try to locate tool using the code snippet
5447       for ac_prog in bash
5448 do
5449   # Extract the first word of "$ac_prog", so it can be a program name with args.
5450 set dummy $ac_prog; ac_word=$2
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452 $as_echo_n "checking for $ac_word... " >&6; }
5453 if ${ac_cv_path_BASH+:} false; then :
5454   $as_echo_n "(cached) " >&6
5455 else
5456   case $BASH in
5457   [\\/]* | ?:[\\/]*)
5458   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5459   ;;
5460   *)
5461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462 for as_dir in $PATH
5463 do
5464   IFS=$as_save_IFS
5465   test -z "$as_dir" && as_dir=.
5466     for ac_exec_ext in '' $ac_executable_extensions; do
5467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470     break 2
5471   fi
5472 done
5473   done
5474 IFS=$as_save_IFS
5475 
5476   ;;
5477 esac
5478 fi
5479 BASH=$ac_cv_path_BASH
5480 if test -n "$BASH"; then
5481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5482 $as_echo "$BASH" >&6; }
5483 else
5484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485 $as_echo "no" >&6; }
5486 fi
5487 
5488 
5489   test -n "$BASH" && break
5490 done
5491 
5492     else
5493       # If it succeeded, then it was overridden by the user. We will use it
5494       # for the tool.
5495 
5496       # First remove it from the list of overridden variables, so we can test
5497       # for unknown variables in the end.
5498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5499 
5500       # Check if we try to supply an empty value
5501       if test "x$BASH" = x; then
5502         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5503 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5504         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5505 $as_echo_n "checking for BASH... " >&6; }
5506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5507 $as_echo "disabled" >&6; }
5508       else
5509         # Check if the provided tool contains a complete path.
5510         tool_specified="$BASH"
5511         tool_basename="${tool_specified##*/}"
5512         if test "x$tool_basename" = "x$tool_specified"; then
5513           # A command without a complete path is provided, search $PATH.
5514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5515 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5516           # Extract the first word of "$tool_basename", so it can be a program name with args.
5517 set dummy $tool_basename; ac_word=$2
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519 $as_echo_n "checking for $ac_word... " >&6; }
5520 if ${ac_cv_path_BASH+:} false; then :
5521   $as_echo_n "(cached) " >&6
5522 else
5523   case $BASH in
5524   [\\/]* | ?:[\\/]*)
5525   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5526   ;;
5527   *)
5528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5529 for as_dir in $PATH
5530 do
5531   IFS=$as_save_IFS
5532   test -z "$as_dir" && as_dir=.
5533     for ac_exec_ext in '' $ac_executable_extensions; do
5534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5535     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5537     break 2
5538   fi
5539 done
5540   done
5541 IFS=$as_save_IFS
5542 
5543   ;;
5544 esac
5545 fi
5546 BASH=$ac_cv_path_BASH
5547 if test -n "$BASH"; then
5548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5549 $as_echo "$BASH" >&6; }
5550 else
5551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552 $as_echo "no" >&6; }
5553 fi
5554 
5555 
5556           if test "x$BASH" = x; then
5557             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5558           fi
5559         else
5560           # Otherwise we believe it is a complete path. Use it as it is.
5561           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5562 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5563           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5564 $as_echo_n "checking for BASH... " >&6; }
5565           if test ! -x "$tool_specified"; then
5566             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5567 $as_echo "not found" >&6; }
5568             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5569           fi
5570           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5571 $as_echo "$tool_specified" >&6; }
5572         fi
5573       fi
5574     fi
5575 
5576   fi
5577 
5578 
5579 
5580   if test "x$BASH" = x; then
5581     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5582   fi
5583 
5584 
5585 
5586 
5587 
5588   # Publish this variable in the help.
5589 
5590 
5591   if [ -z "${CAT+x}" ]; then
5592     # The variable is not set by user, try to locate tool using the code snippet
5593     for ac_prog in cat
5594 do
5595   # Extract the first word of "$ac_prog", so it can be a program name with args.
5596 set dummy $ac_prog; ac_word=$2
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5598 $as_echo_n "checking for $ac_word... " >&6; }
5599 if ${ac_cv_path_CAT+:} false; then :
5600   $as_echo_n "(cached) " >&6
5601 else
5602   case $CAT in
5603   [\\/]* | ?:[\\/]*)
5604   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5605   ;;
5606   *)
5607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5608 for as_dir in $PATH
5609 do
5610   IFS=$as_save_IFS
5611   test -z "$as_dir" && as_dir=.
5612     for ac_exec_ext in '' $ac_executable_extensions; do
5613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5614     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5616     break 2
5617   fi
5618 done
5619   done
5620 IFS=$as_save_IFS
5621 
5622   ;;
5623 esac
5624 fi
5625 CAT=$ac_cv_path_CAT
5626 if test -n "$CAT"; then
5627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5628 $as_echo "$CAT" >&6; }
5629 else
5630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631 $as_echo "no" >&6; }
5632 fi
5633 
5634 
5635   test -n "$CAT" && break
5636 done
5637 
5638   else
5639     # The variable is set, but is it from the command line or the environment?
5640 
5641     # Try to remove the string !CAT! from our list.
5642     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5643     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5644       # If it failed, the variable was not from the command line. Ignore it,
5645       # but warn the user (except for BASH, which is always set by the calling BASH).
5646       if test "xCAT" != xBASH; then
5647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5648 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5649       fi
5650       # Try to locate tool using the code snippet
5651       for ac_prog in cat
5652 do
5653   # Extract the first word of "$ac_prog", so it can be a program name with args.
5654 set dummy $ac_prog; ac_word=$2
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5656 $as_echo_n "checking for $ac_word... " >&6; }
5657 if ${ac_cv_path_CAT+:} false; then :
5658   $as_echo_n "(cached) " >&6
5659 else
5660   case $CAT in
5661   [\\/]* | ?:[\\/]*)
5662   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5663   ;;
5664   *)
5665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666 for as_dir in $PATH
5667 do
5668   IFS=$as_save_IFS
5669   test -z "$as_dir" && as_dir=.
5670     for ac_exec_ext in '' $ac_executable_extensions; do
5671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5672     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5674     break 2
5675   fi
5676 done
5677   done
5678 IFS=$as_save_IFS
5679 
5680   ;;
5681 esac
5682 fi
5683 CAT=$ac_cv_path_CAT
5684 if test -n "$CAT"; then
5685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5686 $as_echo "$CAT" >&6; }
5687 else
5688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689 $as_echo "no" >&6; }
5690 fi
5691 
5692 
5693   test -n "$CAT" && break
5694 done
5695 
5696     else
5697       # If it succeeded, then it was overridden by the user. We will use it
5698       # for the tool.
5699 
5700       # First remove it from the list of overridden variables, so we can test
5701       # for unknown variables in the end.
5702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5703 
5704       # Check if we try to supply an empty value
5705       if test "x$CAT" = x; then
5706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5707 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5709 $as_echo_n "checking for CAT... " >&6; }
5710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5711 $as_echo "disabled" >&6; }
5712       else
5713         # Check if the provided tool contains a complete path.
5714         tool_specified="$CAT"
5715         tool_basename="${tool_specified##*/}"
5716         if test "x$tool_basename" = "x$tool_specified"; then
5717           # A command without a complete path is provided, search $PATH.
5718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5719 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5720           # Extract the first word of "$tool_basename", so it can be a program name with args.
5721 set dummy $tool_basename; ac_word=$2
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723 $as_echo_n "checking for $ac_word... " >&6; }
5724 if ${ac_cv_path_CAT+:} false; then :
5725   $as_echo_n "(cached) " >&6
5726 else
5727   case $CAT in
5728   [\\/]* | ?:[\\/]*)
5729   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5730   ;;
5731   *)
5732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733 for as_dir in $PATH
5734 do
5735   IFS=$as_save_IFS
5736   test -z "$as_dir" && as_dir=.
5737     for ac_exec_ext in '' $ac_executable_extensions; do
5738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741     break 2
5742   fi
5743 done
5744   done
5745 IFS=$as_save_IFS
5746 
5747   ;;
5748 esac
5749 fi
5750 CAT=$ac_cv_path_CAT
5751 if test -n "$CAT"; then
5752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5753 $as_echo "$CAT" >&6; }
5754 else
5755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756 $as_echo "no" >&6; }
5757 fi
5758 
5759 
5760           if test "x$CAT" = x; then
5761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5762           fi
5763         else
5764           # Otherwise we believe it is a complete path. Use it as it is.
5765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5766 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5768 $as_echo_n "checking for CAT... " >&6; }
5769           if test ! -x "$tool_specified"; then
5770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5771 $as_echo "not found" >&6; }
5772             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5773           fi
5774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5775 $as_echo "$tool_specified" >&6; }
5776         fi
5777       fi
5778     fi
5779 
5780   fi
5781 
5782 
5783 
5784   if test "x$CAT" = x; then
5785     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5786   fi
5787 
5788 
5789 
5790 
5791 
5792   # Publish this variable in the help.
5793 
5794 
5795   if [ -z "${CHMOD+x}" ]; then
5796     # The variable is not set by user, try to locate tool using the code snippet
5797     for ac_prog in chmod
5798 do
5799   # Extract the first word of "$ac_prog", so it can be a program name with args.
5800 set dummy $ac_prog; ac_word=$2
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802 $as_echo_n "checking for $ac_word... " >&6; }
5803 if ${ac_cv_path_CHMOD+:} false; then :
5804   $as_echo_n "(cached) " >&6
5805 else
5806   case $CHMOD in
5807   [\\/]* | ?:[\\/]*)
5808   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5809   ;;
5810   *)
5811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812 for as_dir in $PATH
5813 do
5814   IFS=$as_save_IFS
5815   test -z "$as_dir" && as_dir=.
5816     for ac_exec_ext in '' $ac_executable_extensions; do
5817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820     break 2
5821   fi
5822 done
5823   done
5824 IFS=$as_save_IFS
5825 
5826   ;;
5827 esac
5828 fi
5829 CHMOD=$ac_cv_path_CHMOD
5830 if test -n "$CHMOD"; then
5831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5832 $as_echo "$CHMOD" >&6; }
5833 else
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835 $as_echo "no" >&6; }
5836 fi
5837 
5838 
5839   test -n "$CHMOD" && break
5840 done
5841 
5842   else
5843     # The variable is set, but is it from the command line or the environment?
5844 
5845     # Try to remove the string !CHMOD! from our list.
5846     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5847     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5848       # If it failed, the variable was not from the command line. Ignore it,
5849       # but warn the user (except for BASH, which is always set by the calling BASH).
5850       if test "xCHMOD" != xBASH; then
5851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5852 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5853       fi
5854       # Try to locate tool using the code snippet
5855       for ac_prog in chmod
5856 do
5857   # Extract the first word of "$ac_prog", so it can be a program name with args.
5858 set dummy $ac_prog; ac_word=$2
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860 $as_echo_n "checking for $ac_word... " >&6; }
5861 if ${ac_cv_path_CHMOD+:} false; then :
5862   $as_echo_n "(cached) " >&6
5863 else
5864   case $CHMOD in
5865   [\\/]* | ?:[\\/]*)
5866   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5867   ;;
5868   *)
5869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870 for as_dir in $PATH
5871 do
5872   IFS=$as_save_IFS
5873   test -z "$as_dir" && as_dir=.
5874     for ac_exec_ext in '' $ac_executable_extensions; do
5875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878     break 2
5879   fi
5880 done
5881   done
5882 IFS=$as_save_IFS
5883 
5884   ;;
5885 esac
5886 fi
5887 CHMOD=$ac_cv_path_CHMOD
5888 if test -n "$CHMOD"; then
5889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5890 $as_echo "$CHMOD" >&6; }
5891 else
5892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893 $as_echo "no" >&6; }
5894 fi
5895 
5896 
5897   test -n "$CHMOD" && break
5898 done
5899 
5900     else
5901       # If it succeeded, then it was overridden by the user. We will use it
5902       # for the tool.
5903 
5904       # First remove it from the list of overridden variables, so we can test
5905       # for unknown variables in the end.
5906       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5907 
5908       # Check if we try to supply an empty value
5909       if test "x$CHMOD" = x; then
5910         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5911 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5913 $as_echo_n "checking for CHMOD... " >&6; }
5914         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5915 $as_echo "disabled" >&6; }
5916       else
5917         # Check if the provided tool contains a complete path.
5918         tool_specified="$CHMOD"
5919         tool_basename="${tool_specified##*/}"
5920         if test "x$tool_basename" = "x$tool_specified"; then
5921           # A command without a complete path is provided, search $PATH.
5922           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5923 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5924           # Extract the first word of "$tool_basename", so it can be a program name with args.
5925 set dummy $tool_basename; ac_word=$2
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927 $as_echo_n "checking for $ac_word... " >&6; }
5928 if ${ac_cv_path_CHMOD+:} false; then :
5929   $as_echo_n "(cached) " >&6
5930 else
5931   case $CHMOD in
5932   [\\/]* | ?:[\\/]*)
5933   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5934   ;;
5935   *)
5936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937 for as_dir in $PATH
5938 do
5939   IFS=$as_save_IFS
5940   test -z "$as_dir" && as_dir=.
5941     for ac_exec_ext in '' $ac_executable_extensions; do
5942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945     break 2
5946   fi
5947 done
5948   done
5949 IFS=$as_save_IFS
5950 
5951   ;;
5952 esac
5953 fi
5954 CHMOD=$ac_cv_path_CHMOD
5955 if test -n "$CHMOD"; then
5956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5957 $as_echo "$CHMOD" >&6; }
5958 else
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960 $as_echo "no" >&6; }
5961 fi
5962 
5963 
5964           if test "x$CHMOD" = x; then
5965             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5966           fi
5967         else
5968           # Otherwise we believe it is a complete path. Use it as it is.
5969           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5970 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5971           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5972 $as_echo_n "checking for CHMOD... " >&6; }
5973           if test ! -x "$tool_specified"; then
5974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5975 $as_echo "not found" >&6; }
5976             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5977           fi
5978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5979 $as_echo "$tool_specified" >&6; }
5980         fi
5981       fi
5982     fi
5983 
5984   fi
5985 
5986 
5987 
5988   if test "x$CHMOD" = x; then
5989     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5990   fi
5991 
5992 
5993 
5994 
5995 
5996   # Publish this variable in the help.
5997 
5998 
5999   if [ -z "${CMP+x}" ]; then
6000     # The variable is not set by user, try to locate tool using the code snippet
6001     for ac_prog in cmp
6002 do
6003   # Extract the first word of "$ac_prog", so it can be a program name with args.
6004 set dummy $ac_prog; ac_word=$2
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006 $as_echo_n "checking for $ac_word... " >&6; }
6007 if ${ac_cv_path_CMP+:} false; then :
6008   $as_echo_n "(cached) " >&6
6009 else
6010   case $CMP in
6011   [\\/]* | ?:[\\/]*)
6012   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6013   ;;
6014   *)
6015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016 for as_dir in $PATH
6017 do
6018   IFS=$as_save_IFS
6019   test -z "$as_dir" && as_dir=.
6020     for ac_exec_ext in '' $ac_executable_extensions; do
6021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6022     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024     break 2
6025   fi
6026 done
6027   done
6028 IFS=$as_save_IFS
6029 
6030   ;;
6031 esac
6032 fi
6033 CMP=$ac_cv_path_CMP
6034 if test -n "$CMP"; then
6035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6036 $as_echo "$CMP" >&6; }
6037 else
6038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6039 $as_echo "no" >&6; }
6040 fi
6041 
6042 
6043   test -n "$CMP" && break
6044 done
6045 
6046   else
6047     # The variable is set, but is it from the command line or the environment?
6048 
6049     # Try to remove the string !CMP! from our list.
6050     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6051     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6052       # If it failed, the variable was not from the command line. Ignore it,
6053       # but warn the user (except for BASH, which is always set by the calling BASH).
6054       if test "xCMP" != xBASH; then
6055         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6056 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6057       fi
6058       # Try to locate tool using the code snippet
6059       for ac_prog in cmp
6060 do
6061   # Extract the first word of "$ac_prog", so it can be a program name with args.
6062 set dummy $ac_prog; ac_word=$2
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064 $as_echo_n "checking for $ac_word... " >&6; }
6065 if ${ac_cv_path_CMP+:} false; then :
6066   $as_echo_n "(cached) " >&6
6067 else
6068   case $CMP in
6069   [\\/]* | ?:[\\/]*)
6070   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6071   ;;
6072   *)
6073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6074 for as_dir in $PATH
6075 do
6076   IFS=$as_save_IFS
6077   test -z "$as_dir" && as_dir=.
6078     for ac_exec_ext in '' $ac_executable_extensions; do
6079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6080     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6082     break 2
6083   fi
6084 done
6085   done
6086 IFS=$as_save_IFS
6087 
6088   ;;
6089 esac
6090 fi
6091 CMP=$ac_cv_path_CMP
6092 if test -n "$CMP"; then
6093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6094 $as_echo "$CMP" >&6; }
6095 else
6096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097 $as_echo "no" >&6; }
6098 fi
6099 
6100 
6101   test -n "$CMP" && break
6102 done
6103 
6104     else
6105       # If it succeeded, then it was overridden by the user. We will use it
6106       # for the tool.
6107 
6108       # First remove it from the list of overridden variables, so we can test
6109       # for unknown variables in the end.
6110       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6111 
6112       # Check if we try to supply an empty value
6113       if test "x$CMP" = x; then
6114         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6115 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6117 $as_echo_n "checking for CMP... " >&6; }
6118         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6119 $as_echo "disabled" >&6; }
6120       else
6121         # Check if the provided tool contains a complete path.
6122         tool_specified="$CMP"
6123         tool_basename="${tool_specified##*/}"
6124         if test "x$tool_basename" = "x$tool_specified"; then
6125           # A command without a complete path is provided, search $PATH.
6126           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6127 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6128           # Extract the first word of "$tool_basename", so it can be a program name with args.
6129 set dummy $tool_basename; ac_word=$2
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131 $as_echo_n "checking for $ac_word... " >&6; }
6132 if ${ac_cv_path_CMP+:} false; then :
6133   $as_echo_n "(cached) " >&6
6134 else
6135   case $CMP in
6136   [\\/]* | ?:[\\/]*)
6137   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6138   ;;
6139   *)
6140   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141 for as_dir in $PATH
6142 do
6143   IFS=$as_save_IFS
6144   test -z "$as_dir" && as_dir=.
6145     for ac_exec_ext in '' $ac_executable_extensions; do
6146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149     break 2
6150   fi
6151 done
6152   done
6153 IFS=$as_save_IFS
6154 
6155   ;;
6156 esac
6157 fi
6158 CMP=$ac_cv_path_CMP
6159 if test -n "$CMP"; then
6160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6161 $as_echo "$CMP" >&6; }
6162 else
6163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164 $as_echo "no" >&6; }
6165 fi
6166 
6167 
6168           if test "x$CMP" = x; then
6169             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6170           fi
6171         else
6172           # Otherwise we believe it is a complete path. Use it as it is.
6173           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6174 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6175           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6176 $as_echo_n "checking for CMP... " >&6; }
6177           if test ! -x "$tool_specified"; then
6178             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6179 $as_echo "not found" >&6; }
6180             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6181           fi
6182           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6183 $as_echo "$tool_specified" >&6; }
6184         fi
6185       fi
6186     fi
6187 
6188   fi
6189 
6190 
6191 
6192   if test "x$CMP" = x; then
6193     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6194   fi
6195 
6196 
6197 
6198 
6199 
6200   # Publish this variable in the help.
6201 
6202 
6203   if [ -z "${COMM+x}" ]; then
6204     # The variable is not set by user, try to locate tool using the code snippet
6205     for ac_prog in comm
6206 do
6207   # Extract the first word of "$ac_prog", so it can be a program name with args.
6208 set dummy $ac_prog; ac_word=$2
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6210 $as_echo_n "checking for $ac_word... " >&6; }
6211 if ${ac_cv_path_COMM+:} false; then :
6212   $as_echo_n "(cached) " >&6
6213 else
6214   case $COMM in
6215   [\\/]* | ?:[\\/]*)
6216   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6217   ;;
6218   *)
6219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220 for as_dir in $PATH
6221 do
6222   IFS=$as_save_IFS
6223   test -z "$as_dir" && as_dir=.
6224     for ac_exec_ext in '' $ac_executable_extensions; do
6225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6226     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228     break 2
6229   fi
6230 done
6231   done
6232 IFS=$as_save_IFS
6233 
6234   ;;
6235 esac
6236 fi
6237 COMM=$ac_cv_path_COMM
6238 if test -n "$COMM"; then
6239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6240 $as_echo "$COMM" >&6; }
6241 else
6242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243 $as_echo "no" >&6; }
6244 fi
6245 
6246 
6247   test -n "$COMM" && break
6248 done
6249 
6250   else
6251     # The variable is set, but is it from the command line or the environment?
6252 
6253     # Try to remove the string !COMM! from our list.
6254     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6255     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6256       # If it failed, the variable was not from the command line. Ignore it,
6257       # but warn the user (except for BASH, which is always set by the calling BASH).
6258       if test "xCOMM" != xBASH; then
6259         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6260 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6261       fi
6262       # Try to locate tool using the code snippet
6263       for ac_prog in comm
6264 do
6265   # Extract the first word of "$ac_prog", so it can be a program name with args.
6266 set dummy $ac_prog; ac_word=$2
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6268 $as_echo_n "checking for $ac_word... " >&6; }
6269 if ${ac_cv_path_COMM+:} false; then :
6270   $as_echo_n "(cached) " >&6
6271 else
6272   case $COMM in
6273   [\\/]* | ?:[\\/]*)
6274   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6275   ;;
6276   *)
6277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6278 for as_dir in $PATH
6279 do
6280   IFS=$as_save_IFS
6281   test -z "$as_dir" && as_dir=.
6282     for ac_exec_ext in '' $ac_executable_extensions; do
6283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6284     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6286     break 2
6287   fi
6288 done
6289   done
6290 IFS=$as_save_IFS
6291 
6292   ;;
6293 esac
6294 fi
6295 COMM=$ac_cv_path_COMM
6296 if test -n "$COMM"; then
6297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6298 $as_echo "$COMM" >&6; }
6299 else
6300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6301 $as_echo "no" >&6; }
6302 fi
6303 
6304 
6305   test -n "$COMM" && break
6306 done
6307 
6308     else
6309       # If it succeeded, then it was overridden by the user. We will use it
6310       # for the tool.
6311 
6312       # First remove it from the list of overridden variables, so we can test
6313       # for unknown variables in the end.
6314       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6315 
6316       # Check if we try to supply an empty value
6317       if test "x$COMM" = x; then
6318         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6319 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6321 $as_echo_n "checking for COMM... " >&6; }
6322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6323 $as_echo "disabled" >&6; }
6324       else
6325         # Check if the provided tool contains a complete path.
6326         tool_specified="$COMM"
6327         tool_basename="${tool_specified##*/}"
6328         if test "x$tool_basename" = "x$tool_specified"; then
6329           # A command without a complete path is provided, search $PATH.
6330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6331 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6332           # Extract the first word of "$tool_basename", so it can be a program name with args.
6333 set dummy $tool_basename; ac_word=$2
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335 $as_echo_n "checking for $ac_word... " >&6; }
6336 if ${ac_cv_path_COMM+:} false; then :
6337   $as_echo_n "(cached) " >&6
6338 else
6339   case $COMM in
6340   [\\/]* | ?:[\\/]*)
6341   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6342   ;;
6343   *)
6344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345 for as_dir in $PATH
6346 do
6347   IFS=$as_save_IFS
6348   test -z "$as_dir" && as_dir=.
6349     for ac_exec_ext in '' $ac_executable_extensions; do
6350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353     break 2
6354   fi
6355 done
6356   done
6357 IFS=$as_save_IFS
6358 
6359   ;;
6360 esac
6361 fi
6362 COMM=$ac_cv_path_COMM
6363 if test -n "$COMM"; then
6364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6365 $as_echo "$COMM" >&6; }
6366 else
6367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368 $as_echo "no" >&6; }
6369 fi
6370 
6371 
6372           if test "x$COMM" = x; then
6373             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6374           fi
6375         else
6376           # Otherwise we believe it is a complete path. Use it as it is.
6377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6378 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6379           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6380 $as_echo_n "checking for COMM... " >&6; }
6381           if test ! -x "$tool_specified"; then
6382             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6383 $as_echo "not found" >&6; }
6384             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6385           fi
6386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6387 $as_echo "$tool_specified" >&6; }
6388         fi
6389       fi
6390     fi
6391 
6392   fi
6393 
6394 
6395 
6396   if test "x$COMM" = x; then
6397     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6398   fi
6399 
6400 
6401 
6402 
6403 
6404   # Publish this variable in the help.
6405 
6406 
6407   if [ -z "${CP+x}" ]; then
6408     # The variable is not set by user, try to locate tool using the code snippet
6409     for ac_prog in cp
6410 do
6411   # Extract the first word of "$ac_prog", so it can be a program name with args.
6412 set dummy $ac_prog; ac_word=$2
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414 $as_echo_n "checking for $ac_word... " >&6; }
6415 if ${ac_cv_path_CP+:} false; then :
6416   $as_echo_n "(cached) " >&6
6417 else
6418   case $CP in
6419   [\\/]* | ?:[\\/]*)
6420   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6421   ;;
6422   *)
6423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH
6425 do
6426   IFS=$as_save_IFS
6427   test -z "$as_dir" && as_dir=.
6428     for ac_exec_ext in '' $ac_executable_extensions; do
6429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6430     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6432     break 2
6433   fi
6434 done
6435   done
6436 IFS=$as_save_IFS
6437 
6438   ;;
6439 esac
6440 fi
6441 CP=$ac_cv_path_CP
6442 if test -n "$CP"; then
6443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6444 $as_echo "$CP" >&6; }
6445 else
6446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447 $as_echo "no" >&6; }
6448 fi
6449 
6450 
6451   test -n "$CP" && break
6452 done
6453 
6454   else
6455     # The variable is set, but is it from the command line or the environment?
6456 
6457     # Try to remove the string !CP! from our list.
6458     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6459     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6460       # If it failed, the variable was not from the command line. Ignore it,
6461       # but warn the user (except for BASH, which is always set by the calling BASH).
6462       if test "xCP" != xBASH; then
6463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6464 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6465       fi
6466       # Try to locate tool using the code snippet
6467       for ac_prog in cp
6468 do
6469   # Extract the first word of "$ac_prog", so it can be a program name with args.
6470 set dummy $ac_prog; ac_word=$2
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472 $as_echo_n "checking for $ac_word... " >&6; }
6473 if ${ac_cv_path_CP+:} false; then :
6474   $as_echo_n "(cached) " >&6
6475 else
6476   case $CP in
6477   [\\/]* | ?:[\\/]*)
6478   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6479   ;;
6480   *)
6481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6482 for as_dir in $PATH
6483 do
6484   IFS=$as_save_IFS
6485   test -z "$as_dir" && as_dir=.
6486     for ac_exec_ext in '' $ac_executable_extensions; do
6487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6488     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6490     break 2
6491   fi
6492 done
6493   done
6494 IFS=$as_save_IFS
6495 
6496   ;;
6497 esac
6498 fi
6499 CP=$ac_cv_path_CP
6500 if test -n "$CP"; then
6501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6502 $as_echo "$CP" >&6; }
6503 else
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505 $as_echo "no" >&6; }
6506 fi
6507 
6508 
6509   test -n "$CP" && break
6510 done
6511 
6512     else
6513       # If it succeeded, then it was overridden by the user. We will use it
6514       # for the tool.
6515 
6516       # First remove it from the list of overridden variables, so we can test
6517       # for unknown variables in the end.
6518       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6519 
6520       # Check if we try to supply an empty value
6521       if test "x$CP" = x; then
6522         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6523 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6525 $as_echo_n "checking for CP... " >&6; }
6526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6527 $as_echo "disabled" >&6; }
6528       else
6529         # Check if the provided tool contains a complete path.
6530         tool_specified="$CP"
6531         tool_basename="${tool_specified##*/}"
6532         if test "x$tool_basename" = "x$tool_specified"; then
6533           # A command without a complete path is provided, search $PATH.
6534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6535 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6536           # Extract the first word of "$tool_basename", so it can be a program name with args.
6537 set dummy $tool_basename; ac_word=$2
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6539 $as_echo_n "checking for $ac_word... " >&6; }
6540 if ${ac_cv_path_CP+:} false; then :
6541   $as_echo_n "(cached) " >&6
6542 else
6543   case $CP in
6544   [\\/]* | ?:[\\/]*)
6545   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6546   ;;
6547   *)
6548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549 for as_dir in $PATH
6550 do
6551   IFS=$as_save_IFS
6552   test -z "$as_dir" && as_dir=.
6553     for ac_exec_ext in '' $ac_executable_extensions; do
6554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6555     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557     break 2
6558   fi
6559 done
6560   done
6561 IFS=$as_save_IFS
6562 
6563   ;;
6564 esac
6565 fi
6566 CP=$ac_cv_path_CP
6567 if test -n "$CP"; then
6568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6569 $as_echo "$CP" >&6; }
6570 else
6571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572 $as_echo "no" >&6; }
6573 fi
6574 
6575 
6576           if test "x$CP" = x; then
6577             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6578           fi
6579         else
6580           # Otherwise we believe it is a complete path. Use it as it is.
6581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6582 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6583           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6584 $as_echo_n "checking for CP... " >&6; }
6585           if test ! -x "$tool_specified"; then
6586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6587 $as_echo "not found" >&6; }
6588             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6589           fi
6590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6591 $as_echo "$tool_specified" >&6; }
6592         fi
6593       fi
6594     fi
6595 
6596   fi
6597 
6598 
6599 
6600   if test "x$CP" = x; then
6601     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6602   fi
6603 
6604 
6605 
6606 
6607 
6608   # Publish this variable in the help.
6609 
6610 
6611   if [ -z "${CUT+x}" ]; then
6612     # The variable is not set by user, try to locate tool using the code snippet
6613     for ac_prog in cut
6614 do
6615   # Extract the first word of "$ac_prog", so it can be a program name with args.
6616 set dummy $ac_prog; ac_word=$2
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6618 $as_echo_n "checking for $ac_word... " >&6; }
6619 if ${ac_cv_path_CUT+:} false; then :
6620   $as_echo_n "(cached) " >&6
6621 else
6622   case $CUT in
6623   [\\/]* | ?:[\\/]*)
6624   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6625   ;;
6626   *)
6627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6628 for as_dir in $PATH
6629 do
6630   IFS=$as_save_IFS
6631   test -z "$as_dir" && as_dir=.
6632     for ac_exec_ext in '' $ac_executable_extensions; do
6633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6634     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6636     break 2
6637   fi
6638 done
6639   done
6640 IFS=$as_save_IFS
6641 
6642   ;;
6643 esac
6644 fi
6645 CUT=$ac_cv_path_CUT
6646 if test -n "$CUT"; then
6647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6648 $as_echo "$CUT" >&6; }
6649 else
6650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6651 $as_echo "no" >&6; }
6652 fi
6653 
6654 
6655   test -n "$CUT" && break
6656 done
6657 
6658   else
6659     # The variable is set, but is it from the command line or the environment?
6660 
6661     # Try to remove the string !CUT! from our list.
6662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6664       # If it failed, the variable was not from the command line. Ignore it,
6665       # but warn the user (except for BASH, which is always set by the calling BASH).
6666       if test "xCUT" != xBASH; then
6667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6668 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6669       fi
6670       # Try to locate tool using the code snippet
6671       for ac_prog in cut
6672 do
6673   # Extract the first word of "$ac_prog", so it can be a program name with args.
6674 set dummy $ac_prog; ac_word=$2
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6676 $as_echo_n "checking for $ac_word... " >&6; }
6677 if ${ac_cv_path_CUT+:} false; then :
6678   $as_echo_n "(cached) " >&6
6679 else
6680   case $CUT in
6681   [\\/]* | ?:[\\/]*)
6682   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6683   ;;
6684   *)
6685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6686 for as_dir in $PATH
6687 do
6688   IFS=$as_save_IFS
6689   test -z "$as_dir" && as_dir=.
6690     for ac_exec_ext in '' $ac_executable_extensions; do
6691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6692     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6694     break 2
6695   fi
6696 done
6697   done
6698 IFS=$as_save_IFS
6699 
6700   ;;
6701 esac
6702 fi
6703 CUT=$ac_cv_path_CUT
6704 if test -n "$CUT"; then
6705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6706 $as_echo "$CUT" >&6; }
6707 else
6708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709 $as_echo "no" >&6; }
6710 fi
6711 
6712 
6713   test -n "$CUT" && break
6714 done
6715 
6716     else
6717       # If it succeeded, then it was overridden by the user. We will use it
6718       # for the tool.
6719 
6720       # First remove it from the list of overridden variables, so we can test
6721       # for unknown variables in the end.
6722       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6723 
6724       # Check if we try to supply an empty value
6725       if test "x$CUT" = x; then
6726         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6727 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6728         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6729 $as_echo_n "checking for CUT... " >&6; }
6730         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6731 $as_echo "disabled" >&6; }
6732       else
6733         # Check if the provided tool contains a complete path.
6734         tool_specified="$CUT"
6735         tool_basename="${tool_specified##*/}"
6736         if test "x$tool_basename" = "x$tool_specified"; then
6737           # A command without a complete path is provided, search $PATH.
6738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6739 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6740           # Extract the first word of "$tool_basename", so it can be a program name with args.
6741 set dummy $tool_basename; ac_word=$2
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743 $as_echo_n "checking for $ac_word... " >&6; }
6744 if ${ac_cv_path_CUT+:} false; then :
6745   $as_echo_n "(cached) " >&6
6746 else
6747   case $CUT in
6748   [\\/]* | ?:[\\/]*)
6749   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6750   ;;
6751   *)
6752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753 for as_dir in $PATH
6754 do
6755   IFS=$as_save_IFS
6756   test -z "$as_dir" && as_dir=.
6757     for ac_exec_ext in '' $ac_executable_extensions; do
6758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761     break 2
6762   fi
6763 done
6764   done
6765 IFS=$as_save_IFS
6766 
6767   ;;
6768 esac
6769 fi
6770 CUT=$ac_cv_path_CUT
6771 if test -n "$CUT"; then
6772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6773 $as_echo "$CUT" >&6; }
6774 else
6775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776 $as_echo "no" >&6; }
6777 fi
6778 
6779 
6780           if test "x$CUT" = x; then
6781             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6782           fi
6783         else
6784           # Otherwise we believe it is a complete path. Use it as it is.
6785           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6786 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6787           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6788 $as_echo_n "checking for CUT... " >&6; }
6789           if test ! -x "$tool_specified"; then
6790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6791 $as_echo "not found" >&6; }
6792             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6793           fi
6794           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6795 $as_echo "$tool_specified" >&6; }
6796         fi
6797       fi
6798     fi
6799 
6800   fi
6801 
6802 
6803 
6804   if test "x$CUT" = x; then
6805     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6806   fi
6807 
6808 
6809 
6810 
6811 
6812   # Publish this variable in the help.
6813 
6814 
6815   if [ -z "${DATE+x}" ]; then
6816     # The variable is not set by user, try to locate tool using the code snippet
6817     for ac_prog in date
6818 do
6819   # Extract the first word of "$ac_prog", so it can be a program name with args.
6820 set dummy $ac_prog; ac_word=$2
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6822 $as_echo_n "checking for $ac_word... " >&6; }
6823 if ${ac_cv_path_DATE+:} false; then :
6824   $as_echo_n "(cached) " >&6
6825 else
6826   case $DATE in
6827   [\\/]* | ?:[\\/]*)
6828   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6829   ;;
6830   *)
6831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6832 for as_dir in $PATH
6833 do
6834   IFS=$as_save_IFS
6835   test -z "$as_dir" && as_dir=.
6836     for ac_exec_ext in '' $ac_executable_extensions; do
6837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6838     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6840     break 2
6841   fi
6842 done
6843   done
6844 IFS=$as_save_IFS
6845 
6846   ;;
6847 esac
6848 fi
6849 DATE=$ac_cv_path_DATE
6850 if test -n "$DATE"; then
6851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6852 $as_echo "$DATE" >&6; }
6853 else
6854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6855 $as_echo "no" >&6; }
6856 fi
6857 
6858 
6859   test -n "$DATE" && break
6860 done
6861 
6862   else
6863     # The variable is set, but is it from the command line or the environment?
6864 
6865     # Try to remove the string !DATE! from our list.
6866     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6867     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6868       # If it failed, the variable was not from the command line. Ignore it,
6869       # but warn the user (except for BASH, which is always set by the calling BASH).
6870       if test "xDATE" != xBASH; then
6871         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6872 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6873       fi
6874       # Try to locate tool using the code snippet
6875       for ac_prog in date
6876 do
6877   # Extract the first word of "$ac_prog", so it can be a program name with args.
6878 set dummy $ac_prog; ac_word=$2
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6880 $as_echo_n "checking for $ac_word... " >&6; }
6881 if ${ac_cv_path_DATE+:} false; then :
6882   $as_echo_n "(cached) " >&6
6883 else
6884   case $DATE in
6885   [\\/]* | ?:[\\/]*)
6886   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6887   ;;
6888   *)
6889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6890 for as_dir in $PATH
6891 do
6892   IFS=$as_save_IFS
6893   test -z "$as_dir" && as_dir=.
6894     for ac_exec_ext in '' $ac_executable_extensions; do
6895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6896     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6898     break 2
6899   fi
6900 done
6901   done
6902 IFS=$as_save_IFS
6903 
6904   ;;
6905 esac
6906 fi
6907 DATE=$ac_cv_path_DATE
6908 if test -n "$DATE"; then
6909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6910 $as_echo "$DATE" >&6; }
6911 else
6912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6913 $as_echo "no" >&6; }
6914 fi
6915 
6916 
6917   test -n "$DATE" && break
6918 done
6919 
6920     else
6921       # If it succeeded, then it was overridden by the user. We will use it
6922       # for the tool.
6923 
6924       # First remove it from the list of overridden variables, so we can test
6925       # for unknown variables in the end.
6926       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6927 
6928       # Check if we try to supply an empty value
6929       if test "x$DATE" = x; then
6930         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6931 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6932         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6933 $as_echo_n "checking for DATE... " >&6; }
6934         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6935 $as_echo "disabled" >&6; }
6936       else
6937         # Check if the provided tool contains a complete path.
6938         tool_specified="$DATE"
6939         tool_basename="${tool_specified##*/}"
6940         if test "x$tool_basename" = "x$tool_specified"; then
6941           # A command without a complete path is provided, search $PATH.
6942           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6943 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6944           # Extract the first word of "$tool_basename", so it can be a program name with args.
6945 set dummy $tool_basename; ac_word=$2
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6947 $as_echo_n "checking for $ac_word... " >&6; }
6948 if ${ac_cv_path_DATE+:} false; then :
6949   $as_echo_n "(cached) " >&6
6950 else
6951   case $DATE in
6952   [\\/]* | ?:[\\/]*)
6953   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6954   ;;
6955   *)
6956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6957 for as_dir in $PATH
6958 do
6959   IFS=$as_save_IFS
6960   test -z "$as_dir" && as_dir=.
6961     for ac_exec_ext in '' $ac_executable_extensions; do
6962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6963     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6965     break 2
6966   fi
6967 done
6968   done
6969 IFS=$as_save_IFS
6970 
6971   ;;
6972 esac
6973 fi
6974 DATE=$ac_cv_path_DATE
6975 if test -n "$DATE"; then
6976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6977 $as_echo "$DATE" >&6; }
6978 else
6979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980 $as_echo "no" >&6; }
6981 fi
6982 
6983 
6984           if test "x$DATE" = x; then
6985             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6986           fi
6987         else
6988           # Otherwise we believe it is a complete path. Use it as it is.
6989           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6990 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6991           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6992 $as_echo_n "checking for DATE... " >&6; }
6993           if test ! -x "$tool_specified"; then
6994             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6995 $as_echo "not found" >&6; }
6996             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6997           fi
6998           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6999 $as_echo "$tool_specified" >&6; }
7000         fi
7001       fi
7002     fi
7003 
7004   fi
7005 
7006 
7007 
7008   if test "x$DATE" = x; then
7009     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7010   fi
7011 
7012 
7013 
7014 
7015 
7016   # Publish this variable in the help.
7017 
7018 
7019   if [ -z "${DIFF+x}" ]; then
7020     # The variable is not set by user, try to locate tool using the code snippet
7021     for ac_prog in gdiff diff
7022 do
7023   # Extract the first word of "$ac_prog", so it can be a program name with args.
7024 set dummy $ac_prog; ac_word=$2
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026 $as_echo_n "checking for $ac_word... " >&6; }
7027 if ${ac_cv_path_DIFF+:} false; then :
7028   $as_echo_n "(cached) " >&6
7029 else
7030   case $DIFF in
7031   [\\/]* | ?:[\\/]*)
7032   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7033   ;;
7034   *)
7035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7036 for as_dir in $PATH
7037 do
7038   IFS=$as_save_IFS
7039   test -z "$as_dir" && as_dir=.
7040     for ac_exec_ext in '' $ac_executable_extensions; do
7041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7042     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7044     break 2
7045   fi
7046 done
7047   done
7048 IFS=$as_save_IFS
7049 
7050   ;;
7051 esac
7052 fi
7053 DIFF=$ac_cv_path_DIFF
7054 if test -n "$DIFF"; then
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7056 $as_echo "$DIFF" >&6; }
7057 else
7058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059 $as_echo "no" >&6; }
7060 fi
7061 
7062 
7063   test -n "$DIFF" && break
7064 done
7065 
7066   else
7067     # The variable is set, but is it from the command line or the environment?
7068 
7069     # Try to remove the string !DIFF! from our list.
7070     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7071     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7072       # If it failed, the variable was not from the command line. Ignore it,
7073       # but warn the user (except for BASH, which is always set by the calling BASH).
7074       if test "xDIFF" != xBASH; then
7075         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7076 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7077       fi
7078       # Try to locate tool using the code snippet
7079       for ac_prog in gdiff diff
7080 do
7081   # Extract the first word of "$ac_prog", so it can be a program name with args.
7082 set dummy $ac_prog; ac_word=$2
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7084 $as_echo_n "checking for $ac_word... " >&6; }
7085 if ${ac_cv_path_DIFF+:} false; then :
7086   $as_echo_n "(cached) " >&6
7087 else
7088   case $DIFF in
7089   [\\/]* | ?:[\\/]*)
7090   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7091   ;;
7092   *)
7093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7094 for as_dir in $PATH
7095 do
7096   IFS=$as_save_IFS
7097   test -z "$as_dir" && as_dir=.
7098     for ac_exec_ext in '' $ac_executable_extensions; do
7099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7100     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7102     break 2
7103   fi
7104 done
7105   done
7106 IFS=$as_save_IFS
7107 
7108   ;;
7109 esac
7110 fi
7111 DIFF=$ac_cv_path_DIFF
7112 if test -n "$DIFF"; then
7113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7114 $as_echo "$DIFF" >&6; }
7115 else
7116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7117 $as_echo "no" >&6; }
7118 fi
7119 
7120 
7121   test -n "$DIFF" && break
7122 done
7123 
7124     else
7125       # If it succeeded, then it was overridden by the user. We will use it
7126       # for the tool.
7127 
7128       # First remove it from the list of overridden variables, so we can test
7129       # for unknown variables in the end.
7130       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7131 
7132       # Check if we try to supply an empty value
7133       if test "x$DIFF" = x; then
7134         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7135 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7137 $as_echo_n "checking for DIFF... " >&6; }
7138         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7139 $as_echo "disabled" >&6; }
7140       else
7141         # Check if the provided tool contains a complete path.
7142         tool_specified="$DIFF"
7143         tool_basename="${tool_specified##*/}"
7144         if test "x$tool_basename" = "x$tool_specified"; then
7145           # A command without a complete path is provided, search $PATH.
7146           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7147 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7148           # Extract the first word of "$tool_basename", so it can be a program name with args.
7149 set dummy $tool_basename; ac_word=$2
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151 $as_echo_n "checking for $ac_word... " >&6; }
7152 if ${ac_cv_path_DIFF+:} false; then :
7153   $as_echo_n "(cached) " >&6
7154 else
7155   case $DIFF in
7156   [\\/]* | ?:[\\/]*)
7157   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7158   ;;
7159   *)
7160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161 for as_dir in $PATH
7162 do
7163   IFS=$as_save_IFS
7164   test -z "$as_dir" && as_dir=.
7165     for ac_exec_ext in '' $ac_executable_extensions; do
7166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169     break 2
7170   fi
7171 done
7172   done
7173 IFS=$as_save_IFS
7174 
7175   ;;
7176 esac
7177 fi
7178 DIFF=$ac_cv_path_DIFF
7179 if test -n "$DIFF"; then
7180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7181 $as_echo "$DIFF" >&6; }
7182 else
7183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184 $as_echo "no" >&6; }
7185 fi
7186 
7187 
7188           if test "x$DIFF" = x; then
7189             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7190           fi
7191         else
7192           # Otherwise we believe it is a complete path. Use it as it is.
7193           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7194 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7195           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7196 $as_echo_n "checking for DIFF... " >&6; }
7197           if test ! -x "$tool_specified"; then
7198             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7199 $as_echo "not found" >&6; }
7200             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7201           fi
7202           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7203 $as_echo "$tool_specified" >&6; }
7204         fi
7205       fi
7206     fi
7207 
7208   fi
7209 
7210 
7211 
7212   if test "x$DIFF" = x; then
7213     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7214   fi
7215 
7216 
7217 
7218 
7219 
7220   # Publish this variable in the help.
7221 
7222 
7223   if [ -z "${DIRNAME+x}" ]; then
7224     # The variable is not set by user, try to locate tool using the code snippet
7225     for ac_prog in dirname
7226 do
7227   # Extract the first word of "$ac_prog", so it can be a program name with args.
7228 set dummy $ac_prog; ac_word=$2
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7230 $as_echo_n "checking for $ac_word... " >&6; }
7231 if ${ac_cv_path_DIRNAME+:} false; then :
7232   $as_echo_n "(cached) " >&6
7233 else
7234   case $DIRNAME in
7235   [\\/]* | ?:[\\/]*)
7236   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7237   ;;
7238   *)
7239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7240 for as_dir in $PATH
7241 do
7242   IFS=$as_save_IFS
7243   test -z "$as_dir" && as_dir=.
7244     for ac_exec_ext in '' $ac_executable_extensions; do
7245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7246     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7248     break 2
7249   fi
7250 done
7251   done
7252 IFS=$as_save_IFS
7253 
7254   ;;
7255 esac
7256 fi
7257 DIRNAME=$ac_cv_path_DIRNAME
7258 if test -n "$DIRNAME"; then
7259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7260 $as_echo "$DIRNAME" >&6; }
7261 else
7262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7263 $as_echo "no" >&6; }
7264 fi
7265 
7266 
7267   test -n "$DIRNAME" && break
7268 done
7269 
7270   else
7271     # The variable is set, but is it from the command line or the environment?
7272 
7273     # Try to remove the string !DIRNAME! from our list.
7274     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7275     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7276       # If it failed, the variable was not from the command line. Ignore it,
7277       # but warn the user (except for BASH, which is always set by the calling BASH).
7278       if test "xDIRNAME" != xBASH; then
7279         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7280 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7281       fi
7282       # Try to locate tool using the code snippet
7283       for ac_prog in dirname
7284 do
7285   # Extract the first word of "$ac_prog", so it can be a program name with args.
7286 set dummy $ac_prog; ac_word=$2
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7288 $as_echo_n "checking for $ac_word... " >&6; }
7289 if ${ac_cv_path_DIRNAME+:} false; then :
7290   $as_echo_n "(cached) " >&6
7291 else
7292   case $DIRNAME in
7293   [\\/]* | ?:[\\/]*)
7294   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7295   ;;
7296   *)
7297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7298 for as_dir in $PATH
7299 do
7300   IFS=$as_save_IFS
7301   test -z "$as_dir" && as_dir=.
7302     for ac_exec_ext in '' $ac_executable_extensions; do
7303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7304     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7306     break 2
7307   fi
7308 done
7309   done
7310 IFS=$as_save_IFS
7311 
7312   ;;
7313 esac
7314 fi
7315 DIRNAME=$ac_cv_path_DIRNAME
7316 if test -n "$DIRNAME"; then
7317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7318 $as_echo "$DIRNAME" >&6; }
7319 else
7320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321 $as_echo "no" >&6; }
7322 fi
7323 
7324 
7325   test -n "$DIRNAME" && break
7326 done
7327 
7328     else
7329       # If it succeeded, then it was overridden by the user. We will use it
7330       # for the tool.
7331 
7332       # First remove it from the list of overridden variables, so we can test
7333       # for unknown variables in the end.
7334       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7335 
7336       # Check if we try to supply an empty value
7337       if test "x$DIRNAME" = x; then
7338         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7339 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7340         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7341 $as_echo_n "checking for DIRNAME... " >&6; }
7342         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7343 $as_echo "disabled" >&6; }
7344       else
7345         # Check if the provided tool contains a complete path.
7346         tool_specified="$DIRNAME"
7347         tool_basename="${tool_specified##*/}"
7348         if test "x$tool_basename" = "x$tool_specified"; then
7349           # A command without a complete path is provided, search $PATH.
7350           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7351 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7352           # Extract the first word of "$tool_basename", so it can be a program name with args.
7353 set dummy $tool_basename; ac_word=$2
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355 $as_echo_n "checking for $ac_word... " >&6; }
7356 if ${ac_cv_path_DIRNAME+:} false; then :
7357   $as_echo_n "(cached) " >&6
7358 else
7359   case $DIRNAME in
7360   [\\/]* | ?:[\\/]*)
7361   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7362   ;;
7363   *)
7364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365 for as_dir in $PATH
7366 do
7367   IFS=$as_save_IFS
7368   test -z "$as_dir" && as_dir=.
7369     for ac_exec_ext in '' $ac_executable_extensions; do
7370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373     break 2
7374   fi
7375 done
7376   done
7377 IFS=$as_save_IFS
7378 
7379   ;;
7380 esac
7381 fi
7382 DIRNAME=$ac_cv_path_DIRNAME
7383 if test -n "$DIRNAME"; then
7384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7385 $as_echo "$DIRNAME" >&6; }
7386 else
7387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390 
7391 
7392           if test "x$DIRNAME" = x; then
7393             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7394           fi
7395         else
7396           # Otherwise we believe it is a complete path. Use it as it is.
7397           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7398 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7399           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7400 $as_echo_n "checking for DIRNAME... " >&6; }
7401           if test ! -x "$tool_specified"; then
7402             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7403 $as_echo "not found" >&6; }
7404             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7405           fi
7406           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7407 $as_echo "$tool_specified" >&6; }
7408         fi
7409       fi
7410     fi
7411 
7412   fi
7413 
7414 
7415 
7416   if test "x$DIRNAME" = x; then
7417     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7418   fi
7419 
7420 
7421 
7422 
7423 
7424   # Publish this variable in the help.
7425 
7426 
7427   if [ -z "${ECHO+x}" ]; then
7428     # The variable is not set by user, try to locate tool using the code snippet
7429     for ac_prog in echo
7430 do
7431   # Extract the first word of "$ac_prog", so it can be a program name with args.
7432 set dummy $ac_prog; ac_word=$2
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434 $as_echo_n "checking for $ac_word... " >&6; }
7435 if ${ac_cv_path_ECHO+:} false; then :
7436   $as_echo_n "(cached) " >&6
7437 else
7438   case $ECHO in
7439   [\\/]* | ?:[\\/]*)
7440   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7441   ;;
7442   *)
7443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7444 for as_dir in $PATH
7445 do
7446   IFS=$as_save_IFS
7447   test -z "$as_dir" && as_dir=.
7448     for ac_exec_ext in '' $ac_executable_extensions; do
7449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7450     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7452     break 2
7453   fi
7454 done
7455   done
7456 IFS=$as_save_IFS
7457 
7458   ;;
7459 esac
7460 fi
7461 ECHO=$ac_cv_path_ECHO
7462 if test -n "$ECHO"; then
7463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7464 $as_echo "$ECHO" >&6; }
7465 else
7466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7467 $as_echo "no" >&6; }
7468 fi
7469 
7470 
7471   test -n "$ECHO" && break
7472 done
7473 
7474   else
7475     # The variable is set, but is it from the command line or the environment?
7476 
7477     # Try to remove the string !ECHO! from our list.
7478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7480       # If it failed, the variable was not from the command line. Ignore it,
7481       # but warn the user (except for BASH, which is always set by the calling BASH).
7482       if test "xECHO" != xBASH; then
7483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7484 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7485       fi
7486       # Try to locate tool using the code snippet
7487       for ac_prog in echo
7488 do
7489   # Extract the first word of "$ac_prog", so it can be a program name with args.
7490 set dummy $ac_prog; ac_word=$2
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7492 $as_echo_n "checking for $ac_word... " >&6; }
7493 if ${ac_cv_path_ECHO+:} false; then :
7494   $as_echo_n "(cached) " >&6
7495 else
7496   case $ECHO in
7497   [\\/]* | ?:[\\/]*)
7498   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7499   ;;
7500   *)
7501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502 for as_dir in $PATH
7503 do
7504   IFS=$as_save_IFS
7505   test -z "$as_dir" && as_dir=.
7506     for ac_exec_ext in '' $ac_executable_extensions; do
7507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7508     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7510     break 2
7511   fi
7512 done
7513   done
7514 IFS=$as_save_IFS
7515 
7516   ;;
7517 esac
7518 fi
7519 ECHO=$ac_cv_path_ECHO
7520 if test -n "$ECHO"; then
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7522 $as_echo "$ECHO" >&6; }
7523 else
7524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7525 $as_echo "no" >&6; }
7526 fi
7527 
7528 
7529   test -n "$ECHO" && break
7530 done
7531 
7532     else
7533       # If it succeeded, then it was overridden by the user. We will use it
7534       # for the tool.
7535 
7536       # First remove it from the list of overridden variables, so we can test
7537       # for unknown variables in the end.
7538       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7539 
7540       # Check if we try to supply an empty value
7541       if test "x$ECHO" = x; then
7542         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7543 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7544         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7545 $as_echo_n "checking for ECHO... " >&6; }
7546         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7547 $as_echo "disabled" >&6; }
7548       else
7549         # Check if the provided tool contains a complete path.
7550         tool_specified="$ECHO"
7551         tool_basename="${tool_specified##*/}"
7552         if test "x$tool_basename" = "x$tool_specified"; then
7553           # A command without a complete path is provided, search $PATH.
7554           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7555 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7556           # Extract the first word of "$tool_basename", so it can be a program name with args.
7557 set dummy $tool_basename; ac_word=$2
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559 $as_echo_n "checking for $ac_word... " >&6; }
7560 if ${ac_cv_path_ECHO+:} false; then :
7561   $as_echo_n "(cached) " >&6
7562 else
7563   case $ECHO in
7564   [\\/]* | ?:[\\/]*)
7565   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7566   ;;
7567   *)
7568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569 for as_dir in $PATH
7570 do
7571   IFS=$as_save_IFS
7572   test -z "$as_dir" && as_dir=.
7573     for ac_exec_ext in '' $ac_executable_extensions; do
7574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577     break 2
7578   fi
7579 done
7580   done
7581 IFS=$as_save_IFS
7582 
7583   ;;
7584 esac
7585 fi
7586 ECHO=$ac_cv_path_ECHO
7587 if test -n "$ECHO"; then
7588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7589 $as_echo "$ECHO" >&6; }
7590 else
7591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592 $as_echo "no" >&6; }
7593 fi
7594 
7595 
7596           if test "x$ECHO" = x; then
7597             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7598           fi
7599         else
7600           # Otherwise we believe it is a complete path. Use it as it is.
7601           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7602 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7603           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7604 $as_echo_n "checking for ECHO... " >&6; }
7605           if test ! -x "$tool_specified"; then
7606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7607 $as_echo "not found" >&6; }
7608             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7609           fi
7610           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7611 $as_echo "$tool_specified" >&6; }
7612         fi
7613       fi
7614     fi
7615 
7616   fi
7617 
7618 
7619 
7620   if test "x$ECHO" = x; then
7621     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7622   fi
7623 
7624 
7625 
7626 
7627 
7628   # Publish this variable in the help.
7629 
7630 
7631   if [ -z "${EXPR+x}" ]; then
7632     # The variable is not set by user, try to locate tool using the code snippet
7633     for ac_prog in expr
7634 do
7635   # Extract the first word of "$ac_prog", so it can be a program name with args.
7636 set dummy $ac_prog; ac_word=$2
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7638 $as_echo_n "checking for $ac_word... " >&6; }
7639 if ${ac_cv_path_EXPR+:} false; then :
7640   $as_echo_n "(cached) " >&6
7641 else
7642   case $EXPR in
7643   [\\/]* | ?:[\\/]*)
7644   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7645   ;;
7646   *)
7647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7648 for as_dir in $PATH
7649 do
7650   IFS=$as_save_IFS
7651   test -z "$as_dir" && as_dir=.
7652     for ac_exec_ext in '' $ac_executable_extensions; do
7653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7654     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7656     break 2
7657   fi
7658 done
7659   done
7660 IFS=$as_save_IFS
7661 
7662   ;;
7663 esac
7664 fi
7665 EXPR=$ac_cv_path_EXPR
7666 if test -n "$EXPR"; then
7667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7668 $as_echo "$EXPR" >&6; }
7669 else
7670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7671 $as_echo "no" >&6; }
7672 fi
7673 
7674 
7675   test -n "$EXPR" && break
7676 done
7677 
7678   else
7679     # The variable is set, but is it from the command line or the environment?
7680 
7681     # Try to remove the string !EXPR! from our list.
7682     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7683     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7684       # If it failed, the variable was not from the command line. Ignore it,
7685       # but warn the user (except for BASH, which is always set by the calling BASH).
7686       if test "xEXPR" != xBASH; then
7687         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7688 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7689       fi
7690       # Try to locate tool using the code snippet
7691       for ac_prog in expr
7692 do
7693   # Extract the first word of "$ac_prog", so it can be a program name with args.
7694 set dummy $ac_prog; ac_word=$2
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7696 $as_echo_n "checking for $ac_word... " >&6; }
7697 if ${ac_cv_path_EXPR+:} false; then :
7698   $as_echo_n "(cached) " >&6
7699 else
7700   case $EXPR in
7701   [\\/]* | ?:[\\/]*)
7702   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7703   ;;
7704   *)
7705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7706 for as_dir in $PATH
7707 do
7708   IFS=$as_save_IFS
7709   test -z "$as_dir" && as_dir=.
7710     for ac_exec_ext in '' $ac_executable_extensions; do
7711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7712     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7714     break 2
7715   fi
7716 done
7717   done
7718 IFS=$as_save_IFS
7719 
7720   ;;
7721 esac
7722 fi
7723 EXPR=$ac_cv_path_EXPR
7724 if test -n "$EXPR"; then
7725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7726 $as_echo "$EXPR" >&6; }
7727 else
7728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7729 $as_echo "no" >&6; }
7730 fi
7731 
7732 
7733   test -n "$EXPR" && break
7734 done
7735 
7736     else
7737       # If it succeeded, then it was overridden by the user. We will use it
7738       # for the tool.
7739 
7740       # First remove it from the list of overridden variables, so we can test
7741       # for unknown variables in the end.
7742       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7743 
7744       # Check if we try to supply an empty value
7745       if test "x$EXPR" = x; then
7746         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7747 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7749 $as_echo_n "checking for EXPR... " >&6; }
7750         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7751 $as_echo "disabled" >&6; }
7752       else
7753         # Check if the provided tool contains a complete path.
7754         tool_specified="$EXPR"
7755         tool_basename="${tool_specified##*/}"
7756         if test "x$tool_basename" = "x$tool_specified"; then
7757           # A command without a complete path is provided, search $PATH.
7758           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7759 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7760           # Extract the first word of "$tool_basename", so it can be a program name with args.
7761 set dummy $tool_basename; ac_word=$2
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7763 $as_echo_n "checking for $ac_word... " >&6; }
7764 if ${ac_cv_path_EXPR+:} false; then :
7765   $as_echo_n "(cached) " >&6
7766 else
7767   case $EXPR in
7768   [\\/]* | ?:[\\/]*)
7769   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7770   ;;
7771   *)
7772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773 for as_dir in $PATH
7774 do
7775   IFS=$as_save_IFS
7776   test -z "$as_dir" && as_dir=.
7777     for ac_exec_ext in '' $ac_executable_extensions; do
7778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7781     break 2
7782   fi
7783 done
7784   done
7785 IFS=$as_save_IFS
7786 
7787   ;;
7788 esac
7789 fi
7790 EXPR=$ac_cv_path_EXPR
7791 if test -n "$EXPR"; then
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7793 $as_echo "$EXPR" >&6; }
7794 else
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7796 $as_echo "no" >&6; }
7797 fi
7798 
7799 
7800           if test "x$EXPR" = x; then
7801             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7802           fi
7803         else
7804           # Otherwise we believe it is a complete path. Use it as it is.
7805           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7806 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7807           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7808 $as_echo_n "checking for EXPR... " >&6; }
7809           if test ! -x "$tool_specified"; then
7810             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7811 $as_echo "not found" >&6; }
7812             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7813           fi
7814           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7815 $as_echo "$tool_specified" >&6; }
7816         fi
7817       fi
7818     fi
7819 
7820   fi
7821 
7822 
7823 
7824   if test "x$EXPR" = x; then
7825     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7826   fi
7827 
7828 
7829 
7830 
7831 
7832   # Publish this variable in the help.
7833 
7834 
7835   if [ -z "${FILE+x}" ]; then
7836     # The variable is not set by user, try to locate tool using the code snippet
7837     for ac_prog in file
7838 do
7839   # Extract the first word of "$ac_prog", so it can be a program name with args.
7840 set dummy $ac_prog; ac_word=$2
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7842 $as_echo_n "checking for $ac_word... " >&6; }
7843 if ${ac_cv_path_FILE+:} false; then :
7844   $as_echo_n "(cached) " >&6
7845 else
7846   case $FILE in
7847   [\\/]* | ?:[\\/]*)
7848   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7849   ;;
7850   *)
7851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7852 for as_dir in $PATH
7853 do
7854   IFS=$as_save_IFS
7855   test -z "$as_dir" && as_dir=.
7856     for ac_exec_ext in '' $ac_executable_extensions; do
7857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7858     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7860     break 2
7861   fi
7862 done
7863   done
7864 IFS=$as_save_IFS
7865 
7866   ;;
7867 esac
7868 fi
7869 FILE=$ac_cv_path_FILE
7870 if test -n "$FILE"; then
7871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7872 $as_echo "$FILE" >&6; }
7873 else
7874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875 $as_echo "no" >&6; }
7876 fi
7877 
7878 
7879   test -n "$FILE" && break
7880 done
7881 
7882   else
7883     # The variable is set, but is it from the command line or the environment?
7884 
7885     # Try to remove the string !FILE! from our list.
7886     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7887     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7888       # If it failed, the variable was not from the command line. Ignore it,
7889       # but warn the user (except for BASH, which is always set by the calling BASH).
7890       if test "xFILE" != xBASH; then
7891         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7892 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7893       fi
7894       # Try to locate tool using the code snippet
7895       for ac_prog in file
7896 do
7897   # Extract the first word of "$ac_prog", so it can be a program name with args.
7898 set dummy $ac_prog; ac_word=$2
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900 $as_echo_n "checking for $ac_word... " >&6; }
7901 if ${ac_cv_path_FILE+:} false; then :
7902   $as_echo_n "(cached) " >&6
7903 else
7904   case $FILE in
7905   [\\/]* | ?:[\\/]*)
7906   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7907   ;;
7908   *)
7909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910 for as_dir in $PATH
7911 do
7912   IFS=$as_save_IFS
7913   test -z "$as_dir" && as_dir=.
7914     for ac_exec_ext in '' $ac_executable_extensions; do
7915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7916     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918     break 2
7919   fi
7920 done
7921   done
7922 IFS=$as_save_IFS
7923 
7924   ;;
7925 esac
7926 fi
7927 FILE=$ac_cv_path_FILE
7928 if test -n "$FILE"; then
7929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7930 $as_echo "$FILE" >&6; }
7931 else
7932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933 $as_echo "no" >&6; }
7934 fi
7935 
7936 
7937   test -n "$FILE" && break
7938 done
7939 
7940     else
7941       # If it succeeded, then it was overridden by the user. We will use it
7942       # for the tool.
7943 
7944       # First remove it from the list of overridden variables, so we can test
7945       # for unknown variables in the end.
7946       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7947 
7948       # Check if we try to supply an empty value
7949       if test "x$FILE" = x; then
7950         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7951 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7952         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7953 $as_echo_n "checking for FILE... " >&6; }
7954         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7955 $as_echo "disabled" >&6; }
7956       else
7957         # Check if the provided tool contains a complete path.
7958         tool_specified="$FILE"
7959         tool_basename="${tool_specified##*/}"
7960         if test "x$tool_basename" = "x$tool_specified"; then
7961           # A command without a complete path is provided, search $PATH.
7962           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7963 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7964           # Extract the first word of "$tool_basename", so it can be a program name with args.
7965 set dummy $tool_basename; ac_word=$2
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967 $as_echo_n "checking for $ac_word... " >&6; }
7968 if ${ac_cv_path_FILE+:} false; then :
7969   $as_echo_n "(cached) " >&6
7970 else
7971   case $FILE in
7972   [\\/]* | ?:[\\/]*)
7973   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7974   ;;
7975   *)
7976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977 for as_dir in $PATH
7978 do
7979   IFS=$as_save_IFS
7980   test -z "$as_dir" && as_dir=.
7981     for ac_exec_ext in '' $ac_executable_extensions; do
7982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985     break 2
7986   fi
7987 done
7988   done
7989 IFS=$as_save_IFS
7990 
7991   ;;
7992 esac
7993 fi
7994 FILE=$ac_cv_path_FILE
7995 if test -n "$FILE"; then
7996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7997 $as_echo "$FILE" >&6; }
7998 else
7999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000 $as_echo "no" >&6; }
8001 fi
8002 
8003 
8004           if test "x$FILE" = x; then
8005             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8006           fi
8007         else
8008           # Otherwise we believe it is a complete path. Use it as it is.
8009           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8010 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8011           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8012 $as_echo_n "checking for FILE... " >&6; }
8013           if test ! -x "$tool_specified"; then
8014             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8015 $as_echo "not found" >&6; }
8016             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8017           fi
8018           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8019 $as_echo "$tool_specified" >&6; }
8020         fi
8021       fi
8022     fi
8023 
8024   fi
8025 
8026 
8027 
8028   if test "x$FILE" = x; then
8029     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8030   fi
8031 
8032 
8033 
8034 
8035 
8036   # Publish this variable in the help.
8037 
8038 
8039   if [ -z "${FIND+x}" ]; then
8040     # The variable is not set by user, try to locate tool using the code snippet
8041     for ac_prog in find
8042 do
8043   # Extract the first word of "$ac_prog", so it can be a program name with args.
8044 set dummy $ac_prog; ac_word=$2
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8046 $as_echo_n "checking for $ac_word... " >&6; }
8047 if ${ac_cv_path_FIND+:} false; then :
8048   $as_echo_n "(cached) " >&6
8049 else
8050   case $FIND in
8051   [\\/]* | ?:[\\/]*)
8052   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8053   ;;
8054   *)
8055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8056 for as_dir in $PATH
8057 do
8058   IFS=$as_save_IFS
8059   test -z "$as_dir" && as_dir=.
8060     for ac_exec_ext in '' $ac_executable_extensions; do
8061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8062     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8064     break 2
8065   fi
8066 done
8067   done
8068 IFS=$as_save_IFS
8069 
8070   ;;
8071 esac
8072 fi
8073 FIND=$ac_cv_path_FIND
8074 if test -n "$FIND"; then
8075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8076 $as_echo "$FIND" >&6; }
8077 else
8078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8079 $as_echo "no" >&6; }
8080 fi
8081 
8082 
8083   test -n "$FIND" && break
8084 done
8085 
8086   else
8087     # The variable is set, but is it from the command line or the environment?
8088 
8089     # Try to remove the string !FIND! from our list.
8090     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8091     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8092       # If it failed, the variable was not from the command line. Ignore it,
8093       # but warn the user (except for BASH, which is always set by the calling BASH).
8094       if test "xFIND" != xBASH; then
8095         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8096 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8097       fi
8098       # Try to locate tool using the code snippet
8099       for ac_prog in find
8100 do
8101   # Extract the first word of "$ac_prog", so it can be a program name with args.
8102 set dummy $ac_prog; ac_word=$2
8103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8104 $as_echo_n "checking for $ac_word... " >&6; }
8105 if ${ac_cv_path_FIND+:} false; then :
8106   $as_echo_n "(cached) " >&6
8107 else
8108   case $FIND in
8109   [\\/]* | ?:[\\/]*)
8110   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8111   ;;
8112   *)
8113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8114 for as_dir in $PATH
8115 do
8116   IFS=$as_save_IFS
8117   test -z "$as_dir" && as_dir=.
8118     for ac_exec_ext in '' $ac_executable_extensions; do
8119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8120     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8122     break 2
8123   fi
8124 done
8125   done
8126 IFS=$as_save_IFS
8127 
8128   ;;
8129 esac
8130 fi
8131 FIND=$ac_cv_path_FIND
8132 if test -n "$FIND"; then
8133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8134 $as_echo "$FIND" >&6; }
8135 else
8136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8137 $as_echo "no" >&6; }
8138 fi
8139 
8140 
8141   test -n "$FIND" && break
8142 done
8143 
8144     else
8145       # If it succeeded, then it was overridden by the user. We will use it
8146       # for the tool.
8147 
8148       # First remove it from the list of overridden variables, so we can test
8149       # for unknown variables in the end.
8150       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8151 
8152       # Check if we try to supply an empty value
8153       if test "x$FIND" = x; then
8154         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8155 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8157 $as_echo_n "checking for FIND... " >&6; }
8158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8159 $as_echo "disabled" >&6; }
8160       else
8161         # Check if the provided tool contains a complete path.
8162         tool_specified="$FIND"
8163         tool_basename="${tool_specified##*/}"
8164         if test "x$tool_basename" = "x$tool_specified"; then
8165           # A command without a complete path is provided, search $PATH.
8166           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8167 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8168           # Extract the first word of "$tool_basename", so it can be a program name with args.
8169 set dummy $tool_basename; ac_word=$2
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171 $as_echo_n "checking for $ac_word... " >&6; }
8172 if ${ac_cv_path_FIND+:} false; then :
8173   $as_echo_n "(cached) " >&6
8174 else
8175   case $FIND in
8176   [\\/]* | ?:[\\/]*)
8177   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8178   ;;
8179   *)
8180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181 for as_dir in $PATH
8182 do
8183   IFS=$as_save_IFS
8184   test -z "$as_dir" && as_dir=.
8185     for ac_exec_ext in '' $ac_executable_extensions; do
8186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189     break 2
8190   fi
8191 done
8192   done
8193 IFS=$as_save_IFS
8194 
8195   ;;
8196 esac
8197 fi
8198 FIND=$ac_cv_path_FIND
8199 if test -n "$FIND"; then
8200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8201 $as_echo "$FIND" >&6; }
8202 else
8203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204 $as_echo "no" >&6; }
8205 fi
8206 
8207 
8208           if test "x$FIND" = x; then
8209             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8210           fi
8211         else
8212           # Otherwise we believe it is a complete path. Use it as it is.
8213           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8214 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8215           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8216 $as_echo_n "checking for FIND... " >&6; }
8217           if test ! -x "$tool_specified"; then
8218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8219 $as_echo "not found" >&6; }
8220             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8221           fi
8222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8223 $as_echo "$tool_specified" >&6; }
8224         fi
8225       fi
8226     fi
8227 
8228   fi
8229 
8230 
8231 
8232   if test "x$FIND" = x; then
8233     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8234   fi
8235 
8236 
8237 
8238 
8239 
8240   # Publish this variable in the help.
8241 
8242 
8243   if [ -z "${HEAD+x}" ]; then
8244     # The variable is not set by user, try to locate tool using the code snippet
8245     for ac_prog in head
8246 do
8247   # Extract the first word of "$ac_prog", so it can be a program name with args.
8248 set dummy $ac_prog; ac_word=$2
8249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8250 $as_echo_n "checking for $ac_word... " >&6; }
8251 if ${ac_cv_path_HEAD+:} false; then :
8252   $as_echo_n "(cached) " >&6
8253 else
8254   case $HEAD in
8255   [\\/]* | ?:[\\/]*)
8256   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8257   ;;
8258   *)
8259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8260 for as_dir in $PATH
8261 do
8262   IFS=$as_save_IFS
8263   test -z "$as_dir" && as_dir=.
8264     for ac_exec_ext in '' $ac_executable_extensions; do
8265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8266     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8268     break 2
8269   fi
8270 done
8271   done
8272 IFS=$as_save_IFS
8273 
8274   ;;
8275 esac
8276 fi
8277 HEAD=$ac_cv_path_HEAD
8278 if test -n "$HEAD"; then
8279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8280 $as_echo "$HEAD" >&6; }
8281 else
8282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283 $as_echo "no" >&6; }
8284 fi
8285 
8286 
8287   test -n "$HEAD" && break
8288 done
8289 
8290   else
8291     # The variable is set, but is it from the command line or the environment?
8292 
8293     # Try to remove the string !HEAD! from our list.
8294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8296       # If it failed, the variable was not from the command line. Ignore it,
8297       # but warn the user (except for BASH, which is always set by the calling BASH).
8298       if test "xHEAD" != xBASH; then
8299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8300 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8301       fi
8302       # Try to locate tool using the code snippet
8303       for ac_prog in head
8304 do
8305   # Extract the first word of "$ac_prog", so it can be a program name with args.
8306 set dummy $ac_prog; ac_word=$2
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8308 $as_echo_n "checking for $ac_word... " >&6; }
8309 if ${ac_cv_path_HEAD+:} false; then :
8310   $as_echo_n "(cached) " >&6
8311 else
8312   case $HEAD in
8313   [\\/]* | ?:[\\/]*)
8314   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8315   ;;
8316   *)
8317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8318 for as_dir in $PATH
8319 do
8320   IFS=$as_save_IFS
8321   test -z "$as_dir" && as_dir=.
8322     for ac_exec_ext in '' $ac_executable_extensions; do
8323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8324     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8326     break 2
8327   fi
8328 done
8329   done
8330 IFS=$as_save_IFS
8331 
8332   ;;
8333 esac
8334 fi
8335 HEAD=$ac_cv_path_HEAD
8336 if test -n "$HEAD"; then
8337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8338 $as_echo "$HEAD" >&6; }
8339 else
8340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8341 $as_echo "no" >&6; }
8342 fi
8343 
8344 
8345   test -n "$HEAD" && break
8346 done
8347 
8348     else
8349       # If it succeeded, then it was overridden by the user. We will use it
8350       # for the tool.
8351 
8352       # First remove it from the list of overridden variables, so we can test
8353       # for unknown variables in the end.
8354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8355 
8356       # Check if we try to supply an empty value
8357       if test "x$HEAD" = x; then
8358         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8359 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8361 $as_echo_n "checking for HEAD... " >&6; }
8362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8363 $as_echo "disabled" >&6; }
8364       else
8365         # Check if the provided tool contains a complete path.
8366         tool_specified="$HEAD"
8367         tool_basename="${tool_specified##*/}"
8368         if test "x$tool_basename" = "x$tool_specified"; then
8369           # A command without a complete path is provided, search $PATH.
8370           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8371 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8372           # Extract the first word of "$tool_basename", so it can be a program name with args.
8373 set dummy $tool_basename; ac_word=$2
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8375 $as_echo_n "checking for $ac_word... " >&6; }
8376 if ${ac_cv_path_HEAD+:} false; then :
8377   $as_echo_n "(cached) " >&6
8378 else
8379   case $HEAD in
8380   [\\/]* | ?:[\\/]*)
8381   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8382   ;;
8383   *)
8384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385 for as_dir in $PATH
8386 do
8387   IFS=$as_save_IFS
8388   test -z "$as_dir" && as_dir=.
8389     for ac_exec_ext in '' $ac_executable_extensions; do
8390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393     break 2
8394   fi
8395 done
8396   done
8397 IFS=$as_save_IFS
8398 
8399   ;;
8400 esac
8401 fi
8402 HEAD=$ac_cv_path_HEAD
8403 if test -n "$HEAD"; then
8404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8405 $as_echo "$HEAD" >&6; }
8406 else
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408 $as_echo "no" >&6; }
8409 fi
8410 
8411 
8412           if test "x$HEAD" = x; then
8413             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8414           fi
8415         else
8416           # Otherwise we believe it is a complete path. Use it as it is.
8417           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8418 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8419           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8420 $as_echo_n "checking for HEAD... " >&6; }
8421           if test ! -x "$tool_specified"; then
8422             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8423 $as_echo "not found" >&6; }
8424             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8425           fi
8426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8427 $as_echo "$tool_specified" >&6; }
8428         fi
8429       fi
8430     fi
8431 
8432   fi
8433 
8434 
8435 
8436   if test "x$HEAD" = x; then
8437     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8438   fi
8439 
8440 
8441 
8442 
8443 
8444   # Publish this variable in the help.
8445 
8446 
8447   if [ -z "${GUNZIP+x}" ]; then
8448     # The variable is not set by user, try to locate tool using the code snippet
8449     for ac_prog in gunzip
8450 do
8451   # Extract the first word of "$ac_prog", so it can be a program name with args.
8452 set dummy $ac_prog; ac_word=$2
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8454 $as_echo_n "checking for $ac_word... " >&6; }
8455 if ${ac_cv_path_GUNZIP+:} false; then :
8456   $as_echo_n "(cached) " >&6
8457 else
8458   case $GUNZIP in
8459   [\\/]* | ?:[\\/]*)
8460   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8461   ;;
8462   *)
8463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8464 for as_dir in $PATH
8465 do
8466   IFS=$as_save_IFS
8467   test -z "$as_dir" && as_dir=.
8468     for ac_exec_ext in '' $ac_executable_extensions; do
8469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8470     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8472     break 2
8473   fi
8474 done
8475   done
8476 IFS=$as_save_IFS
8477 
8478   ;;
8479 esac
8480 fi
8481 GUNZIP=$ac_cv_path_GUNZIP
8482 if test -n "$GUNZIP"; then
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8484 $as_echo "$GUNZIP" >&6; }
8485 else
8486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487 $as_echo "no" >&6; }
8488 fi
8489 
8490 
8491   test -n "$GUNZIP" && break
8492 done
8493 
8494   else
8495     # The variable is set, but is it from the command line or the environment?
8496 
8497     # Try to remove the string !GUNZIP! from our list.
8498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8500       # If it failed, the variable was not from the command line. Ignore it,
8501       # but warn the user (except for BASH, which is always set by the calling BASH).
8502       if test "xGUNZIP" != xBASH; then
8503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8504 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8505       fi
8506       # Try to locate tool using the code snippet
8507       for ac_prog in gunzip
8508 do
8509   # Extract the first word of "$ac_prog", so it can be a program name with args.
8510 set dummy $ac_prog; ac_word=$2
8511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8512 $as_echo_n "checking for $ac_word... " >&6; }
8513 if ${ac_cv_path_GUNZIP+:} false; then :
8514   $as_echo_n "(cached) " >&6
8515 else
8516   case $GUNZIP in
8517   [\\/]* | ?:[\\/]*)
8518   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8519   ;;
8520   *)
8521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8522 for as_dir in $PATH
8523 do
8524   IFS=$as_save_IFS
8525   test -z "$as_dir" && as_dir=.
8526     for ac_exec_ext in '' $ac_executable_extensions; do
8527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8528     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8530     break 2
8531   fi
8532 done
8533   done
8534 IFS=$as_save_IFS
8535 
8536   ;;
8537 esac
8538 fi
8539 GUNZIP=$ac_cv_path_GUNZIP
8540 if test -n "$GUNZIP"; then
8541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8542 $as_echo "$GUNZIP" >&6; }
8543 else
8544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8545 $as_echo "no" >&6; }
8546 fi
8547 
8548 
8549   test -n "$GUNZIP" && break
8550 done
8551 
8552     else
8553       # If it succeeded, then it was overridden by the user. We will use it
8554       # for the tool.
8555 
8556       # First remove it from the list of overridden variables, so we can test
8557       # for unknown variables in the end.
8558       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8559 
8560       # Check if we try to supply an empty value
8561       if test "x$GUNZIP" = x; then
8562         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8563 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8565 $as_echo_n "checking for GUNZIP... " >&6; }
8566         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8567 $as_echo "disabled" >&6; }
8568       else
8569         # Check if the provided tool contains a complete path.
8570         tool_specified="$GUNZIP"
8571         tool_basename="${tool_specified##*/}"
8572         if test "x$tool_basename" = "x$tool_specified"; then
8573           # A command without a complete path is provided, search $PATH.
8574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8575 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8576           # Extract the first word of "$tool_basename", so it can be a program name with args.
8577 set dummy $tool_basename; ac_word=$2
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579 $as_echo_n "checking for $ac_word... " >&6; }
8580 if ${ac_cv_path_GUNZIP+:} false; then :
8581   $as_echo_n "(cached) " >&6
8582 else
8583   case $GUNZIP in
8584   [\\/]* | ?:[\\/]*)
8585   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8586   ;;
8587   *)
8588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589 for as_dir in $PATH
8590 do
8591   IFS=$as_save_IFS
8592   test -z "$as_dir" && as_dir=.
8593     for ac_exec_ext in '' $ac_executable_extensions; do
8594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597     break 2
8598   fi
8599 done
8600   done
8601 IFS=$as_save_IFS
8602 
8603   ;;
8604 esac
8605 fi
8606 GUNZIP=$ac_cv_path_GUNZIP
8607 if test -n "$GUNZIP"; then
8608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8609 $as_echo "$GUNZIP" >&6; }
8610 else
8611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612 $as_echo "no" >&6; }
8613 fi
8614 
8615 
8616           if test "x$GUNZIP" = x; then
8617             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8618           fi
8619         else
8620           # Otherwise we believe it is a complete path. Use it as it is.
8621           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8622 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8623           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8624 $as_echo_n "checking for GUNZIP... " >&6; }
8625           if test ! -x "$tool_specified"; then
8626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8627 $as_echo "not found" >&6; }
8628             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8629           fi
8630           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8631 $as_echo "$tool_specified" >&6; }
8632         fi
8633       fi
8634     fi
8635 
8636   fi
8637 
8638 
8639 
8640   if test "x$GUNZIP" = x; then
8641     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8642   fi
8643 
8644 
8645 
8646 
8647 
8648   # Publish this variable in the help.
8649 
8650 
8651   if [ -z "${GZIP+x}" ]; then
8652     # The variable is not set by user, try to locate tool using the code snippet
8653     for ac_prog in pigz gzip
8654 do
8655   # Extract the first word of "$ac_prog", so it can be a program name with args.
8656 set dummy $ac_prog; ac_word=$2
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8658 $as_echo_n "checking for $ac_word... " >&6; }
8659 if ${ac_cv_path_GZIP+:} false; then :
8660   $as_echo_n "(cached) " >&6
8661 else
8662   case $GZIP in
8663   [\\/]* | ?:[\\/]*)
8664   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8665   ;;
8666   *)
8667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8668 for as_dir in $PATH
8669 do
8670   IFS=$as_save_IFS
8671   test -z "$as_dir" && as_dir=.
8672     for ac_exec_ext in '' $ac_executable_extensions; do
8673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8674     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8676     break 2
8677   fi
8678 done
8679   done
8680 IFS=$as_save_IFS
8681 
8682   ;;
8683 esac
8684 fi
8685 GZIP=$ac_cv_path_GZIP
8686 if test -n "$GZIP"; then
8687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8688 $as_echo "$GZIP" >&6; }
8689 else
8690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8691 $as_echo "no" >&6; }
8692 fi
8693 
8694 
8695   test -n "$GZIP" && break
8696 done
8697 
8698   else
8699     # The variable is set, but is it from the command line or the environment?
8700 
8701     # Try to remove the string !GZIP! from our list.
8702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8704       # If it failed, the variable was not from the command line. Ignore it,
8705       # but warn the user (except for BASH, which is always set by the calling BASH).
8706       if test "xGZIP" != xBASH; then
8707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8708 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8709       fi
8710       # Try to locate tool using the code snippet
8711       for ac_prog in pigz gzip
8712 do
8713   # Extract the first word of "$ac_prog", so it can be a program name with args.
8714 set dummy $ac_prog; ac_word=$2
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8716 $as_echo_n "checking for $ac_word... " >&6; }
8717 if ${ac_cv_path_GZIP+:} false; then :
8718   $as_echo_n "(cached) " >&6
8719 else
8720   case $GZIP in
8721   [\\/]* | ?:[\\/]*)
8722   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8723   ;;
8724   *)
8725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8726 for as_dir in $PATH
8727 do
8728   IFS=$as_save_IFS
8729   test -z "$as_dir" && as_dir=.
8730     for ac_exec_ext in '' $ac_executable_extensions; do
8731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8732     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8734     break 2
8735   fi
8736 done
8737   done
8738 IFS=$as_save_IFS
8739 
8740   ;;
8741 esac
8742 fi
8743 GZIP=$ac_cv_path_GZIP
8744 if test -n "$GZIP"; then
8745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8746 $as_echo "$GZIP" >&6; }
8747 else
8748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749 $as_echo "no" >&6; }
8750 fi
8751 
8752 
8753   test -n "$GZIP" && break
8754 done
8755 
8756     else
8757       # If it succeeded, then it was overridden by the user. We will use it
8758       # for the tool.
8759 
8760       # First remove it from the list of overridden variables, so we can test
8761       # for unknown variables in the end.
8762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8763 
8764       # Check if we try to supply an empty value
8765       if test "x$GZIP" = x; then
8766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8767 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8769 $as_echo_n "checking for GZIP... " >&6; }
8770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8771 $as_echo "disabled" >&6; }
8772       else
8773         # Check if the provided tool contains a complete path.
8774         tool_specified="$GZIP"
8775         tool_basename="${tool_specified##*/}"
8776         if test "x$tool_basename" = "x$tool_specified"; then
8777           # A command without a complete path is provided, search $PATH.
8778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8779 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8780           # Extract the first word of "$tool_basename", so it can be a program name with args.
8781 set dummy $tool_basename; ac_word=$2
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783 $as_echo_n "checking for $ac_word... " >&6; }
8784 if ${ac_cv_path_GZIP+:} false; then :
8785   $as_echo_n "(cached) " >&6
8786 else
8787   case $GZIP in
8788   [\\/]* | ?:[\\/]*)
8789   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8790   ;;
8791   *)
8792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793 for as_dir in $PATH
8794 do
8795   IFS=$as_save_IFS
8796   test -z "$as_dir" && as_dir=.
8797     for ac_exec_ext in '' $ac_executable_extensions; do
8798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8799     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8801     break 2
8802   fi
8803 done
8804   done
8805 IFS=$as_save_IFS
8806 
8807   ;;
8808 esac
8809 fi
8810 GZIP=$ac_cv_path_GZIP
8811 if test -n "$GZIP"; then
8812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8813 $as_echo "$GZIP" >&6; }
8814 else
8815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816 $as_echo "no" >&6; }
8817 fi
8818 
8819 
8820           if test "x$GZIP" = x; then
8821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8822           fi
8823         else
8824           # Otherwise we believe it is a complete path. Use it as it is.
8825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8826 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8828 $as_echo_n "checking for GZIP... " >&6; }
8829           if test ! -x "$tool_specified"; then
8830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8831 $as_echo "not found" >&6; }
8832             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8833           fi
8834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8835 $as_echo "$tool_specified" >&6; }
8836         fi
8837       fi
8838     fi
8839 
8840   fi
8841 
8842 
8843 
8844   if test "x$GZIP" = x; then
8845     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8846   fi
8847 
8848 
8849 
8850 
8851 
8852   # Publish this variable in the help.
8853 
8854 
8855   if [ -z "${LN+x}" ]; then
8856     # The variable is not set by user, try to locate tool using the code snippet
8857     for ac_prog in ln
8858 do
8859   # Extract the first word of "$ac_prog", so it can be a program name with args.
8860 set dummy $ac_prog; ac_word=$2
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862 $as_echo_n "checking for $ac_word... " >&6; }
8863 if ${ac_cv_path_LN+:} false; then :
8864   $as_echo_n "(cached) " >&6
8865 else
8866   case $LN in
8867   [\\/]* | ?:[\\/]*)
8868   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8869   ;;
8870   *)
8871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872 for as_dir in $PATH
8873 do
8874   IFS=$as_save_IFS
8875   test -z "$as_dir" && as_dir=.
8876     for ac_exec_ext in '' $ac_executable_extensions; do
8877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880     break 2
8881   fi
8882 done
8883   done
8884 IFS=$as_save_IFS
8885 
8886   ;;
8887 esac
8888 fi
8889 LN=$ac_cv_path_LN
8890 if test -n "$LN"; then
8891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8892 $as_echo "$LN" >&6; }
8893 else
8894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895 $as_echo "no" >&6; }
8896 fi
8897 
8898 
8899   test -n "$LN" && break
8900 done
8901 
8902   else
8903     # The variable is set, but is it from the command line or the environment?
8904 
8905     # Try to remove the string !LN! from our list.
8906     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8907     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8908       # If it failed, the variable was not from the command line. Ignore it,
8909       # but warn the user (except for BASH, which is always set by the calling BASH).
8910       if test "xLN" != xBASH; then
8911         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8912 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8913       fi
8914       # Try to locate tool using the code snippet
8915       for ac_prog in ln
8916 do
8917   # Extract the first word of "$ac_prog", so it can be a program name with args.
8918 set dummy $ac_prog; ac_word=$2
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8920 $as_echo_n "checking for $ac_word... " >&6; }
8921 if ${ac_cv_path_LN+:} false; then :
8922   $as_echo_n "(cached) " >&6
8923 else
8924   case $LN in
8925   [\\/]* | ?:[\\/]*)
8926   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8927   ;;
8928   *)
8929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8930 for as_dir in $PATH
8931 do
8932   IFS=$as_save_IFS
8933   test -z "$as_dir" && as_dir=.
8934     for ac_exec_ext in '' $ac_executable_extensions; do
8935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8936     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8938     break 2
8939   fi
8940 done
8941   done
8942 IFS=$as_save_IFS
8943 
8944   ;;
8945 esac
8946 fi
8947 LN=$ac_cv_path_LN
8948 if test -n "$LN"; then
8949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8950 $as_echo "$LN" >&6; }
8951 else
8952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8953 $as_echo "no" >&6; }
8954 fi
8955 
8956 
8957   test -n "$LN" && break
8958 done
8959 
8960     else
8961       # If it succeeded, then it was overridden by the user. We will use it
8962       # for the tool.
8963 
8964       # First remove it from the list of overridden variables, so we can test
8965       # for unknown variables in the end.
8966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8967 
8968       # Check if we try to supply an empty value
8969       if test "x$LN" = x; then
8970         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8971 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8973 $as_echo_n "checking for LN... " >&6; }
8974         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8975 $as_echo "disabled" >&6; }
8976       else
8977         # Check if the provided tool contains a complete path.
8978         tool_specified="$LN"
8979         tool_basename="${tool_specified##*/}"
8980         if test "x$tool_basename" = "x$tool_specified"; then
8981           # A command without a complete path is provided, search $PATH.
8982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8983 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8984           # Extract the first word of "$tool_basename", so it can be a program name with args.
8985 set dummy $tool_basename; ac_word=$2
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987 $as_echo_n "checking for $ac_word... " >&6; }
8988 if ${ac_cv_path_LN+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   case $LN in
8992   [\\/]* | ?:[\\/]*)
8993   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8994   ;;
8995   *)
8996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997 for as_dir in $PATH
8998 do
8999   IFS=$as_save_IFS
9000   test -z "$as_dir" && as_dir=.
9001     for ac_exec_ext in '' $ac_executable_extensions; do
9002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005     break 2
9006   fi
9007 done
9008   done
9009 IFS=$as_save_IFS
9010 
9011   ;;
9012 esac
9013 fi
9014 LN=$ac_cv_path_LN
9015 if test -n "$LN"; then
9016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9017 $as_echo "$LN" >&6; }
9018 else
9019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020 $as_echo "no" >&6; }
9021 fi
9022 
9023 
9024           if test "x$LN" = x; then
9025             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9026           fi
9027         else
9028           # Otherwise we believe it is a complete path. Use it as it is.
9029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9030 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9031           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9032 $as_echo_n "checking for LN... " >&6; }
9033           if test ! -x "$tool_specified"; then
9034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9035 $as_echo "not found" >&6; }
9036             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9037           fi
9038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9039 $as_echo "$tool_specified" >&6; }
9040         fi
9041       fi
9042     fi
9043 
9044   fi
9045 
9046 
9047 
9048   if test "x$LN" = x; then
9049     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9050   fi
9051 
9052 
9053 
9054 
9055 
9056   # Publish this variable in the help.
9057 
9058 
9059   if [ -z "${LS+x}" ]; then
9060     # The variable is not set by user, try to locate tool using the code snippet
9061     for ac_prog in ls
9062 do
9063   # Extract the first word of "$ac_prog", so it can be a program name with args.
9064 set dummy $ac_prog; ac_word=$2
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9066 $as_echo_n "checking for $ac_word... " >&6; }
9067 if ${ac_cv_path_LS+:} false; then :
9068   $as_echo_n "(cached) " >&6
9069 else
9070   case $LS in
9071   [\\/]* | ?:[\\/]*)
9072   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9073   ;;
9074   *)
9075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9076 for as_dir in $PATH
9077 do
9078   IFS=$as_save_IFS
9079   test -z "$as_dir" && as_dir=.
9080     for ac_exec_ext in '' $ac_executable_extensions; do
9081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9082     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9084     break 2
9085   fi
9086 done
9087   done
9088 IFS=$as_save_IFS
9089 
9090   ;;
9091 esac
9092 fi
9093 LS=$ac_cv_path_LS
9094 if test -n "$LS"; then
9095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9096 $as_echo "$LS" >&6; }
9097 else
9098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9099 $as_echo "no" >&6; }
9100 fi
9101 
9102 
9103   test -n "$LS" && break
9104 done
9105 
9106   else
9107     # The variable is set, but is it from the command line or the environment?
9108 
9109     # Try to remove the string !LS! from our list.
9110     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9111     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9112       # If it failed, the variable was not from the command line. Ignore it,
9113       # but warn the user (except for BASH, which is always set by the calling BASH).
9114       if test "xLS" != xBASH; then
9115         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9116 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9117       fi
9118       # Try to locate tool using the code snippet
9119       for ac_prog in ls
9120 do
9121   # Extract the first word of "$ac_prog", so it can be a program name with args.
9122 set dummy $ac_prog; ac_word=$2
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9124 $as_echo_n "checking for $ac_word... " >&6; }
9125 if ${ac_cv_path_LS+:} false; then :
9126   $as_echo_n "(cached) " >&6
9127 else
9128   case $LS in
9129   [\\/]* | ?:[\\/]*)
9130   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9131   ;;
9132   *)
9133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9134 for as_dir in $PATH
9135 do
9136   IFS=$as_save_IFS
9137   test -z "$as_dir" && as_dir=.
9138     for ac_exec_ext in '' $ac_executable_extensions; do
9139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9140     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9142     break 2
9143   fi
9144 done
9145   done
9146 IFS=$as_save_IFS
9147 
9148   ;;
9149 esac
9150 fi
9151 LS=$ac_cv_path_LS
9152 if test -n "$LS"; then
9153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9154 $as_echo "$LS" >&6; }
9155 else
9156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157 $as_echo "no" >&6; }
9158 fi
9159 
9160 
9161   test -n "$LS" && break
9162 done
9163 
9164     else
9165       # If it succeeded, then it was overridden by the user. We will use it
9166       # for the tool.
9167 
9168       # First remove it from the list of overridden variables, so we can test
9169       # for unknown variables in the end.
9170       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9171 
9172       # Check if we try to supply an empty value
9173       if test "x$LS" = x; then
9174         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9175 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9177 $as_echo_n "checking for LS... " >&6; }
9178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9179 $as_echo "disabled" >&6; }
9180       else
9181         # Check if the provided tool contains a complete path.
9182         tool_specified="$LS"
9183         tool_basename="${tool_specified##*/}"
9184         if test "x$tool_basename" = "x$tool_specified"; then
9185           # A command without a complete path is provided, search $PATH.
9186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9187 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9188           # Extract the first word of "$tool_basename", so it can be a program name with args.
9189 set dummy $tool_basename; ac_word=$2
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9191 $as_echo_n "checking for $ac_word... " >&6; }
9192 if ${ac_cv_path_LS+:} false; then :
9193   $as_echo_n "(cached) " >&6
9194 else
9195   case $LS in
9196   [\\/]* | ?:[\\/]*)
9197   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9198   ;;
9199   *)
9200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9201 for as_dir in $PATH
9202 do
9203   IFS=$as_save_IFS
9204   test -z "$as_dir" && as_dir=.
9205     for ac_exec_ext in '' $ac_executable_extensions; do
9206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9207     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9209     break 2
9210   fi
9211 done
9212   done
9213 IFS=$as_save_IFS
9214 
9215   ;;
9216 esac
9217 fi
9218 LS=$ac_cv_path_LS
9219 if test -n "$LS"; then
9220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9221 $as_echo "$LS" >&6; }
9222 else
9223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9224 $as_echo "no" >&6; }
9225 fi
9226 
9227 
9228           if test "x$LS" = x; then
9229             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9230           fi
9231         else
9232           # Otherwise we believe it is a complete path. Use it as it is.
9233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9234 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9235           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9236 $as_echo_n "checking for LS... " >&6; }
9237           if test ! -x "$tool_specified"; then
9238             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9239 $as_echo "not found" >&6; }
9240             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9241           fi
9242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9243 $as_echo "$tool_specified" >&6; }
9244         fi
9245       fi
9246     fi
9247 
9248   fi
9249 
9250 
9251 
9252   if test "x$LS" = x; then
9253     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9254   fi
9255 
9256 
9257 
9258 
9259 
9260   # Publish this variable in the help.
9261 
9262 
9263   if [ -z "${MKDIR+x}" ]; then
9264     # The variable is not set by user, try to locate tool using the code snippet
9265     for ac_prog in mkdir
9266 do
9267   # Extract the first word of "$ac_prog", so it can be a program name with args.
9268 set dummy $ac_prog; ac_word=$2
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9270 $as_echo_n "checking for $ac_word... " >&6; }
9271 if ${ac_cv_path_MKDIR+:} false; then :
9272   $as_echo_n "(cached) " >&6
9273 else
9274   case $MKDIR in
9275   [\\/]* | ?:[\\/]*)
9276   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9277   ;;
9278   *)
9279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9280 for as_dir in $PATH
9281 do
9282   IFS=$as_save_IFS
9283   test -z "$as_dir" && as_dir=.
9284     for ac_exec_ext in '' $ac_executable_extensions; do
9285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9286     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9288     break 2
9289   fi
9290 done
9291   done
9292 IFS=$as_save_IFS
9293 
9294   ;;
9295 esac
9296 fi
9297 MKDIR=$ac_cv_path_MKDIR
9298 if test -n "$MKDIR"; then
9299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9300 $as_echo "$MKDIR" >&6; }
9301 else
9302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303 $as_echo "no" >&6; }
9304 fi
9305 
9306 
9307   test -n "$MKDIR" && break
9308 done
9309 
9310   else
9311     # The variable is set, but is it from the command line or the environment?
9312 
9313     # Try to remove the string !MKDIR! from our list.
9314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9316       # If it failed, the variable was not from the command line. Ignore it,
9317       # but warn the user (except for BASH, which is always set by the calling BASH).
9318       if test "xMKDIR" != xBASH; then
9319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9320 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9321       fi
9322       # Try to locate tool using the code snippet
9323       for ac_prog in mkdir
9324 do
9325   # Extract the first word of "$ac_prog", so it can be a program name with args.
9326 set dummy $ac_prog; ac_word=$2
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328 $as_echo_n "checking for $ac_word... " >&6; }
9329 if ${ac_cv_path_MKDIR+:} false; then :
9330   $as_echo_n "(cached) " >&6
9331 else
9332   case $MKDIR in
9333   [\\/]* | ?:[\\/]*)
9334   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9335   ;;
9336   *)
9337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9338 for as_dir in $PATH
9339 do
9340   IFS=$as_save_IFS
9341   test -z "$as_dir" && as_dir=.
9342     for ac_exec_ext in '' $ac_executable_extensions; do
9343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9344     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9346     break 2
9347   fi
9348 done
9349   done
9350 IFS=$as_save_IFS
9351 
9352   ;;
9353 esac
9354 fi
9355 MKDIR=$ac_cv_path_MKDIR
9356 if test -n "$MKDIR"; then
9357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9358 $as_echo "$MKDIR" >&6; }
9359 else
9360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361 $as_echo "no" >&6; }
9362 fi
9363 
9364 
9365   test -n "$MKDIR" && break
9366 done
9367 
9368     else
9369       # If it succeeded, then it was overridden by the user. We will use it
9370       # for the tool.
9371 
9372       # First remove it from the list of overridden variables, so we can test
9373       # for unknown variables in the end.
9374       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9375 
9376       # Check if we try to supply an empty value
9377       if test "x$MKDIR" = x; then
9378         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9379 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9381 $as_echo_n "checking for MKDIR... " >&6; }
9382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9383 $as_echo "disabled" >&6; }
9384       else
9385         # Check if the provided tool contains a complete path.
9386         tool_specified="$MKDIR"
9387         tool_basename="${tool_specified##*/}"
9388         if test "x$tool_basename" = "x$tool_specified"; then
9389           # A command without a complete path is provided, search $PATH.
9390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9391 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9392           # Extract the first word of "$tool_basename", so it can be a program name with args.
9393 set dummy $tool_basename; ac_word=$2
9394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395 $as_echo_n "checking for $ac_word... " >&6; }
9396 if ${ac_cv_path_MKDIR+:} false; then :
9397   $as_echo_n "(cached) " >&6
9398 else
9399   case $MKDIR in
9400   [\\/]* | ?:[\\/]*)
9401   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9402   ;;
9403   *)
9404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405 for as_dir in $PATH
9406 do
9407   IFS=$as_save_IFS
9408   test -z "$as_dir" && as_dir=.
9409     for ac_exec_ext in '' $ac_executable_extensions; do
9410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413     break 2
9414   fi
9415 done
9416   done
9417 IFS=$as_save_IFS
9418 
9419   ;;
9420 esac
9421 fi
9422 MKDIR=$ac_cv_path_MKDIR
9423 if test -n "$MKDIR"; then
9424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9425 $as_echo "$MKDIR" >&6; }
9426 else
9427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428 $as_echo "no" >&6; }
9429 fi
9430 
9431 
9432           if test "x$MKDIR" = x; then
9433             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9434           fi
9435         else
9436           # Otherwise we believe it is a complete path. Use it as it is.
9437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9438 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9439           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9440 $as_echo_n "checking for MKDIR... " >&6; }
9441           if test ! -x "$tool_specified"; then
9442             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9443 $as_echo "not found" >&6; }
9444             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9445           fi
9446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9447 $as_echo "$tool_specified" >&6; }
9448         fi
9449       fi
9450     fi
9451 
9452   fi
9453 
9454 
9455 
9456   if test "x$MKDIR" = x; then
9457     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9458   fi
9459 
9460 
9461 
9462 
9463 
9464   # Publish this variable in the help.
9465 
9466 
9467   if [ -z "${MKTEMP+x}" ]; then
9468     # The variable is not set by user, try to locate tool using the code snippet
9469     for ac_prog in mktemp
9470 do
9471   # Extract the first word of "$ac_prog", so it can be a program name with args.
9472 set dummy $ac_prog; ac_word=$2
9473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9474 $as_echo_n "checking for $ac_word... " >&6; }
9475 if ${ac_cv_path_MKTEMP+:} false; then :
9476   $as_echo_n "(cached) " >&6
9477 else
9478   case $MKTEMP in
9479   [\\/]* | ?:[\\/]*)
9480   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9481   ;;
9482   *)
9483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9484 for as_dir in $PATH
9485 do
9486   IFS=$as_save_IFS
9487   test -z "$as_dir" && as_dir=.
9488     for ac_exec_ext in '' $ac_executable_extensions; do
9489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9490     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9492     break 2
9493   fi
9494 done
9495   done
9496 IFS=$as_save_IFS
9497 
9498   ;;
9499 esac
9500 fi
9501 MKTEMP=$ac_cv_path_MKTEMP
9502 if test -n "$MKTEMP"; then
9503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9504 $as_echo "$MKTEMP" >&6; }
9505 else
9506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9507 $as_echo "no" >&6; }
9508 fi
9509 
9510 
9511   test -n "$MKTEMP" && break
9512 done
9513 
9514   else
9515     # The variable is set, but is it from the command line or the environment?
9516 
9517     # Try to remove the string !MKTEMP! from our list.
9518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9520       # If it failed, the variable was not from the command line. Ignore it,
9521       # but warn the user (except for BASH, which is always set by the calling BASH).
9522       if test "xMKTEMP" != xBASH; then
9523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9524 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9525       fi
9526       # Try to locate tool using the code snippet
9527       for ac_prog in mktemp
9528 do
9529   # Extract the first word of "$ac_prog", so it can be a program name with args.
9530 set dummy $ac_prog; ac_word=$2
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9532 $as_echo_n "checking for $ac_word... " >&6; }
9533 if ${ac_cv_path_MKTEMP+:} false; then :
9534   $as_echo_n "(cached) " >&6
9535 else
9536   case $MKTEMP in
9537   [\\/]* | ?:[\\/]*)
9538   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9539   ;;
9540   *)
9541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9542 for as_dir in $PATH
9543 do
9544   IFS=$as_save_IFS
9545   test -z "$as_dir" && as_dir=.
9546     for ac_exec_ext in '' $ac_executable_extensions; do
9547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9548     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9550     break 2
9551   fi
9552 done
9553   done
9554 IFS=$as_save_IFS
9555 
9556   ;;
9557 esac
9558 fi
9559 MKTEMP=$ac_cv_path_MKTEMP
9560 if test -n "$MKTEMP"; then
9561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9562 $as_echo "$MKTEMP" >&6; }
9563 else
9564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565 $as_echo "no" >&6; }
9566 fi
9567 
9568 
9569   test -n "$MKTEMP" && break
9570 done
9571 
9572     else
9573       # If it succeeded, then it was overridden by the user. We will use it
9574       # for the tool.
9575 
9576       # First remove it from the list of overridden variables, so we can test
9577       # for unknown variables in the end.
9578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9579 
9580       # Check if we try to supply an empty value
9581       if test "x$MKTEMP" = x; then
9582         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9583 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9585 $as_echo_n "checking for MKTEMP... " >&6; }
9586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9587 $as_echo "disabled" >&6; }
9588       else
9589         # Check if the provided tool contains a complete path.
9590         tool_specified="$MKTEMP"
9591         tool_basename="${tool_specified##*/}"
9592         if test "x$tool_basename" = "x$tool_specified"; then
9593           # A command without a complete path is provided, search $PATH.
9594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9595 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9596           # Extract the first word of "$tool_basename", so it can be a program name with args.
9597 set dummy $tool_basename; ac_word=$2
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9599 $as_echo_n "checking for $ac_word... " >&6; }
9600 if ${ac_cv_path_MKTEMP+:} false; then :
9601   $as_echo_n "(cached) " >&6
9602 else
9603   case $MKTEMP in
9604   [\\/]* | ?:[\\/]*)
9605   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9606   ;;
9607   *)
9608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9609 for as_dir in $PATH
9610 do
9611   IFS=$as_save_IFS
9612   test -z "$as_dir" && as_dir=.
9613     for ac_exec_ext in '' $ac_executable_extensions; do
9614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9615     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9617     break 2
9618   fi
9619 done
9620   done
9621 IFS=$as_save_IFS
9622 
9623   ;;
9624 esac
9625 fi
9626 MKTEMP=$ac_cv_path_MKTEMP
9627 if test -n "$MKTEMP"; then
9628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9629 $as_echo "$MKTEMP" >&6; }
9630 else
9631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632 $as_echo "no" >&6; }
9633 fi
9634 
9635 
9636           if test "x$MKTEMP" = x; then
9637             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9638           fi
9639         else
9640           # Otherwise we believe it is a complete path. Use it as it is.
9641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9642 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9644 $as_echo_n "checking for MKTEMP... " >&6; }
9645           if test ! -x "$tool_specified"; then
9646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9647 $as_echo "not found" >&6; }
9648             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9649           fi
9650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9651 $as_echo "$tool_specified" >&6; }
9652         fi
9653       fi
9654     fi
9655 
9656   fi
9657 
9658 
9659 
9660   if test "x$MKTEMP" = x; then
9661     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9662   fi
9663 
9664 
9665 
9666 
9667 
9668   # Publish this variable in the help.
9669 
9670 
9671   if [ -z "${MV+x}" ]; then
9672     # The variable is not set by user, try to locate tool using the code snippet
9673     for ac_prog in mv
9674 do
9675   # Extract the first word of "$ac_prog", so it can be a program name with args.
9676 set dummy $ac_prog; ac_word=$2
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9678 $as_echo_n "checking for $ac_word... " >&6; }
9679 if ${ac_cv_path_MV+:} false; then :
9680   $as_echo_n "(cached) " >&6
9681 else
9682   case $MV in
9683   [\\/]* | ?:[\\/]*)
9684   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9685   ;;
9686   *)
9687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9688 for as_dir in $PATH
9689 do
9690   IFS=$as_save_IFS
9691   test -z "$as_dir" && as_dir=.
9692     for ac_exec_ext in '' $ac_executable_extensions; do
9693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9694     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696     break 2
9697   fi
9698 done
9699   done
9700 IFS=$as_save_IFS
9701 
9702   ;;
9703 esac
9704 fi
9705 MV=$ac_cv_path_MV
9706 if test -n "$MV"; then
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9708 $as_echo "$MV" >&6; }
9709 else
9710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711 $as_echo "no" >&6; }
9712 fi
9713 
9714 
9715   test -n "$MV" && break
9716 done
9717 
9718   else
9719     # The variable is set, but is it from the command line or the environment?
9720 
9721     # Try to remove the string !MV! from our list.
9722     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9723     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9724       # If it failed, the variable was not from the command line. Ignore it,
9725       # but warn the user (except for BASH, which is always set by the calling BASH).
9726       if test "xMV" != xBASH; then
9727         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9728 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9729       fi
9730       # Try to locate tool using the code snippet
9731       for ac_prog in mv
9732 do
9733   # Extract the first word of "$ac_prog", so it can be a program name with args.
9734 set dummy $ac_prog; ac_word=$2
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9736 $as_echo_n "checking for $ac_word... " >&6; }
9737 if ${ac_cv_path_MV+:} false; then :
9738   $as_echo_n "(cached) " >&6
9739 else
9740   case $MV in
9741   [\\/]* | ?:[\\/]*)
9742   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9743   ;;
9744   *)
9745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9746 for as_dir in $PATH
9747 do
9748   IFS=$as_save_IFS
9749   test -z "$as_dir" && as_dir=.
9750     for ac_exec_ext in '' $ac_executable_extensions; do
9751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9752     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9754     break 2
9755   fi
9756 done
9757   done
9758 IFS=$as_save_IFS
9759 
9760   ;;
9761 esac
9762 fi
9763 MV=$ac_cv_path_MV
9764 if test -n "$MV"; then
9765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9766 $as_echo "$MV" >&6; }
9767 else
9768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9769 $as_echo "no" >&6; }
9770 fi
9771 
9772 
9773   test -n "$MV" && break
9774 done
9775 
9776     else
9777       # If it succeeded, then it was overridden by the user. We will use it
9778       # for the tool.
9779 
9780       # First remove it from the list of overridden variables, so we can test
9781       # for unknown variables in the end.
9782       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9783 
9784       # Check if we try to supply an empty value
9785       if test "x$MV" = x; then
9786         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9787 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9788         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9789 $as_echo_n "checking for MV... " >&6; }
9790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9791 $as_echo "disabled" >&6; }
9792       else
9793         # Check if the provided tool contains a complete path.
9794         tool_specified="$MV"
9795         tool_basename="${tool_specified##*/}"
9796         if test "x$tool_basename" = "x$tool_specified"; then
9797           # A command without a complete path is provided, search $PATH.
9798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9799 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9800           # Extract the first word of "$tool_basename", so it can be a program name with args.
9801 set dummy $tool_basename; ac_word=$2
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9803 $as_echo_n "checking for $ac_word... " >&6; }
9804 if ${ac_cv_path_MV+:} false; then :
9805   $as_echo_n "(cached) " >&6
9806 else
9807   case $MV in
9808   [\\/]* | ?:[\\/]*)
9809   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9810   ;;
9811   *)
9812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9813 for as_dir in $PATH
9814 do
9815   IFS=$as_save_IFS
9816   test -z "$as_dir" && as_dir=.
9817     for ac_exec_ext in '' $ac_executable_extensions; do
9818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9819     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9821     break 2
9822   fi
9823 done
9824   done
9825 IFS=$as_save_IFS
9826 
9827   ;;
9828 esac
9829 fi
9830 MV=$ac_cv_path_MV
9831 if test -n "$MV"; then
9832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9833 $as_echo "$MV" >&6; }
9834 else
9835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836 $as_echo "no" >&6; }
9837 fi
9838 
9839 
9840           if test "x$MV" = x; then
9841             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9842           fi
9843         else
9844           # Otherwise we believe it is a complete path. Use it as it is.
9845           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9846 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9847           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9848 $as_echo_n "checking for MV... " >&6; }
9849           if test ! -x "$tool_specified"; then
9850             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9851 $as_echo "not found" >&6; }
9852             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9853           fi
9854           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9855 $as_echo "$tool_specified" >&6; }
9856         fi
9857       fi
9858     fi
9859 
9860   fi
9861 
9862 
9863 
9864   if test "x$MV" = x; then
9865     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9866   fi
9867 
9868 
9869 
9870 
9871 
9872   # Publish this variable in the help.
9873 
9874 
9875   if [ -z "${NAWK+x}" ]; then
9876     # The variable is not set by user, try to locate tool using the code snippet
9877     for ac_prog in nawk gawk awk
9878 do
9879   # Extract the first word of "$ac_prog", so it can be a program name with args.
9880 set dummy $ac_prog; ac_word=$2
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9882 $as_echo_n "checking for $ac_word... " >&6; }
9883 if ${ac_cv_path_NAWK+:} false; then :
9884   $as_echo_n "(cached) " >&6
9885 else
9886   case $NAWK in
9887   [\\/]* | ?:[\\/]*)
9888   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9889   ;;
9890   *)
9891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9892 for as_dir in $PATH
9893 do
9894   IFS=$as_save_IFS
9895   test -z "$as_dir" && as_dir=.
9896     for ac_exec_ext in '' $ac_executable_extensions; do
9897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9898     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9900     break 2
9901   fi
9902 done
9903   done
9904 IFS=$as_save_IFS
9905 
9906   ;;
9907 esac
9908 fi
9909 NAWK=$ac_cv_path_NAWK
9910 if test -n "$NAWK"; then
9911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9912 $as_echo "$NAWK" >&6; }
9913 else
9914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915 $as_echo "no" >&6; }
9916 fi
9917 
9918 
9919   test -n "$NAWK" && break
9920 done
9921 
9922   else
9923     # The variable is set, but is it from the command line or the environment?
9924 
9925     # Try to remove the string !NAWK! from our list.
9926     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9927     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9928       # If it failed, the variable was not from the command line. Ignore it,
9929       # but warn the user (except for BASH, which is always set by the calling BASH).
9930       if test "xNAWK" != xBASH; then
9931         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9932 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9933       fi
9934       # Try to locate tool using the code snippet
9935       for ac_prog in nawk gawk awk
9936 do
9937   # Extract the first word of "$ac_prog", so it can be a program name with args.
9938 set dummy $ac_prog; ac_word=$2
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940 $as_echo_n "checking for $ac_word... " >&6; }
9941 if ${ac_cv_path_NAWK+:} false; then :
9942   $as_echo_n "(cached) " >&6
9943 else
9944   case $NAWK in
9945   [\\/]* | ?:[\\/]*)
9946   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9947   ;;
9948   *)
9949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950 for as_dir in $PATH
9951 do
9952   IFS=$as_save_IFS
9953   test -z "$as_dir" && as_dir=.
9954     for ac_exec_ext in '' $ac_executable_extensions; do
9955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958     break 2
9959   fi
9960 done
9961   done
9962 IFS=$as_save_IFS
9963 
9964   ;;
9965 esac
9966 fi
9967 NAWK=$ac_cv_path_NAWK
9968 if test -n "$NAWK"; then
9969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9970 $as_echo "$NAWK" >&6; }
9971 else
9972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973 $as_echo "no" >&6; }
9974 fi
9975 
9976 
9977   test -n "$NAWK" && break
9978 done
9979 
9980     else
9981       # If it succeeded, then it was overridden by the user. We will use it
9982       # for the tool.
9983 
9984       # First remove it from the list of overridden variables, so we can test
9985       # for unknown variables in the end.
9986       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9987 
9988       # Check if we try to supply an empty value
9989       if test "x$NAWK" = x; then
9990         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9991 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9993 $as_echo_n "checking for NAWK... " >&6; }
9994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9995 $as_echo "disabled" >&6; }
9996       else
9997         # Check if the provided tool contains a complete path.
9998         tool_specified="$NAWK"
9999         tool_basename="${tool_specified##*/}"
10000         if test "x$tool_basename" = "x$tool_specified"; then
10001           # A command without a complete path is provided, search $PATH.
10002           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10003 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10004           # Extract the first word of "$tool_basename", so it can be a program name with args.
10005 set dummy $tool_basename; ac_word=$2
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007 $as_echo_n "checking for $ac_word... " >&6; }
10008 if ${ac_cv_path_NAWK+:} false; then :
10009   $as_echo_n "(cached) " >&6
10010 else
10011   case $NAWK in
10012   [\\/]* | ?:[\\/]*)
10013   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10014   ;;
10015   *)
10016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017 for as_dir in $PATH
10018 do
10019   IFS=$as_save_IFS
10020   test -z "$as_dir" && as_dir=.
10021     for ac_exec_ext in '' $ac_executable_extensions; do
10022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025     break 2
10026   fi
10027 done
10028   done
10029 IFS=$as_save_IFS
10030 
10031   ;;
10032 esac
10033 fi
10034 NAWK=$ac_cv_path_NAWK
10035 if test -n "$NAWK"; then
10036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10037 $as_echo "$NAWK" >&6; }
10038 else
10039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040 $as_echo "no" >&6; }
10041 fi
10042 
10043 
10044           if test "x$NAWK" = x; then
10045             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10046           fi
10047         else
10048           # Otherwise we believe it is a complete path. Use it as it is.
10049           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10050 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10051           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10052 $as_echo_n "checking for NAWK... " >&6; }
10053           if test ! -x "$tool_specified"; then
10054             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10055 $as_echo "not found" >&6; }
10056             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10057           fi
10058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10059 $as_echo "$tool_specified" >&6; }
10060         fi
10061       fi
10062     fi
10063 
10064   fi
10065 
10066 
10067 
10068   if test "x$NAWK" = x; then
10069     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10070   fi
10071 
10072 
10073 
10074 
10075 
10076   # Publish this variable in the help.
10077 
10078 
10079   if [ -z "${PRINTF+x}" ]; then
10080     # The variable is not set by user, try to locate tool using the code snippet
10081     for ac_prog in printf
10082 do
10083   # Extract the first word of "$ac_prog", so it can be a program name with args.
10084 set dummy $ac_prog; ac_word=$2
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086 $as_echo_n "checking for $ac_word... " >&6; }
10087 if ${ac_cv_path_PRINTF+:} false; then :
10088   $as_echo_n "(cached) " >&6
10089 else
10090   case $PRINTF in
10091   [\\/]* | ?:[\\/]*)
10092   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10093   ;;
10094   *)
10095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096 for as_dir in $PATH
10097 do
10098   IFS=$as_save_IFS
10099   test -z "$as_dir" && as_dir=.
10100     for ac_exec_ext in '' $ac_executable_extensions; do
10101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104     break 2
10105   fi
10106 done
10107   done
10108 IFS=$as_save_IFS
10109 
10110   ;;
10111 esac
10112 fi
10113 PRINTF=$ac_cv_path_PRINTF
10114 if test -n "$PRINTF"; then
10115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10116 $as_echo "$PRINTF" >&6; }
10117 else
10118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119 $as_echo "no" >&6; }
10120 fi
10121 
10122 
10123   test -n "$PRINTF" && break
10124 done
10125 
10126   else
10127     # The variable is set, but is it from the command line or the environment?
10128 
10129     # Try to remove the string !PRINTF! from our list.
10130     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10131     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10132       # If it failed, the variable was not from the command line. Ignore it,
10133       # but warn the user (except for BASH, which is always set by the calling BASH).
10134       if test "xPRINTF" != xBASH; then
10135         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10136 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10137       fi
10138       # Try to locate tool using the code snippet
10139       for ac_prog in printf
10140 do
10141   # Extract the first word of "$ac_prog", so it can be a program name with args.
10142 set dummy $ac_prog; ac_word=$2
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144 $as_echo_n "checking for $ac_word... " >&6; }
10145 if ${ac_cv_path_PRINTF+:} false; then :
10146   $as_echo_n "(cached) " >&6
10147 else
10148   case $PRINTF in
10149   [\\/]* | ?:[\\/]*)
10150   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10151   ;;
10152   *)
10153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154 for as_dir in $PATH
10155 do
10156   IFS=$as_save_IFS
10157   test -z "$as_dir" && as_dir=.
10158     for ac_exec_ext in '' $ac_executable_extensions; do
10159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162     break 2
10163   fi
10164 done
10165   done
10166 IFS=$as_save_IFS
10167 
10168   ;;
10169 esac
10170 fi
10171 PRINTF=$ac_cv_path_PRINTF
10172 if test -n "$PRINTF"; then
10173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10174 $as_echo "$PRINTF" >&6; }
10175 else
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177 $as_echo "no" >&6; }
10178 fi
10179 
10180 
10181   test -n "$PRINTF" && break
10182 done
10183 
10184     else
10185       # If it succeeded, then it was overridden by the user. We will use it
10186       # for the tool.
10187 
10188       # First remove it from the list of overridden variables, so we can test
10189       # for unknown variables in the end.
10190       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10191 
10192       # Check if we try to supply an empty value
10193       if test "x$PRINTF" = x; then
10194         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10195 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10197 $as_echo_n "checking for PRINTF... " >&6; }
10198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10199 $as_echo "disabled" >&6; }
10200       else
10201         # Check if the provided tool contains a complete path.
10202         tool_specified="$PRINTF"
10203         tool_basename="${tool_specified##*/}"
10204         if test "x$tool_basename" = "x$tool_specified"; then
10205           # A command without a complete path is provided, search $PATH.
10206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10207 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10208           # Extract the first word of "$tool_basename", so it can be a program name with args.
10209 set dummy $tool_basename; ac_word=$2
10210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211 $as_echo_n "checking for $ac_word... " >&6; }
10212 if ${ac_cv_path_PRINTF+:} false; then :
10213   $as_echo_n "(cached) " >&6
10214 else
10215   case $PRINTF in
10216   [\\/]* | ?:[\\/]*)
10217   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10218   ;;
10219   *)
10220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221 for as_dir in $PATH
10222 do
10223   IFS=$as_save_IFS
10224   test -z "$as_dir" && as_dir=.
10225     for ac_exec_ext in '' $ac_executable_extensions; do
10226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229     break 2
10230   fi
10231 done
10232   done
10233 IFS=$as_save_IFS
10234 
10235   ;;
10236 esac
10237 fi
10238 PRINTF=$ac_cv_path_PRINTF
10239 if test -n "$PRINTF"; then
10240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10241 $as_echo "$PRINTF" >&6; }
10242 else
10243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244 $as_echo "no" >&6; }
10245 fi
10246 
10247 
10248           if test "x$PRINTF" = x; then
10249             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10250           fi
10251         else
10252           # Otherwise we believe it is a complete path. Use it as it is.
10253           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10254 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10255           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10256 $as_echo_n "checking for PRINTF... " >&6; }
10257           if test ! -x "$tool_specified"; then
10258             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10259 $as_echo "not found" >&6; }
10260             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10261           fi
10262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10263 $as_echo "$tool_specified" >&6; }
10264         fi
10265       fi
10266     fi
10267 
10268   fi
10269 
10270 
10271 
10272   if test "x$PRINTF" = x; then
10273     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10274   fi
10275 
10276 
10277 
10278 
10279 
10280   # Publish this variable in the help.
10281 
10282 
10283   if [ -z "${RM+x}" ]; then
10284     # The variable is not set by user, try to locate tool using the code snippet
10285     for ac_prog in rm
10286 do
10287   # Extract the first word of "$ac_prog", so it can be a program name with args.
10288 set dummy $ac_prog; ac_word=$2
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290 $as_echo_n "checking for $ac_word... " >&6; }
10291 if ${ac_cv_path_RM+:} false; then :
10292   $as_echo_n "(cached) " >&6
10293 else
10294   case $RM in
10295   [\\/]* | ?:[\\/]*)
10296   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10297   ;;
10298   *)
10299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300 for as_dir in $PATH
10301 do
10302   IFS=$as_save_IFS
10303   test -z "$as_dir" && as_dir=.
10304     for ac_exec_ext in '' $ac_executable_extensions; do
10305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308     break 2
10309   fi
10310 done
10311   done
10312 IFS=$as_save_IFS
10313 
10314   ;;
10315 esac
10316 fi
10317 RM=$ac_cv_path_RM
10318 if test -n "$RM"; then
10319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10320 $as_echo "$RM" >&6; }
10321 else
10322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323 $as_echo "no" >&6; }
10324 fi
10325 
10326 
10327   test -n "$RM" && break
10328 done
10329 
10330   else
10331     # The variable is set, but is it from the command line or the environment?
10332 
10333     # Try to remove the string !RM! from our list.
10334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10336       # If it failed, the variable was not from the command line. Ignore it,
10337       # but warn the user (except for BASH, which is always set by the calling BASH).
10338       if test "xRM" != xBASH; then
10339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10340 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10341       fi
10342       # Try to locate tool using the code snippet
10343       for ac_prog in rm
10344 do
10345   # Extract the first word of "$ac_prog", so it can be a program name with args.
10346 set dummy $ac_prog; ac_word=$2
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348 $as_echo_n "checking for $ac_word... " >&6; }
10349 if ${ac_cv_path_RM+:} false; then :
10350   $as_echo_n "(cached) " >&6
10351 else
10352   case $RM in
10353   [\\/]* | ?:[\\/]*)
10354   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10355   ;;
10356   *)
10357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358 for as_dir in $PATH
10359 do
10360   IFS=$as_save_IFS
10361   test -z "$as_dir" && as_dir=.
10362     for ac_exec_ext in '' $ac_executable_extensions; do
10363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366     break 2
10367   fi
10368 done
10369   done
10370 IFS=$as_save_IFS
10371 
10372   ;;
10373 esac
10374 fi
10375 RM=$ac_cv_path_RM
10376 if test -n "$RM"; then
10377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10378 $as_echo "$RM" >&6; }
10379 else
10380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381 $as_echo "no" >&6; }
10382 fi
10383 
10384 
10385   test -n "$RM" && break
10386 done
10387 
10388     else
10389       # If it succeeded, then it was overridden by the user. We will use it
10390       # for the tool.
10391 
10392       # First remove it from the list of overridden variables, so we can test
10393       # for unknown variables in the end.
10394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10395 
10396       # Check if we try to supply an empty value
10397       if test "x$RM" = x; then
10398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10399 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10401 $as_echo_n "checking for RM... " >&6; }
10402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10403 $as_echo "disabled" >&6; }
10404       else
10405         # Check if the provided tool contains a complete path.
10406         tool_specified="$RM"
10407         tool_basename="${tool_specified##*/}"
10408         if test "x$tool_basename" = "x$tool_specified"; then
10409           # A command without a complete path is provided, search $PATH.
10410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10411 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10412           # Extract the first word of "$tool_basename", so it can be a program name with args.
10413 set dummy $tool_basename; ac_word=$2
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415 $as_echo_n "checking for $ac_word... " >&6; }
10416 if ${ac_cv_path_RM+:} false; then :
10417   $as_echo_n "(cached) " >&6
10418 else
10419   case $RM in
10420   [\\/]* | ?:[\\/]*)
10421   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10422   ;;
10423   *)
10424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425 for as_dir in $PATH
10426 do
10427   IFS=$as_save_IFS
10428   test -z "$as_dir" && as_dir=.
10429     for ac_exec_ext in '' $ac_executable_extensions; do
10430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433     break 2
10434   fi
10435 done
10436   done
10437 IFS=$as_save_IFS
10438 
10439   ;;
10440 esac
10441 fi
10442 RM=$ac_cv_path_RM
10443 if test -n "$RM"; then
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10445 $as_echo "$RM" >&6; }
10446 else
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448 $as_echo "no" >&6; }
10449 fi
10450 
10451 
10452           if test "x$RM" = x; then
10453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10454           fi
10455         else
10456           # Otherwise we believe it is a complete path. Use it as it is.
10457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10458 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10460 $as_echo_n "checking for RM... " >&6; }
10461           if test ! -x "$tool_specified"; then
10462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10463 $as_echo "not found" >&6; }
10464             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10465           fi
10466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10467 $as_echo "$tool_specified" >&6; }
10468         fi
10469       fi
10470     fi
10471 
10472   fi
10473 
10474 
10475 
10476   if test "x$RM" = x; then
10477     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10478   fi
10479 
10480 
10481 
10482 
10483 
10484   # Publish this variable in the help.
10485 
10486 
10487   if [ -z "${RMDIR+x}" ]; then
10488     # The variable is not set by user, try to locate tool using the code snippet
10489     for ac_prog in rmdir
10490 do
10491   # Extract the first word of "$ac_prog", so it can be a program name with args.
10492 set dummy $ac_prog; ac_word=$2
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10494 $as_echo_n "checking for $ac_word... " >&6; }
10495 if ${ac_cv_path_RMDIR+:} false; then :
10496   $as_echo_n "(cached) " >&6
10497 else
10498   case $RMDIR in
10499   [\\/]* | ?:[\\/]*)
10500   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10501   ;;
10502   *)
10503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10504 for as_dir in $PATH
10505 do
10506   IFS=$as_save_IFS
10507   test -z "$as_dir" && as_dir=.
10508     for ac_exec_ext in '' $ac_executable_extensions; do
10509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10510     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10512     break 2
10513   fi
10514 done
10515   done
10516 IFS=$as_save_IFS
10517 
10518   ;;
10519 esac
10520 fi
10521 RMDIR=$ac_cv_path_RMDIR
10522 if test -n "$RMDIR"; then
10523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10524 $as_echo "$RMDIR" >&6; }
10525 else
10526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527 $as_echo "no" >&6; }
10528 fi
10529 
10530 
10531   test -n "$RMDIR" && break
10532 done
10533 
10534   else
10535     # The variable is set, but is it from the command line or the environment?
10536 
10537     # Try to remove the string !RMDIR! from our list.
10538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10540       # If it failed, the variable was not from the command line. Ignore it,
10541       # but warn the user (except for BASH, which is always set by the calling BASH).
10542       if test "xRMDIR" != xBASH; then
10543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10544 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10545       fi
10546       # Try to locate tool using the code snippet
10547       for ac_prog in rmdir
10548 do
10549   # Extract the first word of "$ac_prog", so it can be a program name with args.
10550 set dummy $ac_prog; ac_word=$2
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10552 $as_echo_n "checking for $ac_word... " >&6; }
10553 if ${ac_cv_path_RMDIR+:} false; then :
10554   $as_echo_n "(cached) " >&6
10555 else
10556   case $RMDIR in
10557   [\\/]* | ?:[\\/]*)
10558   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10559   ;;
10560   *)
10561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10562 for as_dir in $PATH
10563 do
10564   IFS=$as_save_IFS
10565   test -z "$as_dir" && as_dir=.
10566     for ac_exec_ext in '' $ac_executable_extensions; do
10567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10568     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10570     break 2
10571   fi
10572 done
10573   done
10574 IFS=$as_save_IFS
10575 
10576   ;;
10577 esac
10578 fi
10579 RMDIR=$ac_cv_path_RMDIR
10580 if test -n "$RMDIR"; then
10581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10582 $as_echo "$RMDIR" >&6; }
10583 else
10584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10585 $as_echo "no" >&6; }
10586 fi
10587 
10588 
10589   test -n "$RMDIR" && break
10590 done
10591 
10592     else
10593       # If it succeeded, then it was overridden by the user. We will use it
10594       # for the tool.
10595 
10596       # First remove it from the list of overridden variables, so we can test
10597       # for unknown variables in the end.
10598       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10599 
10600       # Check if we try to supply an empty value
10601       if test "x$RMDIR" = x; then
10602         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10603 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10605 $as_echo_n "checking for RMDIR... " >&6; }
10606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10607 $as_echo "disabled" >&6; }
10608       else
10609         # Check if the provided tool contains a complete path.
10610         tool_specified="$RMDIR"
10611         tool_basename="${tool_specified##*/}"
10612         if test "x$tool_basename" = "x$tool_specified"; then
10613           # A command without a complete path is provided, search $PATH.
10614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10615 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10616           # Extract the first word of "$tool_basename", so it can be a program name with args.
10617 set dummy $tool_basename; ac_word=$2
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619 $as_echo_n "checking for $ac_word... " >&6; }
10620 if ${ac_cv_path_RMDIR+:} false; then :
10621   $as_echo_n "(cached) " >&6
10622 else
10623   case $RMDIR in
10624   [\\/]* | ?:[\\/]*)
10625   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10626   ;;
10627   *)
10628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629 for as_dir in $PATH
10630 do
10631   IFS=$as_save_IFS
10632   test -z "$as_dir" && as_dir=.
10633     for ac_exec_ext in '' $ac_executable_extensions; do
10634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637     break 2
10638   fi
10639 done
10640   done
10641 IFS=$as_save_IFS
10642 
10643   ;;
10644 esac
10645 fi
10646 RMDIR=$ac_cv_path_RMDIR
10647 if test -n "$RMDIR"; then
10648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10649 $as_echo "$RMDIR" >&6; }
10650 else
10651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652 $as_echo "no" >&6; }
10653 fi
10654 
10655 
10656           if test "x$RMDIR" = x; then
10657             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10658           fi
10659         else
10660           # Otherwise we believe it is a complete path. Use it as it is.
10661           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10662 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10663           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10664 $as_echo_n "checking for RMDIR... " >&6; }
10665           if test ! -x "$tool_specified"; then
10666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10667 $as_echo "not found" >&6; }
10668             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10669           fi
10670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10671 $as_echo "$tool_specified" >&6; }
10672         fi
10673       fi
10674     fi
10675 
10676   fi
10677 
10678 
10679 
10680   if test "x$RMDIR" = x; then
10681     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10682   fi
10683 
10684 
10685 
10686 
10687 
10688   # Publish this variable in the help.
10689 
10690 
10691   if [ -z "${SH+x}" ]; then
10692     # The variable is not set by user, try to locate tool using the code snippet
10693     for ac_prog in sh
10694 do
10695   # Extract the first word of "$ac_prog", so it can be a program name with args.
10696 set dummy $ac_prog; ac_word=$2
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10698 $as_echo_n "checking for $ac_word... " >&6; }
10699 if ${ac_cv_path_SH+:} false; then :
10700   $as_echo_n "(cached) " >&6
10701 else
10702   case $SH in
10703   [\\/]* | ?:[\\/]*)
10704   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10705   ;;
10706   *)
10707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10708 for as_dir in $PATH
10709 do
10710   IFS=$as_save_IFS
10711   test -z "$as_dir" && as_dir=.
10712     for ac_exec_ext in '' $ac_executable_extensions; do
10713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10714     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10716     break 2
10717   fi
10718 done
10719   done
10720 IFS=$as_save_IFS
10721 
10722   ;;
10723 esac
10724 fi
10725 SH=$ac_cv_path_SH
10726 if test -n "$SH"; then
10727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10728 $as_echo "$SH" >&6; }
10729 else
10730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10731 $as_echo "no" >&6; }
10732 fi
10733 
10734 
10735   test -n "$SH" && break
10736 done
10737 
10738   else
10739     # The variable is set, but is it from the command line or the environment?
10740 
10741     # Try to remove the string !SH! from our list.
10742     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10743     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10744       # If it failed, the variable was not from the command line. Ignore it,
10745       # but warn the user (except for BASH, which is always set by the calling BASH).
10746       if test "xSH" != xBASH; then
10747         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10748 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10749       fi
10750       # Try to locate tool using the code snippet
10751       for ac_prog in sh
10752 do
10753   # Extract the first word of "$ac_prog", so it can be a program name with args.
10754 set dummy $ac_prog; ac_word=$2
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10756 $as_echo_n "checking for $ac_word... " >&6; }
10757 if ${ac_cv_path_SH+:} false; then :
10758   $as_echo_n "(cached) " >&6
10759 else
10760   case $SH in
10761   [\\/]* | ?:[\\/]*)
10762   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10763   ;;
10764   *)
10765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10766 for as_dir in $PATH
10767 do
10768   IFS=$as_save_IFS
10769   test -z "$as_dir" && as_dir=.
10770     for ac_exec_ext in '' $ac_executable_extensions; do
10771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10772     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10774     break 2
10775   fi
10776 done
10777   done
10778 IFS=$as_save_IFS
10779 
10780   ;;
10781 esac
10782 fi
10783 SH=$ac_cv_path_SH
10784 if test -n "$SH"; then
10785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10786 $as_echo "$SH" >&6; }
10787 else
10788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10789 $as_echo "no" >&6; }
10790 fi
10791 
10792 
10793   test -n "$SH" && break
10794 done
10795 
10796     else
10797       # If it succeeded, then it was overridden by the user. We will use it
10798       # for the tool.
10799 
10800       # First remove it from the list of overridden variables, so we can test
10801       # for unknown variables in the end.
10802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10803 
10804       # Check if we try to supply an empty value
10805       if test "x$SH" = x; then
10806         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10807 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10809 $as_echo_n "checking for SH... " >&6; }
10810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10811 $as_echo "disabled" >&6; }
10812       else
10813         # Check if the provided tool contains a complete path.
10814         tool_specified="$SH"
10815         tool_basename="${tool_specified##*/}"
10816         if test "x$tool_basename" = "x$tool_specified"; then
10817           # A command without a complete path is provided, search $PATH.
10818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10819 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10820           # Extract the first word of "$tool_basename", so it can be a program name with args.
10821 set dummy $tool_basename; ac_word=$2
10822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10823 $as_echo_n "checking for $ac_word... " >&6; }
10824 if ${ac_cv_path_SH+:} false; then :
10825   $as_echo_n "(cached) " >&6
10826 else
10827   case $SH in
10828   [\\/]* | ?:[\\/]*)
10829   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10830   ;;
10831   *)
10832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10833 for as_dir in $PATH
10834 do
10835   IFS=$as_save_IFS
10836   test -z "$as_dir" && as_dir=.
10837     for ac_exec_ext in '' $ac_executable_extensions; do
10838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10839     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10841     break 2
10842   fi
10843 done
10844   done
10845 IFS=$as_save_IFS
10846 
10847   ;;
10848 esac
10849 fi
10850 SH=$ac_cv_path_SH
10851 if test -n "$SH"; then
10852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10853 $as_echo "$SH" >&6; }
10854 else
10855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856 $as_echo "no" >&6; }
10857 fi
10858 
10859 
10860           if test "x$SH" = x; then
10861             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10862           fi
10863         else
10864           # Otherwise we believe it is a complete path. Use it as it is.
10865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10866 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10867           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10868 $as_echo_n "checking for SH... " >&6; }
10869           if test ! -x "$tool_specified"; then
10870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10871 $as_echo "not found" >&6; }
10872             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10873           fi
10874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10875 $as_echo "$tool_specified" >&6; }
10876         fi
10877       fi
10878     fi
10879 
10880   fi
10881 
10882 
10883 
10884   if test "x$SH" = x; then
10885     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10886   fi
10887 
10888 
10889 
10890 
10891 
10892   # Publish this variable in the help.
10893 
10894 
10895   if [ -z "${SORT+x}" ]; then
10896     # The variable is not set by user, try to locate tool using the code snippet
10897     for ac_prog in sort
10898 do
10899   # Extract the first word of "$ac_prog", so it can be a program name with args.
10900 set dummy $ac_prog; ac_word=$2
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10902 $as_echo_n "checking for $ac_word... " >&6; }
10903 if ${ac_cv_path_SORT+:} false; then :
10904   $as_echo_n "(cached) " >&6
10905 else
10906   case $SORT in
10907   [\\/]* | ?:[\\/]*)
10908   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10909   ;;
10910   *)
10911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10912 for as_dir in $PATH
10913 do
10914   IFS=$as_save_IFS
10915   test -z "$as_dir" && as_dir=.
10916     for ac_exec_ext in '' $ac_executable_extensions; do
10917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10918     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10920     break 2
10921   fi
10922 done
10923   done
10924 IFS=$as_save_IFS
10925 
10926   ;;
10927 esac
10928 fi
10929 SORT=$ac_cv_path_SORT
10930 if test -n "$SORT"; then
10931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10932 $as_echo "$SORT" >&6; }
10933 else
10934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10935 $as_echo "no" >&6; }
10936 fi
10937 
10938 
10939   test -n "$SORT" && break
10940 done
10941 
10942   else
10943     # The variable is set, but is it from the command line or the environment?
10944 
10945     # Try to remove the string !SORT! from our list.
10946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10948       # If it failed, the variable was not from the command line. Ignore it,
10949       # but warn the user (except for BASH, which is always set by the calling BASH).
10950       if test "xSORT" != xBASH; then
10951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10952 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10953       fi
10954       # Try to locate tool using the code snippet
10955       for ac_prog in sort
10956 do
10957   # Extract the first word of "$ac_prog", so it can be a program name with args.
10958 set dummy $ac_prog; ac_word=$2
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10960 $as_echo_n "checking for $ac_word... " >&6; }
10961 if ${ac_cv_path_SORT+:} false; then :
10962   $as_echo_n "(cached) " >&6
10963 else
10964   case $SORT in
10965   [\\/]* | ?:[\\/]*)
10966   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10967   ;;
10968   *)
10969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10970 for as_dir in $PATH
10971 do
10972   IFS=$as_save_IFS
10973   test -z "$as_dir" && as_dir=.
10974     for ac_exec_ext in '' $ac_executable_extensions; do
10975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10976     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10978     break 2
10979   fi
10980 done
10981   done
10982 IFS=$as_save_IFS
10983 
10984   ;;
10985 esac
10986 fi
10987 SORT=$ac_cv_path_SORT
10988 if test -n "$SORT"; then
10989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10990 $as_echo "$SORT" >&6; }
10991 else
10992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993 $as_echo "no" >&6; }
10994 fi
10995 
10996 
10997   test -n "$SORT" && break
10998 done
10999 
11000     else
11001       # If it succeeded, then it was overridden by the user. We will use it
11002       # for the tool.
11003 
11004       # First remove it from the list of overridden variables, so we can test
11005       # for unknown variables in the end.
11006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11007 
11008       # Check if we try to supply an empty value
11009       if test "x$SORT" = x; then
11010         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11011 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11013 $as_echo_n "checking for SORT... " >&6; }
11014         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11015 $as_echo "disabled" >&6; }
11016       else
11017         # Check if the provided tool contains a complete path.
11018         tool_specified="$SORT"
11019         tool_basename="${tool_specified##*/}"
11020         if test "x$tool_basename" = "x$tool_specified"; then
11021           # A command without a complete path is provided, search $PATH.
11022           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11023 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11024           # Extract the first word of "$tool_basename", so it can be a program name with args.
11025 set dummy $tool_basename; ac_word=$2
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11027 $as_echo_n "checking for $ac_word... " >&6; }
11028 if ${ac_cv_path_SORT+:} false; then :
11029   $as_echo_n "(cached) " >&6
11030 else
11031   case $SORT in
11032   [\\/]* | ?:[\\/]*)
11033   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11034   ;;
11035   *)
11036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11037 for as_dir in $PATH
11038 do
11039   IFS=$as_save_IFS
11040   test -z "$as_dir" && as_dir=.
11041     for ac_exec_ext in '' $ac_executable_extensions; do
11042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11043     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11045     break 2
11046   fi
11047 done
11048   done
11049 IFS=$as_save_IFS
11050 
11051   ;;
11052 esac
11053 fi
11054 SORT=$ac_cv_path_SORT
11055 if test -n "$SORT"; then
11056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11057 $as_echo "$SORT" >&6; }
11058 else
11059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060 $as_echo "no" >&6; }
11061 fi
11062 
11063 
11064           if test "x$SORT" = x; then
11065             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11066           fi
11067         else
11068           # Otherwise we believe it is a complete path. Use it as it is.
11069           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11070 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11071           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11072 $as_echo_n "checking for SORT... " >&6; }
11073           if test ! -x "$tool_specified"; then
11074             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11075 $as_echo "not found" >&6; }
11076             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11077           fi
11078           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11079 $as_echo "$tool_specified" >&6; }
11080         fi
11081       fi
11082     fi
11083 
11084   fi
11085 
11086 
11087 
11088   if test "x$SORT" = x; then
11089     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11090   fi
11091 
11092 
11093 
11094 
11095 
11096   # Publish this variable in the help.
11097 
11098 
11099   if [ -z "${TAIL+x}" ]; then
11100     # The variable is not set by user, try to locate tool using the code snippet
11101     for ac_prog in tail
11102 do
11103   # Extract the first word of "$ac_prog", so it can be a program name with args.
11104 set dummy $ac_prog; ac_word=$2
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11106 $as_echo_n "checking for $ac_word... " >&6; }
11107 if ${ac_cv_path_TAIL+:} false; then :
11108   $as_echo_n "(cached) " >&6
11109 else
11110   case $TAIL in
11111   [\\/]* | ?:[\\/]*)
11112   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11113   ;;
11114   *)
11115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11116 for as_dir in $PATH
11117 do
11118   IFS=$as_save_IFS
11119   test -z "$as_dir" && as_dir=.
11120     for ac_exec_ext in '' $ac_executable_extensions; do
11121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11122     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11124     break 2
11125   fi
11126 done
11127   done
11128 IFS=$as_save_IFS
11129 
11130   ;;
11131 esac
11132 fi
11133 TAIL=$ac_cv_path_TAIL
11134 if test -n "$TAIL"; then
11135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11136 $as_echo "$TAIL" >&6; }
11137 else
11138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11139 $as_echo "no" >&6; }
11140 fi
11141 
11142 
11143   test -n "$TAIL" && break
11144 done
11145 
11146   else
11147     # The variable is set, but is it from the command line or the environment?
11148 
11149     # Try to remove the string !TAIL! from our list.
11150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11152       # If it failed, the variable was not from the command line. Ignore it,
11153       # but warn the user (except for BASH, which is always set by the calling BASH).
11154       if test "xTAIL" != xBASH; then
11155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11156 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11157       fi
11158       # Try to locate tool using the code snippet
11159       for ac_prog in tail
11160 do
11161   # Extract the first word of "$ac_prog", so it can be a program name with args.
11162 set dummy $ac_prog; ac_word=$2
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11164 $as_echo_n "checking for $ac_word... " >&6; }
11165 if ${ac_cv_path_TAIL+:} false; then :
11166   $as_echo_n "(cached) " >&6
11167 else
11168   case $TAIL in
11169   [\\/]* | ?:[\\/]*)
11170   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11171   ;;
11172   *)
11173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11174 for as_dir in $PATH
11175 do
11176   IFS=$as_save_IFS
11177   test -z "$as_dir" && as_dir=.
11178     for ac_exec_ext in '' $ac_executable_extensions; do
11179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11180     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11182     break 2
11183   fi
11184 done
11185   done
11186 IFS=$as_save_IFS
11187 
11188   ;;
11189 esac
11190 fi
11191 TAIL=$ac_cv_path_TAIL
11192 if test -n "$TAIL"; then
11193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11194 $as_echo "$TAIL" >&6; }
11195 else
11196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11197 $as_echo "no" >&6; }
11198 fi
11199 
11200 
11201   test -n "$TAIL" && break
11202 done
11203 
11204     else
11205       # If it succeeded, then it was overridden by the user. We will use it
11206       # for the tool.
11207 
11208       # First remove it from the list of overridden variables, so we can test
11209       # for unknown variables in the end.
11210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11211 
11212       # Check if we try to supply an empty value
11213       if test "x$TAIL" = x; then
11214         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11215 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11217 $as_echo_n "checking for TAIL... " >&6; }
11218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11219 $as_echo "disabled" >&6; }
11220       else
11221         # Check if the provided tool contains a complete path.
11222         tool_specified="$TAIL"
11223         tool_basename="${tool_specified##*/}"
11224         if test "x$tool_basename" = "x$tool_specified"; then
11225           # A command without a complete path is provided, search $PATH.
11226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11227 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11228           # Extract the first word of "$tool_basename", so it can be a program name with args.
11229 set dummy $tool_basename; ac_word=$2
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11231 $as_echo_n "checking for $ac_word... " >&6; }
11232 if ${ac_cv_path_TAIL+:} false; then :
11233   $as_echo_n "(cached) " >&6
11234 else
11235   case $TAIL in
11236   [\\/]* | ?:[\\/]*)
11237   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11238   ;;
11239   *)
11240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241 for as_dir in $PATH
11242 do
11243   IFS=$as_save_IFS
11244   test -z "$as_dir" && as_dir=.
11245     for ac_exec_ext in '' $ac_executable_extensions; do
11246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249     break 2
11250   fi
11251 done
11252   done
11253 IFS=$as_save_IFS
11254 
11255   ;;
11256 esac
11257 fi
11258 TAIL=$ac_cv_path_TAIL
11259 if test -n "$TAIL"; then
11260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11261 $as_echo "$TAIL" >&6; }
11262 else
11263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264 $as_echo "no" >&6; }
11265 fi
11266 
11267 
11268           if test "x$TAIL" = x; then
11269             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11270           fi
11271         else
11272           # Otherwise we believe it is a complete path. Use it as it is.
11273           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11274 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11275           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11276 $as_echo_n "checking for TAIL... " >&6; }
11277           if test ! -x "$tool_specified"; then
11278             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11279 $as_echo "not found" >&6; }
11280             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11281           fi
11282           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11283 $as_echo "$tool_specified" >&6; }
11284         fi
11285       fi
11286     fi
11287 
11288   fi
11289 
11290 
11291 
11292   if test "x$TAIL" = x; then
11293     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11294   fi
11295 
11296 
11297 
11298 
11299 
11300   # Publish this variable in the help.
11301 
11302 
11303   if [ -z "${TAR+x}" ]; then
11304     # The variable is not set by user, try to locate tool using the code snippet
11305     for ac_prog in gtar tar
11306 do
11307   # Extract the first word of "$ac_prog", so it can be a program name with args.
11308 set dummy $ac_prog; ac_word=$2
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11310 $as_echo_n "checking for $ac_word... " >&6; }
11311 if ${ac_cv_path_TAR+:} false; then :
11312   $as_echo_n "(cached) " >&6
11313 else
11314   case $TAR in
11315   [\\/]* | ?:[\\/]*)
11316   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11317   ;;
11318   *)
11319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11320 for as_dir in $PATH
11321 do
11322   IFS=$as_save_IFS
11323   test -z "$as_dir" && as_dir=.
11324     for ac_exec_ext in '' $ac_executable_extensions; do
11325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11326     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11328     break 2
11329   fi
11330 done
11331   done
11332 IFS=$as_save_IFS
11333 
11334   ;;
11335 esac
11336 fi
11337 TAR=$ac_cv_path_TAR
11338 if test -n "$TAR"; then
11339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11340 $as_echo "$TAR" >&6; }
11341 else
11342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343 $as_echo "no" >&6; }
11344 fi
11345 
11346 
11347   test -n "$TAR" && break
11348 done
11349 
11350   else
11351     # The variable is set, but is it from the command line or the environment?
11352 
11353     # Try to remove the string !TAR! from our list.
11354     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11355     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11356       # If it failed, the variable was not from the command line. Ignore it,
11357       # but warn the user (except for BASH, which is always set by the calling BASH).
11358       if test "xTAR" != xBASH; then
11359         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11360 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11361       fi
11362       # Try to locate tool using the code snippet
11363       for ac_prog in gtar tar
11364 do
11365   # Extract the first word of "$ac_prog", so it can be a program name with args.
11366 set dummy $ac_prog; ac_word=$2
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11368 $as_echo_n "checking for $ac_word... " >&6; }
11369 if ${ac_cv_path_TAR+:} false; then :
11370   $as_echo_n "(cached) " >&6
11371 else
11372   case $TAR in
11373   [\\/]* | ?:[\\/]*)
11374   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11375   ;;
11376   *)
11377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11378 for as_dir in $PATH
11379 do
11380   IFS=$as_save_IFS
11381   test -z "$as_dir" && as_dir=.
11382     for ac_exec_ext in '' $ac_executable_extensions; do
11383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11384     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11386     break 2
11387   fi
11388 done
11389   done
11390 IFS=$as_save_IFS
11391 
11392   ;;
11393 esac
11394 fi
11395 TAR=$ac_cv_path_TAR
11396 if test -n "$TAR"; then
11397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11398 $as_echo "$TAR" >&6; }
11399 else
11400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401 $as_echo "no" >&6; }
11402 fi
11403 
11404 
11405   test -n "$TAR" && break
11406 done
11407 
11408     else
11409       # If it succeeded, then it was overridden by the user. We will use it
11410       # for the tool.
11411 
11412       # First remove it from the list of overridden variables, so we can test
11413       # for unknown variables in the end.
11414       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11415 
11416       # Check if we try to supply an empty value
11417       if test "x$TAR" = x; then
11418         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11419 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11421 $as_echo_n "checking for TAR... " >&6; }
11422         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11423 $as_echo "disabled" >&6; }
11424       else
11425         # Check if the provided tool contains a complete path.
11426         tool_specified="$TAR"
11427         tool_basename="${tool_specified##*/}"
11428         if test "x$tool_basename" = "x$tool_specified"; then
11429           # A command without a complete path is provided, search $PATH.
11430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11431 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11432           # Extract the first word of "$tool_basename", so it can be a program name with args.
11433 set dummy $tool_basename; ac_word=$2
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435 $as_echo_n "checking for $ac_word... " >&6; }
11436 if ${ac_cv_path_TAR+:} false; then :
11437   $as_echo_n "(cached) " >&6
11438 else
11439   case $TAR in
11440   [\\/]* | ?:[\\/]*)
11441   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11442   ;;
11443   *)
11444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445 for as_dir in $PATH
11446 do
11447   IFS=$as_save_IFS
11448   test -z "$as_dir" && as_dir=.
11449     for ac_exec_ext in '' $ac_executable_extensions; do
11450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453     break 2
11454   fi
11455 done
11456   done
11457 IFS=$as_save_IFS
11458 
11459   ;;
11460 esac
11461 fi
11462 TAR=$ac_cv_path_TAR
11463 if test -n "$TAR"; then
11464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11465 $as_echo "$TAR" >&6; }
11466 else
11467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468 $as_echo "no" >&6; }
11469 fi
11470 
11471 
11472           if test "x$TAR" = x; then
11473             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11474           fi
11475         else
11476           # Otherwise we believe it is a complete path. Use it as it is.
11477           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11478 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11479           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11480 $as_echo_n "checking for TAR... " >&6; }
11481           if test ! -x "$tool_specified"; then
11482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11483 $as_echo "not found" >&6; }
11484             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11485           fi
11486           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11487 $as_echo "$tool_specified" >&6; }
11488         fi
11489       fi
11490     fi
11491 
11492   fi
11493 
11494 
11495 
11496   if test "x$TAR" = x; then
11497     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11498   fi
11499 
11500 
11501 
11502 
11503 
11504   # Publish this variable in the help.
11505 
11506 
11507   if [ -z "${TEE+x}" ]; then
11508     # The variable is not set by user, try to locate tool using the code snippet
11509     for ac_prog in tee
11510 do
11511   # Extract the first word of "$ac_prog", so it can be a program name with args.
11512 set dummy $ac_prog; ac_word=$2
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514 $as_echo_n "checking for $ac_word... " >&6; }
11515 if ${ac_cv_path_TEE+:} false; then :
11516   $as_echo_n "(cached) " >&6
11517 else
11518   case $TEE in
11519   [\\/]* | ?:[\\/]*)
11520   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11521   ;;
11522   *)
11523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11524 for as_dir in $PATH
11525 do
11526   IFS=$as_save_IFS
11527   test -z "$as_dir" && as_dir=.
11528     for ac_exec_ext in '' $ac_executable_extensions; do
11529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11530     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11532     break 2
11533   fi
11534 done
11535   done
11536 IFS=$as_save_IFS
11537 
11538   ;;
11539 esac
11540 fi
11541 TEE=$ac_cv_path_TEE
11542 if test -n "$TEE"; then
11543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11544 $as_echo "$TEE" >&6; }
11545 else
11546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547 $as_echo "no" >&6; }
11548 fi
11549 
11550 
11551   test -n "$TEE" && break
11552 done
11553 
11554   else
11555     # The variable is set, but is it from the command line or the environment?
11556 
11557     # Try to remove the string !TEE! from our list.
11558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11560       # If it failed, the variable was not from the command line. Ignore it,
11561       # but warn the user (except for BASH, which is always set by the calling BASH).
11562       if test "xTEE" != xBASH; then
11563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11564 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11565       fi
11566       # Try to locate tool using the code snippet
11567       for ac_prog in tee
11568 do
11569   # Extract the first word of "$ac_prog", so it can be a program name with args.
11570 set dummy $ac_prog; ac_word=$2
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11572 $as_echo_n "checking for $ac_word... " >&6; }
11573 if ${ac_cv_path_TEE+:} false; then :
11574   $as_echo_n "(cached) " >&6
11575 else
11576   case $TEE in
11577   [\\/]* | ?:[\\/]*)
11578   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11579   ;;
11580   *)
11581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11582 for as_dir in $PATH
11583 do
11584   IFS=$as_save_IFS
11585   test -z "$as_dir" && as_dir=.
11586     for ac_exec_ext in '' $ac_executable_extensions; do
11587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11588     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11590     break 2
11591   fi
11592 done
11593   done
11594 IFS=$as_save_IFS
11595 
11596   ;;
11597 esac
11598 fi
11599 TEE=$ac_cv_path_TEE
11600 if test -n "$TEE"; then
11601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11602 $as_echo "$TEE" >&6; }
11603 else
11604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605 $as_echo "no" >&6; }
11606 fi
11607 
11608 
11609   test -n "$TEE" && break
11610 done
11611 
11612     else
11613       # If it succeeded, then it was overridden by the user. We will use it
11614       # for the tool.
11615 
11616       # First remove it from the list of overridden variables, so we can test
11617       # for unknown variables in the end.
11618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11619 
11620       # Check if we try to supply an empty value
11621       if test "x$TEE" = x; then
11622         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11623 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11624         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11625 $as_echo_n "checking for TEE... " >&6; }
11626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11627 $as_echo "disabled" >&6; }
11628       else
11629         # Check if the provided tool contains a complete path.
11630         tool_specified="$TEE"
11631         tool_basename="${tool_specified##*/}"
11632         if test "x$tool_basename" = "x$tool_specified"; then
11633           # A command without a complete path is provided, search $PATH.
11634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11635 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11636           # Extract the first word of "$tool_basename", so it can be a program name with args.
11637 set dummy $tool_basename; ac_word=$2
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11639 $as_echo_n "checking for $ac_word... " >&6; }
11640 if ${ac_cv_path_TEE+:} false; then :
11641   $as_echo_n "(cached) " >&6
11642 else
11643   case $TEE in
11644   [\\/]* | ?:[\\/]*)
11645   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11646   ;;
11647   *)
11648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649 for as_dir in $PATH
11650 do
11651   IFS=$as_save_IFS
11652   test -z "$as_dir" && as_dir=.
11653     for ac_exec_ext in '' $ac_executable_extensions; do
11654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11655     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11657     break 2
11658   fi
11659 done
11660   done
11661 IFS=$as_save_IFS
11662 
11663   ;;
11664 esac
11665 fi
11666 TEE=$ac_cv_path_TEE
11667 if test -n "$TEE"; then
11668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11669 $as_echo "$TEE" >&6; }
11670 else
11671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11672 $as_echo "no" >&6; }
11673 fi
11674 
11675 
11676           if test "x$TEE" = x; then
11677             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11678           fi
11679         else
11680           # Otherwise we believe it is a complete path. Use it as it is.
11681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11682 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11683           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11684 $as_echo_n "checking for TEE... " >&6; }
11685           if test ! -x "$tool_specified"; then
11686             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11687 $as_echo "not found" >&6; }
11688             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11689           fi
11690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11691 $as_echo "$tool_specified" >&6; }
11692         fi
11693       fi
11694     fi
11695 
11696   fi
11697 
11698 
11699 
11700   if test "x$TEE" = x; then
11701     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11702   fi
11703 
11704 
11705 
11706 
11707 
11708   # Publish this variable in the help.
11709 
11710 
11711   if [ -z "${TOUCH+x}" ]; then
11712     # The variable is not set by user, try to locate tool using the code snippet
11713     for ac_prog in touch
11714 do
11715   # Extract the first word of "$ac_prog", so it can be a program name with args.
11716 set dummy $ac_prog; ac_word=$2
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11718 $as_echo_n "checking for $ac_word... " >&6; }
11719 if ${ac_cv_path_TOUCH+:} false; then :
11720   $as_echo_n "(cached) " >&6
11721 else
11722   case $TOUCH in
11723   [\\/]* | ?:[\\/]*)
11724   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11725   ;;
11726   *)
11727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11728 for as_dir in $PATH
11729 do
11730   IFS=$as_save_IFS
11731   test -z "$as_dir" && as_dir=.
11732     for ac_exec_ext in '' $ac_executable_extensions; do
11733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11734     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11736     break 2
11737   fi
11738 done
11739   done
11740 IFS=$as_save_IFS
11741 
11742   ;;
11743 esac
11744 fi
11745 TOUCH=$ac_cv_path_TOUCH
11746 if test -n "$TOUCH"; then
11747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11748 $as_echo "$TOUCH" >&6; }
11749 else
11750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751 $as_echo "no" >&6; }
11752 fi
11753 
11754 
11755   test -n "$TOUCH" && break
11756 done
11757 
11758   else
11759     # The variable is set, but is it from the command line or the environment?
11760 
11761     # Try to remove the string !TOUCH! from our list.
11762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11764       # If it failed, the variable was not from the command line. Ignore it,
11765       # but warn the user (except for BASH, which is always set by the calling BASH).
11766       if test "xTOUCH" != xBASH; then
11767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11768 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11769       fi
11770       # Try to locate tool using the code snippet
11771       for ac_prog in touch
11772 do
11773   # Extract the first word of "$ac_prog", so it can be a program name with args.
11774 set dummy $ac_prog; ac_word=$2
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11776 $as_echo_n "checking for $ac_word... " >&6; }
11777 if ${ac_cv_path_TOUCH+:} false; then :
11778   $as_echo_n "(cached) " >&6
11779 else
11780   case $TOUCH in
11781   [\\/]* | ?:[\\/]*)
11782   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11783   ;;
11784   *)
11785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11786 for as_dir in $PATH
11787 do
11788   IFS=$as_save_IFS
11789   test -z "$as_dir" && as_dir=.
11790     for ac_exec_ext in '' $ac_executable_extensions; do
11791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11792     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11794     break 2
11795   fi
11796 done
11797   done
11798 IFS=$as_save_IFS
11799 
11800   ;;
11801 esac
11802 fi
11803 TOUCH=$ac_cv_path_TOUCH
11804 if test -n "$TOUCH"; then
11805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11806 $as_echo "$TOUCH" >&6; }
11807 else
11808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11809 $as_echo "no" >&6; }
11810 fi
11811 
11812 
11813   test -n "$TOUCH" && break
11814 done
11815 
11816     else
11817       # If it succeeded, then it was overridden by the user. We will use it
11818       # for the tool.
11819 
11820       # First remove it from the list of overridden variables, so we can test
11821       # for unknown variables in the end.
11822       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11823 
11824       # Check if we try to supply an empty value
11825       if test "x$TOUCH" = x; then
11826         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11827 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11829 $as_echo_n "checking for TOUCH... " >&6; }
11830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11831 $as_echo "disabled" >&6; }
11832       else
11833         # Check if the provided tool contains a complete path.
11834         tool_specified="$TOUCH"
11835         tool_basename="${tool_specified##*/}"
11836         if test "x$tool_basename" = "x$tool_specified"; then
11837           # A command without a complete path is provided, search $PATH.
11838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11839 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11840           # Extract the first word of "$tool_basename", so it can be a program name with args.
11841 set dummy $tool_basename; ac_word=$2
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11843 $as_echo_n "checking for $ac_word... " >&6; }
11844 if ${ac_cv_path_TOUCH+:} false; then :
11845   $as_echo_n "(cached) " >&6
11846 else
11847   case $TOUCH in
11848   [\\/]* | ?:[\\/]*)
11849   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11850   ;;
11851   *)
11852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11853 for as_dir in $PATH
11854 do
11855   IFS=$as_save_IFS
11856   test -z "$as_dir" && as_dir=.
11857     for ac_exec_ext in '' $ac_executable_extensions; do
11858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11859     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11861     break 2
11862   fi
11863 done
11864   done
11865 IFS=$as_save_IFS
11866 
11867   ;;
11868 esac
11869 fi
11870 TOUCH=$ac_cv_path_TOUCH
11871 if test -n "$TOUCH"; then
11872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11873 $as_echo "$TOUCH" >&6; }
11874 else
11875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876 $as_echo "no" >&6; }
11877 fi
11878 
11879 
11880           if test "x$TOUCH" = x; then
11881             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11882           fi
11883         else
11884           # Otherwise we believe it is a complete path. Use it as it is.
11885           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11886 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11888 $as_echo_n "checking for TOUCH... " >&6; }
11889           if test ! -x "$tool_specified"; then
11890             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11891 $as_echo "not found" >&6; }
11892             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11893           fi
11894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11895 $as_echo "$tool_specified" >&6; }
11896         fi
11897       fi
11898     fi
11899 
11900   fi
11901 
11902 
11903 
11904   if test "x$TOUCH" = x; then
11905     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11906   fi
11907 
11908 
11909 
11910 
11911 
11912   # Publish this variable in the help.
11913 
11914 
11915   if [ -z "${TR+x}" ]; then
11916     # The variable is not set by user, try to locate tool using the code snippet
11917     for ac_prog in tr
11918 do
11919   # Extract the first word of "$ac_prog", so it can be a program name with args.
11920 set dummy $ac_prog; ac_word=$2
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11922 $as_echo_n "checking for $ac_word... " >&6; }
11923 if ${ac_cv_path_TR+:} false; then :
11924   $as_echo_n "(cached) " >&6
11925 else
11926   case $TR in
11927   [\\/]* | ?:[\\/]*)
11928   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11929   ;;
11930   *)
11931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11932 for as_dir in $PATH
11933 do
11934   IFS=$as_save_IFS
11935   test -z "$as_dir" && as_dir=.
11936     for ac_exec_ext in '' $ac_executable_extensions; do
11937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11938     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11940     break 2
11941   fi
11942 done
11943   done
11944 IFS=$as_save_IFS
11945 
11946   ;;
11947 esac
11948 fi
11949 TR=$ac_cv_path_TR
11950 if test -n "$TR"; then
11951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11952 $as_echo "$TR" >&6; }
11953 else
11954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11955 $as_echo "no" >&6; }
11956 fi
11957 
11958 
11959   test -n "$TR" && break
11960 done
11961 
11962   else
11963     # The variable is set, but is it from the command line or the environment?
11964 
11965     # Try to remove the string !TR! from our list.
11966     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11967     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11968       # If it failed, the variable was not from the command line. Ignore it,
11969       # but warn the user (except for BASH, which is always set by the calling BASH).
11970       if test "xTR" != xBASH; then
11971         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11972 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11973       fi
11974       # Try to locate tool using the code snippet
11975       for ac_prog in tr
11976 do
11977   # Extract the first word of "$ac_prog", so it can be a program name with args.
11978 set dummy $ac_prog; ac_word=$2
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11980 $as_echo_n "checking for $ac_word... " >&6; }
11981 if ${ac_cv_path_TR+:} false; then :
11982   $as_echo_n "(cached) " >&6
11983 else
11984   case $TR in
11985   [\\/]* | ?:[\\/]*)
11986   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11987   ;;
11988   *)
11989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11990 for as_dir in $PATH
11991 do
11992   IFS=$as_save_IFS
11993   test -z "$as_dir" && as_dir=.
11994     for ac_exec_ext in '' $ac_executable_extensions; do
11995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11996     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11998     break 2
11999   fi
12000 done
12001   done
12002 IFS=$as_save_IFS
12003 
12004   ;;
12005 esac
12006 fi
12007 TR=$ac_cv_path_TR
12008 if test -n "$TR"; then
12009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12010 $as_echo "$TR" >&6; }
12011 else
12012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12013 $as_echo "no" >&6; }
12014 fi
12015 
12016 
12017   test -n "$TR" && break
12018 done
12019 
12020     else
12021       # If it succeeded, then it was overridden by the user. We will use it
12022       # for the tool.
12023 
12024       # First remove it from the list of overridden variables, so we can test
12025       # for unknown variables in the end.
12026       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12027 
12028       # Check if we try to supply an empty value
12029       if test "x$TR" = x; then
12030         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12031 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12032         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12033 $as_echo_n "checking for TR... " >&6; }
12034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12035 $as_echo "disabled" >&6; }
12036       else
12037         # Check if the provided tool contains a complete path.
12038         tool_specified="$TR"
12039         tool_basename="${tool_specified##*/}"
12040         if test "x$tool_basename" = "x$tool_specified"; then
12041           # A command without a complete path is provided, search $PATH.
12042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12043 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12044           # Extract the first word of "$tool_basename", so it can be a program name with args.
12045 set dummy $tool_basename; ac_word=$2
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12047 $as_echo_n "checking for $ac_word... " >&6; }
12048 if ${ac_cv_path_TR+:} false; then :
12049   $as_echo_n "(cached) " >&6
12050 else
12051   case $TR in
12052   [\\/]* | ?:[\\/]*)
12053   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12054   ;;
12055   *)
12056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12057 for as_dir in $PATH
12058 do
12059   IFS=$as_save_IFS
12060   test -z "$as_dir" && as_dir=.
12061     for ac_exec_ext in '' $ac_executable_extensions; do
12062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12063     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12065     break 2
12066   fi
12067 done
12068   done
12069 IFS=$as_save_IFS
12070 
12071   ;;
12072 esac
12073 fi
12074 TR=$ac_cv_path_TR
12075 if test -n "$TR"; then
12076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12077 $as_echo "$TR" >&6; }
12078 else
12079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12080 $as_echo "no" >&6; }
12081 fi
12082 
12083 
12084           if test "x$TR" = x; then
12085             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12086           fi
12087         else
12088           # Otherwise we believe it is a complete path. Use it as it is.
12089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12090 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12091           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12092 $as_echo_n "checking for TR... " >&6; }
12093           if test ! -x "$tool_specified"; then
12094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12095 $as_echo "not found" >&6; }
12096             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12097           fi
12098           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12099 $as_echo "$tool_specified" >&6; }
12100         fi
12101       fi
12102     fi
12103 
12104   fi
12105 
12106 
12107 
12108   if test "x$TR" = x; then
12109     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12110   fi
12111 
12112 
12113 
12114 
12115 
12116   # Publish this variable in the help.
12117 
12118 
12119   if [ -z "${UNAME+x}" ]; then
12120     # The variable is not set by user, try to locate tool using the code snippet
12121     for ac_prog in uname
12122 do
12123   # Extract the first word of "$ac_prog", so it can be a program name with args.
12124 set dummy $ac_prog; ac_word=$2
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12126 $as_echo_n "checking for $ac_word... " >&6; }
12127 if ${ac_cv_path_UNAME+:} false; then :
12128   $as_echo_n "(cached) " >&6
12129 else
12130   case $UNAME in
12131   [\\/]* | ?:[\\/]*)
12132   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12133   ;;
12134   *)
12135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12136 for as_dir in $PATH
12137 do
12138   IFS=$as_save_IFS
12139   test -z "$as_dir" && as_dir=.
12140     for ac_exec_ext in '' $ac_executable_extensions; do
12141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12142     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12144     break 2
12145   fi
12146 done
12147   done
12148 IFS=$as_save_IFS
12149 
12150   ;;
12151 esac
12152 fi
12153 UNAME=$ac_cv_path_UNAME
12154 if test -n "$UNAME"; then
12155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12156 $as_echo "$UNAME" >&6; }
12157 else
12158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12159 $as_echo "no" >&6; }
12160 fi
12161 
12162 
12163   test -n "$UNAME" && break
12164 done
12165 
12166   else
12167     # The variable is set, but is it from the command line or the environment?
12168 
12169     # Try to remove the string !UNAME! from our list.
12170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12172       # If it failed, the variable was not from the command line. Ignore it,
12173       # but warn the user (except for BASH, which is always set by the calling BASH).
12174       if test "xUNAME" != xBASH; then
12175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12176 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12177       fi
12178       # Try to locate tool using the code snippet
12179       for ac_prog in uname
12180 do
12181   # Extract the first word of "$ac_prog", so it can be a program name with args.
12182 set dummy $ac_prog; ac_word=$2
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12184 $as_echo_n "checking for $ac_word... " >&6; }
12185 if ${ac_cv_path_UNAME+:} false; then :
12186   $as_echo_n "(cached) " >&6
12187 else
12188   case $UNAME in
12189   [\\/]* | ?:[\\/]*)
12190   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12191   ;;
12192   *)
12193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12194 for as_dir in $PATH
12195 do
12196   IFS=$as_save_IFS
12197   test -z "$as_dir" && as_dir=.
12198     for ac_exec_ext in '' $ac_executable_extensions; do
12199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12200     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12202     break 2
12203   fi
12204 done
12205   done
12206 IFS=$as_save_IFS
12207 
12208   ;;
12209 esac
12210 fi
12211 UNAME=$ac_cv_path_UNAME
12212 if test -n "$UNAME"; then
12213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12214 $as_echo "$UNAME" >&6; }
12215 else
12216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12217 $as_echo "no" >&6; }
12218 fi
12219 
12220 
12221   test -n "$UNAME" && break
12222 done
12223 
12224     else
12225       # If it succeeded, then it was overridden by the user. We will use it
12226       # for the tool.
12227 
12228       # First remove it from the list of overridden variables, so we can test
12229       # for unknown variables in the end.
12230       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12231 
12232       # Check if we try to supply an empty value
12233       if test "x$UNAME" = x; then
12234         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12235 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12237 $as_echo_n "checking for UNAME... " >&6; }
12238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12239 $as_echo "disabled" >&6; }
12240       else
12241         # Check if the provided tool contains a complete path.
12242         tool_specified="$UNAME"
12243         tool_basename="${tool_specified##*/}"
12244         if test "x$tool_basename" = "x$tool_specified"; then
12245           # A command without a complete path is provided, search $PATH.
12246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12247 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12248           # Extract the first word of "$tool_basename", so it can be a program name with args.
12249 set dummy $tool_basename; ac_word=$2
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12251 $as_echo_n "checking for $ac_word... " >&6; }
12252 if ${ac_cv_path_UNAME+:} false; then :
12253   $as_echo_n "(cached) " >&6
12254 else
12255   case $UNAME in
12256   [\\/]* | ?:[\\/]*)
12257   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12258   ;;
12259   *)
12260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12261 for as_dir in $PATH
12262 do
12263   IFS=$as_save_IFS
12264   test -z "$as_dir" && as_dir=.
12265     for ac_exec_ext in '' $ac_executable_extensions; do
12266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12267     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12269     break 2
12270   fi
12271 done
12272   done
12273 IFS=$as_save_IFS
12274 
12275   ;;
12276 esac
12277 fi
12278 UNAME=$ac_cv_path_UNAME
12279 if test -n "$UNAME"; then
12280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12281 $as_echo "$UNAME" >&6; }
12282 else
12283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12284 $as_echo "no" >&6; }
12285 fi
12286 
12287 
12288           if test "x$UNAME" = x; then
12289             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12290           fi
12291         else
12292           # Otherwise we believe it is a complete path. Use it as it is.
12293           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12294 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12295           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12296 $as_echo_n "checking for UNAME... " >&6; }
12297           if test ! -x "$tool_specified"; then
12298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12299 $as_echo "not found" >&6; }
12300             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12301           fi
12302           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12303 $as_echo "$tool_specified" >&6; }
12304         fi
12305       fi
12306     fi
12307 
12308   fi
12309 
12310 
12311 
12312   if test "x$UNAME" = x; then
12313     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12314   fi
12315 
12316 
12317 
12318 
12319 
12320   # Publish this variable in the help.
12321 
12322 
12323   if [ -z "${UNIQ+x}" ]; then
12324     # The variable is not set by user, try to locate tool using the code snippet
12325     for ac_prog in uniq
12326 do
12327   # Extract the first word of "$ac_prog", so it can be a program name with args.
12328 set dummy $ac_prog; ac_word=$2
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12330 $as_echo_n "checking for $ac_word... " >&6; }
12331 if ${ac_cv_path_UNIQ+:} false; then :
12332   $as_echo_n "(cached) " >&6
12333 else
12334   case $UNIQ in
12335   [\\/]* | ?:[\\/]*)
12336   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12337   ;;
12338   *)
12339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12340 for as_dir in $PATH
12341 do
12342   IFS=$as_save_IFS
12343   test -z "$as_dir" && as_dir=.
12344     for ac_exec_ext in '' $ac_executable_extensions; do
12345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12346     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12348     break 2
12349   fi
12350 done
12351   done
12352 IFS=$as_save_IFS
12353 
12354   ;;
12355 esac
12356 fi
12357 UNIQ=$ac_cv_path_UNIQ
12358 if test -n "$UNIQ"; then
12359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12360 $as_echo "$UNIQ" >&6; }
12361 else
12362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12363 $as_echo "no" >&6; }
12364 fi
12365 
12366 
12367   test -n "$UNIQ" && break
12368 done
12369 
12370   else
12371     # The variable is set, but is it from the command line or the environment?
12372 
12373     # Try to remove the string !UNIQ! from our list.
12374     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12375     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12376       # If it failed, the variable was not from the command line. Ignore it,
12377       # but warn the user (except for BASH, which is always set by the calling BASH).
12378       if test "xUNIQ" != xBASH; then
12379         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12380 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12381       fi
12382       # Try to locate tool using the code snippet
12383       for ac_prog in uniq
12384 do
12385   # Extract the first word of "$ac_prog", so it can be a program name with args.
12386 set dummy $ac_prog; ac_word=$2
12387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388 $as_echo_n "checking for $ac_word... " >&6; }
12389 if ${ac_cv_path_UNIQ+:} false; then :
12390   $as_echo_n "(cached) " >&6
12391 else
12392   case $UNIQ in
12393   [\\/]* | ?:[\\/]*)
12394   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12395   ;;
12396   *)
12397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12398 for as_dir in $PATH
12399 do
12400   IFS=$as_save_IFS
12401   test -z "$as_dir" && as_dir=.
12402     for ac_exec_ext in '' $ac_executable_extensions; do
12403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12404     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12406     break 2
12407   fi
12408 done
12409   done
12410 IFS=$as_save_IFS
12411 
12412   ;;
12413 esac
12414 fi
12415 UNIQ=$ac_cv_path_UNIQ
12416 if test -n "$UNIQ"; then
12417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12418 $as_echo "$UNIQ" >&6; }
12419 else
12420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421 $as_echo "no" >&6; }
12422 fi
12423 
12424 
12425   test -n "$UNIQ" && break
12426 done
12427 
12428     else
12429       # If it succeeded, then it was overridden by the user. We will use it
12430       # for the tool.
12431 
12432       # First remove it from the list of overridden variables, so we can test
12433       # for unknown variables in the end.
12434       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12435 
12436       # Check if we try to supply an empty value
12437       if test "x$UNIQ" = x; then
12438         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12439 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12440         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12441 $as_echo_n "checking for UNIQ... " >&6; }
12442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12443 $as_echo "disabled" >&6; }
12444       else
12445         # Check if the provided tool contains a complete path.
12446         tool_specified="$UNIQ"
12447         tool_basename="${tool_specified##*/}"
12448         if test "x$tool_basename" = "x$tool_specified"; then
12449           # A command without a complete path is provided, search $PATH.
12450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12451 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12452           # Extract the first word of "$tool_basename", so it can be a program name with args.
12453 set dummy $tool_basename; ac_word=$2
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455 $as_echo_n "checking for $ac_word... " >&6; }
12456 if ${ac_cv_path_UNIQ+:} false; then :
12457   $as_echo_n "(cached) " >&6
12458 else
12459   case $UNIQ in
12460   [\\/]* | ?:[\\/]*)
12461   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12462   ;;
12463   *)
12464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465 for as_dir in $PATH
12466 do
12467   IFS=$as_save_IFS
12468   test -z "$as_dir" && as_dir=.
12469     for ac_exec_ext in '' $ac_executable_extensions; do
12470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473     break 2
12474   fi
12475 done
12476   done
12477 IFS=$as_save_IFS
12478 
12479   ;;
12480 esac
12481 fi
12482 UNIQ=$ac_cv_path_UNIQ
12483 if test -n "$UNIQ"; then
12484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12485 $as_echo "$UNIQ" >&6; }
12486 else
12487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488 $as_echo "no" >&6; }
12489 fi
12490 
12491 
12492           if test "x$UNIQ" = x; then
12493             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12494           fi
12495         else
12496           # Otherwise we believe it is a complete path. Use it as it is.
12497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12498 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12499           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12500 $as_echo_n "checking for UNIQ... " >&6; }
12501           if test ! -x "$tool_specified"; then
12502             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12503 $as_echo "not found" >&6; }
12504             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12505           fi
12506           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12507 $as_echo "$tool_specified" >&6; }
12508         fi
12509       fi
12510     fi
12511 
12512   fi
12513 
12514 
12515 
12516   if test "x$UNIQ" = x; then
12517     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12518   fi
12519 
12520 
12521 
12522 
12523 
12524   # Publish this variable in the help.
12525 
12526 
12527   if [ -z "${WC+x}" ]; then
12528     # The variable is not set by user, try to locate tool using the code snippet
12529     for ac_prog in wc
12530 do
12531   # Extract the first word of "$ac_prog", so it can be a program name with args.
12532 set dummy $ac_prog; ac_word=$2
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12534 $as_echo_n "checking for $ac_word... " >&6; }
12535 if ${ac_cv_path_WC+:} false; then :
12536   $as_echo_n "(cached) " >&6
12537 else
12538   case $WC in
12539   [\\/]* | ?:[\\/]*)
12540   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12541   ;;
12542   *)
12543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12544 for as_dir in $PATH
12545 do
12546   IFS=$as_save_IFS
12547   test -z "$as_dir" && as_dir=.
12548     for ac_exec_ext in '' $ac_executable_extensions; do
12549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12550     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12552     break 2
12553   fi
12554 done
12555   done
12556 IFS=$as_save_IFS
12557 
12558   ;;
12559 esac
12560 fi
12561 WC=$ac_cv_path_WC
12562 if test -n "$WC"; then
12563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12564 $as_echo "$WC" >&6; }
12565 else
12566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567 $as_echo "no" >&6; }
12568 fi
12569 
12570 
12571   test -n "$WC" && break
12572 done
12573 
12574   else
12575     # The variable is set, but is it from the command line or the environment?
12576 
12577     # Try to remove the string !WC! from our list.
12578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12580       # If it failed, the variable was not from the command line. Ignore it,
12581       # but warn the user (except for BASH, which is always set by the calling BASH).
12582       if test "xWC" != xBASH; then
12583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12584 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12585       fi
12586       # Try to locate tool using the code snippet
12587       for ac_prog in wc
12588 do
12589   # Extract the first word of "$ac_prog", so it can be a program name with args.
12590 set dummy $ac_prog; ac_word=$2
12591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12592 $as_echo_n "checking for $ac_word... " >&6; }
12593 if ${ac_cv_path_WC+:} false; then :
12594   $as_echo_n "(cached) " >&6
12595 else
12596   case $WC in
12597   [\\/]* | ?:[\\/]*)
12598   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12599   ;;
12600   *)
12601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12602 for as_dir in $PATH
12603 do
12604   IFS=$as_save_IFS
12605   test -z "$as_dir" && as_dir=.
12606     for ac_exec_ext in '' $ac_executable_extensions; do
12607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12608     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12610     break 2
12611   fi
12612 done
12613   done
12614 IFS=$as_save_IFS
12615 
12616   ;;
12617 esac
12618 fi
12619 WC=$ac_cv_path_WC
12620 if test -n "$WC"; then
12621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12622 $as_echo "$WC" >&6; }
12623 else
12624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625 $as_echo "no" >&6; }
12626 fi
12627 
12628 
12629   test -n "$WC" && break
12630 done
12631 
12632     else
12633       # If it succeeded, then it was overridden by the user. We will use it
12634       # for the tool.
12635 
12636       # First remove it from the list of overridden variables, so we can test
12637       # for unknown variables in the end.
12638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12639 
12640       # Check if we try to supply an empty value
12641       if test "x$WC" = x; then
12642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12643 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12645 $as_echo_n "checking for WC... " >&6; }
12646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12647 $as_echo "disabled" >&6; }
12648       else
12649         # Check if the provided tool contains a complete path.
12650         tool_specified="$WC"
12651         tool_basename="${tool_specified##*/}"
12652         if test "x$tool_basename" = "x$tool_specified"; then
12653           # A command without a complete path is provided, search $PATH.
12654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12655 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12656           # Extract the first word of "$tool_basename", so it can be a program name with args.
12657 set dummy $tool_basename; ac_word=$2
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12659 $as_echo_n "checking for $ac_word... " >&6; }
12660 if ${ac_cv_path_WC+:} false; then :
12661   $as_echo_n "(cached) " >&6
12662 else
12663   case $WC in
12664   [\\/]* | ?:[\\/]*)
12665   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12666   ;;
12667   *)
12668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669 for as_dir in $PATH
12670 do
12671   IFS=$as_save_IFS
12672   test -z "$as_dir" && as_dir=.
12673     for ac_exec_ext in '' $ac_executable_extensions; do
12674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12675     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12677     break 2
12678   fi
12679 done
12680   done
12681 IFS=$as_save_IFS
12682 
12683   ;;
12684 esac
12685 fi
12686 WC=$ac_cv_path_WC
12687 if test -n "$WC"; then
12688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12689 $as_echo "$WC" >&6; }
12690 else
12691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692 $as_echo "no" >&6; }
12693 fi
12694 
12695 
12696           if test "x$WC" = x; then
12697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12698           fi
12699         else
12700           # Otherwise we believe it is a complete path. Use it as it is.
12701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12702 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12704 $as_echo_n "checking for WC... " >&6; }
12705           if test ! -x "$tool_specified"; then
12706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12707 $as_echo "not found" >&6; }
12708             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12709           fi
12710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12711 $as_echo "$tool_specified" >&6; }
12712         fi
12713       fi
12714     fi
12715 
12716   fi
12717 
12718 
12719 
12720   if test "x$WC" = x; then
12721     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12722   fi
12723 
12724 
12725 
12726 
12727 
12728   # Publish this variable in the help.
12729 
12730 
12731   if [ -z "${WHICH+x}" ]; then
12732     # The variable is not set by user, try to locate tool using the code snippet
12733     for ac_prog in which
12734 do
12735   # Extract the first word of "$ac_prog", so it can be a program name with args.
12736 set dummy $ac_prog; ac_word=$2
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12738 $as_echo_n "checking for $ac_word... " >&6; }
12739 if ${ac_cv_path_WHICH+:} false; then :
12740   $as_echo_n "(cached) " >&6
12741 else
12742   case $WHICH in
12743   [\\/]* | ?:[\\/]*)
12744   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12745   ;;
12746   *)
12747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12748 for as_dir in $PATH
12749 do
12750   IFS=$as_save_IFS
12751   test -z "$as_dir" && as_dir=.
12752     for ac_exec_ext in '' $ac_executable_extensions; do
12753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12754     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12756     break 2
12757   fi
12758 done
12759   done
12760 IFS=$as_save_IFS
12761 
12762   ;;
12763 esac
12764 fi
12765 WHICH=$ac_cv_path_WHICH
12766 if test -n "$WHICH"; then
12767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12768 $as_echo "$WHICH" >&6; }
12769 else
12770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12771 $as_echo "no" >&6; }
12772 fi
12773 
12774 
12775   test -n "$WHICH" && break
12776 done
12777 
12778   else
12779     # The variable is set, but is it from the command line or the environment?
12780 
12781     # Try to remove the string !WHICH! from our list.
12782     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12783     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12784       # If it failed, the variable was not from the command line. Ignore it,
12785       # but warn the user (except for BASH, which is always set by the calling BASH).
12786       if test "xWHICH" != xBASH; then
12787         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12788 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12789       fi
12790       # Try to locate tool using the code snippet
12791       for ac_prog in which
12792 do
12793   # Extract the first word of "$ac_prog", so it can be a program name with args.
12794 set dummy $ac_prog; ac_word=$2
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12796 $as_echo_n "checking for $ac_word... " >&6; }
12797 if ${ac_cv_path_WHICH+:} false; then :
12798   $as_echo_n "(cached) " >&6
12799 else
12800   case $WHICH in
12801   [\\/]* | ?:[\\/]*)
12802   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12803   ;;
12804   *)
12805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12806 for as_dir in $PATH
12807 do
12808   IFS=$as_save_IFS
12809   test -z "$as_dir" && as_dir=.
12810     for ac_exec_ext in '' $ac_executable_extensions; do
12811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12812     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12814     break 2
12815   fi
12816 done
12817   done
12818 IFS=$as_save_IFS
12819 
12820   ;;
12821 esac
12822 fi
12823 WHICH=$ac_cv_path_WHICH
12824 if test -n "$WHICH"; then
12825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12826 $as_echo "$WHICH" >&6; }
12827 else
12828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12829 $as_echo "no" >&6; }
12830 fi
12831 
12832 
12833   test -n "$WHICH" && break
12834 done
12835 
12836     else
12837       # If it succeeded, then it was overridden by the user. We will use it
12838       # for the tool.
12839 
12840       # First remove it from the list of overridden variables, so we can test
12841       # for unknown variables in the end.
12842       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12843 
12844       # Check if we try to supply an empty value
12845       if test "x$WHICH" = x; then
12846         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12847 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12849 $as_echo_n "checking for WHICH... " >&6; }
12850         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12851 $as_echo "disabled" >&6; }
12852       else
12853         # Check if the provided tool contains a complete path.
12854         tool_specified="$WHICH"
12855         tool_basename="${tool_specified##*/}"
12856         if test "x$tool_basename" = "x$tool_specified"; then
12857           # A command without a complete path is provided, search $PATH.
12858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12859 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12860           # Extract the first word of "$tool_basename", so it can be a program name with args.
12861 set dummy $tool_basename; ac_word=$2
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12863 $as_echo_n "checking for $ac_word... " >&6; }
12864 if ${ac_cv_path_WHICH+:} false; then :
12865   $as_echo_n "(cached) " >&6
12866 else
12867   case $WHICH in
12868   [\\/]* | ?:[\\/]*)
12869   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12870   ;;
12871   *)
12872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873 for as_dir in $PATH
12874 do
12875   IFS=$as_save_IFS
12876   test -z "$as_dir" && as_dir=.
12877     for ac_exec_ext in '' $ac_executable_extensions; do
12878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12879     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12881     break 2
12882   fi
12883 done
12884   done
12885 IFS=$as_save_IFS
12886 
12887   ;;
12888 esac
12889 fi
12890 WHICH=$ac_cv_path_WHICH
12891 if test -n "$WHICH"; then
12892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12893 $as_echo "$WHICH" >&6; }
12894 else
12895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896 $as_echo "no" >&6; }
12897 fi
12898 
12899 
12900           if test "x$WHICH" = x; then
12901             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12902           fi
12903         else
12904           # Otherwise we believe it is a complete path. Use it as it is.
12905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12906 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12907           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12908 $as_echo_n "checking for WHICH... " >&6; }
12909           if test ! -x "$tool_specified"; then
12910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12911 $as_echo "not found" >&6; }
12912             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12913           fi
12914           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12915 $as_echo "$tool_specified" >&6; }
12916         fi
12917       fi
12918     fi
12919 
12920   fi
12921 
12922 
12923 
12924   if test "x$WHICH" = x; then
12925     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12926   fi
12927 
12928 
12929 
12930 
12931 
12932   # Publish this variable in the help.
12933 
12934 
12935   if [ -z "${XARGS+x}" ]; then
12936     # The variable is not set by user, try to locate tool using the code snippet
12937     for ac_prog in xargs
12938 do
12939   # Extract the first word of "$ac_prog", so it can be a program name with args.
12940 set dummy $ac_prog; ac_word=$2
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12942 $as_echo_n "checking for $ac_word... " >&6; }
12943 if ${ac_cv_path_XARGS+:} false; then :
12944   $as_echo_n "(cached) " >&6
12945 else
12946   case $XARGS in
12947   [\\/]* | ?:[\\/]*)
12948   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12949   ;;
12950   *)
12951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12952 for as_dir in $PATH
12953 do
12954   IFS=$as_save_IFS
12955   test -z "$as_dir" && as_dir=.
12956     for ac_exec_ext in '' $ac_executable_extensions; do
12957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12958     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12960     break 2
12961   fi
12962 done
12963   done
12964 IFS=$as_save_IFS
12965 
12966   ;;
12967 esac
12968 fi
12969 XARGS=$ac_cv_path_XARGS
12970 if test -n "$XARGS"; then
12971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12972 $as_echo "$XARGS" >&6; }
12973 else
12974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12975 $as_echo "no" >&6; }
12976 fi
12977 
12978 
12979   test -n "$XARGS" && break
12980 done
12981 
12982   else
12983     # The variable is set, but is it from the command line or the environment?
12984 
12985     # Try to remove the string !XARGS! from our list.
12986     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12987     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12988       # If it failed, the variable was not from the command line. Ignore it,
12989       # but warn the user (except for BASH, which is always set by the calling BASH).
12990       if test "xXARGS" != xBASH; then
12991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12992 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12993       fi
12994       # Try to locate tool using the code snippet
12995       for ac_prog in xargs
12996 do
12997   # Extract the first word of "$ac_prog", so it can be a program name with args.
12998 set dummy $ac_prog; ac_word=$2
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13000 $as_echo_n "checking for $ac_word... " >&6; }
13001 if ${ac_cv_path_XARGS+:} false; then :
13002   $as_echo_n "(cached) " >&6
13003 else
13004   case $XARGS in
13005   [\\/]* | ?:[\\/]*)
13006   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13007   ;;
13008   *)
13009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13010 for as_dir in $PATH
13011 do
13012   IFS=$as_save_IFS
13013   test -z "$as_dir" && as_dir=.
13014     for ac_exec_ext in '' $ac_executable_extensions; do
13015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13016     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13018     break 2
13019   fi
13020 done
13021   done
13022 IFS=$as_save_IFS
13023 
13024   ;;
13025 esac
13026 fi
13027 XARGS=$ac_cv_path_XARGS
13028 if test -n "$XARGS"; then
13029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13030 $as_echo "$XARGS" >&6; }
13031 else
13032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13033 $as_echo "no" >&6; }
13034 fi
13035 
13036 
13037   test -n "$XARGS" && break
13038 done
13039 
13040     else
13041       # If it succeeded, then it was overridden by the user. We will use it
13042       # for the tool.
13043 
13044       # First remove it from the list of overridden variables, so we can test
13045       # for unknown variables in the end.
13046       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13047 
13048       # Check if we try to supply an empty value
13049       if test "x$XARGS" = x; then
13050         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13051 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13053 $as_echo_n "checking for XARGS... " >&6; }
13054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13055 $as_echo "disabled" >&6; }
13056       else
13057         # Check if the provided tool contains a complete path.
13058         tool_specified="$XARGS"
13059         tool_basename="${tool_specified##*/}"
13060         if test "x$tool_basename" = "x$tool_specified"; then
13061           # A command without a complete path is provided, search $PATH.
13062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13063 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13064           # Extract the first word of "$tool_basename", so it can be a program name with args.
13065 set dummy $tool_basename; ac_word=$2
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067 $as_echo_n "checking for $ac_word... " >&6; }
13068 if ${ac_cv_path_XARGS+:} false; then :
13069   $as_echo_n "(cached) " >&6
13070 else
13071   case $XARGS in
13072   [\\/]* | ?:[\\/]*)
13073   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13074   ;;
13075   *)
13076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077 for as_dir in $PATH
13078 do
13079   IFS=$as_save_IFS
13080   test -z "$as_dir" && as_dir=.
13081     for ac_exec_ext in '' $ac_executable_extensions; do
13082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085     break 2
13086   fi
13087 done
13088   done
13089 IFS=$as_save_IFS
13090 
13091   ;;
13092 esac
13093 fi
13094 XARGS=$ac_cv_path_XARGS
13095 if test -n "$XARGS"; then
13096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13097 $as_echo "$XARGS" >&6; }
13098 else
13099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100 $as_echo "no" >&6; }
13101 fi
13102 
13103 
13104           if test "x$XARGS" = x; then
13105             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13106           fi
13107         else
13108           # Otherwise we believe it is a complete path. Use it as it is.
13109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13110 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13111           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13112 $as_echo_n "checking for XARGS... " >&6; }
13113           if test ! -x "$tool_specified"; then
13114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13115 $as_echo "not found" >&6; }
13116             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13117           fi
13118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13119 $as_echo "$tool_specified" >&6; }
13120         fi
13121       fi
13122     fi
13123 
13124   fi
13125 
13126 
13127 
13128   if test "x$XARGS" = x; then
13129     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13130   fi
13131 
13132 
13133 
13134   # Then required tools that require some special treatment.
13135 
13136 
13137   # Publish this variable in the help.
13138 
13139 
13140   if [ -z "${AWK+x}" ]; then
13141     # The variable is not set by user, try to locate tool using the code snippet
13142     for ac_prog in gawk mawk nawk awk
13143 do
13144   # Extract the first word of "$ac_prog", so it can be a program name with args.
13145 set dummy $ac_prog; ac_word=$2
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13147 $as_echo_n "checking for $ac_word... " >&6; }
13148 if ${ac_cv_prog_AWK+:} false; then :
13149   $as_echo_n "(cached) " >&6
13150 else
13151   if test -n "$AWK"; then
13152   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13153 else
13154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13155 for as_dir in $PATH
13156 do
13157   IFS=$as_save_IFS
13158   test -z "$as_dir" && as_dir=.
13159     for ac_exec_ext in '' $ac_executable_extensions; do
13160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13161     ac_cv_prog_AWK="$ac_prog"
13162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13163     break 2
13164   fi
13165 done
13166   done
13167 IFS=$as_save_IFS
13168 
13169 fi
13170 fi
13171 AWK=$ac_cv_prog_AWK
13172 if test -n "$AWK"; then
13173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13174 $as_echo "$AWK" >&6; }
13175 else
13176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13177 $as_echo "no" >&6; }
13178 fi
13179 
13180 
13181   test -n "$AWK" && break
13182 done
13183 
13184   else
13185     # The variable is set, but is it from the command line or the environment?
13186 
13187     # Try to remove the string !AWK! from our list.
13188     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13189     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13190       # If it failed, the variable was not from the command line. Ignore it,
13191       # but warn the user (except for BASH, which is always set by the calling BASH).
13192       if test "xAWK" != xBASH; then
13193         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13194 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13195       fi
13196       # Try to locate tool using the code snippet
13197       for ac_prog in gawk mawk nawk awk
13198 do
13199   # Extract the first word of "$ac_prog", so it can be a program name with args.
13200 set dummy $ac_prog; ac_word=$2
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13202 $as_echo_n "checking for $ac_word... " >&6; }
13203 if ${ac_cv_prog_AWK+:} false; then :
13204   $as_echo_n "(cached) " >&6
13205 else
13206   if test -n "$AWK"; then
13207   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13208 else
13209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210 for as_dir in $PATH
13211 do
13212   IFS=$as_save_IFS
13213   test -z "$as_dir" && as_dir=.
13214     for ac_exec_ext in '' $ac_executable_extensions; do
13215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216     ac_cv_prog_AWK="$ac_prog"
13217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218     break 2
13219   fi
13220 done
13221   done
13222 IFS=$as_save_IFS
13223 
13224 fi
13225 fi
13226 AWK=$ac_cv_prog_AWK
13227 if test -n "$AWK"; then
13228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13229 $as_echo "$AWK" >&6; }
13230 else
13231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13232 $as_echo "no" >&6; }
13233 fi
13234 
13235 
13236   test -n "$AWK" && break
13237 done
13238 
13239     else
13240       # If it succeeded, then it was overridden by the user. We will use it
13241       # for the tool.
13242 
13243       # First remove it from the list of overridden variables, so we can test
13244       # for unknown variables in the end.
13245       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13246 
13247       # Check if we try to supply an empty value
13248       if test "x$AWK" = x; then
13249         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13250 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13252 $as_echo_n "checking for AWK... " >&6; }
13253         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13254 $as_echo "disabled" >&6; }
13255       else
13256         # Check if the provided tool contains a complete path.
13257         tool_specified="$AWK"
13258         tool_basename="${tool_specified##*/}"
13259         if test "x$tool_basename" = "x$tool_specified"; then
13260           # A command without a complete path is provided, search $PATH.
13261           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13262 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13263           # Extract the first word of "$tool_basename", so it can be a program name with args.
13264 set dummy $tool_basename; ac_word=$2
13265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266 $as_echo_n "checking for $ac_word... " >&6; }
13267 if ${ac_cv_path_AWK+:} false; then :
13268   $as_echo_n "(cached) " >&6
13269 else
13270   case $AWK in
13271   [\\/]* | ?:[\\/]*)
13272   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13273   ;;
13274   *)
13275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13276 for as_dir in $PATH
13277 do
13278   IFS=$as_save_IFS
13279   test -z "$as_dir" && as_dir=.
13280     for ac_exec_ext in '' $ac_executable_extensions; do
13281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13282     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13284     break 2
13285   fi
13286 done
13287   done
13288 IFS=$as_save_IFS
13289 
13290   ;;
13291 esac
13292 fi
13293 AWK=$ac_cv_path_AWK
13294 if test -n "$AWK"; then
13295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13296 $as_echo "$AWK" >&6; }
13297 else
13298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299 $as_echo "no" >&6; }
13300 fi
13301 
13302 
13303           if test "x$AWK" = x; then
13304             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13305           fi
13306         else
13307           # Otherwise we believe it is a complete path. Use it as it is.
13308           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13309 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13310           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13311 $as_echo_n "checking for AWK... " >&6; }
13312           if test ! -x "$tool_specified"; then
13313             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13314 $as_echo "not found" >&6; }
13315             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13316           fi
13317           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13318 $as_echo "$tool_specified" >&6; }
13319         fi
13320       fi
13321     fi
13322 
13323   fi
13324 
13325 
13326   if test "x$AWK" = x; then
13327     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13328   fi
13329 
13330 
13331 
13332 
13333   # Publish this variable in the help.
13334 
13335 
13336   if [ -z "${GREP+x}" ]; then
13337     # The variable is not set by user, try to locate tool using the code snippet
13338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13339 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13340 if ${ac_cv_path_GREP+:} false; then :
13341   $as_echo_n "(cached) " >&6
13342 else
13343   if test -z "$GREP"; then
13344   ac_path_GREP_found=false
13345   # Loop through the user's path and test for each of PROGNAME-LIST
13346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13347 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13348 do
13349   IFS=$as_save_IFS
13350   test -z "$as_dir" && as_dir=.
13351     for ac_prog in grep ggrep; do
13352     for ac_exec_ext in '' $ac_executable_extensions; do
13353       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13354       as_fn_executable_p "$ac_path_GREP" || continue
13355 # Check for GNU ac_path_GREP and select it if it is found.
13356   # Check for GNU $ac_path_GREP
13357 case `"$ac_path_GREP" --version 2>&1` in
13358 *GNU*)
13359   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13360 *)
13361   ac_count=0
13362   $as_echo_n 0123456789 >"conftest.in"
13363   while :
13364   do
13365     cat "conftest.in" "conftest.in" >"conftest.tmp"
13366     mv "conftest.tmp" "conftest.in"
13367     cp "conftest.in" "conftest.nl"
13368     $as_echo 'GREP' >> "conftest.nl"
13369     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13370     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13371     as_fn_arith $ac_count + 1 && ac_count=$as_val
13372     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13373       # Best one so far, save it but keep looking for a better one
13374       ac_cv_path_GREP="$ac_path_GREP"
13375       ac_path_GREP_max=$ac_count
13376     fi
13377     # 10*(2^10) chars as input seems more than enough
13378     test $ac_count -gt 10 && break
13379   done
13380   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13381 esac
13382 
13383       $ac_path_GREP_found && break 3
13384     done
13385   done
13386   done
13387 IFS=$as_save_IFS
13388   if test -z "$ac_cv_path_GREP"; then
13389     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13390   fi
13391 else
13392   ac_cv_path_GREP=$GREP
13393 fi
13394 
13395 fi
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13397 $as_echo "$ac_cv_path_GREP" >&6; }
13398  GREP="$ac_cv_path_GREP"
13399 
13400 
13401   else
13402     # The variable is set, but is it from the command line or the environment?
13403 
13404     # Try to remove the string !GREP! from our list.
13405     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13406     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13407       # If it failed, the variable was not from the command line. Ignore it,
13408       # but warn the user (except for BASH, which is always set by the calling BASH).
13409       if test "xGREP" != xBASH; then
13410         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13411 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13412       fi
13413       # Try to locate tool using the code snippet
13414       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13415 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13416 if ${ac_cv_path_GREP+:} false; then :
13417   $as_echo_n "(cached) " >&6
13418 else
13419   if test -z "$GREP"; then
13420   ac_path_GREP_found=false
13421   # Loop through the user's path and test for each of PROGNAME-LIST
13422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13423 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13424 do
13425   IFS=$as_save_IFS
13426   test -z "$as_dir" && as_dir=.
13427     for ac_prog in grep ggrep; do
13428     for ac_exec_ext in '' $ac_executable_extensions; do
13429       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13430       as_fn_executable_p "$ac_path_GREP" || continue
13431 # Check for GNU ac_path_GREP and select it if it is found.
13432   # Check for GNU $ac_path_GREP
13433 case `"$ac_path_GREP" --version 2>&1` in
13434 *GNU*)
13435   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13436 *)
13437   ac_count=0
13438   $as_echo_n 0123456789 >"conftest.in"
13439   while :
13440   do
13441     cat "conftest.in" "conftest.in" >"conftest.tmp"
13442     mv "conftest.tmp" "conftest.in"
13443     cp "conftest.in" "conftest.nl"
13444     $as_echo 'GREP' >> "conftest.nl"
13445     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13446     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13447     as_fn_arith $ac_count + 1 && ac_count=$as_val
13448     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13449       # Best one so far, save it but keep looking for a better one
13450       ac_cv_path_GREP="$ac_path_GREP"
13451       ac_path_GREP_max=$ac_count
13452     fi
13453     # 10*(2^10) chars as input seems more than enough
13454     test $ac_count -gt 10 && break
13455   done
13456   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13457 esac
13458 
13459       $ac_path_GREP_found && break 3
13460     done
13461   done
13462   done
13463 IFS=$as_save_IFS
13464   if test -z "$ac_cv_path_GREP"; then
13465     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13466   fi
13467 else
13468   ac_cv_path_GREP=$GREP
13469 fi
13470 
13471 fi
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13473 $as_echo "$ac_cv_path_GREP" >&6; }
13474  GREP="$ac_cv_path_GREP"
13475 
13476 
13477     else
13478       # If it succeeded, then it was overridden by the user. We will use it
13479       # for the tool.
13480 
13481       # First remove it from the list of overridden variables, so we can test
13482       # for unknown variables in the end.
13483       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13484 
13485       # Check if we try to supply an empty value
13486       if test "x$GREP" = x; then
13487         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13488 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13489         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13490 $as_echo_n "checking for GREP... " >&6; }
13491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13492 $as_echo "disabled" >&6; }
13493       else
13494         # Check if the provided tool contains a complete path.
13495         tool_specified="$GREP"
13496         tool_basename="${tool_specified##*/}"
13497         if test "x$tool_basename" = "x$tool_specified"; then
13498           # A command without a complete path is provided, search $PATH.
13499           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13500 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13501           # Extract the first word of "$tool_basename", so it can be a program name with args.
13502 set dummy $tool_basename; ac_word=$2
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13504 $as_echo_n "checking for $ac_word... " >&6; }
13505 if ${ac_cv_path_GREP+:} false; then :
13506   $as_echo_n "(cached) " >&6
13507 else
13508   case $GREP in
13509   [\\/]* | ?:[\\/]*)
13510   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13511   ;;
13512   *)
13513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13514 for as_dir in $PATH
13515 do
13516   IFS=$as_save_IFS
13517   test -z "$as_dir" && as_dir=.
13518     for ac_exec_ext in '' $ac_executable_extensions; do
13519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13520     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13522     break 2
13523   fi
13524 done
13525   done
13526 IFS=$as_save_IFS
13527 
13528   ;;
13529 esac
13530 fi
13531 GREP=$ac_cv_path_GREP
13532 if test -n "$GREP"; then
13533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13534 $as_echo "$GREP" >&6; }
13535 else
13536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13537 $as_echo "no" >&6; }
13538 fi
13539 
13540 
13541           if test "x$GREP" = x; then
13542             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13543           fi
13544         else
13545           # Otherwise we believe it is a complete path. Use it as it is.
13546           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13547 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13548           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13549 $as_echo_n "checking for GREP... " >&6; }
13550           if test ! -x "$tool_specified"; then
13551             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13552 $as_echo "not found" >&6; }
13553             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13554           fi
13555           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13556 $as_echo "$tool_specified" >&6; }
13557         fi
13558       fi
13559     fi
13560 
13561   fi
13562 
13563 
13564   if test "x$GREP" = x; then
13565     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13566   fi
13567 
13568 
13569 
13570 
13571   # Publish this variable in the help.
13572 
13573 
13574   if [ -z "${EGREP+x}" ]; then
13575     # The variable is not set by user, try to locate tool using the code snippet
13576     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13577 $as_echo_n "checking for egrep... " >&6; }
13578 if ${ac_cv_path_EGREP+:} false; then :
13579   $as_echo_n "(cached) " >&6
13580 else
13581   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13582    then ac_cv_path_EGREP="$GREP -E"
13583    else
13584      if test -z "$EGREP"; then
13585   ac_path_EGREP_found=false
13586   # Loop through the user's path and test for each of PROGNAME-LIST
13587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13588 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13589 do
13590   IFS=$as_save_IFS
13591   test -z "$as_dir" && as_dir=.
13592     for ac_prog in egrep; do
13593     for ac_exec_ext in '' $ac_executable_extensions; do
13594       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13595       as_fn_executable_p "$ac_path_EGREP" || continue
13596 # Check for GNU ac_path_EGREP and select it if it is found.
13597   # Check for GNU $ac_path_EGREP
13598 case `"$ac_path_EGREP" --version 2>&1` in
13599 *GNU*)
13600   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13601 *)
13602   ac_count=0
13603   $as_echo_n 0123456789 >"conftest.in"
13604   while :
13605   do
13606     cat "conftest.in" "conftest.in" >"conftest.tmp"
13607     mv "conftest.tmp" "conftest.in"
13608     cp "conftest.in" "conftest.nl"
13609     $as_echo 'EGREP' >> "conftest.nl"
13610     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13611     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13612     as_fn_arith $ac_count + 1 && ac_count=$as_val
13613     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13614       # Best one so far, save it but keep looking for a better one
13615       ac_cv_path_EGREP="$ac_path_EGREP"
13616       ac_path_EGREP_max=$ac_count
13617     fi
13618     # 10*(2^10) chars as input seems more than enough
13619     test $ac_count -gt 10 && break
13620   done
13621   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13622 esac
13623 
13624       $ac_path_EGREP_found && break 3
13625     done
13626   done
13627   done
13628 IFS=$as_save_IFS
13629   if test -z "$ac_cv_path_EGREP"; then
13630     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13631   fi
13632 else
13633   ac_cv_path_EGREP=$EGREP
13634 fi
13635 
13636    fi
13637 fi
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13639 $as_echo "$ac_cv_path_EGREP" >&6; }
13640  EGREP="$ac_cv_path_EGREP"
13641 
13642 
13643   else
13644     # The variable is set, but is it from the command line or the environment?
13645 
13646     # Try to remove the string !EGREP! from our list.
13647     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13648     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13649       # If it failed, the variable was not from the command line. Ignore it,
13650       # but warn the user (except for BASH, which is always set by the calling BASH).
13651       if test "xEGREP" != xBASH; then
13652         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13653 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13654       fi
13655       # Try to locate tool using the code snippet
13656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13657 $as_echo_n "checking for egrep... " >&6; }
13658 if ${ac_cv_path_EGREP+:} false; then :
13659   $as_echo_n "(cached) " >&6
13660 else
13661   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13662    then ac_cv_path_EGREP="$GREP -E"
13663    else
13664      if test -z "$EGREP"; then
13665   ac_path_EGREP_found=false
13666   # Loop through the user's path and test for each of PROGNAME-LIST
13667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13668 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13669 do
13670   IFS=$as_save_IFS
13671   test -z "$as_dir" && as_dir=.
13672     for ac_prog in egrep; do
13673     for ac_exec_ext in '' $ac_executable_extensions; do
13674       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13675       as_fn_executable_p "$ac_path_EGREP" || continue
13676 # Check for GNU ac_path_EGREP and select it if it is found.
13677   # Check for GNU $ac_path_EGREP
13678 case `"$ac_path_EGREP" --version 2>&1` in
13679 *GNU*)
13680   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13681 *)
13682   ac_count=0
13683   $as_echo_n 0123456789 >"conftest.in"
13684   while :
13685   do
13686     cat "conftest.in" "conftest.in" >"conftest.tmp"
13687     mv "conftest.tmp" "conftest.in"
13688     cp "conftest.in" "conftest.nl"
13689     $as_echo 'EGREP' >> "conftest.nl"
13690     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13691     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13692     as_fn_arith $ac_count + 1 && ac_count=$as_val
13693     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13694       # Best one so far, save it but keep looking for a better one
13695       ac_cv_path_EGREP="$ac_path_EGREP"
13696       ac_path_EGREP_max=$ac_count
13697     fi
13698     # 10*(2^10) chars as input seems more than enough
13699     test $ac_count -gt 10 && break
13700   done
13701   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13702 esac
13703 
13704       $ac_path_EGREP_found && break 3
13705     done
13706   done
13707   done
13708 IFS=$as_save_IFS
13709   if test -z "$ac_cv_path_EGREP"; then
13710     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13711   fi
13712 else
13713   ac_cv_path_EGREP=$EGREP
13714 fi
13715 
13716    fi
13717 fi
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13719 $as_echo "$ac_cv_path_EGREP" >&6; }
13720  EGREP="$ac_cv_path_EGREP"
13721 
13722 
13723     else
13724       # If it succeeded, then it was overridden by the user. We will use it
13725       # for the tool.
13726 
13727       # First remove it from the list of overridden variables, so we can test
13728       # for unknown variables in the end.
13729       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13730 
13731       # Check if we try to supply an empty value
13732       if test "x$EGREP" = x; then
13733         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13734 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13736 $as_echo_n "checking for EGREP... " >&6; }
13737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13738 $as_echo "disabled" >&6; }
13739       else
13740         # Check if the provided tool contains a complete path.
13741         tool_specified="$EGREP"
13742         tool_basename="${tool_specified##*/}"
13743         if test "x$tool_basename" = "x$tool_specified"; then
13744           # A command without a complete path is provided, search $PATH.
13745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13746 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13747           # Extract the first word of "$tool_basename", so it can be a program name with args.
13748 set dummy $tool_basename; ac_word=$2
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13750 $as_echo_n "checking for $ac_word... " >&6; }
13751 if ${ac_cv_path_EGREP+:} false; then :
13752   $as_echo_n "(cached) " >&6
13753 else
13754   case $EGREP in
13755   [\\/]* | ?:[\\/]*)
13756   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13757   ;;
13758   *)
13759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13760 for as_dir in $PATH
13761 do
13762   IFS=$as_save_IFS
13763   test -z "$as_dir" && as_dir=.
13764     for ac_exec_ext in '' $ac_executable_extensions; do
13765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13766     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13768     break 2
13769   fi
13770 done
13771   done
13772 IFS=$as_save_IFS
13773 
13774   ;;
13775 esac
13776 fi
13777 EGREP=$ac_cv_path_EGREP
13778 if test -n "$EGREP"; then
13779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13780 $as_echo "$EGREP" >&6; }
13781 else
13782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13783 $as_echo "no" >&6; }
13784 fi
13785 
13786 
13787           if test "x$EGREP" = x; then
13788             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13789           fi
13790         else
13791           # Otherwise we believe it is a complete path. Use it as it is.
13792           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13793 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13794           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13795 $as_echo_n "checking for EGREP... " >&6; }
13796           if test ! -x "$tool_specified"; then
13797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13798 $as_echo "not found" >&6; }
13799             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13800           fi
13801           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13802 $as_echo "$tool_specified" >&6; }
13803         fi
13804       fi
13805     fi
13806 
13807   fi
13808 
13809 
13810   if test "x$EGREP" = x; then
13811     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13812   fi
13813 
13814 
13815 
13816 
13817   # Publish this variable in the help.
13818 
13819 
13820   if [ -z "${FGREP+x}" ]; then
13821     # The variable is not set by user, try to locate tool using the code snippet
13822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13823 $as_echo_n "checking for fgrep... " >&6; }
13824 if ${ac_cv_path_FGREP+:} false; then :
13825   $as_echo_n "(cached) " >&6
13826 else
13827   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13828    then ac_cv_path_FGREP="$GREP -F"
13829    else
13830      if test -z "$FGREP"; then
13831   ac_path_FGREP_found=false
13832   # Loop through the user's path and test for each of PROGNAME-LIST
13833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13834 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13835 do
13836   IFS=$as_save_IFS
13837   test -z "$as_dir" && as_dir=.
13838     for ac_prog in fgrep; do
13839     for ac_exec_ext in '' $ac_executable_extensions; do
13840       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13841       as_fn_executable_p "$ac_path_FGREP" || continue
13842 # Check for GNU ac_path_FGREP and select it if it is found.
13843   # Check for GNU $ac_path_FGREP
13844 case `"$ac_path_FGREP" --version 2>&1` in
13845 *GNU*)
13846   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13847 *)
13848   ac_count=0
13849   $as_echo_n 0123456789 >"conftest.in"
13850   while :
13851   do
13852     cat "conftest.in" "conftest.in" >"conftest.tmp"
13853     mv "conftest.tmp" "conftest.in"
13854     cp "conftest.in" "conftest.nl"
13855     $as_echo 'FGREP' >> "conftest.nl"
13856     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13857     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13858     as_fn_arith $ac_count + 1 && ac_count=$as_val
13859     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13860       # Best one so far, save it but keep looking for a better one
13861       ac_cv_path_FGREP="$ac_path_FGREP"
13862       ac_path_FGREP_max=$ac_count
13863     fi
13864     # 10*(2^10) chars as input seems more than enough
13865     test $ac_count -gt 10 && break
13866   done
13867   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13868 esac
13869 
13870       $ac_path_FGREP_found && break 3
13871     done
13872   done
13873   done
13874 IFS=$as_save_IFS
13875   if test -z "$ac_cv_path_FGREP"; then
13876     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13877   fi
13878 else
13879   ac_cv_path_FGREP=$FGREP
13880 fi
13881 
13882    fi
13883 fi
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13885 $as_echo "$ac_cv_path_FGREP" >&6; }
13886  FGREP="$ac_cv_path_FGREP"
13887 
13888 
13889   else
13890     # The variable is set, but is it from the command line or the environment?
13891 
13892     # Try to remove the string !FGREP! from our list.
13893     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13894     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13895       # If it failed, the variable was not from the command line. Ignore it,
13896       # but warn the user (except for BASH, which is always set by the calling BASH).
13897       if test "xFGREP" != xBASH; then
13898         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13899 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13900       fi
13901       # Try to locate tool using the code snippet
13902       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13903 $as_echo_n "checking for fgrep... " >&6; }
13904 if ${ac_cv_path_FGREP+:} false; then :
13905   $as_echo_n "(cached) " >&6
13906 else
13907   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13908    then ac_cv_path_FGREP="$GREP -F"
13909    else
13910      if test -z "$FGREP"; then
13911   ac_path_FGREP_found=false
13912   # Loop through the user's path and test for each of PROGNAME-LIST
13913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13914 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13915 do
13916   IFS=$as_save_IFS
13917   test -z "$as_dir" && as_dir=.
13918     for ac_prog in fgrep; do
13919     for ac_exec_ext in '' $ac_executable_extensions; do
13920       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13921       as_fn_executable_p "$ac_path_FGREP" || continue
13922 # Check for GNU ac_path_FGREP and select it if it is found.
13923   # Check for GNU $ac_path_FGREP
13924 case `"$ac_path_FGREP" --version 2>&1` in
13925 *GNU*)
13926   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13927 *)
13928   ac_count=0
13929   $as_echo_n 0123456789 >"conftest.in"
13930   while :
13931   do
13932     cat "conftest.in" "conftest.in" >"conftest.tmp"
13933     mv "conftest.tmp" "conftest.in"
13934     cp "conftest.in" "conftest.nl"
13935     $as_echo 'FGREP' >> "conftest.nl"
13936     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13937     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13938     as_fn_arith $ac_count + 1 && ac_count=$as_val
13939     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13940       # Best one so far, save it but keep looking for a better one
13941       ac_cv_path_FGREP="$ac_path_FGREP"
13942       ac_path_FGREP_max=$ac_count
13943     fi
13944     # 10*(2^10) chars as input seems more than enough
13945     test $ac_count -gt 10 && break
13946   done
13947   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13948 esac
13949 
13950       $ac_path_FGREP_found && break 3
13951     done
13952   done
13953   done
13954 IFS=$as_save_IFS
13955   if test -z "$ac_cv_path_FGREP"; then
13956     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13957   fi
13958 else
13959   ac_cv_path_FGREP=$FGREP
13960 fi
13961 
13962    fi
13963 fi
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13965 $as_echo "$ac_cv_path_FGREP" >&6; }
13966  FGREP="$ac_cv_path_FGREP"
13967 
13968 
13969     else
13970       # If it succeeded, then it was overridden by the user. We will use it
13971       # for the tool.
13972 
13973       # First remove it from the list of overridden variables, so we can test
13974       # for unknown variables in the end.
13975       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13976 
13977       # Check if we try to supply an empty value
13978       if test "x$FGREP" = x; then
13979         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13980 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13981         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13982 $as_echo_n "checking for FGREP... " >&6; }
13983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13984 $as_echo "disabled" >&6; }
13985       else
13986         # Check if the provided tool contains a complete path.
13987         tool_specified="$FGREP"
13988         tool_basename="${tool_specified##*/}"
13989         if test "x$tool_basename" = "x$tool_specified"; then
13990           # A command without a complete path is provided, search $PATH.
13991           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13992 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13993           # Extract the first word of "$tool_basename", so it can be a program name with args.
13994 set dummy $tool_basename; ac_word=$2
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13996 $as_echo_n "checking for $ac_word... " >&6; }
13997 if ${ac_cv_path_FGREP+:} false; then :
13998   $as_echo_n "(cached) " >&6
13999 else
14000   case $FGREP in
14001   [\\/]* | ?:[\\/]*)
14002   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14003   ;;
14004   *)
14005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14006 for as_dir in $PATH
14007 do
14008   IFS=$as_save_IFS
14009   test -z "$as_dir" && as_dir=.
14010     for ac_exec_ext in '' $ac_executable_extensions; do
14011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14012     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14014     break 2
14015   fi
14016 done
14017   done
14018 IFS=$as_save_IFS
14019 
14020   ;;
14021 esac
14022 fi
14023 FGREP=$ac_cv_path_FGREP
14024 if test -n "$FGREP"; then
14025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14026 $as_echo "$FGREP" >&6; }
14027 else
14028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14029 $as_echo "no" >&6; }
14030 fi
14031 
14032 
14033           if test "x$FGREP" = x; then
14034             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14035           fi
14036         else
14037           # Otherwise we believe it is a complete path. Use it as it is.
14038           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14039 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14040           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14041 $as_echo_n "checking for FGREP... " >&6; }
14042           if test ! -x "$tool_specified"; then
14043             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14044 $as_echo "not found" >&6; }
14045             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14046           fi
14047           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14048 $as_echo "$tool_specified" >&6; }
14049         fi
14050       fi
14051     fi
14052 
14053   fi
14054 
14055 
14056   if test "x$FGREP" = x; then
14057     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14058   fi
14059 
14060 
14061 
14062 
14063   # Publish this variable in the help.
14064 
14065 
14066   if [ -z "${SED+x}" ]; then
14067     # The variable is not set by user, try to locate tool using the code snippet
14068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14069 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14070 if ${ac_cv_path_SED+:} false; then :
14071   $as_echo_n "(cached) " >&6
14072 else
14073             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14074      for ac_i in 1 2 3 4 5 6 7; do
14075        ac_script="$ac_script$as_nl$ac_script"
14076      done
14077      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14078      { ac_script=; unset ac_script;}
14079      if test -z "$SED"; then
14080   ac_path_SED_found=false
14081   # Loop through the user's path and test for each of PROGNAME-LIST
14082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14083 for as_dir in $PATH
14084 do
14085   IFS=$as_save_IFS
14086   test -z "$as_dir" && as_dir=.
14087     for ac_prog in sed gsed; do
14088     for ac_exec_ext in '' $ac_executable_extensions; do
14089       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14090       as_fn_executable_p "$ac_path_SED" || continue
14091 # Check for GNU ac_path_SED and select it if it is found.
14092   # Check for GNU $ac_path_SED
14093 case `"$ac_path_SED" --version 2>&1` in
14094 *GNU*)
14095   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14096 *)
14097   ac_count=0
14098   $as_echo_n 0123456789 >"conftest.in"
14099   while :
14100   do
14101     cat "conftest.in" "conftest.in" >"conftest.tmp"
14102     mv "conftest.tmp" "conftest.in"
14103     cp "conftest.in" "conftest.nl"
14104     $as_echo '' >> "conftest.nl"
14105     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14106     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14107     as_fn_arith $ac_count + 1 && ac_count=$as_val
14108     if test $ac_count -gt ${ac_path_SED_max-0}; then
14109       # Best one so far, save it but keep looking for a better one
14110       ac_cv_path_SED="$ac_path_SED"
14111       ac_path_SED_max=$ac_count
14112     fi
14113     # 10*(2^10) chars as input seems more than enough
14114     test $ac_count -gt 10 && break
14115   done
14116   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14117 esac
14118 
14119       $ac_path_SED_found && break 3
14120     done
14121   done
14122   done
14123 IFS=$as_save_IFS
14124   if test -z "$ac_cv_path_SED"; then
14125     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14126   fi
14127 else
14128   ac_cv_path_SED=$SED
14129 fi
14130 
14131 fi
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14133 $as_echo "$ac_cv_path_SED" >&6; }
14134  SED="$ac_cv_path_SED"
14135   rm -f conftest.sed
14136 
14137   else
14138     # The variable is set, but is it from the command line or the environment?
14139 
14140     # Try to remove the string !SED! from our list.
14141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14143       # If it failed, the variable was not from the command line. Ignore it,
14144       # but warn the user (except for BASH, which is always set by the calling BASH).
14145       if test "xSED" != xBASH; then
14146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14147 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14148       fi
14149       # Try to locate tool using the code snippet
14150       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14151 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14152 if ${ac_cv_path_SED+:} false; then :
14153   $as_echo_n "(cached) " >&6
14154 else
14155             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14156      for ac_i in 1 2 3 4 5 6 7; do
14157        ac_script="$ac_script$as_nl$ac_script"
14158      done
14159      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14160      { ac_script=; unset ac_script;}
14161      if test -z "$SED"; then
14162   ac_path_SED_found=false
14163   # Loop through the user's path and test for each of PROGNAME-LIST
14164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14165 for as_dir in $PATH
14166 do
14167   IFS=$as_save_IFS
14168   test -z "$as_dir" && as_dir=.
14169     for ac_prog in sed gsed; do
14170     for ac_exec_ext in '' $ac_executable_extensions; do
14171       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14172       as_fn_executable_p "$ac_path_SED" || continue
14173 # Check for GNU ac_path_SED and select it if it is found.
14174   # Check for GNU $ac_path_SED
14175 case `"$ac_path_SED" --version 2>&1` in
14176 *GNU*)
14177   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14178 *)
14179   ac_count=0
14180   $as_echo_n 0123456789 >"conftest.in"
14181   while :
14182   do
14183     cat "conftest.in" "conftest.in" >"conftest.tmp"
14184     mv "conftest.tmp" "conftest.in"
14185     cp "conftest.in" "conftest.nl"
14186     $as_echo '' >> "conftest.nl"
14187     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14188     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14189     as_fn_arith $ac_count + 1 && ac_count=$as_val
14190     if test $ac_count -gt ${ac_path_SED_max-0}; then
14191       # Best one so far, save it but keep looking for a better one
14192       ac_cv_path_SED="$ac_path_SED"
14193       ac_path_SED_max=$ac_count
14194     fi
14195     # 10*(2^10) chars as input seems more than enough
14196     test $ac_count -gt 10 && break
14197   done
14198   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14199 esac
14200 
14201       $ac_path_SED_found && break 3
14202     done
14203   done
14204   done
14205 IFS=$as_save_IFS
14206   if test -z "$ac_cv_path_SED"; then
14207     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14208   fi
14209 else
14210   ac_cv_path_SED=$SED
14211 fi
14212 
14213 fi
14214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14215 $as_echo "$ac_cv_path_SED" >&6; }
14216  SED="$ac_cv_path_SED"
14217   rm -f conftest.sed
14218 
14219     else
14220       # If it succeeded, then it was overridden by the user. We will use it
14221       # for the tool.
14222 
14223       # First remove it from the list of overridden variables, so we can test
14224       # for unknown variables in the end.
14225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14226 
14227       # Check if we try to supply an empty value
14228       if test "x$SED" = x; then
14229         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14230 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14232 $as_echo_n "checking for SED... " >&6; }
14233         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14234 $as_echo "disabled" >&6; }
14235       else
14236         # Check if the provided tool contains a complete path.
14237         tool_specified="$SED"
14238         tool_basename="${tool_specified##*/}"
14239         if test "x$tool_basename" = "x$tool_specified"; then
14240           # A command without a complete path is provided, search $PATH.
14241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14242 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14243           # Extract the first word of "$tool_basename", so it can be a program name with args.
14244 set dummy $tool_basename; ac_word=$2
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14246 $as_echo_n "checking for $ac_word... " >&6; }
14247 if ${ac_cv_path_SED+:} false; then :
14248   $as_echo_n "(cached) " >&6
14249 else
14250   case $SED in
14251   [\\/]* | ?:[\\/]*)
14252   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14253   ;;
14254   *)
14255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14256 for as_dir in $PATH
14257 do
14258   IFS=$as_save_IFS
14259   test -z "$as_dir" && as_dir=.
14260     for ac_exec_ext in '' $ac_executable_extensions; do
14261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14262     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14264     break 2
14265   fi
14266 done
14267   done
14268 IFS=$as_save_IFS
14269 
14270   ;;
14271 esac
14272 fi
14273 SED=$ac_cv_path_SED
14274 if test -n "$SED"; then
14275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14276 $as_echo "$SED" >&6; }
14277 else
14278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14279 $as_echo "no" >&6; }
14280 fi
14281 
14282 
14283           if test "x$SED" = x; then
14284             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14285           fi
14286         else
14287           # Otherwise we believe it is a complete path. Use it as it is.
14288           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14289 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14290           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14291 $as_echo_n "checking for SED... " >&6; }
14292           if test ! -x "$tool_specified"; then
14293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14294 $as_echo "not found" >&6; }
14295             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14296           fi
14297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14298 $as_echo "$tool_specified" >&6; }
14299         fi
14300       fi
14301     fi
14302 
14303   fi
14304 
14305 
14306   if test "x$SED" = x; then
14307     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14308   fi
14309 
14310 
14311 
14312   # Always force rm.
14313   RM="$RM -f"
14314 
14315   # pwd behaves differently on various platforms and some don't support the -L flag.
14316   # Always use the bash builtin pwd to get uniform behavior.
14317   THEPWDCMD=pwd
14318 
14319   # These are not required on all platforms
14320 
14321 
14322   # Publish this variable in the help.
14323 
14324 
14325   if [ -z "${CYGPATH+x}" ]; then
14326     # The variable is not set by user, try to locate tool using the code snippet
14327     for ac_prog in cygpath
14328 do
14329   # Extract the first word of "$ac_prog", so it can be a program name with args.
14330 set dummy $ac_prog; ac_word=$2
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14332 $as_echo_n "checking for $ac_word... " >&6; }
14333 if ${ac_cv_path_CYGPATH+:} false; then :
14334   $as_echo_n "(cached) " >&6
14335 else
14336   case $CYGPATH in
14337   [\\/]* | ?:[\\/]*)
14338   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14339   ;;
14340   *)
14341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14342 for as_dir in $PATH
14343 do
14344   IFS=$as_save_IFS
14345   test -z "$as_dir" && as_dir=.
14346     for ac_exec_ext in '' $ac_executable_extensions; do
14347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14348     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14350     break 2
14351   fi
14352 done
14353   done
14354 IFS=$as_save_IFS
14355 
14356   ;;
14357 esac
14358 fi
14359 CYGPATH=$ac_cv_path_CYGPATH
14360 if test -n "$CYGPATH"; then
14361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14362 $as_echo "$CYGPATH" >&6; }
14363 else
14364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14365 $as_echo "no" >&6; }
14366 fi
14367 
14368 
14369   test -n "$CYGPATH" && break
14370 done
14371 
14372   else
14373     # The variable is set, but is it from the command line or the environment?
14374 
14375     # Try to remove the string !CYGPATH! from our list.
14376     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14377     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14378       # If it failed, the variable was not from the command line. Ignore it,
14379       # but warn the user (except for BASH, which is always set by the calling BASH).
14380       if test "xCYGPATH" != xBASH; then
14381         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14382 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14383       fi
14384       # Try to locate tool using the code snippet
14385       for ac_prog in cygpath
14386 do
14387   # Extract the first word of "$ac_prog", so it can be a program name with args.
14388 set dummy $ac_prog; ac_word=$2
14389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14390 $as_echo_n "checking for $ac_word... " >&6; }
14391 if ${ac_cv_path_CYGPATH+:} false; then :
14392   $as_echo_n "(cached) " >&6
14393 else
14394   case $CYGPATH in
14395   [\\/]* | ?:[\\/]*)
14396   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14397   ;;
14398   *)
14399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14400 for as_dir in $PATH
14401 do
14402   IFS=$as_save_IFS
14403   test -z "$as_dir" && as_dir=.
14404     for ac_exec_ext in '' $ac_executable_extensions; do
14405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14406     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14408     break 2
14409   fi
14410 done
14411   done
14412 IFS=$as_save_IFS
14413 
14414   ;;
14415 esac
14416 fi
14417 CYGPATH=$ac_cv_path_CYGPATH
14418 if test -n "$CYGPATH"; then
14419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14420 $as_echo "$CYGPATH" >&6; }
14421 else
14422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14423 $as_echo "no" >&6; }
14424 fi
14425 
14426 
14427   test -n "$CYGPATH" && break
14428 done
14429 
14430     else
14431       # If it succeeded, then it was overridden by the user. We will use it
14432       # for the tool.
14433 
14434       # First remove it from the list of overridden variables, so we can test
14435       # for unknown variables in the end.
14436       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14437 
14438       # Check if we try to supply an empty value
14439       if test "x$CYGPATH" = x; then
14440         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14441 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14442         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14443 $as_echo_n "checking for CYGPATH... " >&6; }
14444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14445 $as_echo "disabled" >&6; }
14446       else
14447         # Check if the provided tool contains a complete path.
14448         tool_specified="$CYGPATH"
14449         tool_basename="${tool_specified##*/}"
14450         if test "x$tool_basename" = "x$tool_specified"; then
14451           # A command without a complete path is provided, search $PATH.
14452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14453 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14454           # Extract the first word of "$tool_basename", so it can be a program name with args.
14455 set dummy $tool_basename; ac_word=$2
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14457 $as_echo_n "checking for $ac_word... " >&6; }
14458 if ${ac_cv_path_CYGPATH+:} false; then :
14459   $as_echo_n "(cached) " >&6
14460 else
14461   case $CYGPATH in
14462   [\\/]* | ?:[\\/]*)
14463   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14464   ;;
14465   *)
14466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14467 for as_dir in $PATH
14468 do
14469   IFS=$as_save_IFS
14470   test -z "$as_dir" && as_dir=.
14471     for ac_exec_ext in '' $ac_executable_extensions; do
14472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14473     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14475     break 2
14476   fi
14477 done
14478   done
14479 IFS=$as_save_IFS
14480 
14481   ;;
14482 esac
14483 fi
14484 CYGPATH=$ac_cv_path_CYGPATH
14485 if test -n "$CYGPATH"; then
14486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14487 $as_echo "$CYGPATH" >&6; }
14488 else
14489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14490 $as_echo "no" >&6; }
14491 fi
14492 
14493 
14494           if test "x$CYGPATH" = x; then
14495             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14496           fi
14497         else
14498           # Otherwise we believe it is a complete path. Use it as it is.
14499           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14500 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14501           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14502 $as_echo_n "checking for CYGPATH... " >&6; }
14503           if test ! -x "$tool_specified"; then
14504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14505 $as_echo "not found" >&6; }
14506             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14507           fi
14508           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14509 $as_echo "$tool_specified" >&6; }
14510         fi
14511       fi
14512     fi
14513 
14514   fi
14515 
14516 
14517 
14518 
14519   # Publish this variable in the help.
14520 
14521 
14522   if [ -z "${READLINK+x}" ]; then
14523     # The variable is not set by user, try to locate tool using the code snippet
14524     for ac_prog in greadlink readlink
14525 do
14526   # Extract the first word of "$ac_prog", so it can be a program name with args.
14527 set dummy $ac_prog; ac_word=$2
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14529 $as_echo_n "checking for $ac_word... " >&6; }
14530 if ${ac_cv_path_READLINK+:} false; then :
14531   $as_echo_n "(cached) " >&6
14532 else
14533   case $READLINK in
14534   [\\/]* | ?:[\\/]*)
14535   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14536   ;;
14537   *)
14538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14539 for as_dir in $PATH
14540 do
14541   IFS=$as_save_IFS
14542   test -z "$as_dir" && as_dir=.
14543     for ac_exec_ext in '' $ac_executable_extensions; do
14544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14545     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14547     break 2
14548   fi
14549 done
14550   done
14551 IFS=$as_save_IFS
14552 
14553   ;;
14554 esac
14555 fi
14556 READLINK=$ac_cv_path_READLINK
14557 if test -n "$READLINK"; then
14558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14559 $as_echo "$READLINK" >&6; }
14560 else
14561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14562 $as_echo "no" >&6; }
14563 fi
14564 
14565 
14566   test -n "$READLINK" && break
14567 done
14568 
14569   else
14570     # The variable is set, but is it from the command line or the environment?
14571 
14572     # Try to remove the string !READLINK! from our list.
14573     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14574     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14575       # If it failed, the variable was not from the command line. Ignore it,
14576       # but warn the user (except for BASH, which is always set by the calling BASH).
14577       if test "xREADLINK" != xBASH; then
14578         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14579 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14580       fi
14581       # Try to locate tool using the code snippet
14582       for ac_prog in greadlink readlink
14583 do
14584   # Extract the first word of "$ac_prog", so it can be a program name with args.
14585 set dummy $ac_prog; ac_word=$2
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14587 $as_echo_n "checking for $ac_word... " >&6; }
14588 if ${ac_cv_path_READLINK+:} false; then :
14589   $as_echo_n "(cached) " >&6
14590 else
14591   case $READLINK in
14592   [\\/]* | ?:[\\/]*)
14593   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14594   ;;
14595   *)
14596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14597 for as_dir in $PATH
14598 do
14599   IFS=$as_save_IFS
14600   test -z "$as_dir" && as_dir=.
14601     for ac_exec_ext in '' $ac_executable_extensions; do
14602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14603     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14605     break 2
14606   fi
14607 done
14608   done
14609 IFS=$as_save_IFS
14610 
14611   ;;
14612 esac
14613 fi
14614 READLINK=$ac_cv_path_READLINK
14615 if test -n "$READLINK"; then
14616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14617 $as_echo "$READLINK" >&6; }
14618 else
14619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14620 $as_echo "no" >&6; }
14621 fi
14622 
14623 
14624   test -n "$READLINK" && break
14625 done
14626 
14627     else
14628       # If it succeeded, then it was overridden by the user. We will use it
14629       # for the tool.
14630 
14631       # First remove it from the list of overridden variables, so we can test
14632       # for unknown variables in the end.
14633       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14634 
14635       # Check if we try to supply an empty value
14636       if test "x$READLINK" = x; then
14637         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14638 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14639         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14640 $as_echo_n "checking for READLINK... " >&6; }
14641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14642 $as_echo "disabled" >&6; }
14643       else
14644         # Check if the provided tool contains a complete path.
14645         tool_specified="$READLINK"
14646         tool_basename="${tool_specified##*/}"
14647         if test "x$tool_basename" = "x$tool_specified"; then
14648           # A command without a complete path is provided, search $PATH.
14649           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14650 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14651           # Extract the first word of "$tool_basename", so it can be a program name with args.
14652 set dummy $tool_basename; ac_word=$2
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14654 $as_echo_n "checking for $ac_word... " >&6; }
14655 if ${ac_cv_path_READLINK+:} false; then :
14656   $as_echo_n "(cached) " >&6
14657 else
14658   case $READLINK in
14659   [\\/]* | ?:[\\/]*)
14660   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14661   ;;
14662   *)
14663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14664 for as_dir in $PATH
14665 do
14666   IFS=$as_save_IFS
14667   test -z "$as_dir" && as_dir=.
14668     for ac_exec_ext in '' $ac_executable_extensions; do
14669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14670     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14672     break 2
14673   fi
14674 done
14675   done
14676 IFS=$as_save_IFS
14677 
14678   ;;
14679 esac
14680 fi
14681 READLINK=$ac_cv_path_READLINK
14682 if test -n "$READLINK"; then
14683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14684 $as_echo "$READLINK" >&6; }
14685 else
14686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14687 $as_echo "no" >&6; }
14688 fi
14689 
14690 
14691           if test "x$READLINK" = x; then
14692             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14693           fi
14694         else
14695           # Otherwise we believe it is a complete path. Use it as it is.
14696           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14697 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14698           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14699 $as_echo_n "checking for READLINK... " >&6; }
14700           if test ! -x "$tool_specified"; then
14701             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14702 $as_echo "not found" >&6; }
14703             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14704           fi
14705           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14706 $as_echo "$tool_specified" >&6; }
14707         fi
14708       fi
14709     fi
14710 
14711   fi
14712 
14713 
14714 
14715 
14716   # Publish this variable in the help.
14717 
14718 
14719   if [ -z "${DF+x}" ]; then
14720     # The variable is not set by user, try to locate tool using the code snippet
14721     for ac_prog in df
14722 do
14723   # Extract the first word of "$ac_prog", so it can be a program name with args.
14724 set dummy $ac_prog; ac_word=$2
14725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14726 $as_echo_n "checking for $ac_word... " >&6; }
14727 if ${ac_cv_path_DF+:} false; then :
14728   $as_echo_n "(cached) " >&6
14729 else
14730   case $DF in
14731   [\\/]* | ?:[\\/]*)
14732   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14733   ;;
14734   *)
14735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14736 for as_dir in $PATH
14737 do
14738   IFS=$as_save_IFS
14739   test -z "$as_dir" && as_dir=.
14740     for ac_exec_ext in '' $ac_executable_extensions; do
14741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14742     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14744     break 2
14745   fi
14746 done
14747   done
14748 IFS=$as_save_IFS
14749 
14750   ;;
14751 esac
14752 fi
14753 DF=$ac_cv_path_DF
14754 if test -n "$DF"; then
14755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14756 $as_echo "$DF" >&6; }
14757 else
14758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14759 $as_echo "no" >&6; }
14760 fi
14761 
14762 
14763   test -n "$DF" && break
14764 done
14765 
14766   else
14767     # The variable is set, but is it from the command line or the environment?
14768 
14769     # Try to remove the string !DF! from our list.
14770     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14771     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14772       # If it failed, the variable was not from the command line. Ignore it,
14773       # but warn the user (except for BASH, which is always set by the calling BASH).
14774       if test "xDF" != xBASH; then
14775         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14776 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14777       fi
14778       # Try to locate tool using the code snippet
14779       for ac_prog in df
14780 do
14781   # Extract the first word of "$ac_prog", so it can be a program name with args.
14782 set dummy $ac_prog; ac_word=$2
14783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14784 $as_echo_n "checking for $ac_word... " >&6; }
14785 if ${ac_cv_path_DF+:} false; then :
14786   $as_echo_n "(cached) " >&6
14787 else
14788   case $DF in
14789   [\\/]* | ?:[\\/]*)
14790   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14791   ;;
14792   *)
14793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14794 for as_dir in $PATH
14795 do
14796   IFS=$as_save_IFS
14797   test -z "$as_dir" && as_dir=.
14798     for ac_exec_ext in '' $ac_executable_extensions; do
14799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14800     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14802     break 2
14803   fi
14804 done
14805   done
14806 IFS=$as_save_IFS
14807 
14808   ;;
14809 esac
14810 fi
14811 DF=$ac_cv_path_DF
14812 if test -n "$DF"; then
14813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14814 $as_echo "$DF" >&6; }
14815 else
14816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14817 $as_echo "no" >&6; }
14818 fi
14819 
14820 
14821   test -n "$DF" && break
14822 done
14823 
14824     else
14825       # If it succeeded, then it was overridden by the user. We will use it
14826       # for the tool.
14827 
14828       # First remove it from the list of overridden variables, so we can test
14829       # for unknown variables in the end.
14830       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14831 
14832       # Check if we try to supply an empty value
14833       if test "x$DF" = x; then
14834         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14835 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14836         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14837 $as_echo_n "checking for DF... " >&6; }
14838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14839 $as_echo "disabled" >&6; }
14840       else
14841         # Check if the provided tool contains a complete path.
14842         tool_specified="$DF"
14843         tool_basename="${tool_specified##*/}"
14844         if test "x$tool_basename" = "x$tool_specified"; then
14845           # A command without a complete path is provided, search $PATH.
14846           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14847 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14848           # Extract the first word of "$tool_basename", so it can be a program name with args.
14849 set dummy $tool_basename; ac_word=$2
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14851 $as_echo_n "checking for $ac_word... " >&6; }
14852 if ${ac_cv_path_DF+:} false; then :
14853   $as_echo_n "(cached) " >&6
14854 else
14855   case $DF in
14856   [\\/]* | ?:[\\/]*)
14857   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14858   ;;
14859   *)
14860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14861 for as_dir in $PATH
14862 do
14863   IFS=$as_save_IFS
14864   test -z "$as_dir" && as_dir=.
14865     for ac_exec_ext in '' $ac_executable_extensions; do
14866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14867     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14869     break 2
14870   fi
14871 done
14872   done
14873 IFS=$as_save_IFS
14874 
14875   ;;
14876 esac
14877 fi
14878 DF=$ac_cv_path_DF
14879 if test -n "$DF"; then
14880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14881 $as_echo "$DF" >&6; }
14882 else
14883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14884 $as_echo "no" >&6; }
14885 fi
14886 
14887 
14888           if test "x$DF" = x; then
14889             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14890           fi
14891         else
14892           # Otherwise we believe it is a complete path. Use it as it is.
14893           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14894 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14895           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14896 $as_echo_n "checking for DF... " >&6; }
14897           if test ! -x "$tool_specified"; then
14898             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14899 $as_echo "not found" >&6; }
14900             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14901           fi
14902           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14903 $as_echo "$tool_specified" >&6; }
14904         fi
14905       fi
14906     fi
14907 
14908   fi
14909 
14910 
14911 
14912 
14913   # Publish this variable in the help.
14914 
14915 
14916   if [ -z "${CPIO+x}" ]; then
14917     # The variable is not set by user, try to locate tool using the code snippet
14918     for ac_prog in cpio bsdcpio
14919 do
14920   # Extract the first word of "$ac_prog", so it can be a program name with args.
14921 set dummy $ac_prog; ac_word=$2
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14923 $as_echo_n "checking for $ac_word... " >&6; }
14924 if ${ac_cv_path_CPIO+:} false; then :
14925   $as_echo_n "(cached) " >&6
14926 else
14927   case $CPIO in
14928   [\\/]* | ?:[\\/]*)
14929   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14930   ;;
14931   *)
14932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14933 for as_dir in $PATH
14934 do
14935   IFS=$as_save_IFS
14936   test -z "$as_dir" && as_dir=.
14937     for ac_exec_ext in '' $ac_executable_extensions; do
14938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14939     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14941     break 2
14942   fi
14943 done
14944   done
14945 IFS=$as_save_IFS
14946 
14947   ;;
14948 esac
14949 fi
14950 CPIO=$ac_cv_path_CPIO
14951 if test -n "$CPIO"; then
14952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14953 $as_echo "$CPIO" >&6; }
14954 else
14955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14956 $as_echo "no" >&6; }
14957 fi
14958 
14959 
14960   test -n "$CPIO" && break
14961 done
14962 
14963   else
14964     # The variable is set, but is it from the command line or the environment?
14965 
14966     # Try to remove the string !CPIO! from our list.
14967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14969       # If it failed, the variable was not from the command line. Ignore it,
14970       # but warn the user (except for BASH, which is always set by the calling BASH).
14971       if test "xCPIO" != xBASH; then
14972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14973 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14974       fi
14975       # Try to locate tool using the code snippet
14976       for ac_prog in cpio bsdcpio
14977 do
14978   # Extract the first word of "$ac_prog", so it can be a program name with args.
14979 set dummy $ac_prog; ac_word=$2
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14981 $as_echo_n "checking for $ac_word... " >&6; }
14982 if ${ac_cv_path_CPIO+:} false; then :
14983   $as_echo_n "(cached) " >&6
14984 else
14985   case $CPIO in
14986   [\\/]* | ?:[\\/]*)
14987   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14988   ;;
14989   *)
14990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14991 for as_dir in $PATH
14992 do
14993   IFS=$as_save_IFS
14994   test -z "$as_dir" && as_dir=.
14995     for ac_exec_ext in '' $ac_executable_extensions; do
14996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14997     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14999     break 2
15000   fi
15001 done
15002   done
15003 IFS=$as_save_IFS
15004 
15005   ;;
15006 esac
15007 fi
15008 CPIO=$ac_cv_path_CPIO
15009 if test -n "$CPIO"; then
15010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15011 $as_echo "$CPIO" >&6; }
15012 else
15013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15014 $as_echo "no" >&6; }
15015 fi
15016 
15017 
15018   test -n "$CPIO" && break
15019 done
15020 
15021     else
15022       # If it succeeded, then it was overridden by the user. We will use it
15023       # for the tool.
15024 
15025       # First remove it from the list of overridden variables, so we can test
15026       # for unknown variables in the end.
15027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15028 
15029       # Check if we try to supply an empty value
15030       if test "x$CPIO" = x; then
15031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15032 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15034 $as_echo_n "checking for CPIO... " >&6; }
15035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15036 $as_echo "disabled" >&6; }
15037       else
15038         # Check if the provided tool contains a complete path.
15039         tool_specified="$CPIO"
15040         tool_basename="${tool_specified##*/}"
15041         if test "x$tool_basename" = "x$tool_specified"; then
15042           # A command without a complete path is provided, search $PATH.
15043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15044 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15045           # Extract the first word of "$tool_basename", so it can be a program name with args.
15046 set dummy $tool_basename; ac_word=$2
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15048 $as_echo_n "checking for $ac_word... " >&6; }
15049 if ${ac_cv_path_CPIO+:} false; then :
15050   $as_echo_n "(cached) " >&6
15051 else
15052   case $CPIO in
15053   [\\/]* | ?:[\\/]*)
15054   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15055   ;;
15056   *)
15057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15058 for as_dir in $PATH
15059 do
15060   IFS=$as_save_IFS
15061   test -z "$as_dir" && as_dir=.
15062     for ac_exec_ext in '' $ac_executable_extensions; do
15063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15064     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15066     break 2
15067   fi
15068 done
15069   done
15070 IFS=$as_save_IFS
15071 
15072   ;;
15073 esac
15074 fi
15075 CPIO=$ac_cv_path_CPIO
15076 if test -n "$CPIO"; then
15077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15078 $as_echo "$CPIO" >&6; }
15079 else
15080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15081 $as_echo "no" >&6; }
15082 fi
15083 
15084 
15085           if test "x$CPIO" = x; then
15086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15087           fi
15088         else
15089           # Otherwise we believe it is a complete path. Use it as it is.
15090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15091 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15093 $as_echo_n "checking for CPIO... " >&6; }
15094           if test ! -x "$tool_specified"; then
15095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15096 $as_echo "not found" >&6; }
15097             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15098           fi
15099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15100 $as_echo "$tool_specified" >&6; }
15101         fi
15102       fi
15103     fi
15104 
15105   fi
15106 
15107 
15108 
15109 
15110   # Publish this variable in the help.
15111 
15112 
15113   if [ -z "${NICE+x}" ]; then
15114     # The variable is not set by user, try to locate tool using the code snippet
15115     for ac_prog in nice
15116 do
15117   # Extract the first word of "$ac_prog", so it can be a program name with args.
15118 set dummy $ac_prog; ac_word=$2
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15120 $as_echo_n "checking for $ac_word... " >&6; }
15121 if ${ac_cv_path_NICE+:} false; then :
15122   $as_echo_n "(cached) " >&6
15123 else
15124   case $NICE in
15125   [\\/]* | ?:[\\/]*)
15126   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15127   ;;
15128   *)
15129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15130 for as_dir in $PATH
15131 do
15132   IFS=$as_save_IFS
15133   test -z "$as_dir" && as_dir=.
15134     for ac_exec_ext in '' $ac_executable_extensions; do
15135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15136     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15138     break 2
15139   fi
15140 done
15141   done
15142 IFS=$as_save_IFS
15143 
15144   ;;
15145 esac
15146 fi
15147 NICE=$ac_cv_path_NICE
15148 if test -n "$NICE"; then
15149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15150 $as_echo "$NICE" >&6; }
15151 else
15152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15153 $as_echo "no" >&6; }
15154 fi
15155 
15156 
15157   test -n "$NICE" && break
15158 done
15159 
15160   else
15161     # The variable is set, but is it from the command line or the environment?
15162 
15163     # Try to remove the string !NICE! from our list.
15164     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15165     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15166       # If it failed, the variable was not from the command line. Ignore it,
15167       # but warn the user (except for BASH, which is always set by the calling BASH).
15168       if test "xNICE" != xBASH; then
15169         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15170 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15171       fi
15172       # Try to locate tool using the code snippet
15173       for ac_prog in nice
15174 do
15175   # Extract the first word of "$ac_prog", so it can be a program name with args.
15176 set dummy $ac_prog; ac_word=$2
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15178 $as_echo_n "checking for $ac_word... " >&6; }
15179 if ${ac_cv_path_NICE+:} false; then :
15180   $as_echo_n "(cached) " >&6
15181 else
15182   case $NICE in
15183   [\\/]* | ?:[\\/]*)
15184   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15185   ;;
15186   *)
15187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15188 for as_dir in $PATH
15189 do
15190   IFS=$as_save_IFS
15191   test -z "$as_dir" && as_dir=.
15192     for ac_exec_ext in '' $ac_executable_extensions; do
15193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15194     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15196     break 2
15197   fi
15198 done
15199   done
15200 IFS=$as_save_IFS
15201 
15202   ;;
15203 esac
15204 fi
15205 NICE=$ac_cv_path_NICE
15206 if test -n "$NICE"; then
15207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15208 $as_echo "$NICE" >&6; }
15209 else
15210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15211 $as_echo "no" >&6; }
15212 fi
15213 
15214 
15215   test -n "$NICE" && break
15216 done
15217 
15218     else
15219       # If it succeeded, then it was overridden by the user. We will use it
15220       # for the tool.
15221 
15222       # First remove it from the list of overridden variables, so we can test
15223       # for unknown variables in the end.
15224       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15225 
15226       # Check if we try to supply an empty value
15227       if test "x$NICE" = x; then
15228         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15229 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15230         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15231 $as_echo_n "checking for NICE... " >&6; }
15232         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15233 $as_echo "disabled" >&6; }
15234       else
15235         # Check if the provided tool contains a complete path.
15236         tool_specified="$NICE"
15237         tool_basename="${tool_specified##*/}"
15238         if test "x$tool_basename" = "x$tool_specified"; then
15239           # A command without a complete path is provided, search $PATH.
15240           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15241 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15242           # Extract the first word of "$tool_basename", so it can be a program name with args.
15243 set dummy $tool_basename; ac_word=$2
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15245 $as_echo_n "checking for $ac_word... " >&6; }
15246 if ${ac_cv_path_NICE+:} false; then :
15247   $as_echo_n "(cached) " >&6
15248 else
15249   case $NICE in
15250   [\\/]* | ?:[\\/]*)
15251   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15252   ;;
15253   *)
15254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15255 for as_dir in $PATH
15256 do
15257   IFS=$as_save_IFS
15258   test -z "$as_dir" && as_dir=.
15259     for ac_exec_ext in '' $ac_executable_extensions; do
15260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15261     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15263     break 2
15264   fi
15265 done
15266   done
15267 IFS=$as_save_IFS
15268 
15269   ;;
15270 esac
15271 fi
15272 NICE=$ac_cv_path_NICE
15273 if test -n "$NICE"; then
15274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15275 $as_echo "$NICE" >&6; }
15276 else
15277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278 $as_echo "no" >&6; }
15279 fi
15280 
15281 
15282           if test "x$NICE" = x; then
15283             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15284           fi
15285         else
15286           # Otherwise we believe it is a complete path. Use it as it is.
15287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15288 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15289           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15290 $as_echo_n "checking for NICE... " >&6; }
15291           if test ! -x "$tool_specified"; then
15292             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15293 $as_echo "not found" >&6; }
15294             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15295           fi
15296           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15297 $as_echo "$tool_specified" >&6; }
15298         fi
15299       fi
15300     fi
15301 
15302   fi
15303 
15304 
15305 
15306 
15307   # Publish this variable in the help.
15308 
15309 
15310   if [ -z "${PANDOC+x}" ]; then
15311     # The variable is not set by user, try to locate tool using the code snippet
15312     for ac_prog in pandoc
15313 do
15314   # Extract the first word of "$ac_prog", so it can be a program name with args.
15315 set dummy $ac_prog; ac_word=$2
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15317 $as_echo_n "checking for $ac_word... " >&6; }
15318 if ${ac_cv_path_PANDOC+:} false; then :
15319   $as_echo_n "(cached) " >&6
15320 else
15321   case $PANDOC in
15322   [\\/]* | ?:[\\/]*)
15323   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15324   ;;
15325   *)
15326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15327 for as_dir in $PATH
15328 do
15329   IFS=$as_save_IFS
15330   test -z "$as_dir" && as_dir=.
15331     for ac_exec_ext in '' $ac_executable_extensions; do
15332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15333     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15335     break 2
15336   fi
15337 done
15338   done
15339 IFS=$as_save_IFS
15340 
15341   ;;
15342 esac
15343 fi
15344 PANDOC=$ac_cv_path_PANDOC
15345 if test -n "$PANDOC"; then
15346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15347 $as_echo "$PANDOC" >&6; }
15348 else
15349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15350 $as_echo "no" >&6; }
15351 fi
15352 
15353 
15354   test -n "$PANDOC" && break
15355 done
15356 
15357   else
15358     # The variable is set, but is it from the command line or the environment?
15359 
15360     # Try to remove the string !PANDOC! from our list.
15361     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15362     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15363       # If it failed, the variable was not from the command line. Ignore it,
15364       # but warn the user (except for BASH, which is always set by the calling BASH).
15365       if test "xPANDOC" != xBASH; then
15366         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15367 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15368       fi
15369       # Try to locate tool using the code snippet
15370       for ac_prog in pandoc
15371 do
15372   # Extract the first word of "$ac_prog", so it can be a program name with args.
15373 set dummy $ac_prog; ac_word=$2
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15375 $as_echo_n "checking for $ac_word... " >&6; }
15376 if ${ac_cv_path_PANDOC+:} false; then :
15377   $as_echo_n "(cached) " >&6
15378 else
15379   case $PANDOC in
15380   [\\/]* | ?:[\\/]*)
15381   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15382   ;;
15383   *)
15384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15385 for as_dir in $PATH
15386 do
15387   IFS=$as_save_IFS
15388   test -z "$as_dir" && as_dir=.
15389     for ac_exec_ext in '' $ac_executable_extensions; do
15390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15391     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15393     break 2
15394   fi
15395 done
15396   done
15397 IFS=$as_save_IFS
15398 
15399   ;;
15400 esac
15401 fi
15402 PANDOC=$ac_cv_path_PANDOC
15403 if test -n "$PANDOC"; then
15404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15405 $as_echo "$PANDOC" >&6; }
15406 else
15407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15408 $as_echo "no" >&6; }
15409 fi
15410 
15411 
15412   test -n "$PANDOC" && break
15413 done
15414 
15415     else
15416       # If it succeeded, then it was overridden by the user. We will use it
15417       # for the tool.
15418 
15419       # First remove it from the list of overridden variables, so we can test
15420       # for unknown variables in the end.
15421       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15422 
15423       # Check if we try to supply an empty value
15424       if test "x$PANDOC" = x; then
15425         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15426 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15427         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15428 $as_echo_n "checking for PANDOC... " >&6; }
15429         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15430 $as_echo "disabled" >&6; }
15431       else
15432         # Check if the provided tool contains a complete path.
15433         tool_specified="$PANDOC"
15434         tool_basename="${tool_specified##*/}"
15435         if test "x$tool_basename" = "x$tool_specified"; then
15436           # A command without a complete path is provided, search $PATH.
15437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15438 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15439           # Extract the first word of "$tool_basename", so it can be a program name with args.
15440 set dummy $tool_basename; ac_word=$2
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15442 $as_echo_n "checking for $ac_word... " >&6; }
15443 if ${ac_cv_path_PANDOC+:} false; then :
15444   $as_echo_n "(cached) " >&6
15445 else
15446   case $PANDOC in
15447   [\\/]* | ?:[\\/]*)
15448   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15449   ;;
15450   *)
15451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15452 for as_dir in $PATH
15453 do
15454   IFS=$as_save_IFS
15455   test -z "$as_dir" && as_dir=.
15456     for ac_exec_ext in '' $ac_executable_extensions; do
15457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15458     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15460     break 2
15461   fi
15462 done
15463   done
15464 IFS=$as_save_IFS
15465 
15466   ;;
15467 esac
15468 fi
15469 PANDOC=$ac_cv_path_PANDOC
15470 if test -n "$PANDOC"; then
15471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15472 $as_echo "$PANDOC" >&6; }
15473 else
15474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15475 $as_echo "no" >&6; }
15476 fi
15477 
15478 
15479           if test "x$PANDOC" = x; then
15480             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15481           fi
15482         else
15483           # Otherwise we believe it is a complete path. Use it as it is.
15484           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15485 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15486           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15487 $as_echo_n "checking for PANDOC... " >&6; }
15488           if test ! -x "$tool_specified"; then
15489             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15490 $as_echo "not found" >&6; }
15491             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15492           fi
15493           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15494 $as_echo "$tool_specified" >&6; }
15495         fi
15496       fi
15497     fi
15498 
15499   fi
15500 
15501 
15502 
15503 
15504 # Now we can determine OpenJDK build and target platforms. This is required to
15505 # have early on.
15506 # Make sure we can run config.sub.
15507 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15508   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15509 
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15511 $as_echo_n "checking build system type... " >&6; }
15512 if ${ac_cv_build+:} false; then :
15513   $as_echo_n "(cached) " >&6
15514 else
15515   ac_build_alias=$build_alias
15516 test "x$ac_build_alias" = x &&
15517   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15518 test "x$ac_build_alias" = x &&
15519   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15520 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15521   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15522 
15523 fi
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15525 $as_echo "$ac_cv_build" >&6; }
15526 case $ac_cv_build in
15527 *-*-*) ;;
15528 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15529 esac
15530 build=$ac_cv_build
15531 ac_save_IFS=$IFS; IFS='-'
15532 set x $ac_cv_build
15533 shift
15534 build_cpu=$1
15535 build_vendor=$2
15536 shift; shift
15537 # Remember, the first character of IFS is used to create $*,
15538 # except with old shells:
15539 build_os=$*
15540 IFS=$ac_save_IFS
15541 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15542 
15543 
15544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15545 $as_echo_n "checking host system type... " >&6; }
15546 if ${ac_cv_host+:} false; then :
15547   $as_echo_n "(cached) " >&6
15548 else
15549   if test "x$host_alias" = x; then
15550   ac_cv_host=$ac_cv_build
15551 else
15552   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15553     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15554 fi
15555 
15556 fi
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15558 $as_echo "$ac_cv_host" >&6; }
15559 case $ac_cv_host in
15560 *-*-*) ;;
15561 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15562 esac
15563 host=$ac_cv_host
15564 ac_save_IFS=$IFS; IFS='-'
15565 set x $ac_cv_host
15566 shift
15567 host_cpu=$1
15568 host_vendor=$2
15569 shift; shift
15570 # Remember, the first character of IFS is used to create $*,
15571 # except with old shells:
15572 host_os=$*
15573 IFS=$ac_save_IFS
15574 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15575 
15576 
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15578 $as_echo_n "checking target system type... " >&6; }
15579 if ${ac_cv_target+:} false; then :
15580   $as_echo_n "(cached) " >&6
15581 else
15582   if test "x$target_alias" = x; then
15583   ac_cv_target=$ac_cv_host
15584 else
15585   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15586     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15587 fi
15588 
15589 fi
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15591 $as_echo "$ac_cv_target" >&6; }
15592 case $ac_cv_target in
15593 *-*-*) ;;
15594 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15595 esac
15596 target=$ac_cv_target
15597 ac_save_IFS=$IFS; IFS='-'
15598 set x $ac_cv_target
15599 shift
15600 target_cpu=$1
15601 target_vendor=$2
15602 shift; shift
15603 # Remember, the first character of IFS is used to create $*,
15604 # except with old shells:
15605 target_os=$*
15606 IFS=$ac_save_IFS
15607 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15608 
15609 
15610 # The aliases save the names the user supplied, while $host etc.
15611 # will get canonicalized.
15612 test -n "$target_alias" &&
15613   test "$program_prefix$program_suffix$program_transform_name" = \
15614     NONENONEs,x,x, &&
15615   program_prefix=${target_alias}-
15616 
15617   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15618   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15619   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15620   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15621   # to use the configure naming style.
15622 
15623 
15624 
15625 
15626 
15627   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15628   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15629   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15630   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15631   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15632   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15633 
15634 
15635 
15636   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15637 
15638   case "$build_os" in
15639     *linux*)
15640       VAR_OS=linux
15641       VAR_OS_TYPE=unix
15642       ;;
15643     *solaris*)
15644       VAR_OS=solaris
15645       VAR_OS_TYPE=unix
15646       ;;
15647     *darwin*)
15648       VAR_OS=macosx
15649       VAR_OS_TYPE=unix
15650       ;;
15651     *bsd*)
15652       VAR_OS=bsd
15653       VAR_OS_TYPE=unix
15654       ;;
15655     *cygwin*)
15656       VAR_OS=windows
15657       VAR_OS_ENV=windows.cygwin
15658       ;;
15659     *mingw*)
15660       VAR_OS=windows
15661       VAR_OS_ENV=windows.msys
15662       ;;
15663     *aix*)
15664       VAR_OS=aix
15665       VAR_OS_TYPE=unix
15666       ;;
15667     *)
15668       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15669       ;;
15670   esac
15671 
15672 
15673   # First argument is the cpu name from the trip/quad
15674   case "$build_cpu" in
15675     x86_64)
15676       VAR_CPU=x86_64
15677       VAR_CPU_ARCH=x86
15678       VAR_CPU_BITS=64
15679       VAR_CPU_ENDIAN=little
15680       ;;
15681     i?86)
15682       VAR_CPU=x86
15683       VAR_CPU_ARCH=x86
15684       VAR_CPU_BITS=32
15685       VAR_CPU_ENDIAN=little
15686       ;;
15687     alpha*)
15688       VAR_CPU=alpha
15689       VAR_CPU_ARCH=alpha
15690       VAR_CPU_BITS=64
15691       VAR_CPU_ENDIAN=little
15692       ;;
15693     arm*)
15694       VAR_CPU=arm
15695       VAR_CPU_ARCH=arm
15696       VAR_CPU_BITS=32
15697       VAR_CPU_ENDIAN=little
15698       ;;
15699     aarch64)
15700       VAR_CPU=aarch64
15701       VAR_CPU_ARCH=aarch64
15702       VAR_CPU_BITS=64
15703       VAR_CPU_ENDIAN=little
15704       ;;
15705     m68k)
15706       VAR_CPU=m68k
15707       VAR_CPU_ARCH=m68k
15708       VAR_CPU_BITS=32
15709       VAR_CPU_ENDIAN=big
15710       ;;
15711     mips)
15712       VAR_CPU=mips
15713       VAR_CPU_ARCH=mips
15714       VAR_CPU_BITS=32
15715       VAR_CPU_ENDIAN=big
15716       ;;
15717     mipsel)
15718       VAR_CPU=mipsel
15719       VAR_CPU_ARCH=mipsel
15720       VAR_CPU_BITS=32
15721       VAR_CPU_ENDIAN=little
15722       ;;
15723     mips64)
15724       VAR_CPU=mips64
15725       VAR_CPU_ARCH=mips64
15726       VAR_CPU_BITS=64
15727       VAR_CPU_ENDIAN=big
15728       ;;
15729     mips64el)
15730       VAR_CPU=mips64el
15731       VAR_CPU_ARCH=mips64el
15732       VAR_CPU_BITS=64
15733       VAR_CPU_ENDIAN=little
15734       ;;
15735     powerpc)
15736       VAR_CPU=ppc
15737       VAR_CPU_ARCH=ppc
15738       VAR_CPU_BITS=32
15739       VAR_CPU_ENDIAN=big
15740       ;;
15741     powerpc64)
15742       VAR_CPU=ppc64
15743       VAR_CPU_ARCH=ppc
15744       VAR_CPU_BITS=64
15745       VAR_CPU_ENDIAN=big
15746       ;;
15747     powerpc64le)
15748       VAR_CPU=ppc64le
15749       VAR_CPU_ARCH=ppc
15750       VAR_CPU_BITS=64
15751       VAR_CPU_ENDIAN=little
15752       ;;
15753     s390)
15754       VAR_CPU=s390
15755       VAR_CPU_ARCH=s390
15756       VAR_CPU_BITS=32
15757       VAR_CPU_ENDIAN=big
15758       ;;
15759     s390x)
15760       VAR_CPU=s390x
15761       VAR_CPU_ARCH=s390
15762       VAR_CPU_BITS=64
15763       VAR_CPU_ENDIAN=big
15764       ;;
15765     sh*eb)
15766       VAR_CPU=sh
15767       VAR_CPU_ARCH=sh
15768       VAR_CPU_BITS=32
15769       VAR_CPU_ENDIAN=big
15770       ;;
15771     sh*)
15772       VAR_CPU=sh
15773       VAR_CPU_ARCH=sh
15774       VAR_CPU_BITS=32
15775       VAR_CPU_ENDIAN=little
15776       ;;
15777     sparc)
15778       VAR_CPU=sparc
15779       VAR_CPU_ARCH=sparc
15780       VAR_CPU_BITS=32
15781       VAR_CPU_ENDIAN=big
15782       ;;
15783     sparcv9|sparc64)
15784       VAR_CPU=sparcv9
15785       VAR_CPU_ARCH=sparc
15786       VAR_CPU_BITS=64
15787       VAR_CPU_ENDIAN=big
15788       ;;
15789     *)
15790       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15791       ;;
15792   esac
15793 
15794   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15795   OPENJDK_BUILD_OS="$VAR_OS"
15796   if test "x$VAR_OS_TYPE" != x; then
15797     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15798   else
15799     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15800   fi
15801   if test "x$VAR_OS_ENV" != x; then
15802     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15803   else
15804     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15805   fi
15806   OPENJDK_BUILD_CPU="$VAR_CPU"
15807   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15808   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15809   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15810 
15811 
15812 
15813 
15814 
15815 
15816 
15817 
15818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15819 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15821 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15822 
15823   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15824 
15825   case "$host_os" in
15826     *linux*)
15827       VAR_OS=linux
15828       VAR_OS_TYPE=unix
15829       ;;
15830     *solaris*)
15831       VAR_OS=solaris
15832       VAR_OS_TYPE=unix
15833       ;;
15834     *darwin*)
15835       VAR_OS=macosx
15836       VAR_OS_TYPE=unix
15837       ;;
15838     *bsd*)
15839       VAR_OS=bsd
15840       VAR_OS_TYPE=unix
15841       ;;
15842     *cygwin*)
15843       VAR_OS=windows
15844       VAR_OS_ENV=windows.cygwin
15845       ;;
15846     *mingw*)
15847       VAR_OS=windows
15848       VAR_OS_ENV=windows.msys
15849       ;;
15850     *aix*)
15851       VAR_OS=aix
15852       VAR_OS_TYPE=unix
15853       ;;
15854     *)
15855       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15856       ;;
15857   esac
15858 
15859 
15860   # First argument is the cpu name from the trip/quad
15861   case "$host_cpu" in
15862     x86_64)
15863       VAR_CPU=x86_64
15864       VAR_CPU_ARCH=x86
15865       VAR_CPU_BITS=64
15866       VAR_CPU_ENDIAN=little
15867       ;;
15868     i?86)
15869       VAR_CPU=x86
15870       VAR_CPU_ARCH=x86
15871       VAR_CPU_BITS=32
15872       VAR_CPU_ENDIAN=little
15873       ;;
15874     alpha*)
15875       VAR_CPU=alpha
15876       VAR_CPU_ARCH=alpha
15877       VAR_CPU_BITS=64
15878       VAR_CPU_ENDIAN=little
15879       ;;
15880     arm*)
15881       VAR_CPU=arm
15882       VAR_CPU_ARCH=arm
15883       VAR_CPU_BITS=32
15884       VAR_CPU_ENDIAN=little
15885       ;;
15886     aarch64)
15887       VAR_CPU=aarch64
15888       VAR_CPU_ARCH=aarch64
15889       VAR_CPU_BITS=64
15890       VAR_CPU_ENDIAN=little
15891       ;;
15892     m68k)
15893       VAR_CPU=m68k
15894       VAR_CPU_ARCH=m68k
15895       VAR_CPU_BITS=32
15896       VAR_CPU_ENDIAN=big
15897       ;;
15898     mips)
15899       VAR_CPU=mips
15900       VAR_CPU_ARCH=mips
15901       VAR_CPU_BITS=32
15902       VAR_CPU_ENDIAN=big
15903       ;;
15904     mipsel)
15905       VAR_CPU=mipsel
15906       VAR_CPU_ARCH=mipsel
15907       VAR_CPU_BITS=32
15908       VAR_CPU_ENDIAN=little
15909       ;;
15910     mips64)
15911       VAR_CPU=mips64
15912       VAR_CPU_ARCH=mips64
15913       VAR_CPU_BITS=64
15914       VAR_CPU_ENDIAN=big
15915       ;;
15916     mips64el)
15917       VAR_CPU=mips64el
15918       VAR_CPU_ARCH=mips64el
15919       VAR_CPU_BITS=64
15920       VAR_CPU_ENDIAN=little
15921       ;;
15922     powerpc)
15923       VAR_CPU=ppc
15924       VAR_CPU_ARCH=ppc
15925       VAR_CPU_BITS=32
15926       VAR_CPU_ENDIAN=big
15927       ;;
15928     powerpc64)
15929       VAR_CPU=ppc64
15930       VAR_CPU_ARCH=ppc
15931       VAR_CPU_BITS=64
15932       VAR_CPU_ENDIAN=big
15933       ;;
15934     powerpc64le)
15935       VAR_CPU=ppc64le
15936       VAR_CPU_ARCH=ppc
15937       VAR_CPU_BITS=64
15938       VAR_CPU_ENDIAN=little
15939       ;;
15940     s390)
15941       VAR_CPU=s390
15942       VAR_CPU_ARCH=s390
15943       VAR_CPU_BITS=32
15944       VAR_CPU_ENDIAN=big
15945       ;;
15946     s390x)
15947       VAR_CPU=s390x
15948       VAR_CPU_ARCH=s390
15949       VAR_CPU_BITS=64
15950       VAR_CPU_ENDIAN=big
15951       ;;
15952     sh*eb)
15953       VAR_CPU=sh
15954       VAR_CPU_ARCH=sh
15955       VAR_CPU_BITS=32
15956       VAR_CPU_ENDIAN=big
15957       ;;
15958     sh*)
15959       VAR_CPU=sh
15960       VAR_CPU_ARCH=sh
15961       VAR_CPU_BITS=32
15962       VAR_CPU_ENDIAN=little
15963       ;;
15964     sparc)
15965       VAR_CPU=sparc
15966       VAR_CPU_ARCH=sparc
15967       VAR_CPU_BITS=32
15968       VAR_CPU_ENDIAN=big
15969       ;;
15970     sparcv9|sparc64)
15971       VAR_CPU=sparcv9
15972       VAR_CPU_ARCH=sparc
15973       VAR_CPU_BITS=64
15974       VAR_CPU_ENDIAN=big
15975       ;;
15976     *)
15977       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15978       ;;
15979   esac
15980 
15981   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15982   OPENJDK_TARGET_OS="$VAR_OS"
15983   if test "x$VAR_OS_TYPE" != x; then
15984     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15985   else
15986     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15987   fi
15988   if test "x$VAR_OS_ENV" != x; then
15989     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15990   else
15991     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15992   fi
15993   OPENJDK_TARGET_CPU="$VAR_CPU"
15994   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15995   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15996   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15997 
15998 
15999 
16000 
16001 
16002 
16003 
16004 
16005   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16006 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
16007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16008 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16009 
16010 
16011 
16012 # Check whether --with-target-bits was given.
16013 if test "${with_target_bits+set}" = set; then :
16014   withval=$with_target_bits;
16015 fi
16016 
16017 
16018   # We have three types of compiles:
16019   # native  == normal compilation, target system == build system
16020   # cross   == traditional cross compilation, target system != build system; special toolchain needed
16021   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16022   #
16023   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16024     # We're doing a proper cross-compilation
16025     COMPILE_TYPE="cross"
16026   else
16027     COMPILE_TYPE="native"
16028   fi
16029 
16030   if test "x$with_target_bits" != x; then
16031     if test "x$COMPILE_TYPE" = "xcross"; then
16032       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16033     fi
16034 
16035     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16036       # A reduced build is requested
16037       COMPILE_TYPE="reduced"
16038       OPENJDK_TARGET_CPU_BITS=32
16039       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16040         OPENJDK_TARGET_CPU=x86
16041       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16042         OPENJDK_TARGET_CPU=sparc
16043       else
16044         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16045       fi
16046     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16047       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
16048     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16049       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16050 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16051     else
16052       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16053     fi
16054   fi
16055 
16056 
16057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16058 $as_echo_n "checking compilation type... " >&6; }
16059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16060 $as_echo "$COMPILE_TYPE" >&6; }
16061 
16062 
16063   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16064     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16065   else
16066     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16067   fi
16068 
16069   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16070     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16071   else
16072     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16073   fi
16074 
16075   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16076 
16077 
16078 
16079   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16080     RELEASE_FILE_OS_NAME=SunOS
16081   fi
16082   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16083     RELEASE_FILE_OS_NAME=Linux
16084   fi
16085   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16086     RELEASE_FILE_OS_NAME=Windows
16087   fi
16088   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16089     RELEASE_FILE_OS_NAME="Darwin"
16090   fi
16091   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16092     RELEASE_FILE_OS_NAME="AIX"
16093   fi
16094   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16095 
16096 
16097 
16098 
16099 
16100 
16101   # Also store the legacy naming of the cpu.
16102   # Ie i586 and amd64 instead of x86 and x86_64
16103   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16104   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16105     OPENJDK_TARGET_CPU_LEGACY="i586"
16106   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16107     # On all platforms except MacOSX replace x86_64 with amd64.
16108     OPENJDK_TARGET_CPU_LEGACY="amd64"
16109   elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16110     # Avoid name collisions with variables named alpha
16111     OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16112   elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16113     # Avoid name collisions with variables named sh
16114     OPENJDK_TARGET_CPU_LEGACY="_sh_"
16115   fi
16116 
16117 
16118   # And the second legacy naming of the cpu.
16119   # Ie i386 and amd64 instead of x86 and x86_64.
16120   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16121   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16122     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16123   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16124     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16125   fi
16126 
16127 
16128   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16129   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16130   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16131   OPENJDK_TARGET_CPU_ISADIR=""
16132   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16133     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16134       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16135     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16136       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16137     fi
16138   fi
16139 
16140 
16141   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16142   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16143   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16144     # On linux only, we replace x86 with i386.
16145     OPENJDK_TARGET_CPU_OSARCH="i386"
16146   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16147     # On all platforms except macosx, we replace x86_64 with amd64.
16148     OPENJDK_TARGET_CPU_OSARCH="amd64"
16149   fi
16150 
16151 
16152   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16153   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16154     OPENJDK_TARGET_CPU_JLI="i386"
16155   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16156     # On all platforms except macosx, we replace x86_64 with amd64.
16157     OPENJDK_TARGET_CPU_JLI="amd64"
16158   fi
16159 
16160   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16161       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16162   else
16163       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16164   fi
16165 
16166 
16167   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16168   # Macosx is osx and x86_64 is x64
16169   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16170     OPENJDK_TARGET_OS_BUNDLE="osx"
16171   else
16172     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16173   fi
16174   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16175     OPENJDK_TARGET_CPU_BUNDLE="x64"
16176   else
16177     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16178   fi
16179   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16180 
16181 
16182   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16183     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16184     # unpack200.exe. This variable is used in
16185     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16186     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16187       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16188     fi
16189   fi
16190 
16191   if test "x$COMPILE_TYPE" = "xcross"; then
16192     # FIXME: ... or should this include reduced builds..?
16193     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16194   else
16195     DEFINE_CROSS_COMPILE_ARCH=""
16196   fi
16197 
16198 
16199   # Convert openjdk platform names to hotspot names
16200 
16201   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16202   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16203     HOTSPOT_TARGET_OS=bsd
16204   fi
16205 
16206 
16207   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16208   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16209     HOTSPOT_TARGET_OS_TYPE=posix
16210   fi
16211 
16212 
16213   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16214   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16215     HOTSPOT_TARGET_CPU=x86_32
16216   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16217     HOTSPOT_TARGET_CPU=sparc
16218   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16219     HOTSPOT_TARGET_CPU=ppc_64
16220   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16221     HOTSPOT_TARGET_CPU=ppc_64
16222   fi
16223 
16224 
16225   # This is identical with OPENJDK_*, but define anyway for consistency.
16226   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16227 
16228 
16229   # Setup HOTSPOT_TARGET_CPU_DEFINE
16230   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16231     HOTSPOT_TARGET_CPU_DEFINE=IA32
16232   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16233     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16234   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16235     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16236   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16237     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16238   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16239     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16240   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16241     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16242 
16243   # The cpu defines below are for zero, we don't support them directly.
16244   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16245     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16246   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16247     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16248   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16249     HOTSPOT_TARGET_CPU_DEFINE=S390
16250   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16251     HOTSPOT_TARGET_CPU_DEFINE=S390
16252   elif test "x$OPENJDK_TARGET_CPU" != x; then
16253     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16254   fi
16255 
16256 
16257 
16258 
16259   # Also store the legacy naming of the cpu.
16260   # Ie i586 and amd64 instead of x86 and x86_64
16261   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16262   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16263     OPENJDK_BUILD_CPU_LEGACY="i586"
16264   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16265     # On all platforms except MacOSX replace x86_64 with amd64.
16266     OPENJDK_BUILD_CPU_LEGACY="amd64"
16267   elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16268     # Avoid name collisions with variables named alpha
16269     OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16270   elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16271     # Avoid name collisions with variables named sh
16272     OPENJDK_BUILD_CPU_LEGACY="_sh_"
16273   fi
16274 
16275 
16276   # And the second legacy naming of the cpu.
16277   # Ie i386 and amd64 instead of x86 and x86_64.
16278   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16279   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16280     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16281   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16282     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16283   fi
16284 
16285 
16286   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16287   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16288   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16289   OPENJDK_BUILD_CPU_ISADIR=""
16290   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16291     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16292       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16293     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16294       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16295     fi
16296   fi
16297 
16298 
16299   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16300   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16301   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16302     # On linux only, we replace x86 with i386.
16303     OPENJDK_BUILD_CPU_OSARCH="i386"
16304   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16305     # On all platforms except macosx, we replace x86_64 with amd64.
16306     OPENJDK_BUILD_CPU_OSARCH="amd64"
16307   fi
16308 
16309 
16310   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16311   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16312     OPENJDK_BUILD_CPU_JLI="i386"
16313   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16314     # On all platforms except macosx, we replace x86_64 with amd64.
16315     OPENJDK_BUILD_CPU_JLI="amd64"
16316   fi
16317 
16318   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16319       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16320   else
16321       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16322   fi
16323 
16324 
16325   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16326   # Macosx is osx and x86_64 is x64
16327   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16328     OPENJDK_BUILD_OS_BUNDLE="osx"
16329   else
16330     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16331   fi
16332   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16333     OPENJDK_BUILD_CPU_BUNDLE="x64"
16334   else
16335     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16336   fi
16337   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16338 
16339 
16340   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16341     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16342     # unpack200.exe. This variable is used in
16343     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16344     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16345       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16346     fi
16347   fi
16348 
16349   if test "x$COMPILE_TYPE" = "xcross"; then
16350     # FIXME: ... or should this include reduced builds..?
16351     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16352   else
16353     DEFINE_CROSS_COMPILE_ARCH=""
16354   fi
16355 
16356 
16357   # Convert openjdk platform names to hotspot names
16358 
16359   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16360   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16361     HOTSPOT_BUILD_OS=bsd
16362   fi
16363 
16364 
16365   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16366   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16367     HOTSPOT_BUILD_OS_TYPE=posix
16368   fi
16369 
16370 
16371   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16372   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16373     HOTSPOT_BUILD_CPU=x86_32
16374   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16375     HOTSPOT_BUILD_CPU=sparc
16376   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16377     HOTSPOT_BUILD_CPU=ppc_64
16378   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16379     HOTSPOT_BUILD_CPU=ppc_64
16380   fi
16381 
16382 
16383   # This is identical with OPENJDK_*, but define anyway for consistency.
16384   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16385 
16386 
16387   # Setup HOTSPOT_BUILD_CPU_DEFINE
16388   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16389     HOTSPOT_BUILD_CPU_DEFINE=IA32
16390   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16391     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16392   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16393     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16394   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16395     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16396   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16397     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16398   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16399     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16400 
16401   # The cpu defines below are for zero, we don't support them directly.
16402   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16403     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16404   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16405     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16406   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16407     HOTSPOT_BUILD_CPU_DEFINE=S390
16408   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16409     HOTSPOT_BUILD_CPU_DEFINE=S390
16410   elif test "x$OPENJDK_BUILD_CPU" != x; then
16411     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16412   fi
16413 
16414 
16415 
16416 
16417 
16418 
16419 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16420 
16421   # Save the current directory this script was started from
16422   CURDIR="$PWD"
16423 
16424   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16425   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16426   # was not available at that time.
16427   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16428   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16429     ORIGINAL_PATH="$REWRITTEN_PATH"
16430     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16431 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16432   fi
16433 
16434   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16435     PATH_SEP=";"
16436 
16437   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16438   if test $SRC_ROOT_LENGTH -gt 100; then
16439     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16440   fi
16441 
16442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16444 $as_echo_n "checking cygwin release... " >&6; }
16445     CYGWIN_VERSION=`$UNAME -r`
16446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16447 $as_echo "$CYGWIN_VERSION" >&6; }
16448     WINDOWS_ENV_VENDOR='cygwin'
16449     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16450 
16451     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16452     if test "x$CYGWIN_VERSION_OLD" != x; then
16453       { $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
16454 $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;}
16455       as_fn_error $? "Cannot continue" "$LINENO" 5
16456     fi
16457     if test "x$CYGPATH" = x; then
16458       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16459     fi
16460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16461 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16462     # The cmd output ends with Windows line endings (CR/LF)
16463     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16464     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16465     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16467 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16468     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16469     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16470     if test "x$test_cygdrive_prefix" = x; then
16471       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16472     fi
16473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16475 $as_echo_n "checking msys release... " >&6; }
16476     MSYS_VERSION=`$UNAME -r`
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16478 $as_echo "$MSYS_VERSION" >&6; }
16479 
16480     WINDOWS_ENV_VENDOR='msys'
16481     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16482 
16483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16484 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16485     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16486     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16487 
16488   windows_path="$MSYS_ROOT_PATH"
16489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16490     unix_path=`$CYGPATH -u "$windows_path"`
16491     MSYS_ROOT_PATH="$unix_path"
16492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16494     MSYS_ROOT_PATH="$unix_path"
16495   fi
16496 
16497     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16498 $as_echo "$MSYS_ROOT_PATH" >&6; }
16499     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16500   else
16501     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16502   fi
16503 
16504   # Test if windows or unix (cygwin/msys) find is first in path.
16505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16506 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16507   FIND_BINARY_OUTPUT=`find --version 2>&1`
16508   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16510 $as_echo "unix style" >&6; }
16511   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16512     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16513 $as_echo "Windows" >&6; }
16514     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16515 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16516     { $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
16517 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16518     as_fn_error $? "Cannot continue" "$LINENO" 5
16519   else
16520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16521 $as_echo "unknown" >&6; }
16522     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16523 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16524   fi
16525 
16526   else
16527     PATH_SEP=":"
16528   fi
16529 
16530 
16531   # We get the top-level directory from the supporting wrappers.
16532   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16533 $as_echo_n "checking for top-level directory... " >&6; }
16534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16535 $as_echo "$TOPDIR" >&6; }
16536 
16537 
16538   # Save the original version of TOPDIR for string comparisons
16539   ORIGINAL_TOPDIR="$TOPDIR"
16540 
16541 
16542   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16543 
16544   # Only process if variable expands to non-empty
16545 
16546   if test "x$CURDIR" != x; then
16547     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16548 
16549   # Input might be given as Windows format, start by converting to
16550   # unix format.
16551   path="$CURDIR"
16552   new_path=`$CYGPATH -u "$path"`
16553 
16554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16557   # "foo.exe" is OK but "foo" is an error.
16558   #
16559   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16560   # It is also a way to make sure we got the proper file name for the real test later on.
16561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16562   if test "x$test_shortpath" = x; then
16563     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16564 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16565     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16566   fi
16567 
16568   # Call helper function which possibly converts this using DOS-style short mode.
16569   # If so, the updated path is stored in $new_path.
16570 
16571   input_path="$new_path"
16572   # Check if we need to convert this using DOS-style short mode. If the path
16573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16574   # take no chances and rewrite it.
16575   # Note: m4 eats our [], so we need to use [ and ] instead.
16576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16577   if test "x$has_forbidden_chars" != x; then
16578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16579     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16580     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16581     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16582       # Going to short mode and back again did indeed matter. Since short mode is
16583       # case insensitive, let's make it lowercase to improve readability.
16584       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16585       # Now convert it back to Unix-style (cygpath)
16586       input_path=`$CYGPATH -u "$shortmode_path"`
16587       new_path="$input_path"
16588     fi
16589   fi
16590 
16591   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16592   if test "x$test_cygdrive_prefix" = x; then
16593     # As a simple fix, exclude /usr/bin since it's not a real path.
16594     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16595       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16596       # a path prefixed by /cygdrive for fixpath to work.
16597       new_path="$CYGWIN_ROOT_PATH$input_path"
16598     fi
16599   fi
16600 
16601 
16602   if test "x$path" != "x$new_path"; then
16603     CURDIR="$new_path"
16604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16605 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16606   fi
16607 
16608     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16609 
16610   path="$CURDIR"
16611   has_colon=`$ECHO $path | $GREP ^.:`
16612   new_path="$path"
16613   if test "x$has_colon" = x; then
16614     # Not in mixed or Windows style, start by that.
16615     new_path=`cmd //c echo $path`
16616   fi
16617 
16618 
16619   input_path="$new_path"
16620   # Check if we need to convert this using DOS-style short mode. If the path
16621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16622   # take no chances and rewrite it.
16623   # Note: m4 eats our [], so we need to use [ and ] instead.
16624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16625   if test "x$has_forbidden_chars" != x; then
16626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16627     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16628   fi
16629 
16630 
16631   windows_path="$new_path"
16632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633     unix_path=`$CYGPATH -u "$windows_path"`
16634     new_path="$unix_path"
16635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16637     new_path="$unix_path"
16638   fi
16639 
16640   if test "x$path" != "x$new_path"; then
16641     CURDIR="$new_path"
16642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16643 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16644   fi
16645 
16646   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16647   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16648 
16649     else
16650       # We're on a unix platform. Hooray! :)
16651       path="$CURDIR"
16652       has_space=`$ECHO "$path" | $GREP " "`
16653       if test "x$has_space" != x; then
16654         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16655 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16656         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16657       fi
16658 
16659       # Use eval to expand a potential ~
16660       eval path="$path"
16661       if test ! -f "$path" && test ! -d "$path"; then
16662         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16663       fi
16664 
16665       if test -d "$path"; then
16666         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16667       else
16668         dir="`$DIRNAME "$path"`"
16669         base="`$BASENAME "$path"`"
16670         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16671       fi
16672     fi
16673   fi
16674 
16675 
16676   # Only process if variable expands to non-empty
16677 
16678   if test "x$TOPDIR" != x; then
16679     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680 
16681   # Input might be given as Windows format, start by converting to
16682   # unix format.
16683   path="$TOPDIR"
16684   new_path=`$CYGPATH -u "$path"`
16685 
16686   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16687   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16688   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16689   # "foo.exe" is OK but "foo" is an error.
16690   #
16691   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16692   # It is also a way to make sure we got the proper file name for the real test later on.
16693   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16694   if test "x$test_shortpath" = x; then
16695     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16696 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16697     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16698   fi
16699 
16700   # Call helper function which possibly converts this using DOS-style short mode.
16701   # If so, the updated path is stored in $new_path.
16702 
16703   input_path="$new_path"
16704   # Check if we need to convert this using DOS-style short mode. If the path
16705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16706   # take no chances and rewrite it.
16707   # Note: m4 eats our [], so we need to use [ and ] instead.
16708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16709   if test "x$has_forbidden_chars" != x; then
16710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16711     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16712     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16713     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16714       # Going to short mode and back again did indeed matter. Since short mode is
16715       # case insensitive, let's make it lowercase to improve readability.
16716       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16717       # Now convert it back to Unix-style (cygpath)
16718       input_path=`$CYGPATH -u "$shortmode_path"`
16719       new_path="$input_path"
16720     fi
16721   fi
16722 
16723   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16724   if test "x$test_cygdrive_prefix" = x; then
16725     # As a simple fix, exclude /usr/bin since it's not a real path.
16726     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16727       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16728       # a path prefixed by /cygdrive for fixpath to work.
16729       new_path="$CYGWIN_ROOT_PATH$input_path"
16730     fi
16731   fi
16732 
16733 
16734   if test "x$path" != "x$new_path"; then
16735     TOPDIR="$new_path"
16736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16737 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16738   fi
16739 
16740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16741 
16742   path="$TOPDIR"
16743   has_colon=`$ECHO $path | $GREP ^.:`
16744   new_path="$path"
16745   if test "x$has_colon" = x; then
16746     # Not in mixed or Windows style, start by that.
16747     new_path=`cmd //c echo $path`
16748   fi
16749 
16750 
16751   input_path="$new_path"
16752   # Check if we need to convert this using DOS-style short mode. If the path
16753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16754   # take no chances and rewrite it.
16755   # Note: m4 eats our [], so we need to use [ and ] instead.
16756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16757   if test "x$has_forbidden_chars" != x; then
16758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16760   fi
16761 
16762 
16763   windows_path="$new_path"
16764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16765     unix_path=`$CYGPATH -u "$windows_path"`
16766     new_path="$unix_path"
16767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16769     new_path="$unix_path"
16770   fi
16771 
16772   if test "x$path" != "x$new_path"; then
16773     TOPDIR="$new_path"
16774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16775 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16776   fi
16777 
16778   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16779   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16780 
16781     else
16782       # We're on a unix platform. Hooray! :)
16783       path="$TOPDIR"
16784       has_space=`$ECHO "$path" | $GREP " "`
16785       if test "x$has_space" != x; then
16786         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16787 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16788         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16789       fi
16790 
16791       # Use eval to expand a potential ~
16792       eval path="$path"
16793       if test ! -f "$path" && test ! -d "$path"; then
16794         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16795       fi
16796 
16797       if test -d "$path"; then
16798         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16799       else
16800         dir="`$DIRNAME "$path"`"
16801         base="`$BASENAME "$path"`"
16802         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16803       fi
16804     fi
16805   fi
16806 
16807 
16808   # Calculate a canonical version of TOPDIR for string comparisons
16809   CANONICAL_TOPDIR=$TOPDIR
16810 
16811   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16812     # Follow a chain of symbolic links. Use readlink
16813     # where it exists, else fall back to horribly
16814     # complicated shell code.
16815     if test "x$READLINK_TESTED" != yes; then
16816       # On MacOSX there is a readlink tool with a different
16817       # purpose than the GNU readlink tool. Check the found readlink.
16818       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16819       if test "x$ISGNU" = x; then
16820         # A readlink that we do not know how to use.
16821         # Are there other non-GNU readlinks out there?
16822         READLINK_TESTED=yes
16823         READLINK=
16824       fi
16825     fi
16826 
16827     if test "x$READLINK" != x; then
16828       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16829     else
16830       # Save the current directory for restoring afterwards
16831       STARTDIR=$PWD
16832       COUNTER=0
16833       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16834       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16835       cd $sym_link_dir
16836       # Use -P flag to resolve symlinks in directories.
16837       cd `$THEPWDCMD -P`
16838       sym_link_dir=`$THEPWDCMD -P`
16839       # Resolve file symlinks
16840       while test $COUNTER -lt 20; do
16841         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16842         if test "x$ISLINK" == x; then
16843           # This is not a symbolic link! We are done!
16844           break
16845         fi
16846         # Again resolve directory symlinks since the target of the just found
16847         # link could be in a different directory
16848         cd `$DIRNAME $ISLINK`
16849         sym_link_dir=`$THEPWDCMD -P`
16850         sym_link_file=`$BASENAME $ISLINK`
16851         let COUNTER=COUNTER+1
16852       done
16853       cd $STARTDIR
16854       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16855     fi
16856   fi
16857 
16858 
16859 
16860   # Locate the directory of this script.
16861   AUTOCONF_DIR=$TOPDIR/make/autoconf
16862 
16863   # Setup username (for use in adhoc version strings etc)
16864   # Outer [ ] to quote m4.
16865    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16866 
16867 
16868 
16869 # Check if it's a pure open build or if custom sources are to be used.
16870 
16871   # Check whether --enable-openjdk-only was given.
16872 if test "${enable_openjdk_only+set}" = set; then :
16873   enableval=$enable_openjdk_only;
16874 else
16875   enable_openjdk_only="no"
16876 fi
16877 
16878 
16879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16880 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16882 $as_echo "$enable_openjdk_only" >&6; }
16883   if test "x$enable_openjdk_only" = "xyes"; then
16884     SUPPRESS_CUSTOM_EXTENSIONS="true"
16885   elif test "x$enable_openjdk_only" = "xno"; then
16886     SUPPRESS_CUSTOM_EXTENSIONS="false"
16887   else
16888     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16889   fi
16890 
16891   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16892   # the IncludeCustomExtension macro.
16893 
16894 
16895 # Check whether --with-custom-make-dir was given.
16896 if test "${with_custom_make_dir+set}" = set; then :
16897   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
16898 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16899 fi
16900 
16901 
16902 
16903 
16904 # These are needed to be able to create a configuration name (and thus the output directory)
16905 
16906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16907 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16908 
16909 # Check whether --with-jdk-variant was given.
16910 if test "${with_jdk_variant+set}" = set; then :
16911   withval=$with_jdk_variant;
16912 fi
16913 
16914 
16915   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16916     JDK_VARIANT="normal"
16917   else
16918     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16919   fi
16920 
16921 
16922 
16923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16924 $as_echo "$JDK_VARIANT" >&6; }
16925 
16926 
16927   DEBUG_LEVEL="release"
16928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16929 $as_echo_n "checking which debug level to use... " >&6; }
16930   # Check whether --enable-debug was given.
16931 if test "${enable_debug+set}" = set; then :
16932   enableval=$enable_debug;
16933         ENABLE_DEBUG="${enableval}"
16934         DEBUG_LEVEL="fastdebug"
16935 
16936 else
16937   ENABLE_DEBUG="no"
16938 fi
16939 
16940 
16941 
16942 # Check whether --with-debug-level was given.
16943 if test "${with_debug_level+set}" = set; then :
16944   withval=$with_debug_level;
16945         DEBUG_LEVEL="${withval}"
16946         if test "x$ENABLE_DEBUG" = xyes; then
16947           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16948         fi
16949 
16950 fi
16951 
16952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16953 $as_echo "$DEBUG_LEVEL" >&6; }
16954 
16955   if test "x$DEBUG_LEVEL" != xrelease && \
16956       test "x$DEBUG_LEVEL" != xoptimized && \
16957       test "x$DEBUG_LEVEL" != xfastdebug && \
16958       test "x$DEBUG_LEVEL" != xslowdebug; then
16959     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16960   fi
16961 
16962   # Translate DEBUG_LEVEL to debug level used by Hotspot
16963   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16964   if test "x$DEBUG_LEVEL" = xrelease; then
16965     HOTSPOT_DEBUG_LEVEL="product"
16966   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16967     HOTSPOT_DEBUG_LEVEL="debug"
16968   fi
16969 
16970   if test "x$DEBUG_LEVEL" = xoptimized; then
16971     # The debug level 'optimized' is a little special because it is currently only
16972     # applicable to the HotSpot build where it means to build a completely
16973     # optimized version of the VM without any debugging code (like for the
16974     # 'release' debug level which is called 'product' in the HotSpot build) but
16975     # with the exception that it can contain additional code which is otherwise
16976     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16977     # test new and/or experimental features which are not intended for customer
16978     # shipment. Because these new features need to be tested and benchmarked in
16979     # real world scenarios, we want to build the containing JDK at the 'release'
16980     # debug level.
16981     DEBUG_LEVEL="release"
16982   fi
16983 
16984 
16985 
16986 
16987 
16988 
16989 # Check whether --with-jvm-variants was given.
16990 if test "${with_jvm_variants+set}" = set; then :
16991   withval=$with_jvm_variants;
16992 fi
16993 
16994 
16995 
16996 
16997 # Check whether --with-cpu-port was given.
16998 if test "${with_cpu_port+set}" = set; then :
16999   withval=$with_cpu_port;
17000 fi
17001 
17002 
17003   if test "x$with_cpu_port" != x; then
17004     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17005       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17006     fi
17007     if test "x$with_cpu_port" != xarm64 && \
17008         test "x$with_cpu_port" != xaarch64; then
17009       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17010     fi
17011     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17012   fi
17013 
17014 
17015   if test "x$with_jvm_variants" = x; then
17016     with_jvm_variants="server"
17017   fi
17018   JVM_VARIANTS_OPT="$with_jvm_variants"
17019 
17020   # Has the user listed more than one variant?
17021   # Additional [] needed to keep m4 from mangling shell constructs.
17022   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17023     BUILDING_MULTIPLE_JVM_VARIANTS=true
17024   else
17025     BUILDING_MULTIPLE_JVM_VARIANTS=false
17026   fi
17027   # Replace the commas with AND for use in the build directory name.
17028   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17029 
17030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17031 $as_echo_n "checking which variants of the JVM to build... " >&6; }
17032   # JVM_VARIANTS is a space-separated list.
17033   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17034   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17036 $as_echo "$JVM_VARIANTS" >&6; }
17037 
17038   # Check that the selected variants are valid
17039 
17040   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17041   # Notice that the original variant failes on SLES 10 and 11
17042   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17043   STACK=${JVM_VARIANTS// /$'\n'}
17044   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17045   if test "x$INVALID_VARIANTS" != x; then
17046     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17047 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17048     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17049   fi
17050 
17051   # All "special" variants share the same output directory ("server")
17052   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17053   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17054   STACK=${JVM_VARIANTS// /$'\n'}
17055   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17056   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17057     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17058   fi
17059 
17060   # The "main" variant is the one used by other libs to link against during the
17061   # build.
17062   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17063     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17064     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17065       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17066         JVM_VARIANT_MAIN="$variant"
17067         break
17068       fi
17069     done
17070   else
17071     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17072   fi
17073 
17074 
17075 
17076 
17077 
17078   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17079     # zero behaves as a platform and rewrites these values. This is really weird. :(
17080     # We are guaranteed that we do not build any other variants when building zero.
17081     HOTSPOT_TARGET_CPU=zero
17082     HOTSPOT_TARGET_CPU_ARCH=zero
17083   fi
17084 
17085 
17086 # With basic setup done, call the custom early hook.
17087 
17088 
17089 # Check if we have devkits, extra paths or sysroot set.
17090 
17091 
17092 # Check whether --with-devkit was given.
17093 if test "${with_devkit+set}" = set; then :
17094   withval=$with_devkit;
17095 
17096   # Only process if variable expands to non-empty
17097 
17098   if test "x$with_devkit" != x; then
17099     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17100 
17101   # Input might be given as Windows format, start by converting to
17102   # unix format.
17103   path="$with_devkit"
17104   new_path=`$CYGPATH -u "$path"`
17105 
17106   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17107   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17108   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17109   # "foo.exe" is OK but "foo" is an error.
17110   #
17111   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17112   # It is also a way to make sure we got the proper file name for the real test later on.
17113   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17114   if test "x$test_shortpath" = x; then
17115     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17116 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17117     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17118   fi
17119 
17120   # Call helper function which possibly converts this using DOS-style short mode.
17121   # If so, the updated path is stored in $new_path.
17122 
17123   input_path="$new_path"
17124   # Check if we need to convert this using DOS-style short mode. If the path
17125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17126   # take no chances and rewrite it.
17127   # Note: m4 eats our [], so we need to use [ and ] instead.
17128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17129   if test "x$has_forbidden_chars" != x; then
17130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17131     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17132     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17133     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17134       # Going to short mode and back again did indeed matter. Since short mode is
17135       # case insensitive, let's make it lowercase to improve readability.
17136       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17137       # Now convert it back to Unix-style (cygpath)
17138       input_path=`$CYGPATH -u "$shortmode_path"`
17139       new_path="$input_path"
17140     fi
17141   fi
17142 
17143   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17144   if test "x$test_cygdrive_prefix" = x; then
17145     # As a simple fix, exclude /usr/bin since it's not a real path.
17146     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17147       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17148       # a path prefixed by /cygdrive for fixpath to work.
17149       new_path="$CYGWIN_ROOT_PATH$input_path"
17150     fi
17151   fi
17152 
17153 
17154   if test "x$path" != "x$new_path"; then
17155     with_devkit="$new_path"
17156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17157 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17158   fi
17159 
17160     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17161 
17162   path="$with_devkit"
17163   has_colon=`$ECHO $path | $GREP ^.:`
17164   new_path="$path"
17165   if test "x$has_colon" = x; then
17166     # Not in mixed or Windows style, start by that.
17167     new_path=`cmd //c echo $path`
17168   fi
17169 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17180   fi
17181 
17182 
17183   windows_path="$new_path"
17184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17185     unix_path=`$CYGPATH -u "$windows_path"`
17186     new_path="$unix_path"
17187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17188     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17189     new_path="$unix_path"
17190   fi
17191 
17192   if test "x$path" != "x$new_path"; then
17193     with_devkit="$new_path"
17194     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17195 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17196   fi
17197 
17198   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17199   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17200 
17201     else
17202       # We're on a unix platform. Hooray! :)
17203       path="$with_devkit"
17204       has_space=`$ECHO "$path" | $GREP " "`
17205       if test "x$has_space" != x; then
17206         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17207 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17208         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17209       fi
17210 
17211       # Use eval to expand a potential ~
17212       eval path="$path"
17213       if test ! -f "$path" && test ! -d "$path"; then
17214         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17215       fi
17216 
17217       if test -d "$path"; then
17218         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17219       else
17220         dir="`$DIRNAME "$path"`"
17221         base="`$BASENAME "$path"`"
17222         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17223       fi
17224     fi
17225   fi
17226 
17227         DEVKIT_ROOT="$with_devkit"
17228         # Check for a meta data info file in the root of the devkit
17229         if test -f "$DEVKIT_ROOT/devkit.info"; then
17230           . $DEVKIT_ROOT/devkit.info
17231           # This potentially sets the following:
17232           # A descriptive name of the devkit
17233 
17234   if test "x$DEVKIT_NAME" = x; then
17235     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17236   fi
17237 
17238           # Corresponds to --with-extra-path
17239 
17240   if test "x$DEVKIT_EXTRA_PATH" = x; then
17241     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17242   fi
17243 
17244           # Corresponds to --with-toolchain-path
17245 
17246   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17247     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17248   fi
17249 
17250           # Corresponds to --with-sysroot
17251 
17252   if test "x$DEVKIT_SYSROOT" = x; then
17253     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17254   fi
17255 
17256 
17257           # Identifies the Visual Studio version in the devkit
17258 
17259   if test "x$DEVKIT_VS_VERSION" = x; then
17260     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17261   fi
17262 
17263           # The Visual Studio include environment variable
17264 
17265   if test "x$DEVKIT_VS_INCLUDE" = x; then
17266     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17267   fi
17268 
17269           # The Visual Studio lib environment variable
17270 
17271   if test "x$DEVKIT_VS_LIB" = x; then
17272     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17273   fi
17274 
17275           # Corresponds to --with-msvcr-dll
17276 
17277   if test "x$DEVKIT_MSVCR_DLL" = x; then
17278     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17279   fi
17280 
17281           # Corresponds to --with-msvcp-dll
17282 
17283   if test "x$DEVKIT_MSVCP_DLL" = x; then
17284     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17285   fi
17286 
17287         fi
17288 
17289         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17290 $as_echo_n "checking for devkit... " >&6; }
17291         if test "x$DEVKIT_NAME" != x; then
17292           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17293 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17294         else
17295           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17296 $as_echo "$DEVKIT_ROOT" >&6; }
17297         fi
17298 
17299 
17300   if test "x$DEVKIT_EXTRA_PATH" != x; then
17301     if test "x$EXTRA_PATH" = x; then
17302       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17303     else
17304       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17305     fi
17306   fi
17307 
17308 
17309         # Fallback default of just /bin if DEVKIT_PATH is not defined
17310         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17311           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17312         fi
17313 
17314   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17315     if test "x$TOOLCHAIN_PATH" = x; then
17316       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17317     else
17318       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17319     fi
17320   fi
17321 
17322 
17323         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17324         # places for backwards compatiblity.
17325         if test "x$DEVKIT_SYSROOT" != x; then
17326           SYSROOT="$DEVKIT_SYSROOT"
17327         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17328           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17329         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17330           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17331         fi
17332 
17333 
17334 fi
17335 
17336 
17337   # You can force the sysroot if the sysroot encoded into the compiler tools
17338   # is not correct.
17339 
17340 # Check whether --with-sys-root was given.
17341 if test "${with_sys_root+set}" = set; then :
17342   withval=$with_sys_root; SYSROOT=$with_sys_root
17343 
17344 fi
17345 
17346 
17347 
17348 # Check whether --with-sysroot was given.
17349 if test "${with_sysroot+set}" = set; then :
17350   withval=$with_sysroot; SYSROOT=$with_sysroot
17351 
17352 fi
17353 
17354 
17355 
17356 # Check whether --with-tools-dir was given.
17357 if test "${with_tools_dir+set}" = set; then :
17358   withval=$with_tools_dir;
17359   if test "x$with_tools_dir" != x; then
17360     if test "x$TOOLCHAIN_PATH" = x; then
17361       TOOLCHAIN_PATH="$with_tools_dir"
17362     else
17363       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17364     fi
17365   fi
17366 
17367 
17368 fi
17369 
17370 
17371 
17372 # Check whether --with-toolchain-path was given.
17373 if test "${with_toolchain_path+set}" = set; then :
17374   withval=$with_toolchain_path;
17375   if test "x$with_toolchain_path" != x; then
17376     if test "x$TOOLCHAIN_PATH" = x; then
17377       TOOLCHAIN_PATH="$with_toolchain_path"
17378     else
17379       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17380     fi
17381   fi
17382 
17383 
17384 fi
17385 
17386 
17387 
17388 # Check whether --with-extra-path was given.
17389 if test "${with_extra_path+set}" = set; then :
17390   withval=$with_extra_path;
17391   if test "x$with_extra_path" != x; then
17392     if test "x$EXTRA_PATH" = x; then
17393       EXTRA_PATH="$with_extra_path"
17394     else
17395       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17396     fi
17397   fi
17398 
17399 
17400 fi
17401 
17402 
17403   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17404     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17405     # If not, detect if Xcode is installed by running xcodebuild -version
17406     # if no Xcode installed, xcodebuild exits with 1
17407     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17408     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17409       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17410       # fall back on the stub binary in /usr/bin/xcodebuild
17411       # Extract the first word of "xcodebuild", so it can be a program name with args.
17412 set dummy xcodebuild; ac_word=$2
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17414 $as_echo_n "checking for $ac_word... " >&6; }
17415 if ${ac_cv_path_XCODEBUILD+:} false; then :
17416   $as_echo_n "(cached) " >&6
17417 else
17418   case $XCODEBUILD in
17419   [\\/]* | ?:[\\/]*)
17420   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17421   ;;
17422   *)
17423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17424 for as_dir in $TOOLCHAIN_PATH
17425 do
17426   IFS=$as_save_IFS
17427   test -z "$as_dir" && as_dir=.
17428     for ac_exec_ext in '' $ac_executable_extensions; do
17429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17430     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17432     break 2
17433   fi
17434 done
17435   done
17436 IFS=$as_save_IFS
17437 
17438   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17439   ;;
17440 esac
17441 fi
17442 XCODEBUILD=$ac_cv_path_XCODEBUILD
17443 if test -n "$XCODEBUILD"; then
17444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17445 $as_echo "$XCODEBUILD" >&6; }
17446 else
17447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17448 $as_echo "no" >&6; }
17449 fi
17450 
17451 
17452     else
17453       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17454       # when only the command line tools are installed there are no SDKs, so headers
17455       # are copied into the system frameworks
17456       XCODEBUILD=
17457 
17458     fi
17459 
17460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17461 $as_echo_n "checking for sdk name... " >&6; }
17462 
17463 # Check whether --with-sdk-name was given.
17464 if test "${with_sdk_name+set}" = set; then :
17465   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17466 
17467 fi
17468 
17469     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17470 $as_echo "$SDKNAME" >&6; }
17471 
17472     # if toolchain path is specified then don't rely on system headers, they may not compile
17473     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17474     test -z "$TOOLCHAIN_PATH" && \
17475       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17476 
17477     if test -z "$SYSROOT"; then
17478       if test -n "$XCODEBUILD"; then
17479         # if we don't have system headers, use default SDK name (last resort)
17480         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17481           SDKNAME=${SDKNAME:-macosx}
17482         fi
17483 
17484         if test -n "$SDKNAME"; then
17485           # Call xcodebuild to determine SYSROOT
17486           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17487         fi
17488       else
17489         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17490           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
17491         fi
17492       fi
17493     else
17494       # warn user if --with-sdk-name was also set
17495       if test -n "$with_sdk_name"; then
17496         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17497 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17498       fi
17499     fi
17500 
17501     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17502       # If no system framework headers, then SYSROOT must be set, or we won't build
17503       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
17504     fi
17505 
17506     # Perform a basic sanity test
17507     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17508       if test -z "$SYSROOT"; then
17509         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
17510       else
17511         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17512       fi
17513     fi
17514 
17515     # set SDKROOT too, Xcode tools will pick it up
17516     SDKROOT="$SYSROOT"
17517 
17518   fi
17519 
17520   # Prepend the extra path to the global path
17521 
17522   if test "x$EXTRA_PATH" != x; then
17523     if test "x$PATH" = x; then
17524       PATH="$EXTRA_PATH"
17525     else
17526       PATH="$EXTRA_PATH:$PATH"
17527     fi
17528   fi
17529 
17530 
17531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17532 $as_echo_n "checking for sysroot... " >&6; }
17533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17534 $as_echo "$SYSROOT" >&6; }
17535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17536 $as_echo_n "checking for toolchain path... " >&6; }
17537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17538 $as_echo "$TOOLCHAIN_PATH" >&6; }
17539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17540 $as_echo_n "checking for extra path... " >&6; }
17541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17542 $as_echo "$EXTRA_PATH" >&6; }
17543 
17544 
17545 # To properly create a configuration name, we need to have the OpenJDK target
17546 # and options (variants and debug level) parsed.
17547 
17548 
17549 
17550 # Check whether --with-conf-name was given.
17551 if test "${with_conf_name+set}" = set; then :
17552   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17553 fi
17554 
17555 
17556 # Check whether --with-output-base-dir was given.
17557 if test "${with_output_base_dir+set}" = set; then :
17558   withval=$with_output_base_dir;  OUTPUT_BASE=${with_output_base_dir}
17559 else
17560    OUTPUT_BASE="$TOPDIR/build"
17561 fi
17562 
17563 
17564   # Test from where we are running configure, in or outside of src root.
17565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17566 $as_echo_n "checking where to store configuration... " >&6; }
17567   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$TOPDIR/common" \
17568       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
17569       || test "x$CURDIR" = "x$TOPDIR/make" ; then
17570     # We are running configure from the src root.
17571     # Create a default ./build/target-variant-debuglevel output root.
17572     if test "x${CONF_NAME}" = x; then
17573       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17574 $as_echo "in default location" >&6; }
17575       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17576     else
17577       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17578 $as_echo "in build directory with custom name" >&6; }
17579     fi
17580     OUTPUTDIR="${OUTPUT_BASE}/${CONF_NAME}"
17581     $MKDIR -p "$OUTPUTDIR"
17582     if test ! -d "$OUTPUTDIR"; then
17583       as_fn_error $? "Could not create build directory $OUTPUTDIR" "$LINENO" 5
17584     fi
17585   else
17586     # We are running configure from outside of the src dir.
17587     # Then use the current directory as output dir!
17588     # If configuration is situated in normal build directory, just use the build
17589     # directory name as configuration name, otherwise use the complete path.
17590     if test "x${CONF_NAME}" = x; then
17591       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
17592     fi
17593     OUTPUTDIR="$CURDIR"
17594     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17595 $as_echo "in current directory" >&6; }
17596 
17597     # WARNING: This might be a bad thing to do. You need to be sure you want to
17598     # have a configuration in this directory. Do some sanity checks!
17599 
17600     if test ! -e "$OUTPUTDIR/spec.gmk"; then
17601       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17602       # other files
17603       files_present=`$LS $OUTPUTDIR`
17604       # Configure has already touched config.log and confdefs.h in the current dir when this check
17605       # is performed.
17606       filtered_files=`$ECHO "$files_present" \
17607           | $SED -e 's/config.log//g' \
17608               -e 's/configure.log//g' \
17609               -e 's/confdefs.h//g' \
17610               -e 's/ //g' \
17611           | $TR -d '\n'`
17612       if test "x$filtered_files" != x; then
17613         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17614 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17615         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17616 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17617         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17618 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17619         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17620 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17621         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17622 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17623         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $TOPDIR' and restart configure" >&5
17624 $as_echo "$as_me: Try 'cd $TOPDIR' and restart configure" >&6;}
17625         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17626 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17627         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17628       fi
17629     fi
17630   fi
17631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17632 $as_echo_n "checking what configuration name to use... " >&6; }
17633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17634 $as_echo "$CONF_NAME" >&6; }
17635 
17636 
17637   # Only process if variable expands to non-empty
17638 
17639   if test "x$OUTPUTDIR" != x; then
17640     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17641 
17642   # Input might be given as Windows format, start by converting to
17643   # unix format.
17644   path="$OUTPUTDIR"
17645   new_path=`$CYGPATH -u "$path"`
17646 
17647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17650   # "foo.exe" is OK but "foo" is an error.
17651   #
17652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17653   # It is also a way to make sure we got the proper file name for the real test later on.
17654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17655   if test "x$test_shortpath" = x; then
17656     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17657 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17658     as_fn_error $? "Cannot locate the the path of OUTPUTDIR" "$LINENO" 5
17659   fi
17660 
17661   # Call helper function which possibly converts this using DOS-style short mode.
17662   # If so, the updated path is stored in $new_path.
17663 
17664   input_path="$new_path"
17665   # Check if we need to convert this using DOS-style short mode. If the path
17666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17667   # take no chances and rewrite it.
17668   # Note: m4 eats our [], so we need to use [ and ] instead.
17669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17670   if test "x$has_forbidden_chars" != x; then
17671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17672     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17673     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17674     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17675       # Going to short mode and back again did indeed matter. Since short mode is
17676       # case insensitive, let's make it lowercase to improve readability.
17677       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17678       # Now convert it back to Unix-style (cygpath)
17679       input_path=`$CYGPATH -u "$shortmode_path"`
17680       new_path="$input_path"
17681     fi
17682   fi
17683 
17684   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17685   if test "x$test_cygdrive_prefix" = x; then
17686     # As a simple fix, exclude /usr/bin since it's not a real path.
17687     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17688       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17689       # a path prefixed by /cygdrive for fixpath to work.
17690       new_path="$CYGWIN_ROOT_PATH$input_path"
17691     fi
17692   fi
17693 
17694 
17695   if test "x$path" != "x$new_path"; then
17696     OUTPUTDIR="$new_path"
17697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17698 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17699   fi
17700 
17701     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17702 
17703   path="$OUTPUTDIR"
17704   has_colon=`$ECHO $path | $GREP ^.:`
17705   new_path="$path"
17706   if test "x$has_colon" = x; then
17707     # Not in mixed or Windows style, start by that.
17708     new_path=`cmd //c echo $path`
17709   fi
17710 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721   fi
17722 
17723 
17724   windows_path="$new_path"
17725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17726     unix_path=`$CYGPATH -u "$windows_path"`
17727     new_path="$unix_path"
17728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17730     new_path="$unix_path"
17731   fi
17732 
17733   if test "x$path" != "x$new_path"; then
17734     OUTPUTDIR="$new_path"
17735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17736 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17737   fi
17738 
17739   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17740   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17741 
17742     else
17743       # We're on a unix platform. Hooray! :)
17744       path="$OUTPUTDIR"
17745       has_space=`$ECHO "$path" | $GREP " "`
17746       if test "x$has_space" != x; then
17747         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17748 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17749         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17750       fi
17751 
17752       # Use eval to expand a potential ~
17753       eval path="$path"
17754       if test ! -f "$path" && test ! -d "$path"; then
17755         as_fn_error $? "The path of OUTPUTDIR, which resolves as \"$path\", is not found." "$LINENO" 5
17756       fi
17757 
17758       if test -d "$path"; then
17759         OUTPUTDIR="`cd "$path"; $THEPWDCMD -L`"
17760       else
17761         dir="`$DIRNAME "$path"`"
17762         base="`$BASENAME "$path"`"
17763         OUTPUTDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
17764       fi
17765     fi
17766   fi
17767 
17768 
17769   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
17770   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17771 
17772   SPEC="$OUTPUTDIR/spec.gmk"
17773 
17774 
17775 
17776 
17777 
17778   # The spec.gmk file contains all variables for the make system.
17779   ac_config_files="$ac_config_files $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17780 
17781   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17782   ac_config_files="$ac_config_files $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17783 
17784   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17785   ac_config_files="$ac_config_files $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17786 
17787   # The compare.sh is used to compare the build output to other builds.
17788   ac_config_files="$ac_config_files $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17789 
17790   # The generated Makefile knows where the spec.gmk is and where the source is.
17791   # You can run make from the OUTPUTDIR, or from the top-level Makefile
17792   # which will look for generated configurations
17793   ac_config_files="$ac_config_files $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in"
17794 
17795 
17796 
17797 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17798 
17799   for ac_prog in apt-get yum brew port pkgutil pkgadd
17800 do
17801   # Extract the first word of "$ac_prog", so it can be a program name with args.
17802 set dummy $ac_prog; ac_word=$2
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17804 $as_echo_n "checking for $ac_word... " >&6; }
17805 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17806   $as_echo_n "(cached) " >&6
17807 else
17808   if test -n "$PKGHANDLER"; then
17809   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17810 else
17811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17812 for as_dir in $PATH
17813 do
17814   IFS=$as_save_IFS
17815   test -z "$as_dir" && as_dir=.
17816     for ac_exec_ext in '' $ac_executable_extensions; do
17817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17818     ac_cv_prog_PKGHANDLER="$ac_prog"
17819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17820     break 2
17821   fi
17822 done
17823   done
17824 IFS=$as_save_IFS
17825 
17826 fi
17827 fi
17828 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17829 if test -n "$PKGHANDLER"; then
17830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17831 $as_echo "$PKGHANDLER" >&6; }
17832 else
17833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17834 $as_echo "no" >&6; }
17835 fi
17836 
17837 
17838   test -n "$PKGHANDLER" && break
17839 done
17840 
17841 
17842 
17843 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17844 
17845 
17846 
17847   # Publish this variable in the help.
17848 
17849 
17850   if [ -z "${MAKE+x}" ]; then
17851     # The variable is not set by user, try to locate tool using the code snippet
17852 
17853     # Try our hardest to locate a correct version of GNU make
17854     for ac_prog in gmake
17855 do
17856   # Extract the first word of "$ac_prog", so it can be a program name with args.
17857 set dummy $ac_prog; ac_word=$2
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17859 $as_echo_n "checking for $ac_word... " >&6; }
17860 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17861   $as_echo_n "(cached) " >&6
17862 else
17863   case $CHECK_GMAKE in
17864   [\\/]* | ?:[\\/]*)
17865   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17866   ;;
17867   *)
17868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17869 for as_dir in $PATH
17870 do
17871   IFS=$as_save_IFS
17872   test -z "$as_dir" && as_dir=.
17873     for ac_exec_ext in '' $ac_executable_extensions; do
17874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17875     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17877     break 2
17878   fi
17879 done
17880   done
17881 IFS=$as_save_IFS
17882 
17883   ;;
17884 esac
17885 fi
17886 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17887 if test -n "$CHECK_GMAKE"; then
17888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17889 $as_echo "$CHECK_GMAKE" >&6; }
17890 else
17891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17892 $as_echo "no" >&6; }
17893 fi
17894 
17895 
17896   test -n "$CHECK_GMAKE" && break
17897 done
17898 
17899 
17900   MAKE_CANDIDATE=""$CHECK_GMAKE""
17901   DESCRIPTION="gmake in PATH"
17902 
17903   # On Cygwin, we require a newer version of make than on other platforms
17904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17905     MAKE_VERSION_EXPR="-e 4\."
17906     MAKE_REQUIRED_VERSION="4.0"
17907    else
17908     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17909     MAKE_REQUIRED_VERSION="3.81"
17910   fi
17911 
17912   if test "x$MAKE_CANDIDATE" != x; then
17913     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17914 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17915     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17916     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17917     if test "x$IS_GNU_MAKE" = x; then
17918       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17919 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17920     else
17921       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17922       if test "x$IS_MODERN_MAKE" = x; then
17923         { $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
17924 $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;}
17925       else
17926         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17927           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17928             MAKE_EXPECTED_ENV='cygwin'
17929           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17930             MAKE_EXPECTED_ENV='msys'
17931           else
17932             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17933           fi
17934           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17935           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17936         else
17937           # Not relevant for non-Windows
17938           IS_MAKE_CORRECT_ENV=true
17939         fi
17940         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17941           { $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
17942 $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;}
17943         else
17944           FOUND_MAKE=$MAKE_CANDIDATE
17945 
17946   # Only process if variable expands to non-empty
17947 
17948   if test "x$FOUND_MAKE" != x; then
17949     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950 
17951   # First separate the path from the arguments. This will split at the first
17952   # space.
17953   complete="$FOUND_MAKE"
17954   path="${complete%% *}"
17955   tmp="$complete EOL"
17956   arguments="${tmp#* }"
17957 
17958   # Input might be given as Windows format, start by converting to
17959   # unix format.
17960   new_path=`$CYGPATH -u "$path"`
17961 
17962   # Now try to locate executable using which
17963   new_path=`$WHICH "$new_path" 2> /dev/null`
17964   # bat and cmd files are not always considered executable in cygwin causing which
17965   # to not find them
17966   if test "x$new_path" = x \
17967       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17968       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17969     new_path=`$CYGPATH -u "$path"`
17970   fi
17971   if test "x$new_path" = x; then
17972     # Oops. Which didn't find the executable.
17973     # The splitting of arguments from the executable at a space might have been incorrect,
17974     # since paths with space are more likely in Windows. Give it another try with the whole
17975     # argument.
17976     path="$complete"
17977     arguments="EOL"
17978     new_path=`$CYGPATH -u "$path"`
17979     new_path=`$WHICH "$new_path" 2> /dev/null`
17980     # bat and cmd files are not always considered executable in cygwin causing which
17981     # to not find them
17982     if test "x$new_path" = x \
17983         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985       new_path=`$CYGPATH -u "$path"`
17986     fi
17987     if test "x$new_path" = x; then
17988       # It's still not found. Now this is an unrecoverable error.
17989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17990 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17991       has_space=`$ECHO "$complete" | $GREP " "`
17992       if test "x$has_space" != x; then
17993         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17995       fi
17996       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17997     fi
17998   fi
17999 
18000   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18001   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18002   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18003   # "foo.exe" is OK but "foo" is an error.
18004   #
18005   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18006   # It is also a way to make sure we got the proper file name for the real test later on.
18007   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18008   if test "x$test_shortpath" = x; then
18009     # Short path failed, file does not exist as specified.
18010     # Try adding .exe or .cmd
18011     if test -f "${new_path}.exe"; then
18012       input_to_shortpath="${new_path}.exe"
18013     elif test -f "${new_path}.cmd"; then
18014       input_to_shortpath="${new_path}.cmd"
18015     else
18016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18017 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18018       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18019 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18020       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18021     fi
18022   else
18023     input_to_shortpath="$new_path"
18024   fi
18025 
18026   # Call helper function which possibly converts this using DOS-style short mode.
18027   # If so, the updated path is stored in $new_path.
18028   new_path="$input_to_shortpath"
18029 
18030   input_path="$input_to_shortpath"
18031   # Check if we need to convert this using DOS-style short mode. If the path
18032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18033   # take no chances and rewrite it.
18034   # Note: m4 eats our [], so we need to use [ and ] instead.
18035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18036   if test "x$has_forbidden_chars" != x; then
18037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18041       # Going to short mode and back again did indeed matter. Since short mode is
18042       # case insensitive, let's make it lowercase to improve readability.
18043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18044       # Now convert it back to Unix-style (cygpath)
18045       input_path=`$CYGPATH -u "$shortmode_path"`
18046       new_path="$input_path"
18047     fi
18048   fi
18049 
18050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18051   if test "x$test_cygdrive_prefix" = x; then
18052     # As a simple fix, exclude /usr/bin since it's not a real path.
18053     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18055       # a path prefixed by /cygdrive for fixpath to work.
18056       new_path="$CYGWIN_ROOT_PATH$input_path"
18057     fi
18058   fi
18059 
18060   # remove trailing .exe if any
18061   new_path="${new_path/%.exe/}"
18062 
18063     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18064 
18065   # First separate the path from the arguments. This will split at the first
18066   # space.
18067   complete="$FOUND_MAKE"
18068   path="${complete%% *}"
18069   tmp="$complete EOL"
18070   arguments="${tmp#* }"
18071 
18072   # Input might be given as Windows format, start by converting to
18073   # unix format.
18074   new_path="$path"
18075 
18076   windows_path="$new_path"
18077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078     unix_path=`$CYGPATH -u "$windows_path"`
18079     new_path="$unix_path"
18080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18082     new_path="$unix_path"
18083   fi
18084 
18085 
18086   # Now try to locate executable using which
18087   new_path=`$WHICH "$new_path" 2> /dev/null`
18088 
18089   if test "x$new_path" = x; then
18090     # Oops. Which didn't find the executable.
18091     # The splitting of arguments from the executable at a space might have been incorrect,
18092     # since paths with space are more likely in Windows. Give it another try with the whole
18093     # argument.
18094     path="$complete"
18095     arguments="EOL"
18096     new_path="$path"
18097 
18098   windows_path="$new_path"
18099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18100     unix_path=`$CYGPATH -u "$windows_path"`
18101     new_path="$unix_path"
18102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18104     new_path="$unix_path"
18105   fi
18106 
18107 
18108     new_path=`$WHICH "$new_path" 2> /dev/null`
18109     # bat and cmd files are not always considered executable in MSYS causing which
18110     # to not find them
18111     if test "x$new_path" = x \
18112         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18113         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18114       new_path="$path"
18115 
18116   windows_path="$new_path"
18117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18118     unix_path=`$CYGPATH -u "$windows_path"`
18119     new_path="$unix_path"
18120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18122     new_path="$unix_path"
18123   fi
18124 
18125     fi
18126 
18127     if test "x$new_path" = x; then
18128       # It's still not found. Now this is an unrecoverable error.
18129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18130 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18131       has_space=`$ECHO "$complete" | $GREP " "`
18132       if test "x$has_space" != x; then
18133         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18134 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18135       fi
18136       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18137     fi
18138   fi
18139 
18140   # Now new_path has a complete unix path to the binary
18141   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18142     # Keep paths in /bin as-is, but remove trailing .exe if any
18143     new_path="${new_path/%.exe/}"
18144     # Do not save /bin paths to all_fixpath_prefixes!
18145   else
18146     # Not in mixed or Windows style, start by that.
18147     new_path=`cmd //c echo $new_path`
18148 
18149   input_path="$new_path"
18150   # Check if we need to convert this using DOS-style short mode. If the path
18151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18152   # take no chances and rewrite it.
18153   # Note: m4 eats our [], so we need to use [ and ] instead.
18154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18155   if test "x$has_forbidden_chars" != x; then
18156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18157     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18158   fi
18159 
18160     # Output is in $new_path
18161 
18162   windows_path="$new_path"
18163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164     unix_path=`$CYGPATH -u "$windows_path"`
18165     new_path="$unix_path"
18166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168     new_path="$unix_path"
18169   fi
18170 
18171     # remove trailing .exe if any
18172     new_path="${new_path/%.exe/}"
18173 
18174     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18175     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18176   fi
18177 
18178     else
18179       # We're on a unix platform. Hooray! :)
18180       # First separate the path from the arguments. This will split at the first
18181       # space.
18182       complete="$FOUND_MAKE"
18183       path="${complete%% *}"
18184       tmp="$complete EOL"
18185       arguments="${tmp#* }"
18186 
18187       # Cannot rely on the command "which" here since it doesn't always work.
18188       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18189       if test -z "$is_absolute_path"; then
18190         # Path to executable is not absolute. Find it.
18191         IFS_save="$IFS"
18192         IFS=:
18193         for p in $PATH; do
18194           if test -f "$p/$path" && test -x "$p/$path"; then
18195             new_path="$p/$path"
18196             break
18197           fi
18198         done
18199         IFS="$IFS_save"
18200       else
18201         # This is an absolute path, we can use it without further modifications.
18202         new_path="$path"
18203       fi
18204 
18205       if test "x$new_path" = x; then
18206         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18207 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18208         has_space=`$ECHO "$complete" | $GREP " "`
18209         if test "x$has_space" != x; then
18210           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18211 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18212         fi
18213         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18214       fi
18215     fi
18216 
18217     # Now join together the path and the arguments once again
18218     if test "x$arguments" != xEOL; then
18219       new_complete="$new_path ${arguments% *}"
18220     else
18221       new_complete="$new_path"
18222     fi
18223 
18224     if test "x$complete" != "x$new_complete"; then
18225       FOUND_MAKE="$new_complete"
18226       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18227 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18228     fi
18229   fi
18230 
18231         fi
18232       fi
18233     fi
18234   fi
18235 
18236 
18237     if test "x$FOUND_MAKE" = x; then
18238       for ac_prog in make
18239 do
18240   # Extract the first word of "$ac_prog", so it can be a program name with args.
18241 set dummy $ac_prog; ac_word=$2
18242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18243 $as_echo_n "checking for $ac_word... " >&6; }
18244 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18245   $as_echo_n "(cached) " >&6
18246 else
18247   case $CHECK_MAKE in
18248   [\\/]* | ?:[\\/]*)
18249   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18250   ;;
18251   *)
18252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18253 for as_dir in $PATH
18254 do
18255   IFS=$as_save_IFS
18256   test -z "$as_dir" && as_dir=.
18257     for ac_exec_ext in '' $ac_executable_extensions; do
18258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18259     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18261     break 2
18262   fi
18263 done
18264   done
18265 IFS=$as_save_IFS
18266 
18267   ;;
18268 esac
18269 fi
18270 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18271 if test -n "$CHECK_MAKE"; then
18272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18273 $as_echo "$CHECK_MAKE" >&6; }
18274 else
18275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18276 $as_echo "no" >&6; }
18277 fi
18278 
18279 
18280   test -n "$CHECK_MAKE" && break
18281 done
18282 
18283 
18284   MAKE_CANDIDATE=""$CHECK_MAKE""
18285   DESCRIPTION="make in PATH"
18286 
18287   # On Cygwin, we require a newer version of make than on other platforms
18288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18289     MAKE_VERSION_EXPR="-e 4\."
18290     MAKE_REQUIRED_VERSION="4.0"
18291    else
18292     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18293     MAKE_REQUIRED_VERSION="3.81"
18294   fi
18295 
18296   if test "x$MAKE_CANDIDATE" != x; then
18297     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18298 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18299     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18300     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18301     if test "x$IS_GNU_MAKE" = x; then
18302       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18303 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18304     else
18305       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18306       if test "x$IS_MODERN_MAKE" = x; then
18307         { $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
18308 $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;}
18309       else
18310         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18311           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18312             MAKE_EXPECTED_ENV='cygwin'
18313           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314             MAKE_EXPECTED_ENV='msys'
18315           else
18316             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18317           fi
18318           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18319           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18320         else
18321           # Not relevant for non-Windows
18322           IS_MAKE_CORRECT_ENV=true
18323         fi
18324         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18325           { $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
18326 $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;}
18327         else
18328           FOUND_MAKE=$MAKE_CANDIDATE
18329 
18330   # Only process if variable expands to non-empty
18331 
18332   if test "x$FOUND_MAKE" != x; then
18333     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18334 
18335   # First separate the path from the arguments. This will split at the first
18336   # space.
18337   complete="$FOUND_MAKE"
18338   path="${complete%% *}"
18339   tmp="$complete EOL"
18340   arguments="${tmp#* }"
18341 
18342   # Input might be given as Windows format, start by converting to
18343   # unix format.
18344   new_path=`$CYGPATH -u "$path"`
18345 
18346   # Now try to locate executable using which
18347   new_path=`$WHICH "$new_path" 2> /dev/null`
18348   # bat and cmd files are not always considered executable in cygwin causing which
18349   # to not find them
18350   if test "x$new_path" = x \
18351       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18352       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18353     new_path=`$CYGPATH -u "$path"`
18354   fi
18355   if test "x$new_path" = x; then
18356     # Oops. Which didn't find the executable.
18357     # The splitting of arguments from the executable at a space might have been incorrect,
18358     # since paths with space are more likely in Windows. Give it another try with the whole
18359     # argument.
18360     path="$complete"
18361     arguments="EOL"
18362     new_path=`$CYGPATH -u "$path"`
18363     new_path=`$WHICH "$new_path" 2> /dev/null`
18364     # bat and cmd files are not always considered executable in cygwin causing which
18365     # to not find them
18366     if test "x$new_path" = x \
18367         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18368         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18369       new_path=`$CYGPATH -u "$path"`
18370     fi
18371     if test "x$new_path" = x; then
18372       # It's still not found. Now this is an unrecoverable error.
18373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18374 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18375       has_space=`$ECHO "$complete" | $GREP " "`
18376       if test "x$has_space" != x; then
18377         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18378 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18379       fi
18380       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18381     fi
18382   fi
18383 
18384   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18385   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18386   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18387   # "foo.exe" is OK but "foo" is an error.
18388   #
18389   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18390   # It is also a way to make sure we got the proper file name for the real test later on.
18391   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18392   if test "x$test_shortpath" = x; then
18393     # Short path failed, file does not exist as specified.
18394     # Try adding .exe or .cmd
18395     if test -f "${new_path}.exe"; then
18396       input_to_shortpath="${new_path}.exe"
18397     elif test -f "${new_path}.cmd"; then
18398       input_to_shortpath="${new_path}.cmd"
18399     else
18400       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18401 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18402       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18403 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18404       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18405     fi
18406   else
18407     input_to_shortpath="$new_path"
18408   fi
18409 
18410   # Call helper function which possibly converts this using DOS-style short mode.
18411   # If so, the updated path is stored in $new_path.
18412   new_path="$input_to_shortpath"
18413 
18414   input_path="$input_to_shortpath"
18415   # Check if we need to convert this using DOS-style short mode. If the path
18416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18417   # take no chances and rewrite it.
18418   # Note: m4 eats our [], so we need to use [ and ] instead.
18419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18420   if test "x$has_forbidden_chars" != x; then
18421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18422     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18423     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18424     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18425       # Going to short mode and back again did indeed matter. Since short mode is
18426       # case insensitive, let's make it lowercase to improve readability.
18427       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18428       # Now convert it back to Unix-style (cygpath)
18429       input_path=`$CYGPATH -u "$shortmode_path"`
18430       new_path="$input_path"
18431     fi
18432   fi
18433 
18434   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18435   if test "x$test_cygdrive_prefix" = x; then
18436     # As a simple fix, exclude /usr/bin since it's not a real path.
18437     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18438       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18439       # a path prefixed by /cygdrive for fixpath to work.
18440       new_path="$CYGWIN_ROOT_PATH$input_path"
18441     fi
18442   fi
18443 
18444   # remove trailing .exe if any
18445   new_path="${new_path/%.exe/}"
18446 
18447     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18448 
18449   # First separate the path from the arguments. This will split at the first
18450   # space.
18451   complete="$FOUND_MAKE"
18452   path="${complete%% *}"
18453   tmp="$complete EOL"
18454   arguments="${tmp#* }"
18455 
18456   # Input might be given as Windows format, start by converting to
18457   # unix format.
18458   new_path="$path"
18459 
18460   windows_path="$new_path"
18461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18462     unix_path=`$CYGPATH -u "$windows_path"`
18463     new_path="$unix_path"
18464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18466     new_path="$unix_path"
18467   fi
18468 
18469 
18470   # Now try to locate executable using which
18471   new_path=`$WHICH "$new_path" 2> /dev/null`
18472 
18473   if test "x$new_path" = x; then
18474     # Oops. Which didn't find the executable.
18475     # The splitting of arguments from the executable at a space might have been incorrect,
18476     # since paths with space are more likely in Windows. Give it another try with the whole
18477     # argument.
18478     path="$complete"
18479     arguments="EOL"
18480     new_path="$path"
18481 
18482   windows_path="$new_path"
18483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18484     unix_path=`$CYGPATH -u "$windows_path"`
18485     new_path="$unix_path"
18486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18488     new_path="$unix_path"
18489   fi
18490 
18491 
18492     new_path=`$WHICH "$new_path" 2> /dev/null`
18493     # bat and cmd files are not always considered executable in MSYS causing which
18494     # to not find them
18495     if test "x$new_path" = x \
18496         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18497         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18498       new_path="$path"
18499 
18500   windows_path="$new_path"
18501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18502     unix_path=`$CYGPATH -u "$windows_path"`
18503     new_path="$unix_path"
18504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18505     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18506     new_path="$unix_path"
18507   fi
18508 
18509     fi
18510 
18511     if test "x$new_path" = x; then
18512       # It's still not found. Now this is an unrecoverable error.
18513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18514 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18515       has_space=`$ECHO "$complete" | $GREP " "`
18516       if test "x$has_space" != x; then
18517         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18518 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18519       fi
18520       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18521     fi
18522   fi
18523 
18524   # Now new_path has a complete unix path to the binary
18525   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18526     # Keep paths in /bin as-is, but remove trailing .exe if any
18527     new_path="${new_path/%.exe/}"
18528     # Do not save /bin paths to all_fixpath_prefixes!
18529   else
18530     # Not in mixed or Windows style, start by that.
18531     new_path=`cmd //c echo $new_path`
18532 
18533   input_path="$new_path"
18534   # Check if we need to convert this using DOS-style short mode. If the path
18535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18536   # take no chances and rewrite it.
18537   # Note: m4 eats our [], so we need to use [ and ] instead.
18538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18539   if test "x$has_forbidden_chars" != x; then
18540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18542   fi
18543 
18544     # Output is in $new_path
18545 
18546   windows_path="$new_path"
18547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18548     unix_path=`$CYGPATH -u "$windows_path"`
18549     new_path="$unix_path"
18550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18552     new_path="$unix_path"
18553   fi
18554 
18555     # remove trailing .exe if any
18556     new_path="${new_path/%.exe/}"
18557 
18558     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18559     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18560   fi
18561 
18562     else
18563       # We're on a unix platform. Hooray! :)
18564       # First separate the path from the arguments. This will split at the first
18565       # space.
18566       complete="$FOUND_MAKE"
18567       path="${complete%% *}"
18568       tmp="$complete EOL"
18569       arguments="${tmp#* }"
18570 
18571       # Cannot rely on the command "which" here since it doesn't always work.
18572       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18573       if test -z "$is_absolute_path"; then
18574         # Path to executable is not absolute. Find it.
18575         IFS_save="$IFS"
18576         IFS=:
18577         for p in $PATH; do
18578           if test -f "$p/$path" && test -x "$p/$path"; then
18579             new_path="$p/$path"
18580             break
18581           fi
18582         done
18583         IFS="$IFS_save"
18584       else
18585         # This is an absolute path, we can use it without further modifications.
18586         new_path="$path"
18587       fi
18588 
18589       if test "x$new_path" = x; then
18590         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18591 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18592         has_space=`$ECHO "$complete" | $GREP " "`
18593         if test "x$has_space" != x; then
18594           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18595 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18596         fi
18597         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18598       fi
18599     fi
18600 
18601     # Now join together the path and the arguments once again
18602     if test "x$arguments" != xEOL; then
18603       new_complete="$new_path ${arguments% *}"
18604     else
18605       new_complete="$new_path"
18606     fi
18607 
18608     if test "x$complete" != "x$new_complete"; then
18609       FOUND_MAKE="$new_complete"
18610       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18611 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18612     fi
18613   fi
18614 
18615         fi
18616       fi
18617     fi
18618   fi
18619 
18620     fi
18621 
18622     if test "x$FOUND_MAKE" = x; then
18623       if test "x$TOOLCHAIN_PATH" != x; then
18624         # We have a toolchain path, check that as well before giving up.
18625         OLD_PATH=$PATH
18626         PATH=$TOOLCHAIN_PATH:$PATH
18627         for ac_prog in gmake
18628 do
18629   # Extract the first word of "$ac_prog", so it can be a program name with args.
18630 set dummy $ac_prog; ac_word=$2
18631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18632 $as_echo_n "checking for $ac_word... " >&6; }
18633 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18634   $as_echo_n "(cached) " >&6
18635 else
18636   case $CHECK_TOOLSDIR_GMAKE in
18637   [\\/]* | ?:[\\/]*)
18638   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18639   ;;
18640   *)
18641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18642 for as_dir in $PATH
18643 do
18644   IFS=$as_save_IFS
18645   test -z "$as_dir" && as_dir=.
18646     for ac_exec_ext in '' $ac_executable_extensions; do
18647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18648     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18650     break 2
18651   fi
18652 done
18653   done
18654 IFS=$as_save_IFS
18655 
18656   ;;
18657 esac
18658 fi
18659 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18660 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18662 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18663 else
18664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18665 $as_echo "no" >&6; }
18666 fi
18667 
18668 
18669   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18670 done
18671 
18672 
18673   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18674   DESCRIPTION="gmake in tools-dir"
18675 
18676   # On Cygwin, we require a newer version of make than on other platforms
18677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18678     MAKE_VERSION_EXPR="-e 4\."
18679     MAKE_REQUIRED_VERSION="4.0"
18680    else
18681     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18682     MAKE_REQUIRED_VERSION="3.81"
18683   fi
18684 
18685   if test "x$MAKE_CANDIDATE" != x; then
18686     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18687 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18688     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18689     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18690     if test "x$IS_GNU_MAKE" = x; then
18691       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18692 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18693     else
18694       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18695       if test "x$IS_MODERN_MAKE" = x; then
18696         { $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
18697 $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;}
18698       else
18699         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18700           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18701             MAKE_EXPECTED_ENV='cygwin'
18702           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18703             MAKE_EXPECTED_ENV='msys'
18704           else
18705             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18706           fi
18707           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18708           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18709         else
18710           # Not relevant for non-Windows
18711           IS_MAKE_CORRECT_ENV=true
18712         fi
18713         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18714           { $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
18715 $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;}
18716         else
18717           FOUND_MAKE=$MAKE_CANDIDATE
18718 
18719   # Only process if variable expands to non-empty
18720 
18721   if test "x$FOUND_MAKE" != x; then
18722     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18723 
18724   # First separate the path from the arguments. This will split at the first
18725   # space.
18726   complete="$FOUND_MAKE"
18727   path="${complete%% *}"
18728   tmp="$complete EOL"
18729   arguments="${tmp#* }"
18730 
18731   # Input might be given as Windows format, start by converting to
18732   # unix format.
18733   new_path=`$CYGPATH -u "$path"`
18734 
18735   # Now try to locate executable using which
18736   new_path=`$WHICH "$new_path" 2> /dev/null`
18737   # bat and cmd files are not always considered executable in cygwin causing which
18738   # to not find them
18739   if test "x$new_path" = x \
18740       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18741       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18742     new_path=`$CYGPATH -u "$path"`
18743   fi
18744   if test "x$new_path" = x; then
18745     # Oops. Which didn't find the executable.
18746     # The splitting of arguments from the executable at a space might have been incorrect,
18747     # since paths with space are more likely in Windows. Give it another try with the whole
18748     # argument.
18749     path="$complete"
18750     arguments="EOL"
18751     new_path=`$CYGPATH -u "$path"`
18752     new_path=`$WHICH "$new_path" 2> /dev/null`
18753     # bat and cmd files are not always considered executable in cygwin causing which
18754     # to not find them
18755     if test "x$new_path" = x \
18756         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18757         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18758       new_path=`$CYGPATH -u "$path"`
18759     fi
18760     if test "x$new_path" = x; then
18761       # It's still not found. Now this is an unrecoverable error.
18762       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18763 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18764       has_space=`$ECHO "$complete" | $GREP " "`
18765       if test "x$has_space" != x; then
18766         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18767 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18768       fi
18769       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18770     fi
18771   fi
18772 
18773   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18774   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18775   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18776   # "foo.exe" is OK but "foo" is an error.
18777   #
18778   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18779   # It is also a way to make sure we got the proper file name for the real test later on.
18780   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18781   if test "x$test_shortpath" = x; then
18782     # Short path failed, file does not exist as specified.
18783     # Try adding .exe or .cmd
18784     if test -f "${new_path}.exe"; then
18785       input_to_shortpath="${new_path}.exe"
18786     elif test -f "${new_path}.cmd"; then
18787       input_to_shortpath="${new_path}.cmd"
18788     else
18789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18790 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18791       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18792 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18793       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18794     fi
18795   else
18796     input_to_shortpath="$new_path"
18797   fi
18798 
18799   # Call helper function which possibly converts this using DOS-style short mode.
18800   # If so, the updated path is stored in $new_path.
18801   new_path="$input_to_shortpath"
18802 
18803   input_path="$input_to_shortpath"
18804   # Check if we need to convert this using DOS-style short mode. If the path
18805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18806   # take no chances and rewrite it.
18807   # Note: m4 eats our [], so we need to use [ and ] instead.
18808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18809   if test "x$has_forbidden_chars" != x; then
18810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18814       # Going to short mode and back again did indeed matter. Since short mode is
18815       # case insensitive, let's make it lowercase to improve readability.
18816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18817       # Now convert it back to Unix-style (cygpath)
18818       input_path=`$CYGPATH -u "$shortmode_path"`
18819       new_path="$input_path"
18820     fi
18821   fi
18822 
18823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18824   if test "x$test_cygdrive_prefix" = x; then
18825     # As a simple fix, exclude /usr/bin since it's not a real path.
18826     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18828       # a path prefixed by /cygdrive for fixpath to work.
18829       new_path="$CYGWIN_ROOT_PATH$input_path"
18830     fi
18831   fi
18832 
18833   # remove trailing .exe if any
18834   new_path="${new_path/%.exe/}"
18835 
18836     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18837 
18838   # First separate the path from the arguments. This will split at the first
18839   # space.
18840   complete="$FOUND_MAKE"
18841   path="${complete%% *}"
18842   tmp="$complete EOL"
18843   arguments="${tmp#* }"
18844 
18845   # Input might be given as Windows format, start by converting to
18846   # unix format.
18847   new_path="$path"
18848 
18849   windows_path="$new_path"
18850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18851     unix_path=`$CYGPATH -u "$windows_path"`
18852     new_path="$unix_path"
18853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18855     new_path="$unix_path"
18856   fi
18857 
18858 
18859   # Now try to locate executable using which
18860   new_path=`$WHICH "$new_path" 2> /dev/null`
18861 
18862   if test "x$new_path" = x; then
18863     # Oops. Which didn't find the executable.
18864     # The splitting of arguments from the executable at a space might have been incorrect,
18865     # since paths with space are more likely in Windows. Give it another try with the whole
18866     # argument.
18867     path="$complete"
18868     arguments="EOL"
18869     new_path="$path"
18870 
18871   windows_path="$new_path"
18872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18873     unix_path=`$CYGPATH -u "$windows_path"`
18874     new_path="$unix_path"
18875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18877     new_path="$unix_path"
18878   fi
18879 
18880 
18881     new_path=`$WHICH "$new_path" 2> /dev/null`
18882     # bat and cmd files are not always considered executable in MSYS causing which
18883     # to not find them
18884     if test "x$new_path" = x \
18885         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18886         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18887       new_path="$path"
18888 
18889   windows_path="$new_path"
18890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18891     unix_path=`$CYGPATH -u "$windows_path"`
18892     new_path="$unix_path"
18893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18895     new_path="$unix_path"
18896   fi
18897 
18898     fi
18899 
18900     if test "x$new_path" = x; then
18901       # It's still not found. Now this is an unrecoverable error.
18902       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18903 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18904       has_space=`$ECHO "$complete" | $GREP " "`
18905       if test "x$has_space" != x; then
18906         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18907 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18908       fi
18909       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18910     fi
18911   fi
18912 
18913   # Now new_path has a complete unix path to the binary
18914   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18915     # Keep paths in /bin as-is, but remove trailing .exe if any
18916     new_path="${new_path/%.exe/}"
18917     # Do not save /bin paths to all_fixpath_prefixes!
18918   else
18919     # Not in mixed or Windows style, start by that.
18920     new_path=`cmd //c echo $new_path`
18921 
18922   input_path="$new_path"
18923   # Check if we need to convert this using DOS-style short mode. If the path
18924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18925   # take no chances and rewrite it.
18926   # Note: m4 eats our [], so we need to use [ and ] instead.
18927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18928   if test "x$has_forbidden_chars" != x; then
18929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18930     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18931   fi
18932 
18933     # Output is in $new_path
18934 
18935   windows_path="$new_path"
18936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937     unix_path=`$CYGPATH -u "$windows_path"`
18938     new_path="$unix_path"
18939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18941     new_path="$unix_path"
18942   fi
18943 
18944     # remove trailing .exe if any
18945     new_path="${new_path/%.exe/}"
18946 
18947     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18948     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18949   fi
18950 
18951     else
18952       # We're on a unix platform. Hooray! :)
18953       # First separate the path from the arguments. This will split at the first
18954       # space.
18955       complete="$FOUND_MAKE"
18956       path="${complete%% *}"
18957       tmp="$complete EOL"
18958       arguments="${tmp#* }"
18959 
18960       # Cannot rely on the command "which" here since it doesn't always work.
18961       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18962       if test -z "$is_absolute_path"; then
18963         # Path to executable is not absolute. Find it.
18964         IFS_save="$IFS"
18965         IFS=:
18966         for p in $PATH; do
18967           if test -f "$p/$path" && test -x "$p/$path"; then
18968             new_path="$p/$path"
18969             break
18970           fi
18971         done
18972         IFS="$IFS_save"
18973       else
18974         # This is an absolute path, we can use it without further modifications.
18975         new_path="$path"
18976       fi
18977 
18978       if test "x$new_path" = x; then
18979         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18980 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18981         has_space=`$ECHO "$complete" | $GREP " "`
18982         if test "x$has_space" != x; then
18983           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18984 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18985         fi
18986         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18987       fi
18988     fi
18989 
18990     # Now join together the path and the arguments once again
18991     if test "x$arguments" != xEOL; then
18992       new_complete="$new_path ${arguments% *}"
18993     else
18994       new_complete="$new_path"
18995     fi
18996 
18997     if test "x$complete" != "x$new_complete"; then
18998       FOUND_MAKE="$new_complete"
18999       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19000 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19001     fi
19002   fi
19003 
19004         fi
19005       fi
19006     fi
19007   fi
19008 
19009         if test "x$FOUND_MAKE" = x; then
19010           for ac_prog in make
19011 do
19012   # Extract the first word of "$ac_prog", so it can be a program name with args.
19013 set dummy $ac_prog; ac_word=$2
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19015 $as_echo_n "checking for $ac_word... " >&6; }
19016 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19017   $as_echo_n "(cached) " >&6
19018 else
19019   case $CHECK_TOOLSDIR_MAKE in
19020   [\\/]* | ?:[\\/]*)
19021   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19022   ;;
19023   *)
19024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025 for as_dir in $PATH
19026 do
19027   IFS=$as_save_IFS
19028   test -z "$as_dir" && as_dir=.
19029     for ac_exec_ext in '' $ac_executable_extensions; do
19030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19031     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033     break 2
19034   fi
19035 done
19036   done
19037 IFS=$as_save_IFS
19038 
19039   ;;
19040 esac
19041 fi
19042 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19043 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19045 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19046 else
19047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19048 $as_echo "no" >&6; }
19049 fi
19050 
19051 
19052   test -n "$CHECK_TOOLSDIR_MAKE" && break
19053 done
19054 
19055 
19056   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19057   DESCRIPTION="make in tools-dir"
19058 
19059   # On Cygwin, we require a newer version of make than on other platforms
19060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19061     MAKE_VERSION_EXPR="-e 4\."
19062     MAKE_REQUIRED_VERSION="4.0"
19063    else
19064     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19065     MAKE_REQUIRED_VERSION="3.81"
19066   fi
19067 
19068   if test "x$MAKE_CANDIDATE" != x; then
19069     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19070 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19071     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19072     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19073     if test "x$IS_GNU_MAKE" = x; then
19074       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19075 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19076     else
19077       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19078       if test "x$IS_MODERN_MAKE" = x; then
19079         { $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
19080 $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;}
19081       else
19082         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19083           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19084             MAKE_EXPECTED_ENV='cygwin'
19085           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19086             MAKE_EXPECTED_ENV='msys'
19087           else
19088             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19089           fi
19090           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19091           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19092         else
19093           # Not relevant for non-Windows
19094           IS_MAKE_CORRECT_ENV=true
19095         fi
19096         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19097           { $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
19098 $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;}
19099         else
19100           FOUND_MAKE=$MAKE_CANDIDATE
19101 
19102   # Only process if variable expands to non-empty
19103 
19104   if test "x$FOUND_MAKE" != x; then
19105     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19106 
19107   # First separate the path from the arguments. This will split at the first
19108   # space.
19109   complete="$FOUND_MAKE"
19110   path="${complete%% *}"
19111   tmp="$complete EOL"
19112   arguments="${tmp#* }"
19113 
19114   # Input might be given as Windows format, start by converting to
19115   # unix format.
19116   new_path=`$CYGPATH -u "$path"`
19117 
19118   # Now try to locate executable using which
19119   new_path=`$WHICH "$new_path" 2> /dev/null`
19120   # bat and cmd files are not always considered executable in cygwin causing which
19121   # to not find them
19122   if test "x$new_path" = x \
19123       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19124       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19125     new_path=`$CYGPATH -u "$path"`
19126   fi
19127   if test "x$new_path" = x; then
19128     # Oops. Which didn't find the executable.
19129     # The splitting of arguments from the executable at a space might have been incorrect,
19130     # since paths with space are more likely in Windows. Give it another try with the whole
19131     # argument.
19132     path="$complete"
19133     arguments="EOL"
19134     new_path=`$CYGPATH -u "$path"`
19135     new_path=`$WHICH "$new_path" 2> /dev/null`
19136     # bat and cmd files are not always considered executable in cygwin causing which
19137     # to not find them
19138     if test "x$new_path" = x \
19139         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19140         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19141       new_path=`$CYGPATH -u "$path"`
19142     fi
19143     if test "x$new_path" = x; then
19144       # It's still not found. Now this is an unrecoverable error.
19145       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19146 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19147       has_space=`$ECHO "$complete" | $GREP " "`
19148       if test "x$has_space" != x; then
19149         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19150 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19151       fi
19152       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19153     fi
19154   fi
19155 
19156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19159   # "foo.exe" is OK but "foo" is an error.
19160   #
19161   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19162   # It is also a way to make sure we got the proper file name for the real test later on.
19163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19164   if test "x$test_shortpath" = x; then
19165     # Short path failed, file does not exist as specified.
19166     # Try adding .exe or .cmd
19167     if test -f "${new_path}.exe"; then
19168       input_to_shortpath="${new_path}.exe"
19169     elif test -f "${new_path}.cmd"; then
19170       input_to_shortpath="${new_path}.cmd"
19171     else
19172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19173 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19174       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19175 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19176       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19177     fi
19178   else
19179     input_to_shortpath="$new_path"
19180   fi
19181 
19182   # Call helper function which possibly converts this using DOS-style short mode.
19183   # If so, the updated path is stored in $new_path.
19184   new_path="$input_to_shortpath"
19185 
19186   input_path="$input_to_shortpath"
19187   # Check if we need to convert this using DOS-style short mode. If the path
19188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19189   # take no chances and rewrite it.
19190   # Note: m4 eats our [], so we need to use [ and ] instead.
19191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19192   if test "x$has_forbidden_chars" != x; then
19193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19197       # Going to short mode and back again did indeed matter. Since short mode is
19198       # case insensitive, let's make it lowercase to improve readability.
19199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19200       # Now convert it back to Unix-style (cygpath)
19201       input_path=`$CYGPATH -u "$shortmode_path"`
19202       new_path="$input_path"
19203     fi
19204   fi
19205 
19206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19207   if test "x$test_cygdrive_prefix" = x; then
19208     # As a simple fix, exclude /usr/bin since it's not a real path.
19209     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19211       # a path prefixed by /cygdrive for fixpath to work.
19212       new_path="$CYGWIN_ROOT_PATH$input_path"
19213     fi
19214   fi
19215 
19216   # remove trailing .exe if any
19217   new_path="${new_path/%.exe/}"
19218 
19219     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19220 
19221   # First separate the path from the arguments. This will split at the first
19222   # space.
19223   complete="$FOUND_MAKE"
19224   path="${complete%% *}"
19225   tmp="$complete EOL"
19226   arguments="${tmp#* }"
19227 
19228   # Input might be given as Windows format, start by converting to
19229   # unix format.
19230   new_path="$path"
19231 
19232   windows_path="$new_path"
19233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19234     unix_path=`$CYGPATH -u "$windows_path"`
19235     new_path="$unix_path"
19236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19238     new_path="$unix_path"
19239   fi
19240 
19241 
19242   # Now try to locate executable using which
19243   new_path=`$WHICH "$new_path" 2> /dev/null`
19244 
19245   if test "x$new_path" = x; then
19246     # Oops. Which didn't find the executable.
19247     # The splitting of arguments from the executable at a space might have been incorrect,
19248     # since paths with space are more likely in Windows. Give it another try with the whole
19249     # argument.
19250     path="$complete"
19251     arguments="EOL"
19252     new_path="$path"
19253 
19254   windows_path="$new_path"
19255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19256     unix_path=`$CYGPATH -u "$windows_path"`
19257     new_path="$unix_path"
19258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19260     new_path="$unix_path"
19261   fi
19262 
19263 
19264     new_path=`$WHICH "$new_path" 2> /dev/null`
19265     # bat and cmd files are not always considered executable in MSYS causing which
19266     # to not find them
19267     if test "x$new_path" = x \
19268         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19269         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19270       new_path="$path"
19271 
19272   windows_path="$new_path"
19273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19274     unix_path=`$CYGPATH -u "$windows_path"`
19275     new_path="$unix_path"
19276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19277     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19278     new_path="$unix_path"
19279   fi
19280 
19281     fi
19282 
19283     if test "x$new_path" = x; then
19284       # It's still not found. Now this is an unrecoverable error.
19285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19286 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19287       has_space=`$ECHO "$complete" | $GREP " "`
19288       if test "x$has_space" != x; then
19289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19291       fi
19292       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19293     fi
19294   fi
19295 
19296   # Now new_path has a complete unix path to the binary
19297   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19298     # Keep paths in /bin as-is, but remove trailing .exe if any
19299     new_path="${new_path/%.exe/}"
19300     # Do not save /bin paths to all_fixpath_prefixes!
19301   else
19302     # Not in mixed or Windows style, start by that.
19303     new_path=`cmd //c echo $new_path`
19304 
19305   input_path="$new_path"
19306   # Check if we need to convert this using DOS-style short mode. If the path
19307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19308   # take no chances and rewrite it.
19309   # Note: m4 eats our [], so we need to use [ and ] instead.
19310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19311   if test "x$has_forbidden_chars" != x; then
19312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19313     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19314   fi
19315 
19316     # Output is in $new_path
19317 
19318   windows_path="$new_path"
19319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19320     unix_path=`$CYGPATH -u "$windows_path"`
19321     new_path="$unix_path"
19322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19324     new_path="$unix_path"
19325   fi
19326 
19327     # remove trailing .exe if any
19328     new_path="${new_path/%.exe/}"
19329 
19330     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19331     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19332   fi
19333 
19334     else
19335       # We're on a unix platform. Hooray! :)
19336       # First separate the path from the arguments. This will split at the first
19337       # space.
19338       complete="$FOUND_MAKE"
19339       path="${complete%% *}"
19340       tmp="$complete EOL"
19341       arguments="${tmp#* }"
19342 
19343       # Cannot rely on the command "which" here since it doesn't always work.
19344       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19345       if test -z "$is_absolute_path"; then
19346         # Path to executable is not absolute. Find it.
19347         IFS_save="$IFS"
19348         IFS=:
19349         for p in $PATH; do
19350           if test -f "$p/$path" && test -x "$p/$path"; then
19351             new_path="$p/$path"
19352             break
19353           fi
19354         done
19355         IFS="$IFS_save"
19356       else
19357         # This is an absolute path, we can use it without further modifications.
19358         new_path="$path"
19359       fi
19360 
19361       if test "x$new_path" = x; then
19362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19363 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19364         has_space=`$ECHO "$complete" | $GREP " "`
19365         if test "x$has_space" != x; then
19366           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19367 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19368         fi
19369         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19370       fi
19371     fi
19372 
19373     # Now join together the path and the arguments once again
19374     if test "x$arguments" != xEOL; then
19375       new_complete="$new_path ${arguments% *}"
19376     else
19377       new_complete="$new_path"
19378     fi
19379 
19380     if test "x$complete" != "x$new_complete"; then
19381       FOUND_MAKE="$new_complete"
19382       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19383 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19384     fi
19385   fi
19386 
19387         fi
19388       fi
19389     fi
19390   fi
19391 
19392         fi
19393         PATH=$OLD_PATH
19394       fi
19395     fi
19396 
19397     if test "x$FOUND_MAKE" = x; then
19398       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
19399     fi
19400 
19401   else
19402     # The variable is set, but is it from the command line or the environment?
19403 
19404     # Try to remove the string !MAKE! from our list.
19405     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19406     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19407       # If it failed, the variable was not from the command line. Ignore it,
19408       # but warn the user (except for BASH, which is always set by the calling BASH).
19409       if test "xMAKE" != xBASH; then
19410         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19411 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19412       fi
19413       # Try to locate tool using the code snippet
19414 
19415     # Try our hardest to locate a correct version of GNU make
19416     for ac_prog in gmake
19417 do
19418   # Extract the first word of "$ac_prog", so it can be a program name with args.
19419 set dummy $ac_prog; ac_word=$2
19420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19421 $as_echo_n "checking for $ac_word... " >&6; }
19422 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19423   $as_echo_n "(cached) " >&6
19424 else
19425   case $CHECK_GMAKE in
19426   [\\/]* | ?:[\\/]*)
19427   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19428   ;;
19429   *)
19430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19431 for as_dir in $PATH
19432 do
19433   IFS=$as_save_IFS
19434   test -z "$as_dir" && as_dir=.
19435     for ac_exec_ext in '' $ac_executable_extensions; do
19436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19437     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19439     break 2
19440   fi
19441 done
19442   done
19443 IFS=$as_save_IFS
19444 
19445   ;;
19446 esac
19447 fi
19448 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19449 if test -n "$CHECK_GMAKE"; then
19450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19451 $as_echo "$CHECK_GMAKE" >&6; }
19452 else
19453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19454 $as_echo "no" >&6; }
19455 fi
19456 
19457 
19458   test -n "$CHECK_GMAKE" && break
19459 done
19460 
19461 
19462   MAKE_CANDIDATE=""$CHECK_GMAKE""
19463   DESCRIPTION="gmake in PATH"
19464 
19465   # On Cygwin, we require a newer version of make than on other platforms
19466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19467     MAKE_VERSION_EXPR="-e 4\."
19468     MAKE_REQUIRED_VERSION="4.0"
19469    else
19470     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19471     MAKE_REQUIRED_VERSION="3.81"
19472   fi
19473 
19474   if test "x$MAKE_CANDIDATE" != x; then
19475     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19476 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19477     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19478     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19479     if test "x$IS_GNU_MAKE" = x; then
19480       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19481 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19482     else
19483       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19484       if test "x$IS_MODERN_MAKE" = x; then
19485         { $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
19486 $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;}
19487       else
19488         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19489           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19490             MAKE_EXPECTED_ENV='cygwin'
19491           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19492             MAKE_EXPECTED_ENV='msys'
19493           else
19494             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19495           fi
19496           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19497           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19498         else
19499           # Not relevant for non-Windows
19500           IS_MAKE_CORRECT_ENV=true
19501         fi
19502         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19503           { $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
19504 $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;}
19505         else
19506           FOUND_MAKE=$MAKE_CANDIDATE
19507 
19508   # Only process if variable expands to non-empty
19509 
19510   if test "x$FOUND_MAKE" != x; then
19511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19512 
19513   # First separate the path from the arguments. This will split at the first
19514   # space.
19515   complete="$FOUND_MAKE"
19516   path="${complete%% *}"
19517   tmp="$complete EOL"
19518   arguments="${tmp#* }"
19519 
19520   # Input might be given as Windows format, start by converting to
19521   # unix format.
19522   new_path=`$CYGPATH -u "$path"`
19523 
19524   # Now try to locate executable using which
19525   new_path=`$WHICH "$new_path" 2> /dev/null`
19526   # bat and cmd files are not always considered executable in cygwin causing which
19527   # to not find them
19528   if test "x$new_path" = x \
19529       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19530       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19531     new_path=`$CYGPATH -u "$path"`
19532   fi
19533   if test "x$new_path" = x; then
19534     # Oops. Which didn't find the executable.
19535     # The splitting of arguments from the executable at a space might have been incorrect,
19536     # since paths with space are more likely in Windows. Give it another try with the whole
19537     # argument.
19538     path="$complete"
19539     arguments="EOL"
19540     new_path=`$CYGPATH -u "$path"`
19541     new_path=`$WHICH "$new_path" 2> /dev/null`
19542     # bat and cmd files are not always considered executable in cygwin causing which
19543     # to not find them
19544     if test "x$new_path" = x \
19545         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19546         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19547       new_path=`$CYGPATH -u "$path"`
19548     fi
19549     if test "x$new_path" = x; then
19550       # It's still not found. Now this is an unrecoverable error.
19551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19552 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19553       has_space=`$ECHO "$complete" | $GREP " "`
19554       if test "x$has_space" != x; then
19555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19557       fi
19558       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19559     fi
19560   fi
19561 
19562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19565   # "foo.exe" is OK but "foo" is an error.
19566   #
19567   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19568   # It is also a way to make sure we got the proper file name for the real test later on.
19569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19570   if test "x$test_shortpath" = x; then
19571     # Short path failed, file does not exist as specified.
19572     # Try adding .exe or .cmd
19573     if test -f "${new_path}.exe"; then
19574       input_to_shortpath="${new_path}.exe"
19575     elif test -f "${new_path}.cmd"; then
19576       input_to_shortpath="${new_path}.cmd"
19577     else
19578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19579 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19580       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19581 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19582       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19583     fi
19584   else
19585     input_to_shortpath="$new_path"
19586   fi
19587 
19588   # Call helper function which possibly converts this using DOS-style short mode.
19589   # If so, the updated path is stored in $new_path.
19590   new_path="$input_to_shortpath"
19591 
19592   input_path="$input_to_shortpath"
19593   # Check if we need to convert this using DOS-style short mode. If the path
19594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19595   # take no chances and rewrite it.
19596   # Note: m4 eats our [], so we need to use [ and ] instead.
19597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19598   if test "x$has_forbidden_chars" != x; then
19599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19603       # Going to short mode and back again did indeed matter. Since short mode is
19604       # case insensitive, let's make it lowercase to improve readability.
19605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19606       # Now convert it back to Unix-style (cygpath)
19607       input_path=`$CYGPATH -u "$shortmode_path"`
19608       new_path="$input_path"
19609     fi
19610   fi
19611 
19612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19613   if test "x$test_cygdrive_prefix" = x; then
19614     # As a simple fix, exclude /usr/bin since it's not a real path.
19615     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19617       # a path prefixed by /cygdrive for fixpath to work.
19618       new_path="$CYGWIN_ROOT_PATH$input_path"
19619     fi
19620   fi
19621 
19622   # remove trailing .exe if any
19623   new_path="${new_path/%.exe/}"
19624 
19625     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19626 
19627   # First separate the path from the arguments. This will split at the first
19628   # space.
19629   complete="$FOUND_MAKE"
19630   path="${complete%% *}"
19631   tmp="$complete EOL"
19632   arguments="${tmp#* }"
19633 
19634   # Input might be given as Windows format, start by converting to
19635   # unix format.
19636   new_path="$path"
19637 
19638   windows_path="$new_path"
19639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19640     unix_path=`$CYGPATH -u "$windows_path"`
19641     new_path="$unix_path"
19642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19644     new_path="$unix_path"
19645   fi
19646 
19647 
19648   # Now try to locate executable using which
19649   new_path=`$WHICH "$new_path" 2> /dev/null`
19650 
19651   if test "x$new_path" = x; then
19652     # Oops. Which didn't find the executable.
19653     # The splitting of arguments from the executable at a space might have been incorrect,
19654     # since paths with space are more likely in Windows. Give it another try with the whole
19655     # argument.
19656     path="$complete"
19657     arguments="EOL"
19658     new_path="$path"
19659 
19660   windows_path="$new_path"
19661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19662     unix_path=`$CYGPATH -u "$windows_path"`
19663     new_path="$unix_path"
19664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19666     new_path="$unix_path"
19667   fi
19668 
19669 
19670     new_path=`$WHICH "$new_path" 2> /dev/null`
19671     # bat and cmd files are not always considered executable in MSYS causing which
19672     # to not find them
19673     if test "x$new_path" = x \
19674         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19675         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19676       new_path="$path"
19677 
19678   windows_path="$new_path"
19679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19680     unix_path=`$CYGPATH -u "$windows_path"`
19681     new_path="$unix_path"
19682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19684     new_path="$unix_path"
19685   fi
19686 
19687     fi
19688 
19689     if test "x$new_path" = x; then
19690       # It's still not found. Now this is an unrecoverable error.
19691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19692 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19693       has_space=`$ECHO "$complete" | $GREP " "`
19694       if test "x$has_space" != x; then
19695         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19696 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19697       fi
19698       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19699     fi
19700   fi
19701 
19702   # Now new_path has a complete unix path to the binary
19703   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19704     # Keep paths in /bin as-is, but remove trailing .exe if any
19705     new_path="${new_path/%.exe/}"
19706     # Do not save /bin paths to all_fixpath_prefixes!
19707   else
19708     # Not in mixed or Windows style, start by that.
19709     new_path=`cmd //c echo $new_path`
19710 
19711   input_path="$new_path"
19712   # Check if we need to convert this using DOS-style short mode. If the path
19713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19714   # take no chances and rewrite it.
19715   # Note: m4 eats our [], so we need to use [ and ] instead.
19716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19717   if test "x$has_forbidden_chars" != x; then
19718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19720   fi
19721 
19722     # Output is in $new_path
19723 
19724   windows_path="$new_path"
19725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19726     unix_path=`$CYGPATH -u "$windows_path"`
19727     new_path="$unix_path"
19728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19730     new_path="$unix_path"
19731   fi
19732 
19733     # remove trailing .exe if any
19734     new_path="${new_path/%.exe/}"
19735 
19736     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19737     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19738   fi
19739 
19740     else
19741       # We're on a unix platform. Hooray! :)
19742       # First separate the path from the arguments. This will split at the first
19743       # space.
19744       complete="$FOUND_MAKE"
19745       path="${complete%% *}"
19746       tmp="$complete EOL"
19747       arguments="${tmp#* }"
19748 
19749       # Cannot rely on the command "which" here since it doesn't always work.
19750       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19751       if test -z "$is_absolute_path"; then
19752         # Path to executable is not absolute. Find it.
19753         IFS_save="$IFS"
19754         IFS=:
19755         for p in $PATH; do
19756           if test -f "$p/$path" && test -x "$p/$path"; then
19757             new_path="$p/$path"
19758             break
19759           fi
19760         done
19761         IFS="$IFS_save"
19762       else
19763         # This is an absolute path, we can use it without further modifications.
19764         new_path="$path"
19765       fi
19766 
19767       if test "x$new_path" = x; then
19768         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19769 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19770         has_space=`$ECHO "$complete" | $GREP " "`
19771         if test "x$has_space" != x; then
19772           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19773 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19774         fi
19775         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19776       fi
19777     fi
19778 
19779     # Now join together the path and the arguments once again
19780     if test "x$arguments" != xEOL; then
19781       new_complete="$new_path ${arguments% *}"
19782     else
19783       new_complete="$new_path"
19784     fi
19785 
19786     if test "x$complete" != "x$new_complete"; then
19787       FOUND_MAKE="$new_complete"
19788       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19789 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19790     fi
19791   fi
19792 
19793         fi
19794       fi
19795     fi
19796   fi
19797 
19798 
19799     if test "x$FOUND_MAKE" = x; then
19800       for ac_prog in make
19801 do
19802   # Extract the first word of "$ac_prog", so it can be a program name with args.
19803 set dummy $ac_prog; ac_word=$2
19804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19805 $as_echo_n "checking for $ac_word... " >&6; }
19806 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19807   $as_echo_n "(cached) " >&6
19808 else
19809   case $CHECK_MAKE in
19810   [\\/]* | ?:[\\/]*)
19811   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19812   ;;
19813   *)
19814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19815 for as_dir in $PATH
19816 do
19817   IFS=$as_save_IFS
19818   test -z "$as_dir" && as_dir=.
19819     for ac_exec_ext in '' $ac_executable_extensions; do
19820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19821     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19823     break 2
19824   fi
19825 done
19826   done
19827 IFS=$as_save_IFS
19828 
19829   ;;
19830 esac
19831 fi
19832 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19833 if test -n "$CHECK_MAKE"; then
19834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19835 $as_echo "$CHECK_MAKE" >&6; }
19836 else
19837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19838 $as_echo "no" >&6; }
19839 fi
19840 
19841 
19842   test -n "$CHECK_MAKE" && break
19843 done
19844 
19845 
19846   MAKE_CANDIDATE=""$CHECK_MAKE""
19847   DESCRIPTION="make in PATH"
19848 
19849   # On Cygwin, we require a newer version of make than on other platforms
19850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19851     MAKE_VERSION_EXPR="-e 4\."
19852     MAKE_REQUIRED_VERSION="4.0"
19853    else
19854     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19855     MAKE_REQUIRED_VERSION="3.81"
19856   fi
19857 
19858   if test "x$MAKE_CANDIDATE" != x; then
19859     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19860 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19861     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19862     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19863     if test "x$IS_GNU_MAKE" = x; then
19864       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19865 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19866     else
19867       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19868       if test "x$IS_MODERN_MAKE" = x; then
19869         { $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
19870 $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;}
19871       else
19872         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19873           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19874             MAKE_EXPECTED_ENV='cygwin'
19875           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19876             MAKE_EXPECTED_ENV='msys'
19877           else
19878             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19879           fi
19880           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19881           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19882         else
19883           # Not relevant for non-Windows
19884           IS_MAKE_CORRECT_ENV=true
19885         fi
19886         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19887           { $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
19888 $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;}
19889         else
19890           FOUND_MAKE=$MAKE_CANDIDATE
19891 
19892   # Only process if variable expands to non-empty
19893 
19894   if test "x$FOUND_MAKE" != x; then
19895     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19896 
19897   # First separate the path from the arguments. This will split at the first
19898   # space.
19899   complete="$FOUND_MAKE"
19900   path="${complete%% *}"
19901   tmp="$complete EOL"
19902   arguments="${tmp#* }"
19903 
19904   # Input might be given as Windows format, start by converting to
19905   # unix format.
19906   new_path=`$CYGPATH -u "$path"`
19907 
19908   # Now try to locate executable using which
19909   new_path=`$WHICH "$new_path" 2> /dev/null`
19910   # bat and cmd files are not always considered executable in cygwin causing which
19911   # to not find them
19912   if test "x$new_path" = x \
19913       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19914       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19915     new_path=`$CYGPATH -u "$path"`
19916   fi
19917   if test "x$new_path" = x; then
19918     # Oops. Which didn't find the executable.
19919     # The splitting of arguments from the executable at a space might have been incorrect,
19920     # since paths with space are more likely in Windows. Give it another try with the whole
19921     # argument.
19922     path="$complete"
19923     arguments="EOL"
19924     new_path=`$CYGPATH -u "$path"`
19925     new_path=`$WHICH "$new_path" 2> /dev/null`
19926     # bat and cmd files are not always considered executable in cygwin causing which
19927     # to not find them
19928     if test "x$new_path" = x \
19929         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19930         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19931       new_path=`$CYGPATH -u "$path"`
19932     fi
19933     if test "x$new_path" = x; then
19934       # It's still not found. Now this is an unrecoverable error.
19935       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19936 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19937       has_space=`$ECHO "$complete" | $GREP " "`
19938       if test "x$has_space" != x; then
19939         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19940 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19941       fi
19942       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19943     fi
19944   fi
19945 
19946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19949   # "foo.exe" is OK but "foo" is an error.
19950   #
19951   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19952   # It is also a way to make sure we got the proper file name for the real test later on.
19953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19954   if test "x$test_shortpath" = x; then
19955     # Short path failed, file does not exist as specified.
19956     # Try adding .exe or .cmd
19957     if test -f "${new_path}.exe"; then
19958       input_to_shortpath="${new_path}.exe"
19959     elif test -f "${new_path}.cmd"; then
19960       input_to_shortpath="${new_path}.cmd"
19961     else
19962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19963 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19964       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19965 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19966       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19967     fi
19968   else
19969     input_to_shortpath="$new_path"
19970   fi
19971 
19972   # Call helper function which possibly converts this using DOS-style short mode.
19973   # If so, the updated path is stored in $new_path.
19974   new_path="$input_to_shortpath"
19975 
19976   input_path="$input_to_shortpath"
19977   # Check if we need to convert this using DOS-style short mode. If the path
19978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19979   # take no chances and rewrite it.
19980   # Note: m4 eats our [], so we need to use [ and ] instead.
19981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19982   if test "x$has_forbidden_chars" != x; then
19983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19984     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19985     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19986     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19987       # Going to short mode and back again did indeed matter. Since short mode is
19988       # case insensitive, let's make it lowercase to improve readability.
19989       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19990       # Now convert it back to Unix-style (cygpath)
19991       input_path=`$CYGPATH -u "$shortmode_path"`
19992       new_path="$input_path"
19993     fi
19994   fi
19995 
19996   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19997   if test "x$test_cygdrive_prefix" = x; then
19998     # As a simple fix, exclude /usr/bin since it's not a real path.
19999     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20000       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20001       # a path prefixed by /cygdrive for fixpath to work.
20002       new_path="$CYGWIN_ROOT_PATH$input_path"
20003     fi
20004   fi
20005 
20006   # remove trailing .exe if any
20007   new_path="${new_path/%.exe/}"
20008 
20009     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20010 
20011   # First separate the path from the arguments. This will split at the first
20012   # space.
20013   complete="$FOUND_MAKE"
20014   path="${complete%% *}"
20015   tmp="$complete EOL"
20016   arguments="${tmp#* }"
20017 
20018   # Input might be given as Windows format, start by converting to
20019   # unix format.
20020   new_path="$path"
20021 
20022   windows_path="$new_path"
20023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20024     unix_path=`$CYGPATH -u "$windows_path"`
20025     new_path="$unix_path"
20026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20028     new_path="$unix_path"
20029   fi
20030 
20031 
20032   # Now try to locate executable using which
20033   new_path=`$WHICH "$new_path" 2> /dev/null`
20034 
20035   if test "x$new_path" = x; then
20036     # Oops. Which didn't find the executable.
20037     # The splitting of arguments from the executable at a space might have been incorrect,
20038     # since paths with space are more likely in Windows. Give it another try with the whole
20039     # argument.
20040     path="$complete"
20041     arguments="EOL"
20042     new_path="$path"
20043 
20044   windows_path="$new_path"
20045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20046     unix_path=`$CYGPATH -u "$windows_path"`
20047     new_path="$unix_path"
20048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20050     new_path="$unix_path"
20051   fi
20052 
20053 
20054     new_path=`$WHICH "$new_path" 2> /dev/null`
20055     # bat and cmd files are not always considered executable in MSYS causing which
20056     # to not find them
20057     if test "x$new_path" = x \
20058         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20059         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20060       new_path="$path"
20061 
20062   windows_path="$new_path"
20063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20064     unix_path=`$CYGPATH -u "$windows_path"`
20065     new_path="$unix_path"
20066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20068     new_path="$unix_path"
20069   fi
20070 
20071     fi
20072 
20073     if test "x$new_path" = x; then
20074       # It's still not found. Now this is an unrecoverable error.
20075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20076 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20077       has_space=`$ECHO "$complete" | $GREP " "`
20078       if test "x$has_space" != x; then
20079         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20080 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20081       fi
20082       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20083     fi
20084   fi
20085 
20086   # Now new_path has a complete unix path to the binary
20087   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20088     # Keep paths in /bin as-is, but remove trailing .exe if any
20089     new_path="${new_path/%.exe/}"
20090     # Do not save /bin paths to all_fixpath_prefixes!
20091   else
20092     # Not in mixed or Windows style, start by that.
20093     new_path=`cmd //c echo $new_path`
20094 
20095   input_path="$new_path"
20096   # Check if we need to convert this using DOS-style short mode. If the path
20097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20098   # take no chances and rewrite it.
20099   # Note: m4 eats our [], so we need to use [ and ] instead.
20100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20101   if test "x$has_forbidden_chars" != x; then
20102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20103     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20104   fi
20105 
20106     # Output is in $new_path
20107 
20108   windows_path="$new_path"
20109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20110     unix_path=`$CYGPATH -u "$windows_path"`
20111     new_path="$unix_path"
20112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20114     new_path="$unix_path"
20115   fi
20116 
20117     # remove trailing .exe if any
20118     new_path="${new_path/%.exe/}"
20119 
20120     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20121     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20122   fi
20123 
20124     else
20125       # We're on a unix platform. Hooray! :)
20126       # First separate the path from the arguments. This will split at the first
20127       # space.
20128       complete="$FOUND_MAKE"
20129       path="${complete%% *}"
20130       tmp="$complete EOL"
20131       arguments="${tmp#* }"
20132 
20133       # Cannot rely on the command "which" here since it doesn't always work.
20134       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20135       if test -z "$is_absolute_path"; then
20136         # Path to executable is not absolute. Find it.
20137         IFS_save="$IFS"
20138         IFS=:
20139         for p in $PATH; do
20140           if test -f "$p/$path" && test -x "$p/$path"; then
20141             new_path="$p/$path"
20142             break
20143           fi
20144         done
20145         IFS="$IFS_save"
20146       else
20147         # This is an absolute path, we can use it without further modifications.
20148         new_path="$path"
20149       fi
20150 
20151       if test "x$new_path" = x; then
20152         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20153 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20154         has_space=`$ECHO "$complete" | $GREP " "`
20155         if test "x$has_space" != x; then
20156           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20157 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20158         fi
20159         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20160       fi
20161     fi
20162 
20163     # Now join together the path and the arguments once again
20164     if test "x$arguments" != xEOL; then
20165       new_complete="$new_path ${arguments% *}"
20166     else
20167       new_complete="$new_path"
20168     fi
20169 
20170     if test "x$complete" != "x$new_complete"; then
20171       FOUND_MAKE="$new_complete"
20172       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20173 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20174     fi
20175   fi
20176 
20177         fi
20178       fi
20179     fi
20180   fi
20181 
20182     fi
20183 
20184     if test "x$FOUND_MAKE" = x; then
20185       if test "x$TOOLCHAIN_PATH" != x; then
20186         # We have a toolchain path, check that as well before giving up.
20187         OLD_PATH=$PATH
20188         PATH=$TOOLCHAIN_PATH:$PATH
20189         for ac_prog in gmake
20190 do
20191   # Extract the first word of "$ac_prog", so it can be a program name with args.
20192 set dummy $ac_prog; ac_word=$2
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20194 $as_echo_n "checking for $ac_word... " >&6; }
20195 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20196   $as_echo_n "(cached) " >&6
20197 else
20198   case $CHECK_TOOLSDIR_GMAKE in
20199   [\\/]* | ?:[\\/]*)
20200   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20201   ;;
20202   *)
20203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20204 for as_dir in $PATH
20205 do
20206   IFS=$as_save_IFS
20207   test -z "$as_dir" && as_dir=.
20208     for ac_exec_ext in '' $ac_executable_extensions; do
20209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20210     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20212     break 2
20213   fi
20214 done
20215   done
20216 IFS=$as_save_IFS
20217 
20218   ;;
20219 esac
20220 fi
20221 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20222 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20224 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20225 else
20226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20227 $as_echo "no" >&6; }
20228 fi
20229 
20230 
20231   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20232 done
20233 
20234 
20235   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20236   DESCRIPTION="gmake in tools-dir"
20237 
20238   # On Cygwin, we require a newer version of make than on other platforms
20239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20240     MAKE_VERSION_EXPR="-e 4\."
20241     MAKE_REQUIRED_VERSION="4.0"
20242    else
20243     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20244     MAKE_REQUIRED_VERSION="3.81"
20245   fi
20246 
20247   if test "x$MAKE_CANDIDATE" != x; then
20248     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20249 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20250     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20251     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20252     if test "x$IS_GNU_MAKE" = x; then
20253       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20254 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20255     else
20256       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20257       if test "x$IS_MODERN_MAKE" = x; then
20258         { $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
20259 $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;}
20260       else
20261         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20262           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20263             MAKE_EXPECTED_ENV='cygwin'
20264           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20265             MAKE_EXPECTED_ENV='msys'
20266           else
20267             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20268           fi
20269           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20270           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20271         else
20272           # Not relevant for non-Windows
20273           IS_MAKE_CORRECT_ENV=true
20274         fi
20275         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20276           { $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
20277 $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;}
20278         else
20279           FOUND_MAKE=$MAKE_CANDIDATE
20280 
20281   # Only process if variable expands to non-empty
20282 
20283   if test "x$FOUND_MAKE" != x; then
20284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20285 
20286   # First separate the path from the arguments. This will split at the first
20287   # space.
20288   complete="$FOUND_MAKE"
20289   path="${complete%% *}"
20290   tmp="$complete EOL"
20291   arguments="${tmp#* }"
20292 
20293   # Input might be given as Windows format, start by converting to
20294   # unix format.
20295   new_path=`$CYGPATH -u "$path"`
20296 
20297   # Now try to locate executable using which
20298   new_path=`$WHICH "$new_path" 2> /dev/null`
20299   # bat and cmd files are not always considered executable in cygwin causing which
20300   # to not find them
20301   if test "x$new_path" = x \
20302       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20303       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20304     new_path=`$CYGPATH -u "$path"`
20305   fi
20306   if test "x$new_path" = x; then
20307     # Oops. Which didn't find the executable.
20308     # The splitting of arguments from the executable at a space might have been incorrect,
20309     # since paths with space are more likely in Windows. Give it another try with the whole
20310     # argument.
20311     path="$complete"
20312     arguments="EOL"
20313     new_path=`$CYGPATH -u "$path"`
20314     new_path=`$WHICH "$new_path" 2> /dev/null`
20315     # bat and cmd files are not always considered executable in cygwin causing which
20316     # to not find them
20317     if test "x$new_path" = x \
20318         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20319         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20320       new_path=`$CYGPATH -u "$path"`
20321     fi
20322     if test "x$new_path" = x; then
20323       # It's still not found. Now this is an unrecoverable error.
20324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20325 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20326       has_space=`$ECHO "$complete" | $GREP " "`
20327       if test "x$has_space" != x; then
20328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20330       fi
20331       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20332     fi
20333   fi
20334 
20335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20338   # "foo.exe" is OK but "foo" is an error.
20339   #
20340   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20341   # It is also a way to make sure we got the proper file name for the real test later on.
20342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20343   if test "x$test_shortpath" = x; then
20344     # Short path failed, file does not exist as specified.
20345     # Try adding .exe or .cmd
20346     if test -f "${new_path}.exe"; then
20347       input_to_shortpath="${new_path}.exe"
20348     elif test -f "${new_path}.cmd"; then
20349       input_to_shortpath="${new_path}.cmd"
20350     else
20351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20352 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20353       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20354 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20355       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20356     fi
20357   else
20358     input_to_shortpath="$new_path"
20359   fi
20360 
20361   # Call helper function which possibly converts this using DOS-style short mode.
20362   # If so, the updated path is stored in $new_path.
20363   new_path="$input_to_shortpath"
20364 
20365   input_path="$input_to_shortpath"
20366   # Check if we need to convert this using DOS-style short mode. If the path
20367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20368   # take no chances and rewrite it.
20369   # Note: m4 eats our [], so we need to use [ and ] instead.
20370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20371   if test "x$has_forbidden_chars" != x; then
20372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20376       # Going to short mode and back again did indeed matter. Since short mode is
20377       # case insensitive, let's make it lowercase to improve readability.
20378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20379       # Now convert it back to Unix-style (cygpath)
20380       input_path=`$CYGPATH -u "$shortmode_path"`
20381       new_path="$input_path"
20382     fi
20383   fi
20384 
20385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20386   if test "x$test_cygdrive_prefix" = x; then
20387     # As a simple fix, exclude /usr/bin since it's not a real path.
20388     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20390       # a path prefixed by /cygdrive for fixpath to work.
20391       new_path="$CYGWIN_ROOT_PATH$input_path"
20392     fi
20393   fi
20394 
20395   # remove trailing .exe if any
20396   new_path="${new_path/%.exe/}"
20397 
20398     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399 
20400   # First separate the path from the arguments. This will split at the first
20401   # space.
20402   complete="$FOUND_MAKE"
20403   path="${complete%% *}"
20404   tmp="$complete EOL"
20405   arguments="${tmp#* }"
20406 
20407   # Input might be given as Windows format, start by converting to
20408   # unix format.
20409   new_path="$path"
20410 
20411   windows_path="$new_path"
20412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20413     unix_path=`$CYGPATH -u "$windows_path"`
20414     new_path="$unix_path"
20415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20417     new_path="$unix_path"
20418   fi
20419 
20420 
20421   # Now try to locate executable using which
20422   new_path=`$WHICH "$new_path" 2> /dev/null`
20423 
20424   if test "x$new_path" = x; then
20425     # Oops. Which didn't find the executable.
20426     # The splitting of arguments from the executable at a space might have been incorrect,
20427     # since paths with space are more likely in Windows. Give it another try with the whole
20428     # argument.
20429     path="$complete"
20430     arguments="EOL"
20431     new_path="$path"
20432 
20433   windows_path="$new_path"
20434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20435     unix_path=`$CYGPATH -u "$windows_path"`
20436     new_path="$unix_path"
20437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20439     new_path="$unix_path"
20440   fi
20441 
20442 
20443     new_path=`$WHICH "$new_path" 2> /dev/null`
20444     # bat and cmd files are not always considered executable in MSYS causing which
20445     # to not find them
20446     if test "x$new_path" = x \
20447         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20448         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20449       new_path="$path"
20450 
20451   windows_path="$new_path"
20452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20453     unix_path=`$CYGPATH -u "$windows_path"`
20454     new_path="$unix_path"
20455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20457     new_path="$unix_path"
20458   fi
20459 
20460     fi
20461 
20462     if test "x$new_path" = x; then
20463       # It's still not found. Now this is an unrecoverable error.
20464       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20465 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20466       has_space=`$ECHO "$complete" | $GREP " "`
20467       if test "x$has_space" != x; then
20468         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20469 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20470       fi
20471       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20472     fi
20473   fi
20474 
20475   # Now new_path has a complete unix path to the binary
20476   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20477     # Keep paths in /bin as-is, but remove trailing .exe if any
20478     new_path="${new_path/%.exe/}"
20479     # Do not save /bin paths to all_fixpath_prefixes!
20480   else
20481     # Not in mixed or Windows style, start by that.
20482     new_path=`cmd //c echo $new_path`
20483 
20484   input_path="$new_path"
20485   # Check if we need to convert this using DOS-style short mode. If the path
20486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20487   # take no chances and rewrite it.
20488   # Note: m4 eats our [], so we need to use [ and ] instead.
20489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20490   if test "x$has_forbidden_chars" != x; then
20491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20493   fi
20494 
20495     # Output is in $new_path
20496 
20497   windows_path="$new_path"
20498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20499     unix_path=`$CYGPATH -u "$windows_path"`
20500     new_path="$unix_path"
20501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20503     new_path="$unix_path"
20504   fi
20505 
20506     # remove trailing .exe if any
20507     new_path="${new_path/%.exe/}"
20508 
20509     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20510     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20511   fi
20512 
20513     else
20514       # We're on a unix platform. Hooray! :)
20515       # First separate the path from the arguments. This will split at the first
20516       # space.
20517       complete="$FOUND_MAKE"
20518       path="${complete%% *}"
20519       tmp="$complete EOL"
20520       arguments="${tmp#* }"
20521 
20522       # Cannot rely on the command "which" here since it doesn't always work.
20523       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20524       if test -z "$is_absolute_path"; then
20525         # Path to executable is not absolute. Find it.
20526         IFS_save="$IFS"
20527         IFS=:
20528         for p in $PATH; do
20529           if test -f "$p/$path" && test -x "$p/$path"; then
20530             new_path="$p/$path"
20531             break
20532           fi
20533         done
20534         IFS="$IFS_save"
20535       else
20536         # This is an absolute path, we can use it without further modifications.
20537         new_path="$path"
20538       fi
20539 
20540       if test "x$new_path" = x; then
20541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20542 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20543         has_space=`$ECHO "$complete" | $GREP " "`
20544         if test "x$has_space" != x; then
20545           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20546 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20547         fi
20548         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20549       fi
20550     fi
20551 
20552     # Now join together the path and the arguments once again
20553     if test "x$arguments" != xEOL; then
20554       new_complete="$new_path ${arguments% *}"
20555     else
20556       new_complete="$new_path"
20557     fi
20558 
20559     if test "x$complete" != "x$new_complete"; then
20560       FOUND_MAKE="$new_complete"
20561       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20562 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20563     fi
20564   fi
20565 
20566         fi
20567       fi
20568     fi
20569   fi
20570 
20571         if test "x$FOUND_MAKE" = x; then
20572           for ac_prog in make
20573 do
20574   # Extract the first word of "$ac_prog", so it can be a program name with args.
20575 set dummy $ac_prog; ac_word=$2
20576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20577 $as_echo_n "checking for $ac_word... " >&6; }
20578 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20579   $as_echo_n "(cached) " >&6
20580 else
20581   case $CHECK_TOOLSDIR_MAKE in
20582   [\\/]* | ?:[\\/]*)
20583   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20584   ;;
20585   *)
20586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20587 for as_dir in $PATH
20588 do
20589   IFS=$as_save_IFS
20590   test -z "$as_dir" && as_dir=.
20591     for ac_exec_ext in '' $ac_executable_extensions; do
20592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20593     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20595     break 2
20596   fi
20597 done
20598   done
20599 IFS=$as_save_IFS
20600 
20601   ;;
20602 esac
20603 fi
20604 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20605 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20607 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20608 else
20609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20610 $as_echo "no" >&6; }
20611 fi
20612 
20613 
20614   test -n "$CHECK_TOOLSDIR_MAKE" && break
20615 done
20616 
20617 
20618   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20619   DESCRIPTION="make in tools-dir"
20620 
20621   # On Cygwin, we require a newer version of make than on other platforms
20622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20623     MAKE_VERSION_EXPR="-e 4\."
20624     MAKE_REQUIRED_VERSION="4.0"
20625    else
20626     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20627     MAKE_REQUIRED_VERSION="3.81"
20628   fi
20629 
20630   if test "x$MAKE_CANDIDATE" != x; then
20631     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20632 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20633     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20634     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20635     if test "x$IS_GNU_MAKE" = x; then
20636       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20637 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20638     else
20639       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20640       if test "x$IS_MODERN_MAKE" = x; then
20641         { $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
20642 $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;}
20643       else
20644         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20645           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20646             MAKE_EXPECTED_ENV='cygwin'
20647           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20648             MAKE_EXPECTED_ENV='msys'
20649           else
20650             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20651           fi
20652           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20653           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20654         else
20655           # Not relevant for non-Windows
20656           IS_MAKE_CORRECT_ENV=true
20657         fi
20658         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20659           { $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
20660 $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;}
20661         else
20662           FOUND_MAKE=$MAKE_CANDIDATE
20663 
20664   # Only process if variable expands to non-empty
20665 
20666   if test "x$FOUND_MAKE" != x; then
20667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20668 
20669   # First separate the path from the arguments. This will split at the first
20670   # space.
20671   complete="$FOUND_MAKE"
20672   path="${complete%% *}"
20673   tmp="$complete EOL"
20674   arguments="${tmp#* }"
20675 
20676   # Input might be given as Windows format, start by converting to
20677   # unix format.
20678   new_path=`$CYGPATH -u "$path"`
20679 
20680   # Now try to locate executable using which
20681   new_path=`$WHICH "$new_path" 2> /dev/null`
20682   # bat and cmd files are not always considered executable in cygwin causing which
20683   # to not find them
20684   if test "x$new_path" = x \
20685       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20686       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20687     new_path=`$CYGPATH -u "$path"`
20688   fi
20689   if test "x$new_path" = x; then
20690     # Oops. Which didn't find the executable.
20691     # The splitting of arguments from the executable at a space might have been incorrect,
20692     # since paths with space are more likely in Windows. Give it another try with the whole
20693     # argument.
20694     path="$complete"
20695     arguments="EOL"
20696     new_path=`$CYGPATH -u "$path"`
20697     new_path=`$WHICH "$new_path" 2> /dev/null`
20698     # bat and cmd files are not always considered executable in cygwin causing which
20699     # to not find them
20700     if test "x$new_path" = x \
20701         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20702         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20703       new_path=`$CYGPATH -u "$path"`
20704     fi
20705     if test "x$new_path" = x; then
20706       # It's still not found. Now this is an unrecoverable error.
20707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20708 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20709       has_space=`$ECHO "$complete" | $GREP " "`
20710       if test "x$has_space" != x; then
20711         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20712 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20713       fi
20714       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20715     fi
20716   fi
20717 
20718   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20719   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20720   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20721   # "foo.exe" is OK but "foo" is an error.
20722   #
20723   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20724   # It is also a way to make sure we got the proper file name for the real test later on.
20725   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20726   if test "x$test_shortpath" = x; then
20727     # Short path failed, file does not exist as specified.
20728     # Try adding .exe or .cmd
20729     if test -f "${new_path}.exe"; then
20730       input_to_shortpath="${new_path}.exe"
20731     elif test -f "${new_path}.cmd"; then
20732       input_to_shortpath="${new_path}.cmd"
20733     else
20734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20735 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20736       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20737 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20738       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20739     fi
20740   else
20741     input_to_shortpath="$new_path"
20742   fi
20743 
20744   # Call helper function which possibly converts this using DOS-style short mode.
20745   # If so, the updated path is stored in $new_path.
20746   new_path="$input_to_shortpath"
20747 
20748   input_path="$input_to_shortpath"
20749   # Check if we need to convert this using DOS-style short mode. If the path
20750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20751   # take no chances and rewrite it.
20752   # Note: m4 eats our [], so we need to use [ and ] instead.
20753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20754   if test "x$has_forbidden_chars" != x; then
20755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20756     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20757     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20758     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20759       # Going to short mode and back again did indeed matter. Since short mode is
20760       # case insensitive, let's make it lowercase to improve readability.
20761       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20762       # Now convert it back to Unix-style (cygpath)
20763       input_path=`$CYGPATH -u "$shortmode_path"`
20764       new_path="$input_path"
20765     fi
20766   fi
20767 
20768   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20769   if test "x$test_cygdrive_prefix" = x; then
20770     # As a simple fix, exclude /usr/bin since it's not a real path.
20771     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20772       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20773       # a path prefixed by /cygdrive for fixpath to work.
20774       new_path="$CYGWIN_ROOT_PATH$input_path"
20775     fi
20776   fi
20777 
20778   # remove trailing .exe if any
20779   new_path="${new_path/%.exe/}"
20780 
20781     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20782 
20783   # First separate the path from the arguments. This will split at the first
20784   # space.
20785   complete="$FOUND_MAKE"
20786   path="${complete%% *}"
20787   tmp="$complete EOL"
20788   arguments="${tmp#* }"
20789 
20790   # Input might be given as Windows format, start by converting to
20791   # unix format.
20792   new_path="$path"
20793 
20794   windows_path="$new_path"
20795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20796     unix_path=`$CYGPATH -u "$windows_path"`
20797     new_path="$unix_path"
20798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20800     new_path="$unix_path"
20801   fi
20802 
20803 
20804   # Now try to locate executable using which
20805   new_path=`$WHICH "$new_path" 2> /dev/null`
20806 
20807   if test "x$new_path" = x; then
20808     # Oops. Which didn't find the executable.
20809     # The splitting of arguments from the executable at a space might have been incorrect,
20810     # since paths with space are more likely in Windows. Give it another try with the whole
20811     # argument.
20812     path="$complete"
20813     arguments="EOL"
20814     new_path="$path"
20815 
20816   windows_path="$new_path"
20817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20818     unix_path=`$CYGPATH -u "$windows_path"`
20819     new_path="$unix_path"
20820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20822     new_path="$unix_path"
20823   fi
20824 
20825 
20826     new_path=`$WHICH "$new_path" 2> /dev/null`
20827     # bat and cmd files are not always considered executable in MSYS causing which
20828     # to not find them
20829     if test "x$new_path" = x \
20830         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20831         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20832       new_path="$path"
20833 
20834   windows_path="$new_path"
20835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20836     unix_path=`$CYGPATH -u "$windows_path"`
20837     new_path="$unix_path"
20838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20840     new_path="$unix_path"
20841   fi
20842 
20843     fi
20844 
20845     if test "x$new_path" = x; then
20846       # It's still not found. Now this is an unrecoverable error.
20847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20848 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20849       has_space=`$ECHO "$complete" | $GREP " "`
20850       if test "x$has_space" != x; then
20851         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20852 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20853       fi
20854       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20855     fi
20856   fi
20857 
20858   # Now new_path has a complete unix path to the binary
20859   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20860     # Keep paths in /bin as-is, but remove trailing .exe if any
20861     new_path="${new_path/%.exe/}"
20862     # Do not save /bin paths to all_fixpath_prefixes!
20863   else
20864     # Not in mixed or Windows style, start by that.
20865     new_path=`cmd //c echo $new_path`
20866 
20867   input_path="$new_path"
20868   # Check if we need to convert this using DOS-style short mode. If the path
20869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20870   # take no chances and rewrite it.
20871   # Note: m4 eats our [], so we need to use [ and ] instead.
20872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20873   if test "x$has_forbidden_chars" != x; then
20874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20876   fi
20877 
20878     # Output is in $new_path
20879 
20880   windows_path="$new_path"
20881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20882     unix_path=`$CYGPATH -u "$windows_path"`
20883     new_path="$unix_path"
20884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20886     new_path="$unix_path"
20887   fi
20888 
20889     # remove trailing .exe if any
20890     new_path="${new_path/%.exe/}"
20891 
20892     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20893     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20894   fi
20895 
20896     else
20897       # We're on a unix platform. Hooray! :)
20898       # First separate the path from the arguments. This will split at the first
20899       # space.
20900       complete="$FOUND_MAKE"
20901       path="${complete%% *}"
20902       tmp="$complete EOL"
20903       arguments="${tmp#* }"
20904 
20905       # Cannot rely on the command "which" here since it doesn't always work.
20906       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20907       if test -z "$is_absolute_path"; then
20908         # Path to executable is not absolute. Find it.
20909         IFS_save="$IFS"
20910         IFS=:
20911         for p in $PATH; do
20912           if test -f "$p/$path" && test -x "$p/$path"; then
20913             new_path="$p/$path"
20914             break
20915           fi
20916         done
20917         IFS="$IFS_save"
20918       else
20919         # This is an absolute path, we can use it without further modifications.
20920         new_path="$path"
20921       fi
20922 
20923       if test "x$new_path" = x; then
20924         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20925 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20926         has_space=`$ECHO "$complete" | $GREP " "`
20927         if test "x$has_space" != x; then
20928           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20929 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20930         fi
20931         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20932       fi
20933     fi
20934 
20935     # Now join together the path and the arguments once again
20936     if test "x$arguments" != xEOL; then
20937       new_complete="$new_path ${arguments% *}"
20938     else
20939       new_complete="$new_path"
20940     fi
20941 
20942     if test "x$complete" != "x$new_complete"; then
20943       FOUND_MAKE="$new_complete"
20944       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20945 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20946     fi
20947   fi
20948 
20949         fi
20950       fi
20951     fi
20952   fi
20953 
20954         fi
20955         PATH=$OLD_PATH
20956       fi
20957     fi
20958 
20959     if test "x$FOUND_MAKE" = x; then
20960       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
20961     fi
20962 
20963     else
20964       # If it succeeded, then it was overridden by the user. We will use it
20965       # for the tool.
20966 
20967       # First remove it from the list of overridden variables, so we can test
20968       # for unknown variables in the end.
20969       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20970 
20971       # Check if we try to supply an empty value
20972       if test "x$MAKE" = x; then
20973         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20974 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20975         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20976 $as_echo_n "checking for MAKE... " >&6; }
20977         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20978 $as_echo "disabled" >&6; }
20979       else
20980         # Check if the provided tool contains a complete path.
20981         tool_specified="$MAKE"
20982         tool_basename="${tool_specified##*/}"
20983         if test "x$tool_basename" = "x$tool_specified"; then
20984           # A command without a complete path is provided, search $PATH.
20985           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20986 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20987           # Extract the first word of "$tool_basename", so it can be a program name with args.
20988 set dummy $tool_basename; ac_word=$2
20989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20990 $as_echo_n "checking for $ac_word... " >&6; }
20991 if ${ac_cv_path_MAKE+:} false; then :
20992   $as_echo_n "(cached) " >&6
20993 else
20994   case $MAKE in
20995   [\\/]* | ?:[\\/]*)
20996   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20997   ;;
20998   *)
20999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21000 for as_dir in $PATH
21001 do
21002   IFS=$as_save_IFS
21003   test -z "$as_dir" && as_dir=.
21004     for ac_exec_ext in '' $ac_executable_extensions; do
21005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21006     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21008     break 2
21009   fi
21010 done
21011   done
21012 IFS=$as_save_IFS
21013 
21014   ;;
21015 esac
21016 fi
21017 MAKE=$ac_cv_path_MAKE
21018 if test -n "$MAKE"; then
21019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21020 $as_echo "$MAKE" >&6; }
21021 else
21022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21023 $as_echo "no" >&6; }
21024 fi
21025 
21026 
21027           if test "x$MAKE" = x; then
21028             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21029           fi
21030         else
21031           # Otherwise we believe it is a complete path. Use it as it is.
21032           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21033 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21034           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21035 $as_echo_n "checking for MAKE... " >&6; }
21036           if test ! -x "$tool_specified"; then
21037             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21038 $as_echo "not found" >&6; }
21039             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21040           fi
21041           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21042 $as_echo "$tool_specified" >&6; }
21043         fi
21044       fi
21045     fi
21046 
21047     # If MAKE was set by user, verify the version
21048 
21049   MAKE_CANDIDATE=""$MAKE""
21050   DESCRIPTION="user supplied MAKE=$MAKE"
21051 
21052   # On Cygwin, we require a newer version of make than on other platforms
21053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21054     MAKE_VERSION_EXPR="-e 4\."
21055     MAKE_REQUIRED_VERSION="4.0"
21056    else
21057     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21058     MAKE_REQUIRED_VERSION="3.81"
21059   fi
21060 
21061   if test "x$MAKE_CANDIDATE" != x; then
21062     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21063 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21064     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21065     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21066     if test "x$IS_GNU_MAKE" = x; then
21067       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21068 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21069     else
21070       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21071       if test "x$IS_MODERN_MAKE" = x; then
21072         { $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
21073 $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;}
21074       else
21075         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21076           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21077             MAKE_EXPECTED_ENV='cygwin'
21078           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21079             MAKE_EXPECTED_ENV='msys'
21080           else
21081             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21082           fi
21083           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21084           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21085         else
21086           # Not relevant for non-Windows
21087           IS_MAKE_CORRECT_ENV=true
21088         fi
21089         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21090           { $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
21091 $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;}
21092         else
21093           FOUND_MAKE=$MAKE_CANDIDATE
21094 
21095   # Only process if variable expands to non-empty
21096 
21097   if test "x$FOUND_MAKE" != x; then
21098     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21099 
21100   # First separate the path from the arguments. This will split at the first
21101   # space.
21102   complete="$FOUND_MAKE"
21103   path="${complete%% *}"
21104   tmp="$complete EOL"
21105   arguments="${tmp#* }"
21106 
21107   # Input might be given as Windows format, start by converting to
21108   # unix format.
21109   new_path=`$CYGPATH -u "$path"`
21110 
21111   # Now try to locate executable using which
21112   new_path=`$WHICH "$new_path" 2> /dev/null`
21113   # bat and cmd files are not always considered executable in cygwin causing which
21114   # to not find them
21115   if test "x$new_path" = x \
21116       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21117       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21118     new_path=`$CYGPATH -u "$path"`
21119   fi
21120   if test "x$new_path" = x; then
21121     # Oops. Which didn't find the executable.
21122     # The splitting of arguments from the executable at a space might have been incorrect,
21123     # since paths with space are more likely in Windows. Give it another try with the whole
21124     # argument.
21125     path="$complete"
21126     arguments="EOL"
21127     new_path=`$CYGPATH -u "$path"`
21128     new_path=`$WHICH "$new_path" 2> /dev/null`
21129     # bat and cmd files are not always considered executable in cygwin causing which
21130     # to not find them
21131     if test "x$new_path" = x \
21132         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21133         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21134       new_path=`$CYGPATH -u "$path"`
21135     fi
21136     if test "x$new_path" = x; then
21137       # It's still not found. Now this is an unrecoverable error.
21138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21139 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21140       has_space=`$ECHO "$complete" | $GREP " "`
21141       if test "x$has_space" != x; then
21142         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21143 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21144       fi
21145       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21146     fi
21147   fi
21148 
21149   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21150   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21151   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21152   # "foo.exe" is OK but "foo" is an error.
21153   #
21154   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21155   # It is also a way to make sure we got the proper file name for the real test later on.
21156   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21157   if test "x$test_shortpath" = x; then
21158     # Short path failed, file does not exist as specified.
21159     # Try adding .exe or .cmd
21160     if test -f "${new_path}.exe"; then
21161       input_to_shortpath="${new_path}.exe"
21162     elif test -f "${new_path}.cmd"; then
21163       input_to_shortpath="${new_path}.cmd"
21164     else
21165       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21166 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21167       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21168 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21169       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21170     fi
21171   else
21172     input_to_shortpath="$new_path"
21173   fi
21174 
21175   # Call helper function which possibly converts this using DOS-style short mode.
21176   # If so, the updated path is stored in $new_path.
21177   new_path="$input_to_shortpath"
21178 
21179   input_path="$input_to_shortpath"
21180   # Check if we need to convert this using DOS-style short mode. If the path
21181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21182   # take no chances and rewrite it.
21183   # Note: m4 eats our [], so we need to use [ and ] instead.
21184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21185   if test "x$has_forbidden_chars" != x; then
21186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21190       # Going to short mode and back again did indeed matter. Since short mode is
21191       # case insensitive, let's make it lowercase to improve readability.
21192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21193       # Now convert it back to Unix-style (cygpath)
21194       input_path=`$CYGPATH -u "$shortmode_path"`
21195       new_path="$input_path"
21196     fi
21197   fi
21198 
21199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21200   if test "x$test_cygdrive_prefix" = x; then
21201     # As a simple fix, exclude /usr/bin since it's not a real path.
21202     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21204       # a path prefixed by /cygdrive for fixpath to work.
21205       new_path="$CYGWIN_ROOT_PATH$input_path"
21206     fi
21207   fi
21208 
21209   # remove trailing .exe if any
21210   new_path="${new_path/%.exe/}"
21211 
21212     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21213 
21214   # First separate the path from the arguments. This will split at the first
21215   # space.
21216   complete="$FOUND_MAKE"
21217   path="${complete%% *}"
21218   tmp="$complete EOL"
21219   arguments="${tmp#* }"
21220 
21221   # Input might be given as Windows format, start by converting to
21222   # unix format.
21223   new_path="$path"
21224 
21225   windows_path="$new_path"
21226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21227     unix_path=`$CYGPATH -u "$windows_path"`
21228     new_path="$unix_path"
21229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21231     new_path="$unix_path"
21232   fi
21233 
21234 
21235   # Now try to locate executable using which
21236   new_path=`$WHICH "$new_path" 2> /dev/null`
21237 
21238   if test "x$new_path" = x; then
21239     # Oops. Which didn't find the executable.
21240     # The splitting of arguments from the executable at a space might have been incorrect,
21241     # since paths with space are more likely in Windows. Give it another try with the whole
21242     # argument.
21243     path="$complete"
21244     arguments="EOL"
21245     new_path="$path"
21246 
21247   windows_path="$new_path"
21248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21249     unix_path=`$CYGPATH -u "$windows_path"`
21250     new_path="$unix_path"
21251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21253     new_path="$unix_path"
21254   fi
21255 
21256 
21257     new_path=`$WHICH "$new_path" 2> /dev/null`
21258     # bat and cmd files are not always considered executable in MSYS causing which
21259     # to not find them
21260     if test "x$new_path" = x \
21261         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21262         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21263       new_path="$path"
21264 
21265   windows_path="$new_path"
21266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21267     unix_path=`$CYGPATH -u "$windows_path"`
21268     new_path="$unix_path"
21269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21271     new_path="$unix_path"
21272   fi
21273 
21274     fi
21275 
21276     if test "x$new_path" = x; then
21277       # It's still not found. Now this is an unrecoverable error.
21278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21279 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21280       has_space=`$ECHO "$complete" | $GREP " "`
21281       if test "x$has_space" != x; then
21282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21284       fi
21285       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21286     fi
21287   fi
21288 
21289   # Now new_path has a complete unix path to the binary
21290   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21291     # Keep paths in /bin as-is, but remove trailing .exe if any
21292     new_path="${new_path/%.exe/}"
21293     # Do not save /bin paths to all_fixpath_prefixes!
21294   else
21295     # Not in mixed or Windows style, start by that.
21296     new_path=`cmd //c echo $new_path`
21297 
21298   input_path="$new_path"
21299   # Check if we need to convert this using DOS-style short mode. If the path
21300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21301   # take no chances and rewrite it.
21302   # Note: m4 eats our [], so we need to use [ and ] instead.
21303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21304   if test "x$has_forbidden_chars" != x; then
21305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21306     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21307   fi
21308 
21309     # Output is in $new_path
21310 
21311   windows_path="$new_path"
21312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313     unix_path=`$CYGPATH -u "$windows_path"`
21314     new_path="$unix_path"
21315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21317     new_path="$unix_path"
21318   fi
21319 
21320     # remove trailing .exe if any
21321     new_path="${new_path/%.exe/}"
21322 
21323     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21324     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21325   fi
21326 
21327     else
21328       # We're on a unix platform. Hooray! :)
21329       # First separate the path from the arguments. This will split at the first
21330       # space.
21331       complete="$FOUND_MAKE"
21332       path="${complete%% *}"
21333       tmp="$complete EOL"
21334       arguments="${tmp#* }"
21335 
21336       # Cannot rely on the command "which" here since it doesn't always work.
21337       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21338       if test -z "$is_absolute_path"; then
21339         # Path to executable is not absolute. Find it.
21340         IFS_save="$IFS"
21341         IFS=:
21342         for p in $PATH; do
21343           if test -f "$p/$path" && test -x "$p/$path"; then
21344             new_path="$p/$path"
21345             break
21346           fi
21347         done
21348         IFS="$IFS_save"
21349       else
21350         # This is an absolute path, we can use it without further modifications.
21351         new_path="$path"
21352       fi
21353 
21354       if test "x$new_path" = x; then
21355         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21356 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21357         has_space=`$ECHO "$complete" | $GREP " "`
21358         if test "x$has_space" != x; then
21359           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21360 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21361         fi
21362         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21363       fi
21364     fi
21365 
21366     # Now join together the path and the arguments once again
21367     if test "x$arguments" != xEOL; then
21368       new_complete="$new_path ${arguments% *}"
21369     else
21370       new_complete="$new_path"
21371     fi
21372 
21373     if test "x$complete" != "x$new_complete"; then
21374       FOUND_MAKE="$new_complete"
21375       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21376 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21377     fi
21378   fi
21379 
21380         fi
21381       fi
21382     fi
21383   fi
21384 
21385     if test "x$FOUND_MAKE" = x; then
21386       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21387     fi
21388 
21389   fi
21390 
21391 
21392   MAKE=$FOUND_MAKE
21393 
21394   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21395 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21396 
21397 
21398   # Check if make supports the output sync option and if so, setup using it.
21399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21400 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21401   if $MAKE --version -O > /dev/null 2>&1; then
21402     OUTPUT_SYNC_SUPPORTED=true
21403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21404 $as_echo "yes" >&6; }
21405     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21406 $as_echo_n "checking for output-sync value... " >&6; }
21407 
21408 # Check whether --with-output-sync was given.
21409 if test "${with_output_sync+set}" = set; then :
21410   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21411 fi
21412 
21413     if test "x$OUTPUT_SYNC" = "x"; then
21414       OUTPUT_SYNC=none
21415     fi
21416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21417 $as_echo "$OUTPUT_SYNC" >&6; }
21418     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21419       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21420     fi
21421   else
21422     OUTPUT_SYNC_SUPPORTED=false
21423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424 $as_echo "no" >&6; }
21425   fi
21426 
21427 
21428 
21429 
21430 
21431 
21432   # Test if find supports -delete
21433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21434 $as_echo_n "checking if find supports -delete... " >&6; }
21435   FIND_DELETE="-delete"
21436 
21437   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21438 
21439   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21440 
21441   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21442   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21443     # No, it does not.
21444     $RM $DELETEDIR/TestIfFindSupportsDelete
21445     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21446       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21447       FIND_DELETE="-print | $XARGS $RM"
21448     else
21449       FIND_DELETE="-exec $RM \{\} \+"
21450     fi
21451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21452 $as_echo "no" >&6; }
21453   else
21454     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21455 $as_echo "yes" >&6; }
21456   fi
21457   $RMDIR $DELETEDIR
21458 
21459 
21460 
21461   # Test which kind of tar was found
21462   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21463     TAR_TYPE="gnu"
21464   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21465     TAR_TYPE="bsd"
21466   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21467     TAR_TYPE="bsd"
21468   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21469     TAR_TYPE="solaris"
21470   fi
21471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21472 $as_echo_n "checking what type of tar was found... " >&6; }
21473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21474 $as_echo "$TAR_TYPE" >&6; }
21475 
21476   TAR_CREATE_FILE_PARAM=""
21477 
21478   if test "x$TAR_TYPE" = "xgnu"; then
21479     TAR_INCLUDE_PARAM="T"
21480     TAR_SUPPORTS_TRANSFORM="true"
21481     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21482       # When using gnu tar for Solaris targets, need to use compatibility mode
21483       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21484     fi
21485   else
21486     TAR_INCLUDE_PARAM="I"
21487     TAR_SUPPORTS_TRANSFORM="false"
21488   fi
21489 
21490 
21491 
21492 
21493 
21494 
21495   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21496   # This is a problem for the grep resident on AIX.
21497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21498 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21499   # Multiple subsequent spaces..
21500   STACK_SPACES='aaa   bbb   ccc'
21501   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21502   # patterns in it.
21503   STACK_LIST=${STACK_SPACES// /$'\n'}
21504   NEEDLE_SPACES='ccc bbb aaa'
21505   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21506   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21507   if test "x$RESULT" == "x"; then
21508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21509 $as_echo "yes" >&6; }
21510   else
21511     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21512       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21513     fi
21514     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21515   fi
21516 
21517 
21518   # These tools might not be installed by default,
21519   # need hint on how to install them.
21520 
21521 
21522 
21523   # Publish this variable in the help.
21524 
21525 
21526   if [ -z "${UNZIP+x}" ]; then
21527     # The variable is not set by user, try to locate tool using the code snippet
21528     for ac_prog in unzip
21529 do
21530   # Extract the first word of "$ac_prog", so it can be a program name with args.
21531 set dummy $ac_prog; ac_word=$2
21532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21533 $as_echo_n "checking for $ac_word... " >&6; }
21534 if ${ac_cv_path_UNZIP+:} false; then :
21535   $as_echo_n "(cached) " >&6
21536 else
21537   case $UNZIP in
21538   [\\/]* | ?:[\\/]*)
21539   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21540   ;;
21541   *)
21542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21543 for as_dir in $PATH
21544 do
21545   IFS=$as_save_IFS
21546   test -z "$as_dir" && as_dir=.
21547     for ac_exec_ext in '' $ac_executable_extensions; do
21548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21549     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21551     break 2
21552   fi
21553 done
21554   done
21555 IFS=$as_save_IFS
21556 
21557   ;;
21558 esac
21559 fi
21560 UNZIP=$ac_cv_path_UNZIP
21561 if test -n "$UNZIP"; then
21562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21563 $as_echo "$UNZIP" >&6; }
21564 else
21565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21566 $as_echo "no" >&6; }
21567 fi
21568 
21569 
21570   test -n "$UNZIP" && break
21571 done
21572 
21573   else
21574     # The variable is set, but is it from the command line or the environment?
21575 
21576     # Try to remove the string !UNZIP! from our list.
21577     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21578     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21579       # If it failed, the variable was not from the command line. Ignore it,
21580       # but warn the user (except for BASH, which is always set by the calling BASH).
21581       if test "xUNZIP" != xBASH; then
21582         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21583 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21584       fi
21585       # Try to locate tool using the code snippet
21586       for ac_prog in unzip
21587 do
21588   # Extract the first word of "$ac_prog", so it can be a program name with args.
21589 set dummy $ac_prog; ac_word=$2
21590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21591 $as_echo_n "checking for $ac_word... " >&6; }
21592 if ${ac_cv_path_UNZIP+:} false; then :
21593   $as_echo_n "(cached) " >&6
21594 else
21595   case $UNZIP in
21596   [\\/]* | ?:[\\/]*)
21597   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21598   ;;
21599   *)
21600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21601 for as_dir in $PATH
21602 do
21603   IFS=$as_save_IFS
21604   test -z "$as_dir" && as_dir=.
21605     for ac_exec_ext in '' $ac_executable_extensions; do
21606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21607     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21609     break 2
21610   fi
21611 done
21612   done
21613 IFS=$as_save_IFS
21614 
21615   ;;
21616 esac
21617 fi
21618 UNZIP=$ac_cv_path_UNZIP
21619 if test -n "$UNZIP"; then
21620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21621 $as_echo "$UNZIP" >&6; }
21622 else
21623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21624 $as_echo "no" >&6; }
21625 fi
21626 
21627 
21628   test -n "$UNZIP" && break
21629 done
21630 
21631     else
21632       # If it succeeded, then it was overridden by the user. We will use it
21633       # for the tool.
21634 
21635       # First remove it from the list of overridden variables, so we can test
21636       # for unknown variables in the end.
21637       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21638 
21639       # Check if we try to supply an empty value
21640       if test "x$UNZIP" = x; then
21641         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21642 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21644 $as_echo_n "checking for UNZIP... " >&6; }
21645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21646 $as_echo "disabled" >&6; }
21647       else
21648         # Check if the provided tool contains a complete path.
21649         tool_specified="$UNZIP"
21650         tool_basename="${tool_specified##*/}"
21651         if test "x$tool_basename" = "x$tool_specified"; then
21652           # A command without a complete path is provided, search $PATH.
21653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21654 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21655           # Extract the first word of "$tool_basename", so it can be a program name with args.
21656 set dummy $tool_basename; ac_word=$2
21657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21658 $as_echo_n "checking for $ac_word... " >&6; }
21659 if ${ac_cv_path_UNZIP+:} false; then :
21660   $as_echo_n "(cached) " >&6
21661 else
21662   case $UNZIP in
21663   [\\/]* | ?:[\\/]*)
21664   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21665   ;;
21666   *)
21667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21668 for as_dir in $PATH
21669 do
21670   IFS=$as_save_IFS
21671   test -z "$as_dir" && as_dir=.
21672     for ac_exec_ext in '' $ac_executable_extensions; do
21673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21674     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21676     break 2
21677   fi
21678 done
21679   done
21680 IFS=$as_save_IFS
21681 
21682   ;;
21683 esac
21684 fi
21685 UNZIP=$ac_cv_path_UNZIP
21686 if test -n "$UNZIP"; then
21687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21688 $as_echo "$UNZIP" >&6; }
21689 else
21690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21691 $as_echo "no" >&6; }
21692 fi
21693 
21694 
21695           if test "x$UNZIP" = x; then
21696             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21697           fi
21698         else
21699           # Otherwise we believe it is a complete path. Use it as it is.
21700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21701 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21702           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21703 $as_echo_n "checking for UNZIP... " >&6; }
21704           if test ! -x "$tool_specified"; then
21705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21706 $as_echo "not found" >&6; }
21707             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21708           fi
21709           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21710 $as_echo "$tool_specified" >&6; }
21711         fi
21712       fi
21713     fi
21714 
21715   fi
21716 
21717 
21718 
21719   if test "x$UNZIP" = x; then
21720     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21721   fi
21722 
21723 
21724   # Since zip uses "ZIP" as a environment variable for passing options, we need
21725   # to name our variable differently, hence ZIPEXE.
21726 
21727 
21728 
21729   # Publish this variable in the help.
21730 
21731 
21732   if [ -z "${ZIPEXE+x}" ]; then
21733     # The variable is not set by user, try to locate tool using the code snippet
21734     for ac_prog in zip
21735 do
21736   # Extract the first word of "$ac_prog", so it can be a program name with args.
21737 set dummy $ac_prog; ac_word=$2
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21739 $as_echo_n "checking for $ac_word... " >&6; }
21740 if ${ac_cv_path_ZIPEXE+:} false; then :
21741   $as_echo_n "(cached) " >&6
21742 else
21743   case $ZIPEXE in
21744   [\\/]* | ?:[\\/]*)
21745   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21746   ;;
21747   *)
21748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21749 for as_dir in $PATH
21750 do
21751   IFS=$as_save_IFS
21752   test -z "$as_dir" && as_dir=.
21753     for ac_exec_ext in '' $ac_executable_extensions; do
21754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21755     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21757     break 2
21758   fi
21759 done
21760   done
21761 IFS=$as_save_IFS
21762 
21763   ;;
21764 esac
21765 fi
21766 ZIPEXE=$ac_cv_path_ZIPEXE
21767 if test -n "$ZIPEXE"; then
21768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21769 $as_echo "$ZIPEXE" >&6; }
21770 else
21771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21772 $as_echo "no" >&6; }
21773 fi
21774 
21775 
21776   test -n "$ZIPEXE" && break
21777 done
21778 
21779   else
21780     # The variable is set, but is it from the command line or the environment?
21781 
21782     # Try to remove the string !ZIPEXE! from our list.
21783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21785       # If it failed, the variable was not from the command line. Ignore it,
21786       # but warn the user (except for BASH, which is always set by the calling BASH).
21787       if test "xZIPEXE" != xBASH; then
21788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21789 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21790       fi
21791       # Try to locate tool using the code snippet
21792       for ac_prog in zip
21793 do
21794   # Extract the first word of "$ac_prog", so it can be a program name with args.
21795 set dummy $ac_prog; ac_word=$2
21796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21797 $as_echo_n "checking for $ac_word... " >&6; }
21798 if ${ac_cv_path_ZIPEXE+:} false; then :
21799   $as_echo_n "(cached) " >&6
21800 else
21801   case $ZIPEXE in
21802   [\\/]* | ?:[\\/]*)
21803   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21804   ;;
21805   *)
21806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21807 for as_dir in $PATH
21808 do
21809   IFS=$as_save_IFS
21810   test -z "$as_dir" && as_dir=.
21811     for ac_exec_ext in '' $ac_executable_extensions; do
21812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21813     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21815     break 2
21816   fi
21817 done
21818   done
21819 IFS=$as_save_IFS
21820 
21821   ;;
21822 esac
21823 fi
21824 ZIPEXE=$ac_cv_path_ZIPEXE
21825 if test -n "$ZIPEXE"; then
21826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21827 $as_echo "$ZIPEXE" >&6; }
21828 else
21829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21830 $as_echo "no" >&6; }
21831 fi
21832 
21833 
21834   test -n "$ZIPEXE" && break
21835 done
21836 
21837     else
21838       # If it succeeded, then it was overridden by the user. We will use it
21839       # for the tool.
21840 
21841       # First remove it from the list of overridden variables, so we can test
21842       # for unknown variables in the end.
21843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21844 
21845       # Check if we try to supply an empty value
21846       if test "x$ZIPEXE" = x; then
21847         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21848 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21850 $as_echo_n "checking for ZIPEXE... " >&6; }
21851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21852 $as_echo "disabled" >&6; }
21853       else
21854         # Check if the provided tool contains a complete path.
21855         tool_specified="$ZIPEXE"
21856         tool_basename="${tool_specified##*/}"
21857         if test "x$tool_basename" = "x$tool_specified"; then
21858           # A command without a complete path is provided, search $PATH.
21859           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21860 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21861           # Extract the first word of "$tool_basename", so it can be a program name with args.
21862 set dummy $tool_basename; ac_word=$2
21863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21864 $as_echo_n "checking for $ac_word... " >&6; }
21865 if ${ac_cv_path_ZIPEXE+:} false; then :
21866   $as_echo_n "(cached) " >&6
21867 else
21868   case $ZIPEXE in
21869   [\\/]* | ?:[\\/]*)
21870   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21871   ;;
21872   *)
21873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21874 for as_dir in $PATH
21875 do
21876   IFS=$as_save_IFS
21877   test -z "$as_dir" && as_dir=.
21878     for ac_exec_ext in '' $ac_executable_extensions; do
21879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21880     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21882     break 2
21883   fi
21884 done
21885   done
21886 IFS=$as_save_IFS
21887 
21888   ;;
21889 esac
21890 fi
21891 ZIPEXE=$ac_cv_path_ZIPEXE
21892 if test -n "$ZIPEXE"; then
21893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21894 $as_echo "$ZIPEXE" >&6; }
21895 else
21896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21897 $as_echo "no" >&6; }
21898 fi
21899 
21900 
21901           if test "x$ZIPEXE" = x; then
21902             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21903           fi
21904         else
21905           # Otherwise we believe it is a complete path. Use it as it is.
21906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21907 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21908           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21909 $as_echo_n "checking for ZIPEXE... " >&6; }
21910           if test ! -x "$tool_specified"; then
21911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21912 $as_echo "not found" >&6; }
21913             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21914           fi
21915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21916 $as_echo "$tool_specified" >&6; }
21917         fi
21918       fi
21919     fi
21920 
21921   fi
21922 
21923 
21924 
21925   if test "x$ZIPEXE" = x; then
21926     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21927   fi
21928 
21929 
21930 
21931   # Non-required basic tools
21932 
21933 
21934 
21935   # Publish this variable in the help.
21936 
21937 
21938   if [ -z "${LDD+x}" ]; then
21939     # The variable is not set by user, try to locate tool using the code snippet
21940     for ac_prog in ldd
21941 do
21942   # Extract the first word of "$ac_prog", so it can be a program name with args.
21943 set dummy $ac_prog; ac_word=$2
21944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21945 $as_echo_n "checking for $ac_word... " >&6; }
21946 if ${ac_cv_path_LDD+:} false; then :
21947   $as_echo_n "(cached) " >&6
21948 else
21949   case $LDD in
21950   [\\/]* | ?:[\\/]*)
21951   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21952   ;;
21953   *)
21954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21955 for as_dir in $PATH
21956 do
21957   IFS=$as_save_IFS
21958   test -z "$as_dir" && as_dir=.
21959     for ac_exec_ext in '' $ac_executable_extensions; do
21960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21961     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21963     break 2
21964   fi
21965 done
21966   done
21967 IFS=$as_save_IFS
21968 
21969   ;;
21970 esac
21971 fi
21972 LDD=$ac_cv_path_LDD
21973 if test -n "$LDD"; then
21974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21975 $as_echo "$LDD" >&6; }
21976 else
21977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21978 $as_echo "no" >&6; }
21979 fi
21980 
21981 
21982   test -n "$LDD" && break
21983 done
21984 
21985   else
21986     # The variable is set, but is it from the command line or the environment?
21987 
21988     # Try to remove the string !LDD! from our list.
21989     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21990     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21991       # If it failed, the variable was not from the command line. Ignore it,
21992       # but warn the user (except for BASH, which is always set by the calling BASH).
21993       if test "xLDD" != xBASH; then
21994         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21995 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21996       fi
21997       # Try to locate tool using the code snippet
21998       for ac_prog in ldd
21999 do
22000   # Extract the first word of "$ac_prog", so it can be a program name with args.
22001 set dummy $ac_prog; ac_word=$2
22002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22003 $as_echo_n "checking for $ac_word... " >&6; }
22004 if ${ac_cv_path_LDD+:} false; then :
22005   $as_echo_n "(cached) " >&6
22006 else
22007   case $LDD in
22008   [\\/]* | ?:[\\/]*)
22009   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22010   ;;
22011   *)
22012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22013 for as_dir in $PATH
22014 do
22015   IFS=$as_save_IFS
22016   test -z "$as_dir" && as_dir=.
22017     for ac_exec_ext in '' $ac_executable_extensions; do
22018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22019     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22021     break 2
22022   fi
22023 done
22024   done
22025 IFS=$as_save_IFS
22026 
22027   ;;
22028 esac
22029 fi
22030 LDD=$ac_cv_path_LDD
22031 if test -n "$LDD"; then
22032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22033 $as_echo "$LDD" >&6; }
22034 else
22035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22036 $as_echo "no" >&6; }
22037 fi
22038 
22039 
22040   test -n "$LDD" && break
22041 done
22042 
22043     else
22044       # If it succeeded, then it was overridden by the user. We will use it
22045       # for the tool.
22046 
22047       # First remove it from the list of overridden variables, so we can test
22048       # for unknown variables in the end.
22049       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22050 
22051       # Check if we try to supply an empty value
22052       if test "x$LDD" = x; then
22053         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22054 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22056 $as_echo_n "checking for LDD... " >&6; }
22057         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22058 $as_echo "disabled" >&6; }
22059       else
22060         # Check if the provided tool contains a complete path.
22061         tool_specified="$LDD"
22062         tool_basename="${tool_specified##*/}"
22063         if test "x$tool_basename" = "x$tool_specified"; then
22064           # A command without a complete path is provided, search $PATH.
22065           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22066 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22067           # Extract the first word of "$tool_basename", so it can be a program name with args.
22068 set dummy $tool_basename; ac_word=$2
22069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22070 $as_echo_n "checking for $ac_word... " >&6; }
22071 if ${ac_cv_path_LDD+:} false; then :
22072   $as_echo_n "(cached) " >&6
22073 else
22074   case $LDD in
22075   [\\/]* | ?:[\\/]*)
22076   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22077   ;;
22078   *)
22079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22080 for as_dir in $PATH
22081 do
22082   IFS=$as_save_IFS
22083   test -z "$as_dir" && as_dir=.
22084     for ac_exec_ext in '' $ac_executable_extensions; do
22085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22086     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22088     break 2
22089   fi
22090 done
22091   done
22092 IFS=$as_save_IFS
22093 
22094   ;;
22095 esac
22096 fi
22097 LDD=$ac_cv_path_LDD
22098 if test -n "$LDD"; then
22099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22100 $as_echo "$LDD" >&6; }
22101 else
22102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22103 $as_echo "no" >&6; }
22104 fi
22105 
22106 
22107           if test "x$LDD" = x; then
22108             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22109           fi
22110         else
22111           # Otherwise we believe it is a complete path. Use it as it is.
22112           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22113 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22114           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22115 $as_echo_n "checking for LDD... " >&6; }
22116           if test ! -x "$tool_specified"; then
22117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22118 $as_echo "not found" >&6; }
22119             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22120           fi
22121           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22122 $as_echo "$tool_specified" >&6; }
22123         fi
22124       fi
22125     fi
22126 
22127   fi
22128 
22129 
22130   if test "x$LDD" = "x"; then
22131     # List shared lib dependencies is used for
22132     # debug output and checking for forbidden dependencies.
22133     # We can build without it.
22134     LDD="true"
22135   fi
22136 
22137 
22138   # Publish this variable in the help.
22139 
22140 
22141   if [ -z "${OTOOL+x}" ]; then
22142     # The variable is not set by user, try to locate tool using the code snippet
22143     for ac_prog in otool
22144 do
22145   # Extract the first word of "$ac_prog", so it can be a program name with args.
22146 set dummy $ac_prog; ac_word=$2
22147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22148 $as_echo_n "checking for $ac_word... " >&6; }
22149 if ${ac_cv_path_OTOOL+:} false; then :
22150   $as_echo_n "(cached) " >&6
22151 else
22152   case $OTOOL in
22153   [\\/]* | ?:[\\/]*)
22154   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22155   ;;
22156   *)
22157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22158 for as_dir in $PATH
22159 do
22160   IFS=$as_save_IFS
22161   test -z "$as_dir" && as_dir=.
22162     for ac_exec_ext in '' $ac_executable_extensions; do
22163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22164     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22166     break 2
22167   fi
22168 done
22169   done
22170 IFS=$as_save_IFS
22171 
22172   ;;
22173 esac
22174 fi
22175 OTOOL=$ac_cv_path_OTOOL
22176 if test -n "$OTOOL"; then
22177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22178 $as_echo "$OTOOL" >&6; }
22179 else
22180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22181 $as_echo "no" >&6; }
22182 fi
22183 
22184 
22185   test -n "$OTOOL" && break
22186 done
22187 
22188   else
22189     # The variable is set, but is it from the command line or the environment?
22190 
22191     # Try to remove the string !OTOOL! from our list.
22192     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22193     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22194       # If it failed, the variable was not from the command line. Ignore it,
22195       # but warn the user (except for BASH, which is always set by the calling BASH).
22196       if test "xOTOOL" != xBASH; then
22197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22198 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22199       fi
22200       # Try to locate tool using the code snippet
22201       for ac_prog in otool
22202 do
22203   # Extract the first word of "$ac_prog", so it can be a program name with args.
22204 set dummy $ac_prog; ac_word=$2
22205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22206 $as_echo_n "checking for $ac_word... " >&6; }
22207 if ${ac_cv_path_OTOOL+:} false; then :
22208   $as_echo_n "(cached) " >&6
22209 else
22210   case $OTOOL in
22211   [\\/]* | ?:[\\/]*)
22212   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22213   ;;
22214   *)
22215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22216 for as_dir in $PATH
22217 do
22218   IFS=$as_save_IFS
22219   test -z "$as_dir" && as_dir=.
22220     for ac_exec_ext in '' $ac_executable_extensions; do
22221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22222     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22224     break 2
22225   fi
22226 done
22227   done
22228 IFS=$as_save_IFS
22229 
22230   ;;
22231 esac
22232 fi
22233 OTOOL=$ac_cv_path_OTOOL
22234 if test -n "$OTOOL"; then
22235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22236 $as_echo "$OTOOL" >&6; }
22237 else
22238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22239 $as_echo "no" >&6; }
22240 fi
22241 
22242 
22243   test -n "$OTOOL" && break
22244 done
22245 
22246     else
22247       # If it succeeded, then it was overridden by the user. We will use it
22248       # for the tool.
22249 
22250       # First remove it from the list of overridden variables, so we can test
22251       # for unknown variables in the end.
22252       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22253 
22254       # Check if we try to supply an empty value
22255       if test "x$OTOOL" = x; then
22256         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22257 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22259 $as_echo_n "checking for OTOOL... " >&6; }
22260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22261 $as_echo "disabled" >&6; }
22262       else
22263         # Check if the provided tool contains a complete path.
22264         tool_specified="$OTOOL"
22265         tool_basename="${tool_specified##*/}"
22266         if test "x$tool_basename" = "x$tool_specified"; then
22267           # A command without a complete path is provided, search $PATH.
22268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22269 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22270           # Extract the first word of "$tool_basename", so it can be a program name with args.
22271 set dummy $tool_basename; ac_word=$2
22272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22273 $as_echo_n "checking for $ac_word... " >&6; }
22274 if ${ac_cv_path_OTOOL+:} false; then :
22275   $as_echo_n "(cached) " >&6
22276 else
22277   case $OTOOL in
22278   [\\/]* | ?:[\\/]*)
22279   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22280   ;;
22281   *)
22282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22283 for as_dir in $PATH
22284 do
22285   IFS=$as_save_IFS
22286   test -z "$as_dir" && as_dir=.
22287     for ac_exec_ext in '' $ac_executable_extensions; do
22288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22289     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22291     break 2
22292   fi
22293 done
22294   done
22295 IFS=$as_save_IFS
22296 
22297   ;;
22298 esac
22299 fi
22300 OTOOL=$ac_cv_path_OTOOL
22301 if test -n "$OTOOL"; then
22302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22303 $as_echo "$OTOOL" >&6; }
22304 else
22305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22306 $as_echo "no" >&6; }
22307 fi
22308 
22309 
22310           if test "x$OTOOL" = x; then
22311             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22312           fi
22313         else
22314           # Otherwise we believe it is a complete path. Use it as it is.
22315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22316 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22317           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22318 $as_echo_n "checking for OTOOL... " >&6; }
22319           if test ! -x "$tool_specified"; then
22320             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22321 $as_echo "not found" >&6; }
22322             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22323           fi
22324           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22325 $as_echo "$tool_specified" >&6; }
22326         fi
22327       fi
22328     fi
22329 
22330   fi
22331 
22332 
22333   if test "x$OTOOL" = "x"; then
22334     OTOOL="true"
22335   fi
22336 
22337 
22338   # Publish this variable in the help.
22339 
22340 
22341   if [ -z "${READELF+x}" ]; then
22342     # The variable is not set by user, try to locate tool using the code snippet
22343     for ac_prog in greadelf readelf
22344 do
22345   # Extract the first word of "$ac_prog", so it can be a program name with args.
22346 set dummy $ac_prog; ac_word=$2
22347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22348 $as_echo_n "checking for $ac_word... " >&6; }
22349 if ${ac_cv_path_READELF+:} false; then :
22350   $as_echo_n "(cached) " >&6
22351 else
22352   case $READELF in
22353   [\\/]* | ?:[\\/]*)
22354   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22355   ;;
22356   *)
22357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22358 for as_dir in $PATH
22359 do
22360   IFS=$as_save_IFS
22361   test -z "$as_dir" && as_dir=.
22362     for ac_exec_ext in '' $ac_executable_extensions; do
22363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22364     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22366     break 2
22367   fi
22368 done
22369   done
22370 IFS=$as_save_IFS
22371 
22372   ;;
22373 esac
22374 fi
22375 READELF=$ac_cv_path_READELF
22376 if test -n "$READELF"; then
22377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22378 $as_echo "$READELF" >&6; }
22379 else
22380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22381 $as_echo "no" >&6; }
22382 fi
22383 
22384 
22385   test -n "$READELF" && break
22386 done
22387 
22388   else
22389     # The variable is set, but is it from the command line or the environment?
22390 
22391     # Try to remove the string !READELF! from our list.
22392     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22393     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22394       # If it failed, the variable was not from the command line. Ignore it,
22395       # but warn the user (except for BASH, which is always set by the calling BASH).
22396       if test "xREADELF" != xBASH; then
22397         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22398 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22399       fi
22400       # Try to locate tool using the code snippet
22401       for ac_prog in greadelf readelf
22402 do
22403   # Extract the first word of "$ac_prog", so it can be a program name with args.
22404 set dummy $ac_prog; ac_word=$2
22405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22406 $as_echo_n "checking for $ac_word... " >&6; }
22407 if ${ac_cv_path_READELF+:} false; then :
22408   $as_echo_n "(cached) " >&6
22409 else
22410   case $READELF in
22411   [\\/]* | ?:[\\/]*)
22412   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22413   ;;
22414   *)
22415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22416 for as_dir in $PATH
22417 do
22418   IFS=$as_save_IFS
22419   test -z "$as_dir" && as_dir=.
22420     for ac_exec_ext in '' $ac_executable_extensions; do
22421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22422     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22424     break 2
22425   fi
22426 done
22427   done
22428 IFS=$as_save_IFS
22429 
22430   ;;
22431 esac
22432 fi
22433 READELF=$ac_cv_path_READELF
22434 if test -n "$READELF"; then
22435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22436 $as_echo "$READELF" >&6; }
22437 else
22438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22439 $as_echo "no" >&6; }
22440 fi
22441 
22442 
22443   test -n "$READELF" && break
22444 done
22445 
22446     else
22447       # If it succeeded, then it was overridden by the user. We will use it
22448       # for the tool.
22449 
22450       # First remove it from the list of overridden variables, so we can test
22451       # for unknown variables in the end.
22452       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22453 
22454       # Check if we try to supply an empty value
22455       if test "x$READELF" = x; then
22456         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22457 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22458         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22459 $as_echo_n "checking for READELF... " >&6; }
22460         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22461 $as_echo "disabled" >&6; }
22462       else
22463         # Check if the provided tool contains a complete path.
22464         tool_specified="$READELF"
22465         tool_basename="${tool_specified##*/}"
22466         if test "x$tool_basename" = "x$tool_specified"; then
22467           # A command without a complete path is provided, search $PATH.
22468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22469 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22470           # Extract the first word of "$tool_basename", so it can be a program name with args.
22471 set dummy $tool_basename; ac_word=$2
22472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22473 $as_echo_n "checking for $ac_word... " >&6; }
22474 if ${ac_cv_path_READELF+:} false; then :
22475   $as_echo_n "(cached) " >&6
22476 else
22477   case $READELF in
22478   [\\/]* | ?:[\\/]*)
22479   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22480   ;;
22481   *)
22482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22483 for as_dir in $PATH
22484 do
22485   IFS=$as_save_IFS
22486   test -z "$as_dir" && as_dir=.
22487     for ac_exec_ext in '' $ac_executable_extensions; do
22488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22489     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22491     break 2
22492   fi
22493 done
22494   done
22495 IFS=$as_save_IFS
22496 
22497   ;;
22498 esac
22499 fi
22500 READELF=$ac_cv_path_READELF
22501 if test -n "$READELF"; then
22502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22503 $as_echo "$READELF" >&6; }
22504 else
22505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22506 $as_echo "no" >&6; }
22507 fi
22508 
22509 
22510           if test "x$READELF" = x; then
22511             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22512           fi
22513         else
22514           # Otherwise we believe it is a complete path. Use it as it is.
22515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22516 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22517           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22518 $as_echo_n "checking for READELF... " >&6; }
22519           if test ! -x "$tool_specified"; then
22520             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22521 $as_echo "not found" >&6; }
22522             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22523           fi
22524           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22525 $as_echo "$tool_specified" >&6; }
22526         fi
22527       fi
22528     fi
22529 
22530   fi
22531 
22532 
22533 
22534 
22535   # Publish this variable in the help.
22536 
22537 
22538   if [ -z "${DOT+x}" ]; then
22539     # The variable is not set by user, try to locate tool using the code snippet
22540     for ac_prog in dot
22541 do
22542   # Extract the first word of "$ac_prog", so it can be a program name with args.
22543 set dummy $ac_prog; ac_word=$2
22544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22545 $as_echo_n "checking for $ac_word... " >&6; }
22546 if ${ac_cv_path_DOT+:} false; then :
22547   $as_echo_n "(cached) " >&6
22548 else
22549   case $DOT in
22550   [\\/]* | ?:[\\/]*)
22551   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22552   ;;
22553   *)
22554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22555 for as_dir in $PATH
22556 do
22557   IFS=$as_save_IFS
22558   test -z "$as_dir" && as_dir=.
22559     for ac_exec_ext in '' $ac_executable_extensions; do
22560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22561     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22563     break 2
22564   fi
22565 done
22566   done
22567 IFS=$as_save_IFS
22568 
22569   ;;
22570 esac
22571 fi
22572 DOT=$ac_cv_path_DOT
22573 if test -n "$DOT"; then
22574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22575 $as_echo "$DOT" >&6; }
22576 else
22577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22578 $as_echo "no" >&6; }
22579 fi
22580 
22581 
22582   test -n "$DOT" && break
22583 done
22584 
22585   else
22586     # The variable is set, but is it from the command line or the environment?
22587 
22588     # Try to remove the string !DOT! from our list.
22589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22591       # If it failed, the variable was not from the command line. Ignore it,
22592       # but warn the user (except for BASH, which is always set by the calling BASH).
22593       if test "xDOT" != xBASH; then
22594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22595 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22596       fi
22597       # Try to locate tool using the code snippet
22598       for ac_prog in dot
22599 do
22600   # Extract the first word of "$ac_prog", so it can be a program name with args.
22601 set dummy $ac_prog; ac_word=$2
22602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22603 $as_echo_n "checking for $ac_word... " >&6; }
22604 if ${ac_cv_path_DOT+:} false; then :
22605   $as_echo_n "(cached) " >&6
22606 else
22607   case $DOT in
22608   [\\/]* | ?:[\\/]*)
22609   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22610   ;;
22611   *)
22612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22613 for as_dir in $PATH
22614 do
22615   IFS=$as_save_IFS
22616   test -z "$as_dir" && as_dir=.
22617     for ac_exec_ext in '' $ac_executable_extensions; do
22618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22619     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22621     break 2
22622   fi
22623 done
22624   done
22625 IFS=$as_save_IFS
22626 
22627   ;;
22628 esac
22629 fi
22630 DOT=$ac_cv_path_DOT
22631 if test -n "$DOT"; then
22632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22633 $as_echo "$DOT" >&6; }
22634 else
22635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22636 $as_echo "no" >&6; }
22637 fi
22638 
22639 
22640   test -n "$DOT" && break
22641 done
22642 
22643     else
22644       # If it succeeded, then it was overridden by the user. We will use it
22645       # for the tool.
22646 
22647       # First remove it from the list of overridden variables, so we can test
22648       # for unknown variables in the end.
22649       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22650 
22651       # Check if we try to supply an empty value
22652       if test "x$DOT" = x; then
22653         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22654 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22656 $as_echo_n "checking for DOT... " >&6; }
22657         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22658 $as_echo "disabled" >&6; }
22659       else
22660         # Check if the provided tool contains a complete path.
22661         tool_specified="$DOT"
22662         tool_basename="${tool_specified##*/}"
22663         if test "x$tool_basename" = "x$tool_specified"; then
22664           # A command without a complete path is provided, search $PATH.
22665           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22666 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22667           # Extract the first word of "$tool_basename", so it can be a program name with args.
22668 set dummy $tool_basename; ac_word=$2
22669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22670 $as_echo_n "checking for $ac_word... " >&6; }
22671 if ${ac_cv_path_DOT+:} false; then :
22672   $as_echo_n "(cached) " >&6
22673 else
22674   case $DOT in
22675   [\\/]* | ?:[\\/]*)
22676   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22677   ;;
22678   *)
22679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22680 for as_dir in $PATH
22681 do
22682   IFS=$as_save_IFS
22683   test -z "$as_dir" && as_dir=.
22684     for ac_exec_ext in '' $ac_executable_extensions; do
22685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22686     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22688     break 2
22689   fi
22690 done
22691   done
22692 IFS=$as_save_IFS
22693 
22694   ;;
22695 esac
22696 fi
22697 DOT=$ac_cv_path_DOT
22698 if test -n "$DOT"; then
22699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22700 $as_echo "$DOT" >&6; }
22701 else
22702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22703 $as_echo "no" >&6; }
22704 fi
22705 
22706 
22707           if test "x$DOT" = x; then
22708             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22709           fi
22710         else
22711           # Otherwise we believe it is a complete path. Use it as it is.
22712           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22713 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22714           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22715 $as_echo_n "checking for DOT... " >&6; }
22716           if test ! -x "$tool_specified"; then
22717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22718 $as_echo "not found" >&6; }
22719             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22720           fi
22721           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22722 $as_echo "$tool_specified" >&6; }
22723         fi
22724       fi
22725     fi
22726 
22727   fi
22728 
22729 
22730 
22731 
22732   # Publish this variable in the help.
22733 
22734 
22735   if [ -z "${HG+x}" ]; then
22736     # The variable is not set by user, try to locate tool using the code snippet
22737     for ac_prog in hg
22738 do
22739   # Extract the first word of "$ac_prog", so it can be a program name with args.
22740 set dummy $ac_prog; ac_word=$2
22741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22742 $as_echo_n "checking for $ac_word... " >&6; }
22743 if ${ac_cv_path_HG+:} false; then :
22744   $as_echo_n "(cached) " >&6
22745 else
22746   case $HG in
22747   [\\/]* | ?:[\\/]*)
22748   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22749   ;;
22750   *)
22751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22752 for as_dir in $PATH
22753 do
22754   IFS=$as_save_IFS
22755   test -z "$as_dir" && as_dir=.
22756     for ac_exec_ext in '' $ac_executable_extensions; do
22757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22758     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22760     break 2
22761   fi
22762 done
22763   done
22764 IFS=$as_save_IFS
22765 
22766   ;;
22767 esac
22768 fi
22769 HG=$ac_cv_path_HG
22770 if test -n "$HG"; then
22771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22772 $as_echo "$HG" >&6; }
22773 else
22774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22775 $as_echo "no" >&6; }
22776 fi
22777 
22778 
22779   test -n "$HG" && break
22780 done
22781 
22782   else
22783     # The variable is set, but is it from the command line or the environment?
22784 
22785     # Try to remove the string !HG! from our list.
22786     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22787     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22788       # If it failed, the variable was not from the command line. Ignore it,
22789       # but warn the user (except for BASH, which is always set by the calling BASH).
22790       if test "xHG" != xBASH; then
22791         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22792 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22793       fi
22794       # Try to locate tool using the code snippet
22795       for ac_prog in hg
22796 do
22797   # Extract the first word of "$ac_prog", so it can be a program name with args.
22798 set dummy $ac_prog; ac_word=$2
22799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22800 $as_echo_n "checking for $ac_word... " >&6; }
22801 if ${ac_cv_path_HG+:} false; then :
22802   $as_echo_n "(cached) " >&6
22803 else
22804   case $HG in
22805   [\\/]* | ?:[\\/]*)
22806   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22807   ;;
22808   *)
22809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22810 for as_dir in $PATH
22811 do
22812   IFS=$as_save_IFS
22813   test -z "$as_dir" && as_dir=.
22814     for ac_exec_ext in '' $ac_executable_extensions; do
22815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22816     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22818     break 2
22819   fi
22820 done
22821   done
22822 IFS=$as_save_IFS
22823 
22824   ;;
22825 esac
22826 fi
22827 HG=$ac_cv_path_HG
22828 if test -n "$HG"; then
22829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22830 $as_echo "$HG" >&6; }
22831 else
22832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22833 $as_echo "no" >&6; }
22834 fi
22835 
22836 
22837   test -n "$HG" && break
22838 done
22839 
22840     else
22841       # If it succeeded, then it was overridden by the user. We will use it
22842       # for the tool.
22843 
22844       # First remove it from the list of overridden variables, so we can test
22845       # for unknown variables in the end.
22846       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22847 
22848       # Check if we try to supply an empty value
22849       if test "x$HG" = x; then
22850         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22851 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22852         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22853 $as_echo_n "checking for HG... " >&6; }
22854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22855 $as_echo "disabled" >&6; }
22856       else
22857         # Check if the provided tool contains a complete path.
22858         tool_specified="$HG"
22859         tool_basename="${tool_specified##*/}"
22860         if test "x$tool_basename" = "x$tool_specified"; then
22861           # A command without a complete path is provided, search $PATH.
22862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22863 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22864           # Extract the first word of "$tool_basename", so it can be a program name with args.
22865 set dummy $tool_basename; ac_word=$2
22866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22867 $as_echo_n "checking for $ac_word... " >&6; }
22868 if ${ac_cv_path_HG+:} false; then :
22869   $as_echo_n "(cached) " >&6
22870 else
22871   case $HG in
22872   [\\/]* | ?:[\\/]*)
22873   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22874   ;;
22875   *)
22876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22877 for as_dir in $PATH
22878 do
22879   IFS=$as_save_IFS
22880   test -z "$as_dir" && as_dir=.
22881     for ac_exec_ext in '' $ac_executable_extensions; do
22882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22883     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22885     break 2
22886   fi
22887 done
22888   done
22889 IFS=$as_save_IFS
22890 
22891   ;;
22892 esac
22893 fi
22894 HG=$ac_cv_path_HG
22895 if test -n "$HG"; then
22896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22897 $as_echo "$HG" >&6; }
22898 else
22899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22900 $as_echo "no" >&6; }
22901 fi
22902 
22903 
22904           if test "x$HG" = x; then
22905             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22906           fi
22907         else
22908           # Otherwise we believe it is a complete path. Use it as it is.
22909           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22910 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22911           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22912 $as_echo_n "checking for HG... " >&6; }
22913           if test ! -x "$tool_specified"; then
22914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22915 $as_echo "not found" >&6; }
22916             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22917           fi
22918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22919 $as_echo "$tool_specified" >&6; }
22920         fi
22921       fi
22922     fi
22923 
22924   fi
22925 
22926 
22927 
22928 
22929   # Publish this variable in the help.
22930 
22931 
22932   if [ -z "${STAT+x}" ]; then
22933     # The variable is not set by user, try to locate tool using the code snippet
22934     for ac_prog in stat
22935 do
22936   # Extract the first word of "$ac_prog", so it can be a program name with args.
22937 set dummy $ac_prog; ac_word=$2
22938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22939 $as_echo_n "checking for $ac_word... " >&6; }
22940 if ${ac_cv_path_STAT+:} false; then :
22941   $as_echo_n "(cached) " >&6
22942 else
22943   case $STAT in
22944   [\\/]* | ?:[\\/]*)
22945   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22946   ;;
22947   *)
22948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22949 for as_dir in $PATH
22950 do
22951   IFS=$as_save_IFS
22952   test -z "$as_dir" && as_dir=.
22953     for ac_exec_ext in '' $ac_executable_extensions; do
22954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22955     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22957     break 2
22958   fi
22959 done
22960   done
22961 IFS=$as_save_IFS
22962 
22963   ;;
22964 esac
22965 fi
22966 STAT=$ac_cv_path_STAT
22967 if test -n "$STAT"; then
22968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22969 $as_echo "$STAT" >&6; }
22970 else
22971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22972 $as_echo "no" >&6; }
22973 fi
22974 
22975 
22976   test -n "$STAT" && break
22977 done
22978 
22979   else
22980     # The variable is set, but is it from the command line or the environment?
22981 
22982     # Try to remove the string !STAT! from our list.
22983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22985       # If it failed, the variable was not from the command line. Ignore it,
22986       # but warn the user (except for BASH, which is always set by the calling BASH).
22987       if test "xSTAT" != xBASH; then
22988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22989 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22990       fi
22991       # Try to locate tool using the code snippet
22992       for ac_prog in stat
22993 do
22994   # Extract the first word of "$ac_prog", so it can be a program name with args.
22995 set dummy $ac_prog; ac_word=$2
22996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22997 $as_echo_n "checking for $ac_word... " >&6; }
22998 if ${ac_cv_path_STAT+:} false; then :
22999   $as_echo_n "(cached) " >&6
23000 else
23001   case $STAT in
23002   [\\/]* | ?:[\\/]*)
23003   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23004   ;;
23005   *)
23006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23007 for as_dir in $PATH
23008 do
23009   IFS=$as_save_IFS
23010   test -z "$as_dir" && as_dir=.
23011     for ac_exec_ext in '' $ac_executable_extensions; do
23012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23013     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23015     break 2
23016   fi
23017 done
23018   done
23019 IFS=$as_save_IFS
23020 
23021   ;;
23022 esac
23023 fi
23024 STAT=$ac_cv_path_STAT
23025 if test -n "$STAT"; then
23026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23027 $as_echo "$STAT" >&6; }
23028 else
23029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23030 $as_echo "no" >&6; }
23031 fi
23032 
23033 
23034   test -n "$STAT" && break
23035 done
23036 
23037     else
23038       # If it succeeded, then it was overridden by the user. We will use it
23039       # for the tool.
23040 
23041       # First remove it from the list of overridden variables, so we can test
23042       # for unknown variables in the end.
23043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23044 
23045       # Check if we try to supply an empty value
23046       if test "x$STAT" = x; then
23047         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23048 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23049         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23050 $as_echo_n "checking for STAT... " >&6; }
23051         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23052 $as_echo "disabled" >&6; }
23053       else
23054         # Check if the provided tool contains a complete path.
23055         tool_specified="$STAT"
23056         tool_basename="${tool_specified##*/}"
23057         if test "x$tool_basename" = "x$tool_specified"; then
23058           # A command without a complete path is provided, search $PATH.
23059           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23060 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23061           # Extract the first word of "$tool_basename", so it can be a program name with args.
23062 set dummy $tool_basename; ac_word=$2
23063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23064 $as_echo_n "checking for $ac_word... " >&6; }
23065 if ${ac_cv_path_STAT+:} false; then :
23066   $as_echo_n "(cached) " >&6
23067 else
23068   case $STAT in
23069   [\\/]* | ?:[\\/]*)
23070   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23071   ;;
23072   *)
23073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23074 for as_dir in $PATH
23075 do
23076   IFS=$as_save_IFS
23077   test -z "$as_dir" && as_dir=.
23078     for ac_exec_ext in '' $ac_executable_extensions; do
23079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23080     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23082     break 2
23083   fi
23084 done
23085   done
23086 IFS=$as_save_IFS
23087 
23088   ;;
23089 esac
23090 fi
23091 STAT=$ac_cv_path_STAT
23092 if test -n "$STAT"; then
23093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23094 $as_echo "$STAT" >&6; }
23095 else
23096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23097 $as_echo "no" >&6; }
23098 fi
23099 
23100 
23101           if test "x$STAT" = x; then
23102             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23103           fi
23104         else
23105           # Otherwise we believe it is a complete path. Use it as it is.
23106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23107 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23108           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23109 $as_echo_n "checking for STAT... " >&6; }
23110           if test ! -x "$tool_specified"; then
23111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23112 $as_echo "not found" >&6; }
23113             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23114           fi
23115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23116 $as_echo "$tool_specified" >&6; }
23117         fi
23118       fi
23119     fi
23120 
23121   fi
23122 
23123 
23124 
23125 
23126   # Publish this variable in the help.
23127 
23128 
23129   if [ -z "${TIME+x}" ]; then
23130     # The variable is not set by user, try to locate tool using the code snippet
23131     for ac_prog in time
23132 do
23133   # Extract the first word of "$ac_prog", so it can be a program name with args.
23134 set dummy $ac_prog; ac_word=$2
23135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23136 $as_echo_n "checking for $ac_word... " >&6; }
23137 if ${ac_cv_path_TIME+:} false; then :
23138   $as_echo_n "(cached) " >&6
23139 else
23140   case $TIME in
23141   [\\/]* | ?:[\\/]*)
23142   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23143   ;;
23144   *)
23145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23146 for as_dir in $PATH
23147 do
23148   IFS=$as_save_IFS
23149   test -z "$as_dir" && as_dir=.
23150     for ac_exec_ext in '' $ac_executable_extensions; do
23151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23152     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23154     break 2
23155   fi
23156 done
23157   done
23158 IFS=$as_save_IFS
23159 
23160   ;;
23161 esac
23162 fi
23163 TIME=$ac_cv_path_TIME
23164 if test -n "$TIME"; then
23165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23166 $as_echo "$TIME" >&6; }
23167 else
23168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23169 $as_echo "no" >&6; }
23170 fi
23171 
23172 
23173   test -n "$TIME" && break
23174 done
23175 
23176   else
23177     # The variable is set, but is it from the command line or the environment?
23178 
23179     # Try to remove the string !TIME! from our list.
23180     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23181     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23182       # If it failed, the variable was not from the command line. Ignore it,
23183       # but warn the user (except for BASH, which is always set by the calling BASH).
23184       if test "xTIME" != xBASH; then
23185         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23186 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23187       fi
23188       # Try to locate tool using the code snippet
23189       for ac_prog in time
23190 do
23191   # Extract the first word of "$ac_prog", so it can be a program name with args.
23192 set dummy $ac_prog; ac_word=$2
23193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23194 $as_echo_n "checking for $ac_word... " >&6; }
23195 if ${ac_cv_path_TIME+:} false; then :
23196   $as_echo_n "(cached) " >&6
23197 else
23198   case $TIME in
23199   [\\/]* | ?:[\\/]*)
23200   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23201   ;;
23202   *)
23203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23204 for as_dir in $PATH
23205 do
23206   IFS=$as_save_IFS
23207   test -z "$as_dir" && as_dir=.
23208     for ac_exec_ext in '' $ac_executable_extensions; do
23209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23210     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23212     break 2
23213   fi
23214 done
23215   done
23216 IFS=$as_save_IFS
23217 
23218   ;;
23219 esac
23220 fi
23221 TIME=$ac_cv_path_TIME
23222 if test -n "$TIME"; then
23223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23224 $as_echo "$TIME" >&6; }
23225 else
23226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23227 $as_echo "no" >&6; }
23228 fi
23229 
23230 
23231   test -n "$TIME" && break
23232 done
23233 
23234     else
23235       # If it succeeded, then it was overridden by the user. We will use it
23236       # for the tool.
23237 
23238       # First remove it from the list of overridden variables, so we can test
23239       # for unknown variables in the end.
23240       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23241 
23242       # Check if we try to supply an empty value
23243       if test "x$TIME" = x; then
23244         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23245 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23246         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23247 $as_echo_n "checking for TIME... " >&6; }
23248         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23249 $as_echo "disabled" >&6; }
23250       else
23251         # Check if the provided tool contains a complete path.
23252         tool_specified="$TIME"
23253         tool_basename="${tool_specified##*/}"
23254         if test "x$tool_basename" = "x$tool_specified"; then
23255           # A command without a complete path is provided, search $PATH.
23256           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23257 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23258           # Extract the first word of "$tool_basename", so it can be a program name with args.
23259 set dummy $tool_basename; ac_word=$2
23260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23261 $as_echo_n "checking for $ac_word... " >&6; }
23262 if ${ac_cv_path_TIME+:} false; then :
23263   $as_echo_n "(cached) " >&6
23264 else
23265   case $TIME in
23266   [\\/]* | ?:[\\/]*)
23267   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23268   ;;
23269   *)
23270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23271 for as_dir in $PATH
23272 do
23273   IFS=$as_save_IFS
23274   test -z "$as_dir" && as_dir=.
23275     for ac_exec_ext in '' $ac_executable_extensions; do
23276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23277     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23279     break 2
23280   fi
23281 done
23282   done
23283 IFS=$as_save_IFS
23284 
23285   ;;
23286 esac
23287 fi
23288 TIME=$ac_cv_path_TIME
23289 if test -n "$TIME"; then
23290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23291 $as_echo "$TIME" >&6; }
23292 else
23293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23294 $as_echo "no" >&6; }
23295 fi
23296 
23297 
23298           if test "x$TIME" = x; then
23299             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23300           fi
23301         else
23302           # Otherwise we believe it is a complete path. Use it as it is.
23303           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23304 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23305           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23306 $as_echo_n "checking for TIME... " >&6; }
23307           if test ! -x "$tool_specified"; then
23308             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23309 $as_echo "not found" >&6; }
23310             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23311           fi
23312           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23313 $as_echo "$tool_specified" >&6; }
23314         fi
23315       fi
23316     fi
23317 
23318   fi
23319 
23320 
23321 
23322 
23323   # Publish this variable in the help.
23324 
23325 
23326   if [ -z "${FLOCK+x}" ]; then
23327     # The variable is not set by user, try to locate tool using the code snippet
23328     for ac_prog in flock
23329 do
23330   # Extract the first word of "$ac_prog", so it can be a program name with args.
23331 set dummy $ac_prog; ac_word=$2
23332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23333 $as_echo_n "checking for $ac_word... " >&6; }
23334 if ${ac_cv_path_FLOCK+:} false; then :
23335   $as_echo_n "(cached) " >&6
23336 else
23337   case $FLOCK in
23338   [\\/]* | ?:[\\/]*)
23339   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23340   ;;
23341   *)
23342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23343 for as_dir in $PATH
23344 do
23345   IFS=$as_save_IFS
23346   test -z "$as_dir" && as_dir=.
23347     for ac_exec_ext in '' $ac_executable_extensions; do
23348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23349     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23351     break 2
23352   fi
23353 done
23354   done
23355 IFS=$as_save_IFS
23356 
23357   ;;
23358 esac
23359 fi
23360 FLOCK=$ac_cv_path_FLOCK
23361 if test -n "$FLOCK"; then
23362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23363 $as_echo "$FLOCK" >&6; }
23364 else
23365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23366 $as_echo "no" >&6; }
23367 fi
23368 
23369 
23370   test -n "$FLOCK" && break
23371 done
23372 
23373   else
23374     # The variable is set, but is it from the command line or the environment?
23375 
23376     # Try to remove the string !FLOCK! from our list.
23377     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23378     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23379       # If it failed, the variable was not from the command line. Ignore it,
23380       # but warn the user (except for BASH, which is always set by the calling BASH).
23381       if test "xFLOCK" != xBASH; then
23382         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23383 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23384       fi
23385       # Try to locate tool using the code snippet
23386       for ac_prog in flock
23387 do
23388   # Extract the first word of "$ac_prog", so it can be a program name with args.
23389 set dummy $ac_prog; ac_word=$2
23390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23391 $as_echo_n "checking for $ac_word... " >&6; }
23392 if ${ac_cv_path_FLOCK+:} false; then :
23393   $as_echo_n "(cached) " >&6
23394 else
23395   case $FLOCK in
23396   [\\/]* | ?:[\\/]*)
23397   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23398   ;;
23399   *)
23400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23401 for as_dir in $PATH
23402 do
23403   IFS=$as_save_IFS
23404   test -z "$as_dir" && as_dir=.
23405     for ac_exec_ext in '' $ac_executable_extensions; do
23406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23407     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23409     break 2
23410   fi
23411 done
23412   done
23413 IFS=$as_save_IFS
23414 
23415   ;;
23416 esac
23417 fi
23418 FLOCK=$ac_cv_path_FLOCK
23419 if test -n "$FLOCK"; then
23420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23421 $as_echo "$FLOCK" >&6; }
23422 else
23423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23424 $as_echo "no" >&6; }
23425 fi
23426 
23427 
23428   test -n "$FLOCK" && break
23429 done
23430 
23431     else
23432       # If it succeeded, then it was overridden by the user. We will use it
23433       # for the tool.
23434 
23435       # First remove it from the list of overridden variables, so we can test
23436       # for unknown variables in the end.
23437       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23438 
23439       # Check if we try to supply an empty value
23440       if test "x$FLOCK" = x; then
23441         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23442 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23444 $as_echo_n "checking for FLOCK... " >&6; }
23445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23446 $as_echo "disabled" >&6; }
23447       else
23448         # Check if the provided tool contains a complete path.
23449         tool_specified="$FLOCK"
23450         tool_basename="${tool_specified##*/}"
23451         if test "x$tool_basename" = "x$tool_specified"; then
23452           # A command without a complete path is provided, search $PATH.
23453           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23454 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23455           # Extract the first word of "$tool_basename", so it can be a program name with args.
23456 set dummy $tool_basename; ac_word=$2
23457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23458 $as_echo_n "checking for $ac_word... " >&6; }
23459 if ${ac_cv_path_FLOCK+:} false; then :
23460   $as_echo_n "(cached) " >&6
23461 else
23462   case $FLOCK in
23463   [\\/]* | ?:[\\/]*)
23464   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23465   ;;
23466   *)
23467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23468 for as_dir in $PATH
23469 do
23470   IFS=$as_save_IFS
23471   test -z "$as_dir" && as_dir=.
23472     for ac_exec_ext in '' $ac_executable_extensions; do
23473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23474     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23476     break 2
23477   fi
23478 done
23479   done
23480 IFS=$as_save_IFS
23481 
23482   ;;
23483 esac
23484 fi
23485 FLOCK=$ac_cv_path_FLOCK
23486 if test -n "$FLOCK"; then
23487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23488 $as_echo "$FLOCK" >&6; }
23489 else
23490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23491 $as_echo "no" >&6; }
23492 fi
23493 
23494 
23495           if test "x$FLOCK" = x; then
23496             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23497           fi
23498         else
23499           # Otherwise we believe it is a complete path. Use it as it is.
23500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23501 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23502           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23503 $as_echo_n "checking for FLOCK... " >&6; }
23504           if test ! -x "$tool_specified"; then
23505             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23506 $as_echo "not found" >&6; }
23507             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23508           fi
23509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23510 $as_echo "$tool_specified" >&6; }
23511         fi
23512       fi
23513     fi
23514 
23515   fi
23516 
23517 
23518   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23519   # be in the user path.
23520 
23521 
23522   # Publish this variable in the help.
23523 
23524 
23525   if [ -z "${DTRACE+x}" ]; then
23526     # The variable is not set by user, try to locate tool using the code snippet
23527     for ac_prog in dtrace
23528 do
23529   # Extract the first word of "$ac_prog", so it can be a program name with args.
23530 set dummy $ac_prog; ac_word=$2
23531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23532 $as_echo_n "checking for $ac_word... " >&6; }
23533 if ${ac_cv_path_DTRACE+:} false; then :
23534   $as_echo_n "(cached) " >&6
23535 else
23536   case $DTRACE in
23537   [\\/]* | ?:[\\/]*)
23538   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23539   ;;
23540   *)
23541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23542 as_dummy="$PATH:/usr/sbin"
23543 for as_dir in $as_dummy
23544 do
23545   IFS=$as_save_IFS
23546   test -z "$as_dir" && as_dir=.
23547     for ac_exec_ext in '' $ac_executable_extensions; do
23548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23549     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23551     break 2
23552   fi
23553 done
23554   done
23555 IFS=$as_save_IFS
23556 
23557   ;;
23558 esac
23559 fi
23560 DTRACE=$ac_cv_path_DTRACE
23561 if test -n "$DTRACE"; then
23562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23563 $as_echo "$DTRACE" >&6; }
23564 else
23565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23566 $as_echo "no" >&6; }
23567 fi
23568 
23569 
23570   test -n "$DTRACE" && break
23571 done
23572 
23573   else
23574     # The variable is set, but is it from the command line or the environment?
23575 
23576     # Try to remove the string !DTRACE! from our list.
23577     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23578     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23579       # If it failed, the variable was not from the command line. Ignore it,
23580       # but warn the user (except for BASH, which is always set by the calling BASH).
23581       if test "xDTRACE" != xBASH; then
23582         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23583 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23584       fi
23585       # Try to locate tool using the code snippet
23586       for ac_prog in dtrace
23587 do
23588   # Extract the first word of "$ac_prog", so it can be a program name with args.
23589 set dummy $ac_prog; ac_word=$2
23590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23591 $as_echo_n "checking for $ac_word... " >&6; }
23592 if ${ac_cv_path_DTRACE+:} false; then :
23593   $as_echo_n "(cached) " >&6
23594 else
23595   case $DTRACE in
23596   [\\/]* | ?:[\\/]*)
23597   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23598   ;;
23599   *)
23600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23601 as_dummy="$PATH:/usr/sbin"
23602 for as_dir in $as_dummy
23603 do
23604   IFS=$as_save_IFS
23605   test -z "$as_dir" && as_dir=.
23606     for ac_exec_ext in '' $ac_executable_extensions; do
23607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23608     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23610     break 2
23611   fi
23612 done
23613   done
23614 IFS=$as_save_IFS
23615 
23616   ;;
23617 esac
23618 fi
23619 DTRACE=$ac_cv_path_DTRACE
23620 if test -n "$DTRACE"; then
23621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23622 $as_echo "$DTRACE" >&6; }
23623 else
23624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23625 $as_echo "no" >&6; }
23626 fi
23627 
23628 
23629   test -n "$DTRACE" && break
23630 done
23631 
23632     else
23633       # If it succeeded, then it was overridden by the user. We will use it
23634       # for the tool.
23635 
23636       # First remove it from the list of overridden variables, so we can test
23637       # for unknown variables in the end.
23638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23639 
23640       # Check if we try to supply an empty value
23641       if test "x$DTRACE" = x; then
23642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23643 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23645 $as_echo_n "checking for DTRACE... " >&6; }
23646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23647 $as_echo "disabled" >&6; }
23648       else
23649         # Check if the provided tool contains a complete path.
23650         tool_specified="$DTRACE"
23651         tool_basename="${tool_specified##*/}"
23652         if test "x$tool_basename" = "x$tool_specified"; then
23653           # A command without a complete path is provided, search $PATH.
23654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23655 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23656           # Extract the first word of "$tool_basename", so it can be a program name with args.
23657 set dummy $tool_basename; ac_word=$2
23658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23659 $as_echo_n "checking for $ac_word... " >&6; }
23660 if ${ac_cv_path_DTRACE+:} false; then :
23661   $as_echo_n "(cached) " >&6
23662 else
23663   case $DTRACE in
23664   [\\/]* | ?:[\\/]*)
23665   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23666   ;;
23667   *)
23668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23669 for as_dir in $PATH
23670 do
23671   IFS=$as_save_IFS
23672   test -z "$as_dir" && as_dir=.
23673     for ac_exec_ext in '' $ac_executable_extensions; do
23674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23675     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23677     break 2
23678   fi
23679 done
23680   done
23681 IFS=$as_save_IFS
23682 
23683   ;;
23684 esac
23685 fi
23686 DTRACE=$ac_cv_path_DTRACE
23687 if test -n "$DTRACE"; then
23688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23689 $as_echo "$DTRACE" >&6; }
23690 else
23691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23692 $as_echo "no" >&6; }
23693 fi
23694 
23695 
23696           if test "x$DTRACE" = x; then
23697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23698           fi
23699         else
23700           # Otherwise we believe it is a complete path. Use it as it is.
23701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23702 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23704 $as_echo_n "checking for DTRACE... " >&6; }
23705           if test ! -x "$tool_specified"; then
23706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23707 $as_echo "not found" >&6; }
23708             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23709           fi
23710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23711 $as_echo "$tool_specified" >&6; }
23712         fi
23713       fi
23714     fi
23715 
23716   fi
23717 
23718 
23719 
23720 
23721   # Publish this variable in the help.
23722 
23723 
23724   if [ -z "${PATCH+x}" ]; then
23725     # The variable is not set by user, try to locate tool using the code snippet
23726     for ac_prog in gpatch patch
23727 do
23728   # Extract the first word of "$ac_prog", so it can be a program name with args.
23729 set dummy $ac_prog; ac_word=$2
23730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23731 $as_echo_n "checking for $ac_word... " >&6; }
23732 if ${ac_cv_path_PATCH+:} false; then :
23733   $as_echo_n "(cached) " >&6
23734 else
23735   case $PATCH in
23736   [\\/]* | ?:[\\/]*)
23737   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23738   ;;
23739   *)
23740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23741 for as_dir in $PATH
23742 do
23743   IFS=$as_save_IFS
23744   test -z "$as_dir" && as_dir=.
23745     for ac_exec_ext in '' $ac_executable_extensions; do
23746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23747     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23749     break 2
23750   fi
23751 done
23752   done
23753 IFS=$as_save_IFS
23754 
23755   ;;
23756 esac
23757 fi
23758 PATCH=$ac_cv_path_PATCH
23759 if test -n "$PATCH"; then
23760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23761 $as_echo "$PATCH" >&6; }
23762 else
23763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23764 $as_echo "no" >&6; }
23765 fi
23766 
23767 
23768   test -n "$PATCH" && break
23769 done
23770 
23771   else
23772     # The variable is set, but is it from the command line or the environment?
23773 
23774     # Try to remove the string !PATCH! from our list.
23775     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23776     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23777       # If it failed, the variable was not from the command line. Ignore it,
23778       # but warn the user (except for BASH, which is always set by the calling BASH).
23779       if test "xPATCH" != xBASH; then
23780         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23781 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23782       fi
23783       # Try to locate tool using the code snippet
23784       for ac_prog in gpatch patch
23785 do
23786   # Extract the first word of "$ac_prog", so it can be a program name with args.
23787 set dummy $ac_prog; ac_word=$2
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23789 $as_echo_n "checking for $ac_word... " >&6; }
23790 if ${ac_cv_path_PATCH+:} false; then :
23791   $as_echo_n "(cached) " >&6
23792 else
23793   case $PATCH in
23794   [\\/]* | ?:[\\/]*)
23795   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23796   ;;
23797   *)
23798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23799 for as_dir in $PATH
23800 do
23801   IFS=$as_save_IFS
23802   test -z "$as_dir" && as_dir=.
23803     for ac_exec_ext in '' $ac_executable_extensions; do
23804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23805     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23807     break 2
23808   fi
23809 done
23810   done
23811 IFS=$as_save_IFS
23812 
23813   ;;
23814 esac
23815 fi
23816 PATCH=$ac_cv_path_PATCH
23817 if test -n "$PATCH"; then
23818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23819 $as_echo "$PATCH" >&6; }
23820 else
23821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23822 $as_echo "no" >&6; }
23823 fi
23824 
23825 
23826   test -n "$PATCH" && break
23827 done
23828 
23829     else
23830       # If it succeeded, then it was overridden by the user. We will use it
23831       # for the tool.
23832 
23833       # First remove it from the list of overridden variables, so we can test
23834       # for unknown variables in the end.
23835       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23836 
23837       # Check if we try to supply an empty value
23838       if test "x$PATCH" = x; then
23839         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23840 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23842 $as_echo_n "checking for PATCH... " >&6; }
23843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23844 $as_echo "disabled" >&6; }
23845       else
23846         # Check if the provided tool contains a complete path.
23847         tool_specified="$PATCH"
23848         tool_basename="${tool_specified##*/}"
23849         if test "x$tool_basename" = "x$tool_specified"; then
23850           # A command without a complete path is provided, search $PATH.
23851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23852 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23853           # Extract the first word of "$tool_basename", so it can be a program name with args.
23854 set dummy $tool_basename; ac_word=$2
23855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23856 $as_echo_n "checking for $ac_word... " >&6; }
23857 if ${ac_cv_path_PATCH+:} false; then :
23858   $as_echo_n "(cached) " >&6
23859 else
23860   case $PATCH in
23861   [\\/]* | ?:[\\/]*)
23862   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23863   ;;
23864   *)
23865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23866 for as_dir in $PATH
23867 do
23868   IFS=$as_save_IFS
23869   test -z "$as_dir" && as_dir=.
23870     for ac_exec_ext in '' $ac_executable_extensions; do
23871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23872     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23874     break 2
23875   fi
23876 done
23877   done
23878 IFS=$as_save_IFS
23879 
23880   ;;
23881 esac
23882 fi
23883 PATCH=$ac_cv_path_PATCH
23884 if test -n "$PATCH"; then
23885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23886 $as_echo "$PATCH" >&6; }
23887 else
23888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23889 $as_echo "no" >&6; }
23890 fi
23891 
23892 
23893           if test "x$PATCH" = x; then
23894             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23895           fi
23896         else
23897           # Otherwise we believe it is a complete path. Use it as it is.
23898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23899 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23900           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23901 $as_echo_n "checking for PATCH... " >&6; }
23902           if test ! -x "$tool_specified"; then
23903             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23904 $as_echo "not found" >&6; }
23905             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23906           fi
23907           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23908 $as_echo "$tool_specified" >&6; }
23909         fi
23910       fi
23911     fi
23912 
23913   fi
23914 
23915 
23916   # Check if it's GNU time
23917   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23918   if test "x$IS_GNU_TIME" != x; then
23919     IS_GNU_TIME=yes
23920   else
23921     IS_GNU_TIME=no
23922   fi
23923 
23924 
23925   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23926 
23927 
23928 
23929   # Publish this variable in the help.
23930 
23931 
23932   if [ -z "${DSYMUTIL+x}" ]; then
23933     # The variable is not set by user, try to locate tool using the code snippet
23934     for ac_prog in dsymutil
23935 do
23936   # Extract the first word of "$ac_prog", so it can be a program name with args.
23937 set dummy $ac_prog; ac_word=$2
23938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23939 $as_echo_n "checking for $ac_word... " >&6; }
23940 if ${ac_cv_path_DSYMUTIL+:} false; then :
23941   $as_echo_n "(cached) " >&6
23942 else
23943   case $DSYMUTIL in
23944   [\\/]* | ?:[\\/]*)
23945   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23946   ;;
23947   *)
23948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23949 for as_dir in $PATH
23950 do
23951   IFS=$as_save_IFS
23952   test -z "$as_dir" && as_dir=.
23953     for ac_exec_ext in '' $ac_executable_extensions; do
23954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23955     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23957     break 2
23958   fi
23959 done
23960   done
23961 IFS=$as_save_IFS
23962 
23963   ;;
23964 esac
23965 fi
23966 DSYMUTIL=$ac_cv_path_DSYMUTIL
23967 if test -n "$DSYMUTIL"; then
23968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23969 $as_echo "$DSYMUTIL" >&6; }
23970 else
23971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23972 $as_echo "no" >&6; }
23973 fi
23974 
23975 
23976   test -n "$DSYMUTIL" && break
23977 done
23978 
23979   else
23980     # The variable is set, but is it from the command line or the environment?
23981 
23982     # Try to remove the string !DSYMUTIL! from our list.
23983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23985       # If it failed, the variable was not from the command line. Ignore it,
23986       # but warn the user (except for BASH, which is always set by the calling BASH).
23987       if test "xDSYMUTIL" != xBASH; then
23988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23989 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23990       fi
23991       # Try to locate tool using the code snippet
23992       for ac_prog in dsymutil
23993 do
23994   # Extract the first word of "$ac_prog", so it can be a program name with args.
23995 set dummy $ac_prog; ac_word=$2
23996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23997 $as_echo_n "checking for $ac_word... " >&6; }
23998 if ${ac_cv_path_DSYMUTIL+:} false; then :
23999   $as_echo_n "(cached) " >&6
24000 else
24001   case $DSYMUTIL in
24002   [\\/]* | ?:[\\/]*)
24003   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24004   ;;
24005   *)
24006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24007 for as_dir in $PATH
24008 do
24009   IFS=$as_save_IFS
24010   test -z "$as_dir" && as_dir=.
24011     for ac_exec_ext in '' $ac_executable_extensions; do
24012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24013     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24015     break 2
24016   fi
24017 done
24018   done
24019 IFS=$as_save_IFS
24020 
24021   ;;
24022 esac
24023 fi
24024 DSYMUTIL=$ac_cv_path_DSYMUTIL
24025 if test -n "$DSYMUTIL"; then
24026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24027 $as_echo "$DSYMUTIL" >&6; }
24028 else
24029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24030 $as_echo "no" >&6; }
24031 fi
24032 
24033 
24034   test -n "$DSYMUTIL" && break
24035 done
24036 
24037     else
24038       # If it succeeded, then it was overridden by the user. We will use it
24039       # for the tool.
24040 
24041       # First remove it from the list of overridden variables, so we can test
24042       # for unknown variables in the end.
24043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24044 
24045       # Check if we try to supply an empty value
24046       if test "x$DSYMUTIL" = x; then
24047         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24048 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24049         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24050 $as_echo_n "checking for DSYMUTIL... " >&6; }
24051         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24052 $as_echo "disabled" >&6; }
24053       else
24054         # Check if the provided tool contains a complete path.
24055         tool_specified="$DSYMUTIL"
24056         tool_basename="${tool_specified##*/}"
24057         if test "x$tool_basename" = "x$tool_specified"; then
24058           # A command without a complete path is provided, search $PATH.
24059           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24060 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24061           # Extract the first word of "$tool_basename", so it can be a program name with args.
24062 set dummy $tool_basename; ac_word=$2
24063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24064 $as_echo_n "checking for $ac_word... " >&6; }
24065 if ${ac_cv_path_DSYMUTIL+:} false; then :
24066   $as_echo_n "(cached) " >&6
24067 else
24068   case $DSYMUTIL in
24069   [\\/]* | ?:[\\/]*)
24070   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24071   ;;
24072   *)
24073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24074 for as_dir in $PATH
24075 do
24076   IFS=$as_save_IFS
24077   test -z "$as_dir" && as_dir=.
24078     for ac_exec_ext in '' $ac_executable_extensions; do
24079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24080     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24082     break 2
24083   fi
24084 done
24085   done
24086 IFS=$as_save_IFS
24087 
24088   ;;
24089 esac
24090 fi
24091 DSYMUTIL=$ac_cv_path_DSYMUTIL
24092 if test -n "$DSYMUTIL"; then
24093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24094 $as_echo "$DSYMUTIL" >&6; }
24095 else
24096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24097 $as_echo "no" >&6; }
24098 fi
24099 
24100 
24101           if test "x$DSYMUTIL" = x; then
24102             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24103           fi
24104         else
24105           # Otherwise we believe it is a complete path. Use it as it is.
24106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24107 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24108           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24109 $as_echo_n "checking for DSYMUTIL... " >&6; }
24110           if test ! -x "$tool_specified"; then
24111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24112 $as_echo "not found" >&6; }
24113             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24114           fi
24115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24116 $as_echo "$tool_specified" >&6; }
24117         fi
24118       fi
24119     fi
24120 
24121   fi
24122 
24123 
24124 
24125   if test "x$DSYMUTIL" = x; then
24126     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24127   fi
24128 
24129 
24130 
24131 
24132 
24133   # Publish this variable in the help.
24134 
24135 
24136   if [ -z "${XATTR+x}" ]; then
24137     # The variable is not set by user, try to locate tool using the code snippet
24138     for ac_prog in xattr
24139 do
24140   # Extract the first word of "$ac_prog", so it can be a program name with args.
24141 set dummy $ac_prog; ac_word=$2
24142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24143 $as_echo_n "checking for $ac_word... " >&6; }
24144 if ${ac_cv_path_XATTR+:} false; then :
24145   $as_echo_n "(cached) " >&6
24146 else
24147   case $XATTR in
24148   [\\/]* | ?:[\\/]*)
24149   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24150   ;;
24151   *)
24152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24153 for as_dir in $PATH
24154 do
24155   IFS=$as_save_IFS
24156   test -z "$as_dir" && as_dir=.
24157     for ac_exec_ext in '' $ac_executable_extensions; do
24158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24159     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24161     break 2
24162   fi
24163 done
24164   done
24165 IFS=$as_save_IFS
24166 
24167   ;;
24168 esac
24169 fi
24170 XATTR=$ac_cv_path_XATTR
24171 if test -n "$XATTR"; then
24172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24173 $as_echo "$XATTR" >&6; }
24174 else
24175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24176 $as_echo "no" >&6; }
24177 fi
24178 
24179 
24180   test -n "$XATTR" && break
24181 done
24182 
24183   else
24184     # The variable is set, but is it from the command line or the environment?
24185 
24186     # Try to remove the string !XATTR! from our list.
24187     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24188     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24189       # If it failed, the variable was not from the command line. Ignore it,
24190       # but warn the user (except for BASH, which is always set by the calling BASH).
24191       if test "xXATTR" != xBASH; then
24192         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24193 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24194       fi
24195       # Try to locate tool using the code snippet
24196       for ac_prog in xattr
24197 do
24198   # Extract the first word of "$ac_prog", so it can be a program name with args.
24199 set dummy $ac_prog; ac_word=$2
24200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24201 $as_echo_n "checking for $ac_word... " >&6; }
24202 if ${ac_cv_path_XATTR+:} false; then :
24203   $as_echo_n "(cached) " >&6
24204 else
24205   case $XATTR in
24206   [\\/]* | ?:[\\/]*)
24207   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24208   ;;
24209   *)
24210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24211 for as_dir in $PATH
24212 do
24213   IFS=$as_save_IFS
24214   test -z "$as_dir" && as_dir=.
24215     for ac_exec_ext in '' $ac_executable_extensions; do
24216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24217     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24219     break 2
24220   fi
24221 done
24222   done
24223 IFS=$as_save_IFS
24224 
24225   ;;
24226 esac
24227 fi
24228 XATTR=$ac_cv_path_XATTR
24229 if test -n "$XATTR"; then
24230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24231 $as_echo "$XATTR" >&6; }
24232 else
24233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24234 $as_echo "no" >&6; }
24235 fi
24236 
24237 
24238   test -n "$XATTR" && break
24239 done
24240 
24241     else
24242       # If it succeeded, then it was overridden by the user. We will use it
24243       # for the tool.
24244 
24245       # First remove it from the list of overridden variables, so we can test
24246       # for unknown variables in the end.
24247       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24248 
24249       # Check if we try to supply an empty value
24250       if test "x$XATTR" = x; then
24251         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24252 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24254 $as_echo_n "checking for XATTR... " >&6; }
24255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24256 $as_echo "disabled" >&6; }
24257       else
24258         # Check if the provided tool contains a complete path.
24259         tool_specified="$XATTR"
24260         tool_basename="${tool_specified##*/}"
24261         if test "x$tool_basename" = "x$tool_specified"; then
24262           # A command without a complete path is provided, search $PATH.
24263           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24264 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24265           # Extract the first word of "$tool_basename", so it can be a program name with args.
24266 set dummy $tool_basename; ac_word=$2
24267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24268 $as_echo_n "checking for $ac_word... " >&6; }
24269 if ${ac_cv_path_XATTR+:} false; then :
24270   $as_echo_n "(cached) " >&6
24271 else
24272   case $XATTR in
24273   [\\/]* | ?:[\\/]*)
24274   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24275   ;;
24276   *)
24277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24278 for as_dir in $PATH
24279 do
24280   IFS=$as_save_IFS
24281   test -z "$as_dir" && as_dir=.
24282     for ac_exec_ext in '' $ac_executable_extensions; do
24283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24284     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24286     break 2
24287   fi
24288 done
24289   done
24290 IFS=$as_save_IFS
24291 
24292   ;;
24293 esac
24294 fi
24295 XATTR=$ac_cv_path_XATTR
24296 if test -n "$XATTR"; then
24297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24298 $as_echo "$XATTR" >&6; }
24299 else
24300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24301 $as_echo "no" >&6; }
24302 fi
24303 
24304 
24305           if test "x$XATTR" = x; then
24306             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24307           fi
24308         else
24309           # Otherwise we believe it is a complete path. Use it as it is.
24310           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24311 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24312           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24313 $as_echo_n "checking for XATTR... " >&6; }
24314           if test ! -x "$tool_specified"; then
24315             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24316 $as_echo "not found" >&6; }
24317             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24318           fi
24319           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24320 $as_echo "$tool_specified" >&6; }
24321         fi
24322       fi
24323     fi
24324 
24325   fi
24326 
24327 
24328 
24329   if test "x$XATTR" = x; then
24330     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24331   fi
24332 
24333 
24334 
24335 
24336   # Publish this variable in the help.
24337 
24338 
24339   if [ -z "${CODESIGN+x}" ]; then
24340     # The variable is not set by user, try to locate tool using the code snippet
24341     for ac_prog in codesign
24342 do
24343   # Extract the first word of "$ac_prog", so it can be a program name with args.
24344 set dummy $ac_prog; ac_word=$2
24345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24346 $as_echo_n "checking for $ac_word... " >&6; }
24347 if ${ac_cv_path_CODESIGN+:} false; then :
24348   $as_echo_n "(cached) " >&6
24349 else
24350   case $CODESIGN in
24351   [\\/]* | ?:[\\/]*)
24352   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24353   ;;
24354   *)
24355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24356 for as_dir in $PATH
24357 do
24358   IFS=$as_save_IFS
24359   test -z "$as_dir" && as_dir=.
24360     for ac_exec_ext in '' $ac_executable_extensions; do
24361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24362     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24364     break 2
24365   fi
24366 done
24367   done
24368 IFS=$as_save_IFS
24369 
24370   ;;
24371 esac
24372 fi
24373 CODESIGN=$ac_cv_path_CODESIGN
24374 if test -n "$CODESIGN"; then
24375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24376 $as_echo "$CODESIGN" >&6; }
24377 else
24378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24379 $as_echo "no" >&6; }
24380 fi
24381 
24382 
24383   test -n "$CODESIGN" && break
24384 done
24385 
24386   else
24387     # The variable is set, but is it from the command line or the environment?
24388 
24389     # Try to remove the string !CODESIGN! from our list.
24390     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24391     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24392       # If it failed, the variable was not from the command line. Ignore it,
24393       # but warn the user (except for BASH, which is always set by the calling BASH).
24394       if test "xCODESIGN" != xBASH; then
24395         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24396 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24397       fi
24398       # Try to locate tool using the code snippet
24399       for ac_prog in codesign
24400 do
24401   # Extract the first word of "$ac_prog", so it can be a program name with args.
24402 set dummy $ac_prog; ac_word=$2
24403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24404 $as_echo_n "checking for $ac_word... " >&6; }
24405 if ${ac_cv_path_CODESIGN+:} false; then :
24406   $as_echo_n "(cached) " >&6
24407 else
24408   case $CODESIGN in
24409   [\\/]* | ?:[\\/]*)
24410   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24411   ;;
24412   *)
24413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24414 for as_dir in $PATH
24415 do
24416   IFS=$as_save_IFS
24417   test -z "$as_dir" && as_dir=.
24418     for ac_exec_ext in '' $ac_executable_extensions; do
24419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24420     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24422     break 2
24423   fi
24424 done
24425   done
24426 IFS=$as_save_IFS
24427 
24428   ;;
24429 esac
24430 fi
24431 CODESIGN=$ac_cv_path_CODESIGN
24432 if test -n "$CODESIGN"; then
24433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24434 $as_echo "$CODESIGN" >&6; }
24435 else
24436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24437 $as_echo "no" >&6; }
24438 fi
24439 
24440 
24441   test -n "$CODESIGN" && break
24442 done
24443 
24444     else
24445       # If it succeeded, then it was overridden by the user. We will use it
24446       # for the tool.
24447 
24448       # First remove it from the list of overridden variables, so we can test
24449       # for unknown variables in the end.
24450       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24451 
24452       # Check if we try to supply an empty value
24453       if test "x$CODESIGN" = x; then
24454         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24455 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24456         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24457 $as_echo_n "checking for CODESIGN... " >&6; }
24458         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24459 $as_echo "disabled" >&6; }
24460       else
24461         # Check if the provided tool contains a complete path.
24462         tool_specified="$CODESIGN"
24463         tool_basename="${tool_specified##*/}"
24464         if test "x$tool_basename" = "x$tool_specified"; then
24465           # A command without a complete path is provided, search $PATH.
24466           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24467 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24468           # Extract the first word of "$tool_basename", so it can be a program name with args.
24469 set dummy $tool_basename; ac_word=$2
24470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24471 $as_echo_n "checking for $ac_word... " >&6; }
24472 if ${ac_cv_path_CODESIGN+:} false; then :
24473   $as_echo_n "(cached) " >&6
24474 else
24475   case $CODESIGN in
24476   [\\/]* | ?:[\\/]*)
24477   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24478   ;;
24479   *)
24480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24481 for as_dir in $PATH
24482 do
24483   IFS=$as_save_IFS
24484   test -z "$as_dir" && as_dir=.
24485     for ac_exec_ext in '' $ac_executable_extensions; do
24486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24487     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24489     break 2
24490   fi
24491 done
24492   done
24493 IFS=$as_save_IFS
24494 
24495   ;;
24496 esac
24497 fi
24498 CODESIGN=$ac_cv_path_CODESIGN
24499 if test -n "$CODESIGN"; then
24500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24501 $as_echo "$CODESIGN" >&6; }
24502 else
24503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24504 $as_echo "no" >&6; }
24505 fi
24506 
24507 
24508           if test "x$CODESIGN" = x; then
24509             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24510           fi
24511         else
24512           # Otherwise we believe it is a complete path. Use it as it is.
24513           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24514 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24515           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24516 $as_echo_n "checking for CODESIGN... " >&6; }
24517           if test ! -x "$tool_specified"; then
24518             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24519 $as_echo "not found" >&6; }
24520             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24521           fi
24522           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24523 $as_echo "$tool_specified" >&6; }
24524         fi
24525       fi
24526     fi
24527 
24528   fi
24529 
24530 
24531     if test "x$CODESIGN" != "x"; then
24532       # Verify that the openjdk_codesign certificate is present
24533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24534 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24535       $RM codesign-testfile
24536       $TOUCH codesign-testfile
24537       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24538       $RM codesign-testfile
24539       if test "x$CODESIGN" = x; then
24540         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24541 $as_echo "no" >&6; }
24542       else
24543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24544 $as_echo "yes" >&6; }
24545       fi
24546     fi
24547 
24548 
24549 
24550   # Publish this variable in the help.
24551 
24552 
24553   if [ -z "${SETFILE+x}" ]; then
24554     # The variable is not set by user, try to locate tool using the code snippet
24555     for ac_prog in SetFile
24556 do
24557   # Extract the first word of "$ac_prog", so it can be a program name with args.
24558 set dummy $ac_prog; ac_word=$2
24559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24560 $as_echo_n "checking for $ac_word... " >&6; }
24561 if ${ac_cv_path_SETFILE+:} false; then :
24562   $as_echo_n "(cached) " >&6
24563 else
24564   case $SETFILE in
24565   [\\/]* | ?:[\\/]*)
24566   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24567   ;;
24568   *)
24569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24570 for as_dir in $PATH
24571 do
24572   IFS=$as_save_IFS
24573   test -z "$as_dir" && as_dir=.
24574     for ac_exec_ext in '' $ac_executable_extensions; do
24575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24576     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24578     break 2
24579   fi
24580 done
24581   done
24582 IFS=$as_save_IFS
24583 
24584   ;;
24585 esac
24586 fi
24587 SETFILE=$ac_cv_path_SETFILE
24588 if test -n "$SETFILE"; then
24589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24590 $as_echo "$SETFILE" >&6; }
24591 else
24592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24593 $as_echo "no" >&6; }
24594 fi
24595 
24596 
24597   test -n "$SETFILE" && break
24598 done
24599 
24600   else
24601     # The variable is set, but is it from the command line or the environment?
24602 
24603     # Try to remove the string !SETFILE! from our list.
24604     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24605     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24606       # If it failed, the variable was not from the command line. Ignore it,
24607       # but warn the user (except for BASH, which is always set by the calling BASH).
24608       if test "xSETFILE" != xBASH; then
24609         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24610 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24611       fi
24612       # Try to locate tool using the code snippet
24613       for ac_prog in SetFile
24614 do
24615   # Extract the first word of "$ac_prog", so it can be a program name with args.
24616 set dummy $ac_prog; ac_word=$2
24617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24618 $as_echo_n "checking for $ac_word... " >&6; }
24619 if ${ac_cv_path_SETFILE+:} false; then :
24620   $as_echo_n "(cached) " >&6
24621 else
24622   case $SETFILE in
24623   [\\/]* | ?:[\\/]*)
24624   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24625   ;;
24626   *)
24627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24628 for as_dir in $PATH
24629 do
24630   IFS=$as_save_IFS
24631   test -z "$as_dir" && as_dir=.
24632     for ac_exec_ext in '' $ac_executable_extensions; do
24633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24634     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24636     break 2
24637   fi
24638 done
24639   done
24640 IFS=$as_save_IFS
24641 
24642   ;;
24643 esac
24644 fi
24645 SETFILE=$ac_cv_path_SETFILE
24646 if test -n "$SETFILE"; then
24647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24648 $as_echo "$SETFILE" >&6; }
24649 else
24650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24651 $as_echo "no" >&6; }
24652 fi
24653 
24654 
24655   test -n "$SETFILE" && break
24656 done
24657 
24658     else
24659       # If it succeeded, then it was overridden by the user. We will use it
24660       # for the tool.
24661 
24662       # First remove it from the list of overridden variables, so we can test
24663       # for unknown variables in the end.
24664       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24665 
24666       # Check if we try to supply an empty value
24667       if test "x$SETFILE" = x; then
24668         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24669 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24671 $as_echo_n "checking for SETFILE... " >&6; }
24672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24673 $as_echo "disabled" >&6; }
24674       else
24675         # Check if the provided tool contains a complete path.
24676         tool_specified="$SETFILE"
24677         tool_basename="${tool_specified##*/}"
24678         if test "x$tool_basename" = "x$tool_specified"; then
24679           # A command without a complete path is provided, search $PATH.
24680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24681 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24682           # Extract the first word of "$tool_basename", so it can be a program name with args.
24683 set dummy $tool_basename; ac_word=$2
24684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24685 $as_echo_n "checking for $ac_word... " >&6; }
24686 if ${ac_cv_path_SETFILE+:} false; then :
24687   $as_echo_n "(cached) " >&6
24688 else
24689   case $SETFILE in
24690   [\\/]* | ?:[\\/]*)
24691   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24692   ;;
24693   *)
24694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24695 for as_dir in $PATH
24696 do
24697   IFS=$as_save_IFS
24698   test -z "$as_dir" && as_dir=.
24699     for ac_exec_ext in '' $ac_executable_extensions; do
24700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24701     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24703     break 2
24704   fi
24705 done
24706   done
24707 IFS=$as_save_IFS
24708 
24709   ;;
24710 esac
24711 fi
24712 SETFILE=$ac_cv_path_SETFILE
24713 if test -n "$SETFILE"; then
24714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24715 $as_echo "$SETFILE" >&6; }
24716 else
24717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24718 $as_echo "no" >&6; }
24719 fi
24720 
24721 
24722           if test "x$SETFILE" = x; then
24723             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24724           fi
24725         else
24726           # Otherwise we believe it is a complete path. Use it as it is.
24727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24728 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24729           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24730 $as_echo_n "checking for SETFILE... " >&6; }
24731           if test ! -x "$tool_specified"; then
24732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24733 $as_echo "not found" >&6; }
24734             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24735           fi
24736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24737 $as_echo "$tool_specified" >&6; }
24738         fi
24739       fi
24740     fi
24741 
24742   fi
24743 
24744 
24745 
24746   if test "x$SETFILE" = x; then
24747     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24748   fi
24749 
24750 
24751   fi
24752 
24753 
24754   # Check bash version
24755   # Extra [ ] to stop m4 mangling
24756    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24758 $as_echo_n "checking bash version... " >&6; }
24759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24760 $as_echo "$BASH_VER" >&6; }
24761 
24762   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24763   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24764   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24765     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24766   fi
24767 
24768   # Test if bash supports pipefail.
24769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24770 $as_echo_n "checking if bash supports pipefail... " >&6; }
24771   if ${BASH} -c 'set -o pipefail'; then
24772     BASH_ARGS="$BASH_ARGS -o pipefail"
24773     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24774 $as_echo "yes" >&6; }
24775   else
24776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24777 $as_echo "no" >&6; }
24778   fi
24779 
24780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24781 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24782   if ${BASH} -e -c 'true'; then
24783     BASH_ARGS="$BASH_ARGS -e"
24784     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24785 $as_echo "yes" >&6; }
24786   else
24787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24788 $as_echo "no" >&6; }
24789   fi
24790 
24791 
24792 
24793 
24794 # Check if pkg-config is available.
24795 
24796 
24797 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24798         if test -n "$ac_tool_prefix"; then
24799   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24800 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24802 $as_echo_n "checking for $ac_word... " >&6; }
24803 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24804   $as_echo_n "(cached) " >&6
24805 else
24806   case $PKG_CONFIG in
24807   [\\/]* | ?:[\\/]*)
24808   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24809   ;;
24810   *)
24811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24812 for as_dir in $PATH
24813 do
24814   IFS=$as_save_IFS
24815   test -z "$as_dir" && as_dir=.
24816     for ac_exec_ext in '' $ac_executable_extensions; do
24817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24818     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24820     break 2
24821   fi
24822 done
24823   done
24824 IFS=$as_save_IFS
24825 
24826   ;;
24827 esac
24828 fi
24829 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24830 if test -n "$PKG_CONFIG"; then
24831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24832 $as_echo "$PKG_CONFIG" >&6; }
24833 else
24834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24835 $as_echo "no" >&6; }
24836 fi
24837 
24838 
24839 fi
24840 if test -z "$ac_cv_path_PKG_CONFIG"; then
24841   ac_pt_PKG_CONFIG=$PKG_CONFIG
24842   # Extract the first word of "pkg-config", so it can be a program name with args.
24843 set dummy pkg-config; ac_word=$2
24844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24845 $as_echo_n "checking for $ac_word... " >&6; }
24846 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24847   $as_echo_n "(cached) " >&6
24848 else
24849   case $ac_pt_PKG_CONFIG in
24850   [\\/]* | ?:[\\/]*)
24851   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24852   ;;
24853   *)
24854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24855 for as_dir in $PATH
24856 do
24857   IFS=$as_save_IFS
24858   test -z "$as_dir" && as_dir=.
24859     for ac_exec_ext in '' $ac_executable_extensions; do
24860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24861     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24863     break 2
24864   fi
24865 done
24866   done
24867 IFS=$as_save_IFS
24868 
24869   ;;
24870 esac
24871 fi
24872 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24873 if test -n "$ac_pt_PKG_CONFIG"; then
24874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24875 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24876 else
24877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24878 $as_echo "no" >&6; }
24879 fi
24880 
24881   if test "x$ac_pt_PKG_CONFIG" = x; then
24882     PKG_CONFIG=""
24883   else
24884     case $cross_compiling:$ac_tool_warned in
24885 yes:)
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24887 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24888 ac_tool_warned=yes ;;
24889 esac
24890     PKG_CONFIG=$ac_pt_PKG_CONFIG
24891   fi
24892 else
24893   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24894 fi
24895 
24896 fi
24897 if test -n "$PKG_CONFIG"; then
24898         _pkg_min_version=0.9.0
24899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24900 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24901         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24902                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24903 $as_echo "yes" >&6; }
24904         else
24905                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24906 $as_echo "no" >&6; }
24907                 PKG_CONFIG=""
24908         fi
24909 
24910 fi
24911 
24912 # After basic tools have been setup, we can check build os specific details.
24913 
24914   ###############################################################################
24915 
24916   # Note that this is the build platform OS version!
24917 
24918   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24919   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24920   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24921   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24922 
24923 
24924 
24925 
24926 
24927 # Misc basic settings
24928 
24929 
24930 # Check whether --with-default-make-target was given.
24931 if test "${with_default_make_target+set}" = set; then :
24932   withval=$with_default_make_target;
24933 fi
24934 
24935   if test "x$with_default_make_target" = "x" \
24936       || test "x$with_default_make_target" = "xyes"; then
24937     DEFAULT_MAKE_TARGET="exploded-image"
24938   elif test "x$with_default_make_target" = "xno"; then
24939     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24940   else
24941     DEFAULT_MAKE_TARGET="$with_default_make_target"
24942   fi
24943 
24944 
24945 
24946 
24947 ###############################################################################
24948 #
24949 # Determine OpenJDK variants, options and version numbers.
24950 #
24951 ###############################################################################
24952 
24953 # We need build & target for this.
24954 
24955   # Should we build a JDK without a graphical UI?
24956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24957 $as_echo_n "checking headless only... " >&6; }
24958   # Check whether --enable-headless-only was given.
24959 if test "${enable_headless_only+set}" = set; then :
24960   enableval=$enable_headless_only;
24961 fi
24962 
24963 
24964   if test "x$enable_headless_only" = "xyes"; then
24965     ENABLE_HEADLESS_ONLY="true"
24966     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24967 $as_echo "yes" >&6; }
24968   elif test "x$enable_headless_only" = "xno"; then
24969     ENABLE_HEADLESS_ONLY="false"
24970     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24971 $as_echo "no" >&6; }
24972   elif test "x$enable_headless_only" = "x"; then
24973     ENABLE_HEADLESS_ONLY="false"
24974     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24975 $as_echo "no" >&6; }
24976   else
24977     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24978   fi
24979 
24980 
24981 
24982   # Should we build the complete docs, or just a lightweight version?
24983   # Check whether --enable-full-docs was given.
24984 if test "${enable_full_docs+set}" = set; then :
24985   enableval=$enable_full_docs;
24986 fi
24987 
24988 
24989   # Verify dependencies
24990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24991 $as_echo_n "checking for graphviz dot... " >&6; }
24992   if test "x$DOT" != "x"; then
24993     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24994 $as_echo "yes" >&6; }
24995   else
24996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24997 $as_echo "no, cannot generate full docs" >&6; }
24998     FULL_DOCS_DEP_MISSING=true
24999   fi
25000 
25001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25002 $as_echo_n "checking for pandoc... " >&6; }
25003   if test "x$PANDOC" != "x"; then
25004     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25005 $as_echo "yes" >&6; }
25006   else
25007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25008 $as_echo "no, cannot generate full docs" >&6; }
25009     FULL_DOCS_DEP_MISSING=true
25010   fi
25011 
25012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25013 $as_echo_n "checking full docs... " >&6; }
25014   if test "x$enable_full_docs" = xyes; then
25015     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25016       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25017 $as_echo "no, missing dependencies" >&6; }
25018 
25019   # Print a helpful message on how to acquire the necessary build dependency.
25020   # dot is the help tag: freetype, cups, alsa etc
25021   MISSING_DEPENDENCY=dot
25022 
25023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024     cygwin_help $MISSING_DEPENDENCY
25025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25026     msys_help $MISSING_DEPENDENCY
25027   else
25028     PKGHANDLER_COMMAND=
25029 
25030     case $PKGHANDLER in
25031       apt-get)
25032         apt_help     $MISSING_DEPENDENCY ;;
25033       yum)
25034         yum_help     $MISSING_DEPENDENCY ;;
25035       brew)
25036         brew_help    $MISSING_DEPENDENCY ;;
25037       port)
25038         port_help    $MISSING_DEPENDENCY ;;
25039       pkgutil)
25040         pkgutil_help $MISSING_DEPENDENCY ;;
25041       pkgadd)
25042         pkgadd_help  $MISSING_DEPENDENCY ;;
25043     esac
25044 
25045     if test "x$PKGHANDLER_COMMAND" != x; then
25046       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25047     fi
25048   fi
25049 
25050       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25051     else
25052       ENABLE_FULL_DOCS=true
25053       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25054 $as_echo "yes, forced" >&6; }
25055     fi
25056   elif test "x$enable_full_docs" = xno; then
25057     ENABLE_FULL_DOCS=false
25058     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25059 $as_echo "no, forced" >&6; }
25060   elif test "x$enable_full_docs" = x; then
25061     # Check for prerequisites
25062     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25063       ENABLE_FULL_DOCS=false
25064       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25065 $as_echo "no, missing dependencies" >&6; }
25066     else
25067       ENABLE_FULL_DOCS=true
25068       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25069 $as_echo "yes, dependencies present" >&6; }
25070     fi
25071   else
25072     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25073   fi
25074 
25075 
25076 
25077   # Choose cacerts source file
25078 
25079 # Check whether --with-cacerts-file was given.
25080 if test "${with_cacerts_file+set}" = set; then :
25081   withval=$with_cacerts_file;
25082 fi
25083 
25084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacerts file" >&5
25085 $as_echo_n "checking for cacerts file... " >&6; }
25086   if test "x$with_cacerts_file" == x; then
25087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
25088 $as_echo "default" >&6; }
25089   else
25090     CACERTS_FILE=$with_cacerts_file
25091     if test ! -f "$CACERTS_FILE"; then
25092       { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
25093 $as_echo "fail" >&6; }
25094       as_fn_error $? "Specified cacerts file \"$CACERTS_FILE\" does not exist" "$LINENO" 5
25095     fi
25096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACERTS_FILE" >&5
25097 $as_echo "$CACERTS_FILE" >&6; }
25098   fi
25099 
25100 
25101   # Enable or disable unlimited crypto
25102   # Check whether --enable-unlimited-crypto was given.
25103 if test "${enable_unlimited_crypto+set}" = set; then :
25104   enableval=$enable_unlimited_crypto;
25105 else
25106   enable_unlimited_crypto=yes
25107 fi
25108 
25109   if test "x$enable_unlimited_crypto" = "xyes"; then
25110     UNLIMITED_CRYPTO=true
25111   else
25112     UNLIMITED_CRYPTO=false
25113   fi
25114 
25115 
25116   # Should we build the serviceability agent (SA)?
25117   INCLUDE_SA=true
25118   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25119     INCLUDE_SA=false
25120   fi
25121   if test "x$OPENJDK_TARGET_OS" = xaix ; then
25122     INCLUDE_SA=false
25123   fi
25124 
25125 
25126   # Compress jars
25127   COMPRESS_JARS=false
25128 
25129 
25130 
25131   # Setup default copyright year. Mostly overridden when building close to a new year.
25132 
25133 # Check whether --with-copyright-year was given.
25134 if test "${with_copyright_year+set}" = set; then :
25135   withval=$with_copyright_year;
25136 fi
25137 
25138   if test "x$with_copyright_year" = xyes; then
25139     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25140   elif test "x$with_copyright_year" != x; then
25141     COPYRIGHT_YEAR="$with_copyright_year"
25142   else
25143     COPYRIGHT_YEAR=`$DATE +'%Y'`
25144   fi
25145 
25146 
25147 
25148   # Check whether --enable-keep-packaged-modules was given.
25149 if test "${enable_keep_packaged_modules+set}" = set; then :
25150   enableval=$enable_keep_packaged_modules;
25151 fi
25152 
25153 
25154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25155 $as_echo_n "checking if packaged modules are kept... " >&6; }
25156   if test "x$enable_keep_packaged_modules" = "xyes"; then
25157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25158 $as_echo "yes" >&6; }
25159     JLINK_KEEP_PACKAGED_MODULES=true
25160   elif test "x$enable_keep_packaged_modules" = "xno"; then
25161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25162 $as_echo "no" >&6; }
25163     JLINK_KEEP_PACKAGED_MODULES=false
25164   elif test "x$enable_keep_packaged_modules" = "x"; then
25165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25166 $as_echo "yes (default)" >&6; }
25167     JLINK_KEEP_PACKAGED_MODULES=true
25168   else
25169     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25170 $as_echo "error" >&6; }
25171     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25172   fi
25173 
25174 
25175 
25176 
25177   # Warn user that old version arguments are deprecated.
25178 
25179 
25180 # Check whether --with-milestone was given.
25181 if test "${with_milestone+set}" = set; then :
25182   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25183 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25184 fi
25185 
25186 
25187 
25188 
25189 # Check whether --with-update-version was given.
25190 if test "${with_update_version+set}" = set; then :
25191   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25192 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25193 fi
25194 
25195 
25196 
25197 
25198 # Check whether --with-user-release-suffix was given.
25199 if test "${with_user_release_suffix+set}" = set; then :
25200   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
25201 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25202 fi
25203 
25204 
25205 
25206 
25207 # Check whether --with-build-number was given.
25208 if test "${with_build_number+set}" = set; then :
25209   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25210 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25211 fi
25212 
25213 
25214 
25215   # Source the version numbers file
25216   . $AUTOCONF_DIR/version-numbers
25217 
25218   # Some non-version number information is set in that file
25219 
25220 
25221 
25222 
25223 
25224 
25225 
25226 
25227 
25228   # Override version from arguments
25229 
25230   # If --with-version-string is set, process it first. It is possible to
25231   # override parts with more specific flags, since these are processed later.
25232 
25233 # Check whether --with-version-string was given.
25234 if test "${with_version_string+set}" = set; then :
25235   withval=$with_version_string;
25236 fi
25237 
25238   if test "x$with_version_string" = xyes; then
25239     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25240   elif test "x$with_version_string" != x; then
25241     # Additional [] needed to keep m4 from mangling shell constructs.
25242     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25243       VERSION_MAJOR=${BASH_REMATCH[1]}
25244       VERSION_MINOR=${BASH_REMATCH[3]}
25245       VERSION_SECURITY=${BASH_REMATCH[5]}
25246       VERSION_PATCH=${BASH_REMATCH[7]}
25247       VERSION_PRE=${BASH_REMATCH[9]}
25248       version_plus_separator=${BASH_REMATCH[11]}
25249       VERSION_BUILD=${BASH_REMATCH[12]}
25250       VERSION_OPT=${BASH_REMATCH[14]}
25251       # Unspecified numerical fields are interpreted as 0.
25252       if test "x$VERSION_MINOR" = x; then
25253         VERSION_MINOR=0
25254       fi
25255       if test "x$VERSION_SECURITY" = x; then
25256         VERSION_SECURITY=0
25257       fi
25258       if test "x$VERSION_PATCH" = x; then
25259         VERSION_PATCH=0
25260       fi
25261       if test "x$version_plus_separator" != x \
25262           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25263         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25264       fi
25265       # Stop the version part process from setting default values.
25266       # We still allow them to explicitly override though.
25267       NO_DEFAULT_VERSION_PARTS=true
25268     else
25269       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25270     fi
25271   fi
25272 
25273 
25274 # Check whether --with-version-pre was given.
25275 if test "${with_version_pre+set}" = set; then :
25276   withval=$with_version_pre; with_version_pre_present=true
25277 else
25278   with_version_pre_present=false
25279 fi
25280 
25281 
25282   if test "x$with_version_pre_present" = xtrue; then
25283     if test "x$with_version_pre" = xyes; then
25284       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25285     elif test "x$with_version_pre" = xno; then
25286       # Interpret --without-* as empty string instead of the literal "no"
25287       VERSION_PRE=
25288     else
25289       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25290        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25291       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25293 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25294       fi
25295     fi
25296   else
25297     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25298       # Default is to use "internal" as pre
25299       VERSION_PRE="internal"
25300     fi
25301   fi
25302 
25303 
25304 # Check whether --with-version-opt was given.
25305 if test "${with_version_opt+set}" = set; then :
25306   withval=$with_version_opt; with_version_opt_present=true
25307 else
25308   with_version_opt_present=false
25309 fi
25310 
25311 
25312   if test "x$with_version_opt_present" = xtrue; then
25313     if test "x$with_version_opt" = xyes; then
25314       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25315     elif test "x$with_version_opt" = xno; then
25316       # Interpret --without-* as empty string instead of the literal "no"
25317       VERSION_OPT=
25318     else
25319       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25320        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25321       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25322         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25323 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25324       fi
25325     fi
25326   else
25327     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25328       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25329       # Outer [ ] to quote m4.
25330        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25331       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25332     fi
25333   fi
25334 
25335 
25336 # Check whether --with-version-build was given.
25337 if test "${with_version_build+set}" = set; then :
25338   withval=$with_version_build; with_version_build_present=true
25339 else
25340   with_version_build_present=false
25341 fi
25342 
25343 
25344   if test "x$with_version_build_present" = xtrue; then
25345     if test "x$with_version_build" = xyes; then
25346       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25347     elif test "x$with_version_build" = xno; then
25348       # Interpret --without-* as empty string instead of the literal "no"
25349       VERSION_BUILD=
25350     elif test "x$with_version_build" = x; then
25351       VERSION_BUILD=
25352     else
25353 
25354   # Additional [] needed to keep m4 from mangling shell constructs.
25355   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25356     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25357   fi
25358   # Extract the version number without leading zeros.
25359   cleaned_value=${BASH_REMATCH[1]}
25360   if test "x$cleaned_value" = x; then
25361     # Special case for zero
25362     cleaned_value=${BASH_REMATCH[2]}
25363   fi
25364 
25365   if test $cleaned_value -gt 255; then
25366     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25367   fi
25368   if test "x$cleaned_value" != "x$with_version_build"; then
25369     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25370 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25371   fi
25372   VERSION_BUILD=$cleaned_value
25373 
25374     fi
25375   else
25376     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25377       # Default is to not have a build number.
25378       VERSION_BUILD=""
25379       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25380       VERSION_BUILD=0
25381     fi
25382   fi
25383 
25384 
25385 # Check whether --with-version-major was given.
25386 if test "${with_version_major+set}" = set; then :
25387   withval=$with_version_major; with_version_major_present=true
25388 else
25389   with_version_major_present=false
25390 fi
25391 
25392 
25393   if test "x$with_version_major_present" = xtrue; then
25394     if test "x$with_version_major" = xyes; then
25395       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25396     else
25397 
25398   # Additional [] needed to keep m4 from mangling shell constructs.
25399   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25400     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25401   fi
25402   # Extract the version number without leading zeros.
25403   cleaned_value=${BASH_REMATCH[1]}
25404   if test "x$cleaned_value" = x; then
25405     # Special case for zero
25406     cleaned_value=${BASH_REMATCH[2]}
25407   fi
25408 
25409   if test $cleaned_value -gt 255; then
25410     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25411   fi
25412   if test "x$cleaned_value" != "x$with_version_major"; then
25413     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25414 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25415   fi
25416   VERSION_MAJOR=$cleaned_value
25417 
25418     fi
25419   else
25420     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25421       # Default is to get value from version-numbers
25422       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25423     fi
25424   fi
25425 
25426 
25427 # Check whether --with-version-minor was given.
25428 if test "${with_version_minor+set}" = set; then :
25429   withval=$with_version_minor; with_version_minor_present=true
25430 else
25431   with_version_minor_present=false
25432 fi
25433 
25434 
25435   if test "x$with_version_minor_present" = xtrue; then
25436     if test "x$with_version_minor" = xyes; then
25437       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25438     elif test "x$with_version_minor" = xno; then
25439       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25440       VERSION_MINOR=0
25441     elif test "x$with_version_minor" = x; then
25442       VERSION_MINOR=0
25443     else
25444 
25445   # Additional [] needed to keep m4 from mangling shell constructs.
25446   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25447     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25448   fi
25449   # Extract the version number without leading zeros.
25450   cleaned_value=${BASH_REMATCH[1]}
25451   if test "x$cleaned_value" = x; then
25452     # Special case for zero
25453     cleaned_value=${BASH_REMATCH[2]}
25454   fi
25455 
25456   if test $cleaned_value -gt 255; then
25457     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25458   fi
25459   if test "x$cleaned_value" != "x$with_version_minor"; then
25460     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25461 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25462   fi
25463   VERSION_MINOR=$cleaned_value
25464 
25465     fi
25466   else
25467     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25468       # Default is 0, if unspecified
25469       VERSION_MINOR=$DEFAULT_VERSION_MINOR
25470     fi
25471   fi
25472 
25473 
25474 # Check whether --with-version-security was given.
25475 if test "${with_version_security+set}" = set; then :
25476   withval=$with_version_security; with_version_security_present=true
25477 else
25478   with_version_security_present=false
25479 fi
25480 
25481 
25482   if test "x$with_version_security_present" = xtrue; then
25483     if test "x$with_version_security" = xyes; then
25484       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25485     elif test "x$with_version_security" = xno; then
25486       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25487       VERSION_SECURITY=0
25488     elif test "x$with_version_security" = x; then
25489       VERSION_SECURITY=0
25490     else
25491 
25492   # Additional [] needed to keep m4 from mangling shell constructs.
25493   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25494     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25495   fi
25496   # Extract the version number without leading zeros.
25497   cleaned_value=${BASH_REMATCH[1]}
25498   if test "x$cleaned_value" = x; then
25499     # Special case for zero
25500     cleaned_value=${BASH_REMATCH[2]}
25501   fi
25502 
25503   if test $cleaned_value -gt 255; then
25504     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25505   fi
25506   if test "x$cleaned_value" != "x$with_version_security"; then
25507     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25508 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25509   fi
25510   VERSION_SECURITY=$cleaned_value
25511 
25512     fi
25513   else
25514     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25515       # Default is 0, if unspecified
25516       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25517     fi
25518   fi
25519 
25520 
25521 # Check whether --with-version-patch was given.
25522 if test "${with_version_patch+set}" = set; then :
25523   withval=$with_version_patch; with_version_patch_present=true
25524 else
25525   with_version_patch_present=false
25526 fi
25527 
25528 
25529   if test "x$with_version_patch_present" = xtrue; then
25530     if test "x$with_version_patch" = xyes; then
25531       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25532     elif test "x$with_version_patch" = xno; then
25533       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25534       VERSION_PATCH=0
25535     elif test "x$with_version_patch" = x; then
25536       VERSION_PATCH=0
25537     else
25538 
25539   # Additional [] needed to keep m4 from mangling shell constructs.
25540   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25541     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25542   fi
25543   # Extract the version number without leading zeros.
25544   cleaned_value=${BASH_REMATCH[1]}
25545   if test "x$cleaned_value" = x; then
25546     # Special case for zero
25547     cleaned_value=${BASH_REMATCH[2]}
25548   fi
25549 
25550   if test $cleaned_value -gt 255; then
25551     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25552   fi
25553   if test "x$cleaned_value" != "x$with_version_patch"; then
25554     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25555 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25556   fi
25557   VERSION_PATCH=$cleaned_value
25558 
25559     fi
25560   else
25561     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25562       # Default is 0, if unspecified
25563       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25564     fi
25565   fi
25566 
25567   # Calculate derived version properties
25568 
25569   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25570   if test "x$VERSION_PRE" = x; then
25571     VERSION_IS_GA=true
25572   else
25573     VERSION_IS_GA=false
25574   fi
25575 
25576   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25577   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25578 
25579   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25580   # Strip trailing zeroes from stripped_version_number
25581   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25582   VERSION_NUMBER=$stripped_version_number
25583 
25584   # The complete version string, with additional build information
25585   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25586     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25587   else
25588     # If either build or opt is set, we need a + separator
25589     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25590   fi
25591 
25592   # The short version string, just VERSION_NUMBER and PRE, if present.
25593   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25594 
25595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25596 $as_echo_n "checking for version string... " >&6; }
25597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25598 $as_echo "$VERSION_STRING" >&6; }
25599 
25600 
25601 
25602 
25603 
25604 
25605 
25606 
25607 
25608 
25609 
25610 
25611 
25612 
25613 
25614 ###############################################################################
25615 #
25616 # Setup BootJDK, used to bootstrap the build.
25617 #
25618 ###############################################################################
25619 
25620 
25621   BOOT_JDK_FOUND=no
25622 
25623 # Check whether --with-boot-jdk was given.
25624 if test "${with_boot_jdk+set}" = set; then :
25625   withval=$with_boot_jdk;
25626 fi
25627 
25628 
25629   # We look for the Boot JDK through various means, going from more certain to
25630   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25631   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25632   # must check if this is indeed valid; otherwise we'll continue looking.
25633 
25634   # Test: Is bootjdk explicitly set by command line arguments?
25635 
25636   if test "x$BOOT_JDK_FOUND" = xno; then
25637     # Now execute the test
25638 
25639   if test "x$with_boot_jdk" != x; then
25640     BOOT_JDK=$with_boot_jdk
25641     BOOT_JDK_FOUND=maybe
25642     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25643 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25644   fi
25645 
25646 
25647     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25648     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25649       # Do we have a bin/java?
25650       if test ! -x "$BOOT_JDK/bin/java"; then
25651         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25653         BOOT_JDK_FOUND=no
25654       else
25655         # Do we have a bin/javac?
25656         if test ! -x "$BOOT_JDK/bin/javac"; then
25657           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25659           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25660 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25661           BOOT_JDK_FOUND=no
25662         else
25663           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25664           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25665 
25666           # Extra M4 quote needed to protect [] in grep expression.
25667           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25668           if test "x$FOUND_CORRECT_VERSION" = x; then
25669             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25670 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25671             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25672 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25673             BOOT_JDK_FOUND=no
25674           else
25675             # We're done! :-)
25676             BOOT_JDK_FOUND=yes
25677 
25678   # Only process if variable expands to non-empty
25679 
25680   if test "x$BOOT_JDK" != x; then
25681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25682 
25683   # Input might be given as Windows format, start by converting to
25684   # unix format.
25685   path="$BOOT_JDK"
25686   new_path=`$CYGPATH -u "$path"`
25687 
25688   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25689   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25690   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25691   # "foo.exe" is OK but "foo" is an error.
25692   #
25693   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25694   # It is also a way to make sure we got the proper file name for the real test later on.
25695   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25696   if test "x$test_shortpath" = x; then
25697     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25699     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25700   fi
25701 
25702   # Call helper function which possibly converts this using DOS-style short mode.
25703   # If so, the updated path is stored in $new_path.
25704 
25705   input_path="$new_path"
25706   # Check if we need to convert this using DOS-style short mode. If the path
25707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25708   # take no chances and rewrite it.
25709   # Note: m4 eats our [], so we need to use [ and ] instead.
25710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25711   if test "x$has_forbidden_chars" != x; then
25712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25716       # Going to short mode and back again did indeed matter. Since short mode is
25717       # case insensitive, let's make it lowercase to improve readability.
25718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25719       # Now convert it back to Unix-style (cygpath)
25720       input_path=`$CYGPATH -u "$shortmode_path"`
25721       new_path="$input_path"
25722     fi
25723   fi
25724 
25725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25726   if test "x$test_cygdrive_prefix" = x; then
25727     # As a simple fix, exclude /usr/bin since it's not a real path.
25728     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25730       # a path prefixed by /cygdrive for fixpath to work.
25731       new_path="$CYGWIN_ROOT_PATH$input_path"
25732     fi
25733   fi
25734 
25735 
25736   if test "x$path" != "x$new_path"; then
25737     BOOT_JDK="$new_path"
25738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25739 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25740   fi
25741 
25742     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25743 
25744   path="$BOOT_JDK"
25745   has_colon=`$ECHO $path | $GREP ^.:`
25746   new_path="$path"
25747   if test "x$has_colon" = x; then
25748     # Not in mixed or Windows style, start by that.
25749     new_path=`cmd //c echo $path`
25750   fi
25751 
25752 
25753   input_path="$new_path"
25754   # Check if we need to convert this using DOS-style short mode. If the path
25755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25756   # take no chances and rewrite it.
25757   # Note: m4 eats our [], so we need to use [ and ] instead.
25758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25759   if test "x$has_forbidden_chars" != x; then
25760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25762   fi
25763 
25764 
25765   windows_path="$new_path"
25766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25767     unix_path=`$CYGPATH -u "$windows_path"`
25768     new_path="$unix_path"
25769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25771     new_path="$unix_path"
25772   fi
25773 
25774   if test "x$path" != "x$new_path"; then
25775     BOOT_JDK="$new_path"
25776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25778   fi
25779 
25780   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25781   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25782 
25783     else
25784       # We're on a unix platform. Hooray! :)
25785       path="$BOOT_JDK"
25786       has_space=`$ECHO "$path" | $GREP " "`
25787       if test "x$has_space" != x; then
25788         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25789 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25790         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25791       fi
25792 
25793       # Use eval to expand a potential ~
25794       eval path="$path"
25795       if test ! -f "$path" && test ! -d "$path"; then
25796         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25797       fi
25798 
25799       if test -d "$path"; then
25800         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25801       else
25802         dir="`$DIRNAME "$path"`"
25803         base="`$BASENAME "$path"`"
25804         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25805       fi
25806     fi
25807   fi
25808 
25809             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25810 $as_echo_n "checking for Boot JDK... " >&6; }
25811             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25812 $as_echo "$BOOT_JDK" >&6; }
25813             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25814 $as_echo_n "checking Boot JDK version... " >&6; }
25815             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25817 $as_echo "$BOOT_JDK_VERSION" >&6; }
25818           fi # end check jdk version
25819         fi # end check javac
25820       fi # end check java
25821     fi # end check boot jdk found
25822   fi
25823 
25824   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25825     # Having specified an argument which is incorrect will produce an instant failure;
25826     # we should not go on looking
25827     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25828   fi
25829 
25830   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25831 
25832   if test "x$BOOT_JDK_FOUND" = xno; then
25833     # Now execute the test
25834 
25835   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25836     # First check at user selected default
25837 
25838   if test "x$BOOT_JDK_FOUND" = xno; then
25839     # Now execute the test
25840 
25841   if test -x /usr/libexec/java_home; then
25842     BOOT_JDK=`/usr/libexec/java_home `
25843     BOOT_JDK_FOUND=maybe
25844     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25845 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25846   fi
25847 
25848 
25849     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25850     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25851       # Do we have a bin/java?
25852       if test ! -x "$BOOT_JDK/bin/java"; then
25853         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25854 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25855         BOOT_JDK_FOUND=no
25856       else
25857         # Do we have a bin/javac?
25858         if test ! -x "$BOOT_JDK/bin/javac"; then
25859           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25861           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25862 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25863           BOOT_JDK_FOUND=no
25864         else
25865           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25866           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25867 
25868           # Extra M4 quote needed to protect [] in grep expression.
25869           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25870           if test "x$FOUND_CORRECT_VERSION" = x; then
25871             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25872 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25873             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25874 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25875             BOOT_JDK_FOUND=no
25876           else
25877             # We're done! :-)
25878             BOOT_JDK_FOUND=yes
25879 
25880   # Only process if variable expands to non-empty
25881 
25882   if test "x$BOOT_JDK" != x; then
25883     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25884 
25885   # Input might be given as Windows format, start by converting to
25886   # unix format.
25887   path="$BOOT_JDK"
25888   new_path=`$CYGPATH -u "$path"`
25889 
25890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25893   # "foo.exe" is OK but "foo" is an error.
25894   #
25895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25896   # It is also a way to make sure we got the proper file name for the real test later on.
25897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25898   if test "x$test_shortpath" = x; then
25899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25902   fi
25903 
25904   # Call helper function which possibly converts this using DOS-style short mode.
25905   # If so, the updated path is stored in $new_path.
25906 
25907   input_path="$new_path"
25908   # Check if we need to convert this using DOS-style short mode. If the path
25909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25910   # take no chances and rewrite it.
25911   # Note: m4 eats our [], so we need to use [ and ] instead.
25912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25913   if test "x$has_forbidden_chars" != x; then
25914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25918       # Going to short mode and back again did indeed matter. Since short mode is
25919       # case insensitive, let's make it lowercase to improve readability.
25920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25921       # Now convert it back to Unix-style (cygpath)
25922       input_path=`$CYGPATH -u "$shortmode_path"`
25923       new_path="$input_path"
25924     fi
25925   fi
25926 
25927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25928   if test "x$test_cygdrive_prefix" = x; then
25929     # As a simple fix, exclude /usr/bin since it's not a real path.
25930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25932       # a path prefixed by /cygdrive for fixpath to work.
25933       new_path="$CYGWIN_ROOT_PATH$input_path"
25934     fi
25935   fi
25936 
25937 
25938   if test "x$path" != "x$new_path"; then
25939     BOOT_JDK="$new_path"
25940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25942   fi
25943 
25944     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25945 
25946   path="$BOOT_JDK"
25947   has_colon=`$ECHO $path | $GREP ^.:`
25948   new_path="$path"
25949   if test "x$has_colon" = x; then
25950     # Not in mixed or Windows style, start by that.
25951     new_path=`cmd //c echo $path`
25952   fi
25953 
25954 
25955   input_path="$new_path"
25956   # Check if we need to convert this using DOS-style short mode. If the path
25957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25958   # take no chances and rewrite it.
25959   # Note: m4 eats our [], so we need to use [ and ] instead.
25960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25961   if test "x$has_forbidden_chars" != x; then
25962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25964   fi
25965 
25966 
25967   windows_path="$new_path"
25968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25969     unix_path=`$CYGPATH -u "$windows_path"`
25970     new_path="$unix_path"
25971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25973     new_path="$unix_path"
25974   fi
25975 
25976   if test "x$path" != "x$new_path"; then
25977     BOOT_JDK="$new_path"
25978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25980   fi
25981 
25982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25984 
25985     else
25986       # We're on a unix platform. Hooray! :)
25987       path="$BOOT_JDK"
25988       has_space=`$ECHO "$path" | $GREP " "`
25989       if test "x$has_space" != x; then
25990         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25991 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25992         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25993       fi
25994 
25995       # Use eval to expand a potential ~
25996       eval path="$path"
25997       if test ! -f "$path" && test ! -d "$path"; then
25998         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25999       fi
26000 
26001       if test -d "$path"; then
26002         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26003       else
26004         dir="`$DIRNAME "$path"`"
26005         base="`$BASENAME "$path"`"
26006         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26007       fi
26008     fi
26009   fi
26010 
26011             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26012 $as_echo_n "checking for Boot JDK... " >&6; }
26013             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26014 $as_echo "$BOOT_JDK" >&6; }
26015             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26016 $as_echo_n "checking Boot JDK version... " >&6; }
26017             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26018             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26019 $as_echo "$BOOT_JDK_VERSION" >&6; }
26020           fi # end check jdk version
26021         fi # end check javac
26022       fi # end check java
26023     fi # end check boot jdk found
26024   fi
26025 
26026     # If that did not work out (e.g. too old), try explicit versions instead
26027 
26028   if test "x$BOOT_JDK_FOUND" = xno; then
26029     # Now execute the test
26030 
26031   if test -x /usr/libexec/java_home; then
26032     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26033     BOOT_JDK_FOUND=maybe
26034     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26035 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26036   fi
26037 
26038 
26039     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26040     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26041       # Do we have a bin/java?
26042       if test ! -x "$BOOT_JDK/bin/java"; then
26043         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26044 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26045         BOOT_JDK_FOUND=no
26046       else
26047         # Do we have a bin/javac?
26048         if test ! -x "$BOOT_JDK/bin/javac"; then
26049           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26051           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26052 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26053           BOOT_JDK_FOUND=no
26054         else
26055           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26056           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26057 
26058           # Extra M4 quote needed to protect [] in grep expression.
26059           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26060           if test "x$FOUND_CORRECT_VERSION" = x; then
26061             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26063             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26064 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26065             BOOT_JDK_FOUND=no
26066           else
26067             # We're done! :-)
26068             BOOT_JDK_FOUND=yes
26069 
26070   # Only process if variable expands to non-empty
26071 
26072   if test "x$BOOT_JDK" != x; then
26073     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26074 
26075   # Input might be given as Windows format, start by converting to
26076   # unix format.
26077   path="$BOOT_JDK"
26078   new_path=`$CYGPATH -u "$path"`
26079 
26080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26083   # "foo.exe" is OK but "foo" is an error.
26084   #
26085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26086   # It is also a way to make sure we got the proper file name for the real test later on.
26087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26088   if test "x$test_shortpath" = x; then
26089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26091     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26092   fi
26093 
26094   # Call helper function which possibly converts this using DOS-style short mode.
26095   # If so, the updated path is stored in $new_path.
26096 
26097   input_path="$new_path"
26098   # Check if we need to convert this using DOS-style short mode. If the path
26099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26100   # take no chances and rewrite it.
26101   # Note: m4 eats our [], so we need to use [ and ] instead.
26102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26103   if test "x$has_forbidden_chars" != x; then
26104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26108       # Going to short mode and back again did indeed matter. Since short mode is
26109       # case insensitive, let's make it lowercase to improve readability.
26110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26111       # Now convert it back to Unix-style (cygpath)
26112       input_path=`$CYGPATH -u "$shortmode_path"`
26113       new_path="$input_path"
26114     fi
26115   fi
26116 
26117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26118   if test "x$test_cygdrive_prefix" = x; then
26119     # As a simple fix, exclude /usr/bin since it's not a real path.
26120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26122       # a path prefixed by /cygdrive for fixpath to work.
26123       new_path="$CYGWIN_ROOT_PATH$input_path"
26124     fi
26125   fi
26126 
26127 
26128   if test "x$path" != "x$new_path"; then
26129     BOOT_JDK="$new_path"
26130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26132   fi
26133 
26134     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26135 
26136   path="$BOOT_JDK"
26137   has_colon=`$ECHO $path | $GREP ^.:`
26138   new_path="$path"
26139   if test "x$has_colon" = x; then
26140     # Not in mixed or Windows style, start by that.
26141     new_path=`cmd //c echo $path`
26142   fi
26143 
26144 
26145   input_path="$new_path"
26146   # Check if we need to convert this using DOS-style short mode. If the path
26147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26148   # take no chances and rewrite it.
26149   # Note: m4 eats our [], so we need to use [ and ] instead.
26150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26151   if test "x$has_forbidden_chars" != x; then
26152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26154   fi
26155 
26156 
26157   windows_path="$new_path"
26158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26159     unix_path=`$CYGPATH -u "$windows_path"`
26160     new_path="$unix_path"
26161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26163     new_path="$unix_path"
26164   fi
26165 
26166   if test "x$path" != "x$new_path"; then
26167     BOOT_JDK="$new_path"
26168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26170   fi
26171 
26172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26174 
26175     else
26176       # We're on a unix platform. Hooray! :)
26177       path="$BOOT_JDK"
26178       has_space=`$ECHO "$path" | $GREP " "`
26179       if test "x$has_space" != x; then
26180         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26181 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26182         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26183       fi
26184 
26185       # Use eval to expand a potential ~
26186       eval path="$path"
26187       if test ! -f "$path" && test ! -d "$path"; then
26188         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26189       fi
26190 
26191       if test -d "$path"; then
26192         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26193       else
26194         dir="`$DIRNAME "$path"`"
26195         base="`$BASENAME "$path"`"
26196         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26197       fi
26198     fi
26199   fi
26200 
26201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26202 $as_echo_n "checking for Boot JDK... " >&6; }
26203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26204 $as_echo "$BOOT_JDK" >&6; }
26205             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26206 $as_echo_n "checking Boot JDK version... " >&6; }
26207             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26208             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26209 $as_echo "$BOOT_JDK_VERSION" >&6; }
26210           fi # end check jdk version
26211         fi # end check javac
26212       fi # end check java
26213     fi # end check boot jdk found
26214   fi
26215 
26216 
26217   if test "x$BOOT_JDK_FOUND" = xno; then
26218     # Now execute the test
26219 
26220   if test -x /usr/libexec/java_home; then
26221     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26222     BOOT_JDK_FOUND=maybe
26223     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26224 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26225   fi
26226 
26227 
26228     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26229     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26230       # Do we have a bin/java?
26231       if test ! -x "$BOOT_JDK/bin/java"; then
26232         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26234         BOOT_JDK_FOUND=no
26235       else
26236         # Do we have a bin/javac?
26237         if test ! -x "$BOOT_JDK/bin/javac"; then
26238           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26240           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26241 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26242           BOOT_JDK_FOUND=no
26243         else
26244           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26245           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26246 
26247           # Extra M4 quote needed to protect [] in grep expression.
26248           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26249           if test "x$FOUND_CORRECT_VERSION" = x; then
26250             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26252             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26253 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26254             BOOT_JDK_FOUND=no
26255           else
26256             # We're done! :-)
26257             BOOT_JDK_FOUND=yes
26258 
26259   # Only process if variable expands to non-empty
26260 
26261   if test "x$BOOT_JDK" != x; then
26262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26263 
26264   # Input might be given as Windows format, start by converting to
26265   # unix format.
26266   path="$BOOT_JDK"
26267   new_path=`$CYGPATH -u "$path"`
26268 
26269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26272   # "foo.exe" is OK but "foo" is an error.
26273   #
26274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26275   # It is also a way to make sure we got the proper file name for the real test later on.
26276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26277   if test "x$test_shortpath" = x; then
26278     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26279 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26280     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26281   fi
26282 
26283   # Call helper function which possibly converts this using DOS-style short mode.
26284   # If so, the updated path is stored in $new_path.
26285 
26286   input_path="$new_path"
26287   # Check if we need to convert this using DOS-style short mode. If the path
26288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26289   # take no chances and rewrite it.
26290   # Note: m4 eats our [], so we need to use [ and ] instead.
26291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26292   if test "x$has_forbidden_chars" != x; then
26293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26297       # Going to short mode and back again did indeed matter. Since short mode is
26298       # case insensitive, let's make it lowercase to improve readability.
26299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26300       # Now convert it back to Unix-style (cygpath)
26301       input_path=`$CYGPATH -u "$shortmode_path"`
26302       new_path="$input_path"
26303     fi
26304   fi
26305 
26306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26307   if test "x$test_cygdrive_prefix" = x; then
26308     # As a simple fix, exclude /usr/bin since it's not a real path.
26309     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26311       # a path prefixed by /cygdrive for fixpath to work.
26312       new_path="$CYGWIN_ROOT_PATH$input_path"
26313     fi
26314   fi
26315 
26316 
26317   if test "x$path" != "x$new_path"; then
26318     BOOT_JDK="$new_path"
26319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26320 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26321   fi
26322 
26323     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26324 
26325   path="$BOOT_JDK"
26326   has_colon=`$ECHO $path | $GREP ^.:`
26327   new_path="$path"
26328   if test "x$has_colon" = x; then
26329     # Not in mixed or Windows style, start by that.
26330     new_path=`cmd //c echo $path`
26331   fi
26332 
26333 
26334   input_path="$new_path"
26335   # Check if we need to convert this using DOS-style short mode. If the path
26336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26337   # take no chances and rewrite it.
26338   # Note: m4 eats our [], so we need to use [ and ] instead.
26339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26340   if test "x$has_forbidden_chars" != x; then
26341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26342     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26343   fi
26344 
26345 
26346   windows_path="$new_path"
26347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26348     unix_path=`$CYGPATH -u "$windows_path"`
26349     new_path="$unix_path"
26350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26352     new_path="$unix_path"
26353   fi
26354 
26355   if test "x$path" != "x$new_path"; then
26356     BOOT_JDK="$new_path"
26357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26358 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26359   fi
26360 
26361   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26362   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26363 
26364     else
26365       # We're on a unix platform. Hooray! :)
26366       path="$BOOT_JDK"
26367       has_space=`$ECHO "$path" | $GREP " "`
26368       if test "x$has_space" != x; then
26369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26370 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26371         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26372       fi
26373 
26374       # Use eval to expand a potential ~
26375       eval path="$path"
26376       if test ! -f "$path" && test ! -d "$path"; then
26377         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26378       fi
26379 
26380       if test -d "$path"; then
26381         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26382       else
26383         dir="`$DIRNAME "$path"`"
26384         base="`$BASENAME "$path"`"
26385         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26386       fi
26387     fi
26388   fi
26389 
26390             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26391 $as_echo_n "checking for Boot JDK... " >&6; }
26392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26393 $as_echo "$BOOT_JDK" >&6; }
26394             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26395 $as_echo_n "checking Boot JDK version... " >&6; }
26396             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26397             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26398 $as_echo "$BOOT_JDK_VERSION" >&6; }
26399           fi # end check jdk version
26400         fi # end check javac
26401       fi # end check java
26402     fi # end check boot jdk found
26403   fi
26404 
26405 
26406   if test "x$BOOT_JDK_FOUND" = xno; then
26407     # Now execute the test
26408 
26409   if test -x /usr/libexec/java_home; then
26410     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26411     BOOT_JDK_FOUND=maybe
26412     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26413 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26414   fi
26415 
26416 
26417     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26418     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26419       # Do we have a bin/java?
26420       if test ! -x "$BOOT_JDK/bin/java"; then
26421         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26422 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26423         BOOT_JDK_FOUND=no
26424       else
26425         # Do we have a bin/javac?
26426         if test ! -x "$BOOT_JDK/bin/javac"; then
26427           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26429           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26430 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26431           BOOT_JDK_FOUND=no
26432         else
26433           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26434           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26435 
26436           # Extra M4 quote needed to protect [] in grep expression.
26437           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26438           if test "x$FOUND_CORRECT_VERSION" = x; then
26439             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26441             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26442 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26443             BOOT_JDK_FOUND=no
26444           else
26445             # We're done! :-)
26446             BOOT_JDK_FOUND=yes
26447 
26448   # Only process if variable expands to non-empty
26449 
26450   if test "x$BOOT_JDK" != x; then
26451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26452 
26453   # Input might be given as Windows format, start by converting to
26454   # unix format.
26455   path="$BOOT_JDK"
26456   new_path=`$CYGPATH -u "$path"`
26457 
26458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26461   # "foo.exe" is OK but "foo" is an error.
26462   #
26463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26464   # It is also a way to make sure we got the proper file name for the real test later on.
26465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26466   if test "x$test_shortpath" = x; then
26467     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26468 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26469     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26470   fi
26471 
26472   # Call helper function which possibly converts this using DOS-style short mode.
26473   # If so, the updated path is stored in $new_path.
26474 
26475   input_path="$new_path"
26476   # Check if we need to convert this using DOS-style short mode. If the path
26477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26478   # take no chances and rewrite it.
26479   # Note: m4 eats our [], so we need to use [ and ] instead.
26480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26481   if test "x$has_forbidden_chars" != x; then
26482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26483     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26484     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26485     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26486       # Going to short mode and back again did indeed matter. Since short mode is
26487       # case insensitive, let's make it lowercase to improve readability.
26488       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26489       # Now convert it back to Unix-style (cygpath)
26490       input_path=`$CYGPATH -u "$shortmode_path"`
26491       new_path="$input_path"
26492     fi
26493   fi
26494 
26495   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26496   if test "x$test_cygdrive_prefix" = x; then
26497     # As a simple fix, exclude /usr/bin since it's not a real path.
26498     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26499       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26500       # a path prefixed by /cygdrive for fixpath to work.
26501       new_path="$CYGWIN_ROOT_PATH$input_path"
26502     fi
26503   fi
26504 
26505 
26506   if test "x$path" != "x$new_path"; then
26507     BOOT_JDK="$new_path"
26508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26509 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26510   fi
26511 
26512     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26513 
26514   path="$BOOT_JDK"
26515   has_colon=`$ECHO $path | $GREP ^.:`
26516   new_path="$path"
26517   if test "x$has_colon" = x; then
26518     # Not in mixed or Windows style, start by that.
26519     new_path=`cmd //c echo $path`
26520   fi
26521 
26522 
26523   input_path="$new_path"
26524   # Check if we need to convert this using DOS-style short mode. If the path
26525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26526   # take no chances and rewrite it.
26527   # Note: m4 eats our [], so we need to use [ and ] instead.
26528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26529   if test "x$has_forbidden_chars" != x; then
26530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26532   fi
26533 
26534 
26535   windows_path="$new_path"
26536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26537     unix_path=`$CYGPATH -u "$windows_path"`
26538     new_path="$unix_path"
26539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26541     new_path="$unix_path"
26542   fi
26543 
26544   if test "x$path" != "x$new_path"; then
26545     BOOT_JDK="$new_path"
26546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26547 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26548   fi
26549 
26550   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26551   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26552 
26553     else
26554       # We're on a unix platform. Hooray! :)
26555       path="$BOOT_JDK"
26556       has_space=`$ECHO "$path" | $GREP " "`
26557       if test "x$has_space" != x; then
26558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26559 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26560         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26561       fi
26562 
26563       # Use eval to expand a potential ~
26564       eval path="$path"
26565       if test ! -f "$path" && test ! -d "$path"; then
26566         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26567       fi
26568 
26569       if test -d "$path"; then
26570         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26571       else
26572         dir="`$DIRNAME "$path"`"
26573         base="`$BASENAME "$path"`"
26574         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26575       fi
26576     fi
26577   fi
26578 
26579             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26580 $as_echo_n "checking for Boot JDK... " >&6; }
26581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26582 $as_echo "$BOOT_JDK" >&6; }
26583             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26584 $as_echo_n "checking Boot JDK version... " >&6; }
26585             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26587 $as_echo "$BOOT_JDK_VERSION" >&6; }
26588           fi # end check jdk version
26589         fi # end check javac
26590       fi # end check java
26591     fi # end check boot jdk found
26592   fi
26593 
26594   fi
26595 
26596 
26597     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26598     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26599       # Do we have a bin/java?
26600       if test ! -x "$BOOT_JDK/bin/java"; then
26601         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26602 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26603         BOOT_JDK_FOUND=no
26604       else
26605         # Do we have a bin/javac?
26606         if test ! -x "$BOOT_JDK/bin/javac"; then
26607           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26609           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26610 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26611           BOOT_JDK_FOUND=no
26612         else
26613           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26614           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26615 
26616           # Extra M4 quote needed to protect [] in grep expression.
26617           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26618           if test "x$FOUND_CORRECT_VERSION" = x; then
26619             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26620 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26621             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26622 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26623             BOOT_JDK_FOUND=no
26624           else
26625             # We're done! :-)
26626             BOOT_JDK_FOUND=yes
26627 
26628   # Only process if variable expands to non-empty
26629 
26630   if test "x$BOOT_JDK" != x; then
26631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26632 
26633   # Input might be given as Windows format, start by converting to
26634   # unix format.
26635   path="$BOOT_JDK"
26636   new_path=`$CYGPATH -u "$path"`
26637 
26638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26641   # "foo.exe" is OK but "foo" is an error.
26642   #
26643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26644   # It is also a way to make sure we got the proper file name for the real test later on.
26645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26646   if test "x$test_shortpath" = x; then
26647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26648 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26649     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26650   fi
26651 
26652   # Call helper function which possibly converts this using DOS-style short mode.
26653   # If so, the updated path is stored in $new_path.
26654 
26655   input_path="$new_path"
26656   # Check if we need to convert this using DOS-style short mode. If the path
26657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26658   # take no chances and rewrite it.
26659   # Note: m4 eats our [], so we need to use [ and ] instead.
26660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26661   if test "x$has_forbidden_chars" != x; then
26662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26666       # Going to short mode and back again did indeed matter. Since short mode is
26667       # case insensitive, let's make it lowercase to improve readability.
26668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26669       # Now convert it back to Unix-style (cygpath)
26670       input_path=`$CYGPATH -u "$shortmode_path"`
26671       new_path="$input_path"
26672     fi
26673   fi
26674 
26675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26676   if test "x$test_cygdrive_prefix" = x; then
26677     # As a simple fix, exclude /usr/bin since it's not a real path.
26678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26680       # a path prefixed by /cygdrive for fixpath to work.
26681       new_path="$CYGWIN_ROOT_PATH$input_path"
26682     fi
26683   fi
26684 
26685 
26686   if test "x$path" != "x$new_path"; then
26687     BOOT_JDK="$new_path"
26688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26689 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26690   fi
26691 
26692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26693 
26694   path="$BOOT_JDK"
26695   has_colon=`$ECHO $path | $GREP ^.:`
26696   new_path="$path"
26697   if test "x$has_colon" = x; then
26698     # Not in mixed or Windows style, start by that.
26699     new_path=`cmd //c echo $path`
26700   fi
26701 
26702 
26703   input_path="$new_path"
26704   # Check if we need to convert this using DOS-style short mode. If the path
26705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26706   # take no chances and rewrite it.
26707   # Note: m4 eats our [], so we need to use [ and ] instead.
26708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26709   if test "x$has_forbidden_chars" != x; then
26710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26712   fi
26713 
26714 
26715   windows_path="$new_path"
26716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26717     unix_path=`$CYGPATH -u "$windows_path"`
26718     new_path="$unix_path"
26719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26721     new_path="$unix_path"
26722   fi
26723 
26724   if test "x$path" != "x$new_path"; then
26725     BOOT_JDK="$new_path"
26726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26727 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26728   fi
26729 
26730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26732 
26733     else
26734       # We're on a unix platform. Hooray! :)
26735       path="$BOOT_JDK"
26736       has_space=`$ECHO "$path" | $GREP " "`
26737       if test "x$has_space" != x; then
26738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26739 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26741       fi
26742 
26743       # Use eval to expand a potential ~
26744       eval path="$path"
26745       if test ! -f "$path" && test ! -d "$path"; then
26746         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26747       fi
26748 
26749       if test -d "$path"; then
26750         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26751       else
26752         dir="`$DIRNAME "$path"`"
26753         base="`$BASENAME "$path"`"
26754         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26755       fi
26756     fi
26757   fi
26758 
26759             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26760 $as_echo_n "checking for Boot JDK... " >&6; }
26761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26762 $as_echo "$BOOT_JDK" >&6; }
26763             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26764 $as_echo_n "checking Boot JDK version... " >&6; }
26765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26767 $as_echo "$BOOT_JDK_VERSION" >&6; }
26768           fi # end check jdk version
26769         fi # end check javac
26770       fi # end check java
26771     fi # end check boot jdk found
26772   fi
26773 
26774 
26775   # Test: Is $JAVA_HOME set?
26776 
26777   if test "x$BOOT_JDK_FOUND" = xno; then
26778     # Now execute the test
26779 
26780   if test "x$JAVA_HOME" != x; then
26781     JAVA_HOME_PROCESSED="$JAVA_HOME"
26782 
26783   # Only process if variable expands to non-empty
26784 
26785   if test "x$JAVA_HOME_PROCESSED" != x; then
26786     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26787 
26788   # Input might be given as Windows format, start by converting to
26789   # unix format.
26790   path="$JAVA_HOME_PROCESSED"
26791   new_path=`$CYGPATH -u "$path"`
26792 
26793   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26794   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26795   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26796   # "foo.exe" is OK but "foo" is an error.
26797   #
26798   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26799   # It is also a way to make sure we got the proper file name for the real test later on.
26800   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26801   if test "x$test_shortpath" = x; then
26802     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26803 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26804     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26805   fi
26806 
26807   # Call helper function which possibly converts this using DOS-style short mode.
26808   # If so, the updated path is stored in $new_path.
26809 
26810   input_path="$new_path"
26811   # Check if we need to convert this using DOS-style short mode. If the path
26812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26813   # take no chances and rewrite it.
26814   # Note: m4 eats our [], so we need to use [ and ] instead.
26815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26816   if test "x$has_forbidden_chars" != x; then
26817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26818     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26819     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26820     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26821       # Going to short mode and back again did indeed matter. Since short mode is
26822       # case insensitive, let's make it lowercase to improve readability.
26823       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26824       # Now convert it back to Unix-style (cygpath)
26825       input_path=`$CYGPATH -u "$shortmode_path"`
26826       new_path="$input_path"
26827     fi
26828   fi
26829 
26830   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26831   if test "x$test_cygdrive_prefix" = x; then
26832     # As a simple fix, exclude /usr/bin since it's not a real path.
26833     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26834       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26835       # a path prefixed by /cygdrive for fixpath to work.
26836       new_path="$CYGWIN_ROOT_PATH$input_path"
26837     fi
26838   fi
26839 
26840 
26841   if test "x$path" != "x$new_path"; then
26842     JAVA_HOME_PROCESSED="$new_path"
26843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26844 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26845   fi
26846 
26847     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26848 
26849   path="$JAVA_HOME_PROCESSED"
26850   has_colon=`$ECHO $path | $GREP ^.:`
26851   new_path="$path"
26852   if test "x$has_colon" = x; then
26853     # Not in mixed or Windows style, start by that.
26854     new_path=`cmd //c echo $path`
26855   fi
26856 
26857 
26858   input_path="$new_path"
26859   # Check if we need to convert this using DOS-style short mode. If the path
26860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26861   # take no chances and rewrite it.
26862   # Note: m4 eats our [], so we need to use [ and ] instead.
26863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26864   if test "x$has_forbidden_chars" != x; then
26865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26866     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26867   fi
26868 
26869 
26870   windows_path="$new_path"
26871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26872     unix_path=`$CYGPATH -u "$windows_path"`
26873     new_path="$unix_path"
26874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26876     new_path="$unix_path"
26877   fi
26878 
26879   if test "x$path" != "x$new_path"; then
26880     JAVA_HOME_PROCESSED="$new_path"
26881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26882 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26883   fi
26884 
26885   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26886   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26887 
26888     else
26889       # We're on a unix platform. Hooray! :)
26890       path="$JAVA_HOME_PROCESSED"
26891       has_space=`$ECHO "$path" | $GREP " "`
26892       if test "x$has_space" != x; then
26893         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26894 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26895         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26896       fi
26897 
26898       # Use eval to expand a potential ~
26899       eval path="$path"
26900       if test ! -f "$path" && test ! -d "$path"; then
26901         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26902       fi
26903 
26904       if test -d "$path"; then
26905         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26906       else
26907         dir="`$DIRNAME "$path"`"
26908         base="`$BASENAME "$path"`"
26909         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26910       fi
26911     fi
26912   fi
26913 
26914     if test ! -d "$JAVA_HOME_PROCESSED"; then
26915       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26916 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26917     else
26918       # Aha, the user has set a JAVA_HOME
26919       # let us use that as the Boot JDK.
26920       BOOT_JDK="$JAVA_HOME_PROCESSED"
26921       BOOT_JDK_FOUND=maybe
26922       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26923 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26924     fi
26925   fi
26926 
26927 
26928     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26929     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26930       # Do we have a bin/java?
26931       if test ! -x "$BOOT_JDK/bin/java"; then
26932         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26934         BOOT_JDK_FOUND=no
26935       else
26936         # Do we have a bin/javac?
26937         if test ! -x "$BOOT_JDK/bin/javac"; then
26938           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26940           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26941 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26942           BOOT_JDK_FOUND=no
26943         else
26944           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26945           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26946 
26947           # Extra M4 quote needed to protect [] in grep expression.
26948           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26949           if test "x$FOUND_CORRECT_VERSION" = x; then
26950             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26952             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26953 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26954             BOOT_JDK_FOUND=no
26955           else
26956             # We're done! :-)
26957             BOOT_JDK_FOUND=yes
26958 
26959   # Only process if variable expands to non-empty
26960 
26961   if test "x$BOOT_JDK" != x; then
26962     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963 
26964   # Input might be given as Windows format, start by converting to
26965   # unix format.
26966   path="$BOOT_JDK"
26967   new_path=`$CYGPATH -u "$path"`
26968 
26969   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26970   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26971   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26972   # "foo.exe" is OK but "foo" is an error.
26973   #
26974   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26975   # It is also a way to make sure we got the proper file name for the real test later on.
26976   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26977   if test "x$test_shortpath" = x; then
26978     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26979 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26980     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26981   fi
26982 
26983   # Call helper function which possibly converts this using DOS-style short mode.
26984   # If so, the updated path is stored in $new_path.
26985 
26986   input_path="$new_path"
26987   # Check if we need to convert this using DOS-style short mode. If the path
26988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26989   # take no chances and rewrite it.
26990   # Note: m4 eats our [], so we need to use [ and ] instead.
26991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26992   if test "x$has_forbidden_chars" != x; then
26993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26994     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26995     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26996     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26997       # Going to short mode and back again did indeed matter. Since short mode is
26998       # case insensitive, let's make it lowercase to improve readability.
26999       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27000       # Now convert it back to Unix-style (cygpath)
27001       input_path=`$CYGPATH -u "$shortmode_path"`
27002       new_path="$input_path"
27003     fi
27004   fi
27005 
27006   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27007   if test "x$test_cygdrive_prefix" = x; then
27008     # As a simple fix, exclude /usr/bin since it's not a real path.
27009     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27010       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27011       # a path prefixed by /cygdrive for fixpath to work.
27012       new_path="$CYGWIN_ROOT_PATH$input_path"
27013     fi
27014   fi
27015 
27016 
27017   if test "x$path" != "x$new_path"; then
27018     BOOT_JDK="$new_path"
27019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27020 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27021   fi
27022 
27023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27024 
27025   path="$BOOT_JDK"
27026   has_colon=`$ECHO $path | $GREP ^.:`
27027   new_path="$path"
27028   if test "x$has_colon" = x; then
27029     # Not in mixed or Windows style, start by that.
27030     new_path=`cmd //c echo $path`
27031   fi
27032 
27033 
27034   input_path="$new_path"
27035   # Check if we need to convert this using DOS-style short mode. If the path
27036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27037   # take no chances and rewrite it.
27038   # Note: m4 eats our [], so we need to use [ and ] instead.
27039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27040   if test "x$has_forbidden_chars" != x; then
27041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27043   fi
27044 
27045 
27046   windows_path="$new_path"
27047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27048     unix_path=`$CYGPATH -u "$windows_path"`
27049     new_path="$unix_path"
27050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27052     new_path="$unix_path"
27053   fi
27054 
27055   if test "x$path" != "x$new_path"; then
27056     BOOT_JDK="$new_path"
27057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27058 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27059   fi
27060 
27061   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27062   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27063 
27064     else
27065       # We're on a unix platform. Hooray! :)
27066       path="$BOOT_JDK"
27067       has_space=`$ECHO "$path" | $GREP " "`
27068       if test "x$has_space" != x; then
27069         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27070 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27071         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27072       fi
27073 
27074       # Use eval to expand a potential ~
27075       eval path="$path"
27076       if test ! -f "$path" && test ! -d "$path"; then
27077         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27078       fi
27079 
27080       if test -d "$path"; then
27081         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27082       else
27083         dir="`$DIRNAME "$path"`"
27084         base="`$BASENAME "$path"`"
27085         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27086       fi
27087     fi
27088   fi
27089 
27090             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27091 $as_echo_n "checking for Boot JDK... " >&6; }
27092             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27093 $as_echo "$BOOT_JDK" >&6; }
27094             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27095 $as_echo_n "checking Boot JDK version... " >&6; }
27096             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27097             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27098 $as_echo "$BOOT_JDK_VERSION" >&6; }
27099           fi # end check jdk version
27100         fi # end check javac
27101       fi # end check java
27102     fi # end check boot jdk found
27103   fi
27104 
27105 
27106   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27107 
27108   if test "x$BOOT_JDK_FOUND" = xno; then
27109     # Now execute the test
27110 
27111   # Extract the first word of "javac", so it can be a program name with args.
27112 set dummy javac; ac_word=$2
27113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27114 $as_echo_n "checking for $ac_word... " >&6; }
27115 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27116   $as_echo_n "(cached) " >&6
27117 else
27118   case $JAVAC_CHECK in
27119   [\\/]* | ?:[\\/]*)
27120   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27121   ;;
27122   *)
27123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27124 for as_dir in $PATH
27125 do
27126   IFS=$as_save_IFS
27127   test -z "$as_dir" && as_dir=.
27128     for ac_exec_ext in '' $ac_executable_extensions; do
27129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27130     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27132     break 2
27133   fi
27134 done
27135   done
27136 IFS=$as_save_IFS
27137 
27138   ;;
27139 esac
27140 fi
27141 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27142 if test -n "$JAVAC_CHECK"; then
27143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27144 $as_echo "$JAVAC_CHECK" >&6; }
27145 else
27146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27147 $as_echo "no" >&6; }
27148 fi
27149 
27150 
27151   # Extract the first word of "java", so it can be a program name with args.
27152 set dummy java; ac_word=$2
27153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27154 $as_echo_n "checking for $ac_word... " >&6; }
27155 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27156   $as_echo_n "(cached) " >&6
27157 else
27158   case $JAVA_CHECK in
27159   [\\/]* | ?:[\\/]*)
27160   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27161   ;;
27162   *)
27163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27164 for as_dir in $PATH
27165 do
27166   IFS=$as_save_IFS
27167   test -z "$as_dir" && as_dir=.
27168     for ac_exec_ext in '' $ac_executable_extensions; do
27169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27170     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27172     break 2
27173   fi
27174 done
27175   done
27176 IFS=$as_save_IFS
27177 
27178   ;;
27179 esac
27180 fi
27181 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27182 if test -n "$JAVA_CHECK"; then
27183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27184 $as_echo "$JAVA_CHECK" >&6; }
27185 else
27186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27187 $as_echo "no" >&6; }
27188 fi
27189 
27190 
27191   BINARY="$JAVAC_CHECK"
27192   if test "x$JAVAC_CHECK" = x; then
27193     BINARY="$JAVA_CHECK"
27194   fi
27195   if test "x$BINARY" != x; then
27196     # So there is a java(c) binary, it might be part of a JDK.
27197     # Lets find the JDK/JRE directory by following symbolic links.
27198     # Linux/GNU systems often have links from /usr/bin/java to
27199     # /etc/alternatives/java to the real JDK binary.
27200 
27201   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27202     # Follow a chain of symbolic links. Use readlink
27203     # where it exists, else fall back to horribly
27204     # complicated shell code.
27205     if test "x$READLINK_TESTED" != yes; then
27206       # On MacOSX there is a readlink tool with a different
27207       # purpose than the GNU readlink tool. Check the found readlink.
27208       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27209       if test "x$ISGNU" = x; then
27210         # A readlink that we do not know how to use.
27211         # Are there other non-GNU readlinks out there?
27212         READLINK_TESTED=yes
27213         READLINK=
27214       fi
27215     fi
27216 
27217     if test "x$READLINK" != x; then
27218       BINARY=`$READLINK -f $BINARY`
27219     else
27220       # Save the current directory for restoring afterwards
27221       STARTDIR=$PWD
27222       COUNTER=0
27223       sym_link_dir=`$DIRNAME $BINARY`
27224       sym_link_file=`$BASENAME $BINARY`
27225       cd $sym_link_dir
27226       # Use -P flag to resolve symlinks in directories.
27227       cd `$THEPWDCMD -P`
27228       sym_link_dir=`$THEPWDCMD -P`
27229       # Resolve file symlinks
27230       while test $COUNTER -lt 20; do
27231         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27232         if test "x$ISLINK" == x; then
27233           # This is not a symbolic link! We are done!
27234           break
27235         fi
27236         # Again resolve directory symlinks since the target of the just found
27237         # link could be in a different directory
27238         cd `$DIRNAME $ISLINK`
27239         sym_link_dir=`$THEPWDCMD -P`
27240         sym_link_file=`$BASENAME $ISLINK`
27241         let COUNTER=COUNTER+1
27242       done
27243       cd $STARTDIR
27244       BINARY=$sym_link_dir/$sym_link_file
27245     fi
27246   fi
27247 
27248     BOOT_JDK=`dirname "$BINARY"`
27249     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27250     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27251       # Looks like we found ourselves an JDK
27252       BOOT_JDK_FOUND=maybe
27253       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27254 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27255     fi
27256   fi
27257 
27258 
27259     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27260     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27261       # Do we have a bin/java?
27262       if test ! -x "$BOOT_JDK/bin/java"; then
27263         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27265         BOOT_JDK_FOUND=no
27266       else
27267         # Do we have a bin/javac?
27268         if test ! -x "$BOOT_JDK/bin/javac"; then
27269           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27271           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27272 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27273           BOOT_JDK_FOUND=no
27274         else
27275           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27276           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27277 
27278           # Extra M4 quote needed to protect [] in grep expression.
27279           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27280           if test "x$FOUND_CORRECT_VERSION" = x; then
27281             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27282 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27283             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27284 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27285             BOOT_JDK_FOUND=no
27286           else
27287             # We're done! :-)
27288             BOOT_JDK_FOUND=yes
27289 
27290   # Only process if variable expands to non-empty
27291 
27292   if test "x$BOOT_JDK" != x; then
27293     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27294 
27295   # Input might be given as Windows format, start by converting to
27296   # unix format.
27297   path="$BOOT_JDK"
27298   new_path=`$CYGPATH -u "$path"`
27299 
27300   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27301   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27302   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27303   # "foo.exe" is OK but "foo" is an error.
27304   #
27305   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27306   # It is also a way to make sure we got the proper file name for the real test later on.
27307   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27308   if test "x$test_shortpath" = x; then
27309     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27310 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27311     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27312   fi
27313 
27314   # Call helper function which possibly converts this using DOS-style short mode.
27315   # If so, the updated path is stored in $new_path.
27316 
27317   input_path="$new_path"
27318   # Check if we need to convert this using DOS-style short mode. If the path
27319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27320   # take no chances and rewrite it.
27321   # Note: m4 eats our [], so we need to use [ and ] instead.
27322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27323   if test "x$has_forbidden_chars" != x; then
27324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27325     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27326     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27327     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27328       # Going to short mode and back again did indeed matter. Since short mode is
27329       # case insensitive, let's make it lowercase to improve readability.
27330       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27331       # Now convert it back to Unix-style (cygpath)
27332       input_path=`$CYGPATH -u "$shortmode_path"`
27333       new_path="$input_path"
27334     fi
27335   fi
27336 
27337   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27338   if test "x$test_cygdrive_prefix" = x; then
27339     # As a simple fix, exclude /usr/bin since it's not a real path.
27340     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27341       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27342       # a path prefixed by /cygdrive for fixpath to work.
27343       new_path="$CYGWIN_ROOT_PATH$input_path"
27344     fi
27345   fi
27346 
27347 
27348   if test "x$path" != "x$new_path"; then
27349     BOOT_JDK="$new_path"
27350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27351 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27352   fi
27353 
27354     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27355 
27356   path="$BOOT_JDK"
27357   has_colon=`$ECHO $path | $GREP ^.:`
27358   new_path="$path"
27359   if test "x$has_colon" = x; then
27360     # Not in mixed or Windows style, start by that.
27361     new_path=`cmd //c echo $path`
27362   fi
27363 
27364 
27365   input_path="$new_path"
27366   # Check if we need to convert this using DOS-style short mode. If the path
27367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27368   # take no chances and rewrite it.
27369   # Note: m4 eats our [], so we need to use [ and ] instead.
27370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27371   if test "x$has_forbidden_chars" != x; then
27372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27373     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27374   fi
27375 
27376 
27377   windows_path="$new_path"
27378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27379     unix_path=`$CYGPATH -u "$windows_path"`
27380     new_path="$unix_path"
27381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27383     new_path="$unix_path"
27384   fi
27385 
27386   if test "x$path" != "x$new_path"; then
27387     BOOT_JDK="$new_path"
27388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27389 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27390   fi
27391 
27392   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27393   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27394 
27395     else
27396       # We're on a unix platform. Hooray! :)
27397       path="$BOOT_JDK"
27398       has_space=`$ECHO "$path" | $GREP " "`
27399       if test "x$has_space" != x; then
27400         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27401 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27402         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27403       fi
27404 
27405       # Use eval to expand a potential ~
27406       eval path="$path"
27407       if test ! -f "$path" && test ! -d "$path"; then
27408         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27409       fi
27410 
27411       if test -d "$path"; then
27412         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27413       else
27414         dir="`$DIRNAME "$path"`"
27415         base="`$BASENAME "$path"`"
27416         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27417       fi
27418     fi
27419   fi
27420 
27421             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27422 $as_echo_n "checking for Boot JDK... " >&6; }
27423             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27424 $as_echo "$BOOT_JDK" >&6; }
27425             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27426 $as_echo_n "checking Boot JDK version... " >&6; }
27427             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27429 $as_echo "$BOOT_JDK_VERSION" >&6; }
27430           fi # end check jdk version
27431         fi # end check javac
27432       fi # end check java
27433     fi # end check boot jdk found
27434   fi
27435 
27436 
27437   # Test: Is there a JDK installed in default, well-known locations?
27438 
27439   if test "x$BOOT_JDK_FOUND" = xno; then
27440     # Now execute the test
27441 
27442   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27443 
27444   if test "x$BOOT_JDK_FOUND" = xno; then
27445     # Now execute the test
27446 
27447   if test "x$ProgramW6432" != x; then
27448     VIRTUAL_DIR="$ProgramW6432/Java"
27449 
27450   windows_path="$VIRTUAL_DIR"
27451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452     unix_path=`$CYGPATH -u "$windows_path"`
27453     VIRTUAL_DIR="$unix_path"
27454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456     VIRTUAL_DIR="$unix_path"
27457   fi
27458 
27459 
27460   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27461   BOOT_JDK_SUFFIX=""
27462   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27463   if test "x$ALL_JDKS_FOUND" != x; then
27464     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27465 
27466   if test "x$BOOT_JDK_FOUND" = xno; then
27467     # Now execute the test
27468 
27469         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27470         if test -d "$BOOT_JDK"; then
27471           BOOT_JDK_FOUND=maybe
27472           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27473 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27474         fi
27475 
27476 
27477     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27478     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27479       # Do we have a bin/java?
27480       if test ! -x "$BOOT_JDK/bin/java"; then
27481         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27483         BOOT_JDK_FOUND=no
27484       else
27485         # Do we have a bin/javac?
27486         if test ! -x "$BOOT_JDK/bin/javac"; then
27487           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27489           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27490 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27491           BOOT_JDK_FOUND=no
27492         else
27493           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27494           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27495 
27496           # Extra M4 quote needed to protect [] in grep expression.
27497           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27498           if test "x$FOUND_CORRECT_VERSION" = x; then
27499             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27500 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27501             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27502 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27503             BOOT_JDK_FOUND=no
27504           else
27505             # We're done! :-)
27506             BOOT_JDK_FOUND=yes
27507 
27508   # Only process if variable expands to non-empty
27509 
27510   if test "x$BOOT_JDK" != x; then
27511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27512 
27513   # Input might be given as Windows format, start by converting to
27514   # unix format.
27515   path="$BOOT_JDK"
27516   new_path=`$CYGPATH -u "$path"`
27517 
27518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27521   # "foo.exe" is OK but "foo" is an error.
27522   #
27523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27524   # It is also a way to make sure we got the proper file name for the real test later on.
27525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27526   if test "x$test_shortpath" = x; then
27527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27529     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27530   fi
27531 
27532   # Call helper function which possibly converts this using DOS-style short mode.
27533   # If so, the updated path is stored in $new_path.
27534 
27535   input_path="$new_path"
27536   # Check if we need to convert this using DOS-style short mode. If the path
27537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27538   # take no chances and rewrite it.
27539   # Note: m4 eats our [], so we need to use [ and ] instead.
27540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27541   if test "x$has_forbidden_chars" != x; then
27542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27546       # Going to short mode and back again did indeed matter. Since short mode is
27547       # case insensitive, let's make it lowercase to improve readability.
27548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27549       # Now convert it back to Unix-style (cygpath)
27550       input_path=`$CYGPATH -u "$shortmode_path"`
27551       new_path="$input_path"
27552     fi
27553   fi
27554 
27555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27556   if test "x$test_cygdrive_prefix" = x; then
27557     # As a simple fix, exclude /usr/bin since it's not a real path.
27558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27560       # a path prefixed by /cygdrive for fixpath to work.
27561       new_path="$CYGWIN_ROOT_PATH$input_path"
27562     fi
27563   fi
27564 
27565 
27566   if test "x$path" != "x$new_path"; then
27567     BOOT_JDK="$new_path"
27568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27569 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27570   fi
27571 
27572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27573 
27574   path="$BOOT_JDK"
27575   has_colon=`$ECHO $path | $GREP ^.:`
27576   new_path="$path"
27577   if test "x$has_colon" = x; then
27578     # Not in mixed or Windows style, start by that.
27579     new_path=`cmd //c echo $path`
27580   fi
27581 
27582 
27583   input_path="$new_path"
27584   # Check if we need to convert this using DOS-style short mode. If the path
27585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27586   # take no chances and rewrite it.
27587   # Note: m4 eats our [], so we need to use [ and ] instead.
27588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27589   if test "x$has_forbidden_chars" != x; then
27590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27592   fi
27593 
27594 
27595   windows_path="$new_path"
27596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27597     unix_path=`$CYGPATH -u "$windows_path"`
27598     new_path="$unix_path"
27599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27601     new_path="$unix_path"
27602   fi
27603 
27604   if test "x$path" != "x$new_path"; then
27605     BOOT_JDK="$new_path"
27606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27608   fi
27609 
27610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27612 
27613     else
27614       # We're on a unix platform. Hooray! :)
27615       path="$BOOT_JDK"
27616       has_space=`$ECHO "$path" | $GREP " "`
27617       if test "x$has_space" != x; then
27618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27620         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27621       fi
27622 
27623       # Use eval to expand a potential ~
27624       eval path="$path"
27625       if test ! -f "$path" && test ! -d "$path"; then
27626         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27627       fi
27628 
27629       if test -d "$path"; then
27630         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27631       else
27632         dir="`$DIRNAME "$path"`"
27633         base="`$BASENAME "$path"`"
27634         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27635       fi
27636     fi
27637   fi
27638 
27639             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27640 $as_echo_n "checking for Boot JDK... " >&6; }
27641             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27642 $as_echo "$BOOT_JDK" >&6; }
27643             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27644 $as_echo_n "checking Boot JDK version... " >&6; }
27645             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27647 $as_echo "$BOOT_JDK_VERSION" >&6; }
27648           fi # end check jdk version
27649         fi # end check javac
27650       fi # end check java
27651     fi # end check boot jdk found
27652   fi
27653 
27654     done
27655   fi
27656 
27657   fi
27658 
27659 
27660     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27661     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27662       # Do we have a bin/java?
27663       if test ! -x "$BOOT_JDK/bin/java"; then
27664         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27666         BOOT_JDK_FOUND=no
27667       else
27668         # Do we have a bin/javac?
27669         if test ! -x "$BOOT_JDK/bin/javac"; then
27670           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27672           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27673 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27674           BOOT_JDK_FOUND=no
27675         else
27676           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27677           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27678 
27679           # Extra M4 quote needed to protect [] in grep expression.
27680           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27681           if test "x$FOUND_CORRECT_VERSION" = x; then
27682             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27684             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27685 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27686             BOOT_JDK_FOUND=no
27687           else
27688             # We're done! :-)
27689             BOOT_JDK_FOUND=yes
27690 
27691   # Only process if variable expands to non-empty
27692 
27693   if test "x$BOOT_JDK" != x; then
27694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27695 
27696   # Input might be given as Windows format, start by converting to
27697   # unix format.
27698   path="$BOOT_JDK"
27699   new_path=`$CYGPATH -u "$path"`
27700 
27701   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27702   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27703   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27704   # "foo.exe" is OK but "foo" is an error.
27705   #
27706   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27707   # It is also a way to make sure we got the proper file name for the real test later on.
27708   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27709   if test "x$test_shortpath" = x; then
27710     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27711 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27712     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27713   fi
27714 
27715   # Call helper function which possibly converts this using DOS-style short mode.
27716   # If so, the updated path is stored in $new_path.
27717 
27718   input_path="$new_path"
27719   # Check if we need to convert this using DOS-style short mode. If the path
27720   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721   # take no chances and rewrite it.
27722   # Note: m4 eats our [], so we need to use [ and ] instead.
27723   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27724   if test "x$has_forbidden_chars" != x; then
27725     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27727     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27728     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27729       # Going to short mode and back again did indeed matter. Since short mode is
27730       # case insensitive, let's make it lowercase to improve readability.
27731       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27732       # Now convert it back to Unix-style (cygpath)
27733       input_path=`$CYGPATH -u "$shortmode_path"`
27734       new_path="$input_path"
27735     fi
27736   fi
27737 
27738   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27739   if test "x$test_cygdrive_prefix" = x; then
27740     # As a simple fix, exclude /usr/bin since it's not a real path.
27741     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27742       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27743       # a path prefixed by /cygdrive for fixpath to work.
27744       new_path="$CYGWIN_ROOT_PATH$input_path"
27745     fi
27746   fi
27747 
27748 
27749   if test "x$path" != "x$new_path"; then
27750     BOOT_JDK="$new_path"
27751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27753   fi
27754 
27755     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756 
27757   path="$BOOT_JDK"
27758   has_colon=`$ECHO $path | $GREP ^.:`
27759   new_path="$path"
27760   if test "x$has_colon" = x; then
27761     # Not in mixed or Windows style, start by that.
27762     new_path=`cmd //c echo $path`
27763   fi
27764 
27765 
27766   input_path="$new_path"
27767   # Check if we need to convert this using DOS-style short mode. If the path
27768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27769   # take no chances and rewrite it.
27770   # Note: m4 eats our [], so we need to use [ and ] instead.
27771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27772   if test "x$has_forbidden_chars" != x; then
27773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27774     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27775   fi
27776 
27777 
27778   windows_path="$new_path"
27779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27780     unix_path=`$CYGPATH -u "$windows_path"`
27781     new_path="$unix_path"
27782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27784     new_path="$unix_path"
27785   fi
27786 
27787   if test "x$path" != "x$new_path"; then
27788     BOOT_JDK="$new_path"
27789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27790 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27791   fi
27792 
27793   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27794   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27795 
27796     else
27797       # We're on a unix platform. Hooray! :)
27798       path="$BOOT_JDK"
27799       has_space=`$ECHO "$path" | $GREP " "`
27800       if test "x$has_space" != x; then
27801         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27802 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27803         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27804       fi
27805 
27806       # Use eval to expand a potential ~
27807       eval path="$path"
27808       if test ! -f "$path" && test ! -d "$path"; then
27809         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27810       fi
27811 
27812       if test -d "$path"; then
27813         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27814       else
27815         dir="`$DIRNAME "$path"`"
27816         base="`$BASENAME "$path"`"
27817         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27818       fi
27819     fi
27820   fi
27821 
27822             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27823 $as_echo_n "checking for Boot JDK... " >&6; }
27824             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27825 $as_echo "$BOOT_JDK" >&6; }
27826             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27827 $as_echo_n "checking Boot JDK version... " >&6; }
27828             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27829             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27830 $as_echo "$BOOT_JDK_VERSION" >&6; }
27831           fi # end check jdk version
27832         fi # end check javac
27833       fi # end check java
27834     fi # end check boot jdk found
27835   fi
27836 
27837 
27838   if test "x$BOOT_JDK_FOUND" = xno; then
27839     # Now execute the test
27840 
27841   if test "x$PROGRAMW6432" != x; then
27842     VIRTUAL_DIR="$PROGRAMW6432/Java"
27843 
27844   windows_path="$VIRTUAL_DIR"
27845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27846     unix_path=`$CYGPATH -u "$windows_path"`
27847     VIRTUAL_DIR="$unix_path"
27848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27850     VIRTUAL_DIR="$unix_path"
27851   fi
27852 
27853 
27854   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27855   BOOT_JDK_SUFFIX=""
27856   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27857   if test "x$ALL_JDKS_FOUND" != x; then
27858     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27859 
27860   if test "x$BOOT_JDK_FOUND" = xno; then
27861     # Now execute the test
27862 
27863         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27864         if test -d "$BOOT_JDK"; then
27865           BOOT_JDK_FOUND=maybe
27866           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27867 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27868         fi
27869 
27870 
27871     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27872     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27873       # Do we have a bin/java?
27874       if test ! -x "$BOOT_JDK/bin/java"; then
27875         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27876 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27877         BOOT_JDK_FOUND=no
27878       else
27879         # Do we have a bin/javac?
27880         if test ! -x "$BOOT_JDK/bin/javac"; then
27881           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27883           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27884 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27885           BOOT_JDK_FOUND=no
27886         else
27887           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27888           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27889 
27890           # Extra M4 quote needed to protect [] in grep expression.
27891           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27892           if test "x$FOUND_CORRECT_VERSION" = x; then
27893             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27894 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27895             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27896 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27897             BOOT_JDK_FOUND=no
27898           else
27899             # We're done! :-)
27900             BOOT_JDK_FOUND=yes
27901 
27902   # Only process if variable expands to non-empty
27903 
27904   if test "x$BOOT_JDK" != x; then
27905     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27906 
27907   # Input might be given as Windows format, start by converting to
27908   # unix format.
27909   path="$BOOT_JDK"
27910   new_path=`$CYGPATH -u "$path"`
27911 
27912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27915   # "foo.exe" is OK but "foo" is an error.
27916   #
27917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27918   # It is also a way to make sure we got the proper file name for the real test later on.
27919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27920   if test "x$test_shortpath" = x; then
27921     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27922 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27923     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27924   fi
27925 
27926   # Call helper function which possibly converts this using DOS-style short mode.
27927   # If so, the updated path is stored in $new_path.
27928 
27929   input_path="$new_path"
27930   # Check if we need to convert this using DOS-style short mode. If the path
27931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27932   # take no chances and rewrite it.
27933   # Note: m4 eats our [], so we need to use [ and ] instead.
27934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27935   if test "x$has_forbidden_chars" != x; then
27936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27940       # Going to short mode and back again did indeed matter. Since short mode is
27941       # case insensitive, let's make it lowercase to improve readability.
27942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27943       # Now convert it back to Unix-style (cygpath)
27944       input_path=`$CYGPATH -u "$shortmode_path"`
27945       new_path="$input_path"
27946     fi
27947   fi
27948 
27949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27950   if test "x$test_cygdrive_prefix" = x; then
27951     # As a simple fix, exclude /usr/bin since it's not a real path.
27952     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27954       # a path prefixed by /cygdrive for fixpath to work.
27955       new_path="$CYGWIN_ROOT_PATH$input_path"
27956     fi
27957   fi
27958 
27959 
27960   if test "x$path" != "x$new_path"; then
27961     BOOT_JDK="$new_path"
27962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27963 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27964   fi
27965 
27966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27967 
27968   path="$BOOT_JDK"
27969   has_colon=`$ECHO $path | $GREP ^.:`
27970   new_path="$path"
27971   if test "x$has_colon" = x; then
27972     # Not in mixed or Windows style, start by that.
27973     new_path=`cmd //c echo $path`
27974   fi
27975 
27976 
27977   input_path="$new_path"
27978   # Check if we need to convert this using DOS-style short mode. If the path
27979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27980   # take no chances and rewrite it.
27981   # Note: m4 eats our [], so we need to use [ and ] instead.
27982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27983   if test "x$has_forbidden_chars" != x; then
27984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27985     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27986   fi
27987 
27988 
27989   windows_path="$new_path"
27990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27991     unix_path=`$CYGPATH -u "$windows_path"`
27992     new_path="$unix_path"
27993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27995     new_path="$unix_path"
27996   fi
27997 
27998   if test "x$path" != "x$new_path"; then
27999     BOOT_JDK="$new_path"
28000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28001 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28002   fi
28003 
28004   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28005   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28006 
28007     else
28008       # We're on a unix platform. Hooray! :)
28009       path="$BOOT_JDK"
28010       has_space=`$ECHO "$path" | $GREP " "`
28011       if test "x$has_space" != x; then
28012         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28013 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28014         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28015       fi
28016 
28017       # Use eval to expand a potential ~
28018       eval path="$path"
28019       if test ! -f "$path" && test ! -d "$path"; then
28020         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28021       fi
28022 
28023       if test -d "$path"; then
28024         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28025       else
28026         dir="`$DIRNAME "$path"`"
28027         base="`$BASENAME "$path"`"
28028         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28029       fi
28030     fi
28031   fi
28032 
28033             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28034 $as_echo_n "checking for Boot JDK... " >&6; }
28035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28036 $as_echo "$BOOT_JDK" >&6; }
28037             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28038 $as_echo_n "checking Boot JDK version... " >&6; }
28039             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28041 $as_echo "$BOOT_JDK_VERSION" >&6; }
28042           fi # end check jdk version
28043         fi # end check javac
28044       fi # end check java
28045     fi # end check boot jdk found
28046   fi
28047 
28048     done
28049   fi
28050 
28051   fi
28052 
28053 
28054     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28055     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28056       # Do we have a bin/java?
28057       if test ! -x "$BOOT_JDK/bin/java"; then
28058         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28059 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28060         BOOT_JDK_FOUND=no
28061       else
28062         # Do we have a bin/javac?
28063         if test ! -x "$BOOT_JDK/bin/javac"; then
28064           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28066           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28067 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28068           BOOT_JDK_FOUND=no
28069         else
28070           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28071           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28072 
28073           # Extra M4 quote needed to protect [] in grep expression.
28074           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28075           if test "x$FOUND_CORRECT_VERSION" = x; then
28076             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28077 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28078             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28079 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28080             BOOT_JDK_FOUND=no
28081           else
28082             # We're done! :-)
28083             BOOT_JDK_FOUND=yes
28084 
28085   # Only process if variable expands to non-empty
28086 
28087   if test "x$BOOT_JDK" != x; then
28088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28089 
28090   # Input might be given as Windows format, start by converting to
28091   # unix format.
28092   path="$BOOT_JDK"
28093   new_path=`$CYGPATH -u "$path"`
28094 
28095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28098   # "foo.exe" is OK but "foo" is an error.
28099   #
28100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28101   # It is also a way to make sure we got the proper file name for the real test later on.
28102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28103   if test "x$test_shortpath" = x; then
28104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28105 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28106     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28107   fi
28108 
28109   # Call helper function which possibly converts this using DOS-style short mode.
28110   # If so, the updated path is stored in $new_path.
28111 
28112   input_path="$new_path"
28113   # Check if we need to convert this using DOS-style short mode. If the path
28114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28115   # take no chances and rewrite it.
28116   # Note: m4 eats our [], so we need to use [ and ] instead.
28117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28118   if test "x$has_forbidden_chars" != x; then
28119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28123       # Going to short mode and back again did indeed matter. Since short mode is
28124       # case insensitive, let's make it lowercase to improve readability.
28125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28126       # Now convert it back to Unix-style (cygpath)
28127       input_path=`$CYGPATH -u "$shortmode_path"`
28128       new_path="$input_path"
28129     fi
28130   fi
28131 
28132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28133   if test "x$test_cygdrive_prefix" = x; then
28134     # As a simple fix, exclude /usr/bin since it's not a real path.
28135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28137       # a path prefixed by /cygdrive for fixpath to work.
28138       new_path="$CYGWIN_ROOT_PATH$input_path"
28139     fi
28140   fi
28141 
28142 
28143   if test "x$path" != "x$new_path"; then
28144     BOOT_JDK="$new_path"
28145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28147   fi
28148 
28149     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28150 
28151   path="$BOOT_JDK"
28152   has_colon=`$ECHO $path | $GREP ^.:`
28153   new_path="$path"
28154   if test "x$has_colon" = x; then
28155     # Not in mixed or Windows style, start by that.
28156     new_path=`cmd //c echo $path`
28157   fi
28158 
28159 
28160   input_path="$new_path"
28161   # Check if we need to convert this using DOS-style short mode. If the path
28162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28163   # take no chances and rewrite it.
28164   # Note: m4 eats our [], so we need to use [ and ] instead.
28165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28166   if test "x$has_forbidden_chars" != x; then
28167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28169   fi
28170 
28171 
28172   windows_path="$new_path"
28173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28174     unix_path=`$CYGPATH -u "$windows_path"`
28175     new_path="$unix_path"
28176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28178     new_path="$unix_path"
28179   fi
28180 
28181   if test "x$path" != "x$new_path"; then
28182     BOOT_JDK="$new_path"
28183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28185   fi
28186 
28187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28189 
28190     else
28191       # We're on a unix platform. Hooray! :)
28192       path="$BOOT_JDK"
28193       has_space=`$ECHO "$path" | $GREP " "`
28194       if test "x$has_space" != x; then
28195         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28196 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28197         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28198       fi
28199 
28200       # Use eval to expand a potential ~
28201       eval path="$path"
28202       if test ! -f "$path" && test ! -d "$path"; then
28203         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28204       fi
28205 
28206       if test -d "$path"; then
28207         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28208       else
28209         dir="`$DIRNAME "$path"`"
28210         base="`$BASENAME "$path"`"
28211         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28212       fi
28213     fi
28214   fi
28215 
28216             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28217 $as_echo_n "checking for Boot JDK... " >&6; }
28218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28219 $as_echo "$BOOT_JDK" >&6; }
28220             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28221 $as_echo_n "checking Boot JDK version... " >&6; }
28222             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28223             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28224 $as_echo "$BOOT_JDK_VERSION" >&6; }
28225           fi # end check jdk version
28226         fi # end check javac
28227       fi # end check java
28228     fi # end check boot jdk found
28229   fi
28230 
28231 
28232   if test "x$BOOT_JDK_FOUND" = xno; then
28233     # Now execute the test
28234 
28235   if test "x$PROGRAMFILES" != x; then
28236     VIRTUAL_DIR="$PROGRAMFILES/Java"
28237 
28238   windows_path="$VIRTUAL_DIR"
28239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28240     unix_path=`$CYGPATH -u "$windows_path"`
28241     VIRTUAL_DIR="$unix_path"
28242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28244     VIRTUAL_DIR="$unix_path"
28245   fi
28246 
28247 
28248   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28249   BOOT_JDK_SUFFIX=""
28250   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28251   if test "x$ALL_JDKS_FOUND" != x; then
28252     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28253 
28254   if test "x$BOOT_JDK_FOUND" = xno; then
28255     # Now execute the test
28256 
28257         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28258         if test -d "$BOOT_JDK"; then
28259           BOOT_JDK_FOUND=maybe
28260           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28261 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28262         fi
28263 
28264 
28265     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28266     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28267       # Do we have a bin/java?
28268       if test ! -x "$BOOT_JDK/bin/java"; then
28269         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28271         BOOT_JDK_FOUND=no
28272       else
28273         # Do we have a bin/javac?
28274         if test ! -x "$BOOT_JDK/bin/javac"; then
28275           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28277           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28278 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28279           BOOT_JDK_FOUND=no
28280         else
28281           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28282           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28283 
28284           # Extra M4 quote needed to protect [] in grep expression.
28285           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28286           if test "x$FOUND_CORRECT_VERSION" = x; then
28287             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28288 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28289             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28290 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28291             BOOT_JDK_FOUND=no
28292           else
28293             # We're done! :-)
28294             BOOT_JDK_FOUND=yes
28295 
28296   # Only process if variable expands to non-empty
28297 
28298   if test "x$BOOT_JDK" != x; then
28299     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300 
28301   # Input might be given as Windows format, start by converting to
28302   # unix format.
28303   path="$BOOT_JDK"
28304   new_path=`$CYGPATH -u "$path"`
28305 
28306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28309   # "foo.exe" is OK but "foo" is an error.
28310   #
28311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28312   # It is also a way to make sure we got the proper file name for the real test later on.
28313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28314   if test "x$test_shortpath" = x; then
28315     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28317     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28318   fi
28319 
28320   # Call helper function which possibly converts this using DOS-style short mode.
28321   # If so, the updated path is stored in $new_path.
28322 
28323   input_path="$new_path"
28324   # Check if we need to convert this using DOS-style short mode. If the path
28325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28326   # take no chances and rewrite it.
28327   # Note: m4 eats our [], so we need to use [ and ] instead.
28328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28329   if test "x$has_forbidden_chars" != x; then
28330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28334       # Going to short mode and back again did indeed matter. Since short mode is
28335       # case insensitive, let's make it lowercase to improve readability.
28336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28337       # Now convert it back to Unix-style (cygpath)
28338       input_path=`$CYGPATH -u "$shortmode_path"`
28339       new_path="$input_path"
28340     fi
28341   fi
28342 
28343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28344   if test "x$test_cygdrive_prefix" = x; then
28345     # As a simple fix, exclude /usr/bin since it's not a real path.
28346     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28348       # a path prefixed by /cygdrive for fixpath to work.
28349       new_path="$CYGWIN_ROOT_PATH$input_path"
28350     fi
28351   fi
28352 
28353 
28354   if test "x$path" != "x$new_path"; then
28355     BOOT_JDK="$new_path"
28356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28357 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28358   fi
28359 
28360     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28361 
28362   path="$BOOT_JDK"
28363   has_colon=`$ECHO $path | $GREP ^.:`
28364   new_path="$path"
28365   if test "x$has_colon" = x; then
28366     # Not in mixed or Windows style, start by that.
28367     new_path=`cmd //c echo $path`
28368   fi
28369 
28370 
28371   input_path="$new_path"
28372   # Check if we need to convert this using DOS-style short mode. If the path
28373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28374   # take no chances and rewrite it.
28375   # Note: m4 eats our [], so we need to use [ and ] instead.
28376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28377   if test "x$has_forbidden_chars" != x; then
28378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28380   fi
28381 
28382 
28383   windows_path="$new_path"
28384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28385     unix_path=`$CYGPATH -u "$windows_path"`
28386     new_path="$unix_path"
28387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28389     new_path="$unix_path"
28390   fi
28391 
28392   if test "x$path" != "x$new_path"; then
28393     BOOT_JDK="$new_path"
28394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28395 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28396   fi
28397 
28398   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28399   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28400 
28401     else
28402       # We're on a unix platform. Hooray! :)
28403       path="$BOOT_JDK"
28404       has_space=`$ECHO "$path" | $GREP " "`
28405       if test "x$has_space" != x; then
28406         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28408         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28409       fi
28410 
28411       # Use eval to expand a potential ~
28412       eval path="$path"
28413       if test ! -f "$path" && test ! -d "$path"; then
28414         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28415       fi
28416 
28417       if test -d "$path"; then
28418         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28419       else
28420         dir="`$DIRNAME "$path"`"
28421         base="`$BASENAME "$path"`"
28422         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28423       fi
28424     fi
28425   fi
28426 
28427             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28428 $as_echo_n "checking for Boot JDK... " >&6; }
28429             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28430 $as_echo "$BOOT_JDK" >&6; }
28431             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28432 $as_echo_n "checking Boot JDK version... " >&6; }
28433             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28434             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28435 $as_echo "$BOOT_JDK_VERSION" >&6; }
28436           fi # end check jdk version
28437         fi # end check javac
28438       fi # end check java
28439     fi # end check boot jdk found
28440   fi
28441 
28442     done
28443   fi
28444 
28445   fi
28446 
28447 
28448     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28449     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28450       # Do we have a bin/java?
28451       if test ! -x "$BOOT_JDK/bin/java"; then
28452         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28454         BOOT_JDK_FOUND=no
28455       else
28456         # Do we have a bin/javac?
28457         if test ! -x "$BOOT_JDK/bin/javac"; then
28458           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28460           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28461 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28462           BOOT_JDK_FOUND=no
28463         else
28464           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28465           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28466 
28467           # Extra M4 quote needed to protect [] in grep expression.
28468           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28469           if test "x$FOUND_CORRECT_VERSION" = x; then
28470             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28472             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28473 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28474             BOOT_JDK_FOUND=no
28475           else
28476             # We're done! :-)
28477             BOOT_JDK_FOUND=yes
28478 
28479   # Only process if variable expands to non-empty
28480 
28481   if test "x$BOOT_JDK" != x; then
28482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28483 
28484   # Input might be given as Windows format, start by converting to
28485   # unix format.
28486   path="$BOOT_JDK"
28487   new_path=`$CYGPATH -u "$path"`
28488 
28489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28492   # "foo.exe" is OK but "foo" is an error.
28493   #
28494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28495   # It is also a way to make sure we got the proper file name for the real test later on.
28496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28497   if test "x$test_shortpath" = x; then
28498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28501   fi
28502 
28503   # Call helper function which possibly converts this using DOS-style short mode.
28504   # If so, the updated path is stored in $new_path.
28505 
28506   input_path="$new_path"
28507   # Check if we need to convert this using DOS-style short mode. If the path
28508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28509   # take no chances and rewrite it.
28510   # Note: m4 eats our [], so we need to use [ and ] instead.
28511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28512   if test "x$has_forbidden_chars" != x; then
28513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28517       # Going to short mode and back again did indeed matter. Since short mode is
28518       # case insensitive, let's make it lowercase to improve readability.
28519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28520       # Now convert it back to Unix-style (cygpath)
28521       input_path=`$CYGPATH -u "$shortmode_path"`
28522       new_path="$input_path"
28523     fi
28524   fi
28525 
28526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28527   if test "x$test_cygdrive_prefix" = x; then
28528     # As a simple fix, exclude /usr/bin since it's not a real path.
28529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28531       # a path prefixed by /cygdrive for fixpath to work.
28532       new_path="$CYGWIN_ROOT_PATH$input_path"
28533     fi
28534   fi
28535 
28536 
28537   if test "x$path" != "x$new_path"; then
28538     BOOT_JDK="$new_path"
28539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28541   fi
28542 
28543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28544 
28545   path="$BOOT_JDK"
28546   has_colon=`$ECHO $path | $GREP ^.:`
28547   new_path="$path"
28548   if test "x$has_colon" = x; then
28549     # Not in mixed or Windows style, start by that.
28550     new_path=`cmd //c echo $path`
28551   fi
28552 
28553 
28554   input_path="$new_path"
28555   # Check if we need to convert this using DOS-style short mode. If the path
28556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28557   # take no chances and rewrite it.
28558   # Note: m4 eats our [], so we need to use [ and ] instead.
28559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28560   if test "x$has_forbidden_chars" != x; then
28561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28563   fi
28564 
28565 
28566   windows_path="$new_path"
28567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28568     unix_path=`$CYGPATH -u "$windows_path"`
28569     new_path="$unix_path"
28570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28572     new_path="$unix_path"
28573   fi
28574 
28575   if test "x$path" != "x$new_path"; then
28576     BOOT_JDK="$new_path"
28577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28579   fi
28580 
28581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28583 
28584     else
28585       # We're on a unix platform. Hooray! :)
28586       path="$BOOT_JDK"
28587       has_space=`$ECHO "$path" | $GREP " "`
28588       if test "x$has_space" != x; then
28589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28592       fi
28593 
28594       # Use eval to expand a potential ~
28595       eval path="$path"
28596       if test ! -f "$path" && test ! -d "$path"; then
28597         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28598       fi
28599 
28600       if test -d "$path"; then
28601         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28602       else
28603         dir="`$DIRNAME "$path"`"
28604         base="`$BASENAME "$path"`"
28605         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28606       fi
28607     fi
28608   fi
28609 
28610             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28611 $as_echo_n "checking for Boot JDK... " >&6; }
28612             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28613 $as_echo "$BOOT_JDK" >&6; }
28614             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28615 $as_echo_n "checking Boot JDK version... " >&6; }
28616             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28617             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28618 $as_echo "$BOOT_JDK_VERSION" >&6; }
28619           fi # end check jdk version
28620         fi # end check javac
28621       fi # end check java
28622     fi # end check boot jdk found
28623   fi
28624 
28625 
28626   if test "x$BOOT_JDK_FOUND" = xno; then
28627     # Now execute the test
28628 
28629   if test "x$ProgramFiles" != x; then
28630     VIRTUAL_DIR="$ProgramFiles/Java"
28631 
28632   windows_path="$VIRTUAL_DIR"
28633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28634     unix_path=`$CYGPATH -u "$windows_path"`
28635     VIRTUAL_DIR="$unix_path"
28636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28638     VIRTUAL_DIR="$unix_path"
28639   fi
28640 
28641 
28642   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28643   BOOT_JDK_SUFFIX=""
28644   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28645   if test "x$ALL_JDKS_FOUND" != x; then
28646     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28647 
28648   if test "x$BOOT_JDK_FOUND" = xno; then
28649     # Now execute the test
28650 
28651         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28652         if test -d "$BOOT_JDK"; then
28653           BOOT_JDK_FOUND=maybe
28654           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28655 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28656         fi
28657 
28658 
28659     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28660     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28661       # Do we have a bin/java?
28662       if test ! -x "$BOOT_JDK/bin/java"; then
28663         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28665         BOOT_JDK_FOUND=no
28666       else
28667         # Do we have a bin/javac?
28668         if test ! -x "$BOOT_JDK/bin/javac"; then
28669           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28670 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28671           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28672 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28673           BOOT_JDK_FOUND=no
28674         else
28675           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28676           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28677 
28678           # Extra M4 quote needed to protect [] in grep expression.
28679           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28680           if test "x$FOUND_CORRECT_VERSION" = x; then
28681             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28682 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28683             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28684 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28685             BOOT_JDK_FOUND=no
28686           else
28687             # We're done! :-)
28688             BOOT_JDK_FOUND=yes
28689 
28690   # Only process if variable expands to non-empty
28691 
28692   if test "x$BOOT_JDK" != x; then
28693     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28694 
28695   # Input might be given as Windows format, start by converting to
28696   # unix format.
28697   path="$BOOT_JDK"
28698   new_path=`$CYGPATH -u "$path"`
28699 
28700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28703   # "foo.exe" is OK but "foo" is an error.
28704   #
28705   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28706   # It is also a way to make sure we got the proper file name for the real test later on.
28707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28708   if test "x$test_shortpath" = x; then
28709     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28711     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28712   fi
28713 
28714   # Call helper function which possibly converts this using DOS-style short mode.
28715   # If so, the updated path is stored in $new_path.
28716 
28717   input_path="$new_path"
28718   # Check if we need to convert this using DOS-style short mode. If the path
28719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28720   # take no chances and rewrite it.
28721   # Note: m4 eats our [], so we need to use [ and ] instead.
28722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28723   if test "x$has_forbidden_chars" != x; then
28724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28728       # Going to short mode and back again did indeed matter. Since short mode is
28729       # case insensitive, let's make it lowercase to improve readability.
28730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28731       # Now convert it back to Unix-style (cygpath)
28732       input_path=`$CYGPATH -u "$shortmode_path"`
28733       new_path="$input_path"
28734     fi
28735   fi
28736 
28737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28738   if test "x$test_cygdrive_prefix" = x; then
28739     # As a simple fix, exclude /usr/bin since it's not a real path.
28740     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28742       # a path prefixed by /cygdrive for fixpath to work.
28743       new_path="$CYGWIN_ROOT_PATH$input_path"
28744     fi
28745   fi
28746 
28747 
28748   if test "x$path" != "x$new_path"; then
28749     BOOT_JDK="$new_path"
28750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28751 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28752   fi
28753 
28754     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28755 
28756   path="$BOOT_JDK"
28757   has_colon=`$ECHO $path | $GREP ^.:`
28758   new_path="$path"
28759   if test "x$has_colon" = x; then
28760     # Not in mixed or Windows style, start by that.
28761     new_path=`cmd //c echo $path`
28762   fi
28763 
28764 
28765   input_path="$new_path"
28766   # Check if we need to convert this using DOS-style short mode. If the path
28767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28768   # take no chances and rewrite it.
28769   # Note: m4 eats our [], so we need to use [ and ] instead.
28770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28771   if test "x$has_forbidden_chars" != x; then
28772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28774   fi
28775 
28776 
28777   windows_path="$new_path"
28778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28779     unix_path=`$CYGPATH -u "$windows_path"`
28780     new_path="$unix_path"
28781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28783     new_path="$unix_path"
28784   fi
28785 
28786   if test "x$path" != "x$new_path"; then
28787     BOOT_JDK="$new_path"
28788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28789 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28790   fi
28791 
28792   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28793   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28794 
28795     else
28796       # We're on a unix platform. Hooray! :)
28797       path="$BOOT_JDK"
28798       has_space=`$ECHO "$path" | $GREP " "`
28799       if test "x$has_space" != x; then
28800         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28801 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28802         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28803       fi
28804 
28805       # Use eval to expand a potential ~
28806       eval path="$path"
28807       if test ! -f "$path" && test ! -d "$path"; then
28808         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28809       fi
28810 
28811       if test -d "$path"; then
28812         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28813       else
28814         dir="`$DIRNAME "$path"`"
28815         base="`$BASENAME "$path"`"
28816         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28817       fi
28818     fi
28819   fi
28820 
28821             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28822 $as_echo_n "checking for Boot JDK... " >&6; }
28823             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28824 $as_echo "$BOOT_JDK" >&6; }
28825             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28826 $as_echo_n "checking Boot JDK version... " >&6; }
28827             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28828             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28829 $as_echo "$BOOT_JDK_VERSION" >&6; }
28830           fi # end check jdk version
28831         fi # end check javac
28832       fi # end check java
28833     fi # end check boot jdk found
28834   fi
28835 
28836     done
28837   fi
28838 
28839   fi
28840 
28841 
28842     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28843     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28844       # Do we have a bin/java?
28845       if test ! -x "$BOOT_JDK/bin/java"; then
28846         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28848         BOOT_JDK_FOUND=no
28849       else
28850         # Do we have a bin/javac?
28851         if test ! -x "$BOOT_JDK/bin/javac"; then
28852           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28854           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28855 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28856           BOOT_JDK_FOUND=no
28857         else
28858           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28859           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28860 
28861           # Extra M4 quote needed to protect [] in grep expression.
28862           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28863           if test "x$FOUND_CORRECT_VERSION" = x; then
28864             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28865 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28866             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28867 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28868             BOOT_JDK_FOUND=no
28869           else
28870             # We're done! :-)
28871             BOOT_JDK_FOUND=yes
28872 
28873   # Only process if variable expands to non-empty
28874 
28875   if test "x$BOOT_JDK" != x; then
28876     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28877 
28878   # Input might be given as Windows format, start by converting to
28879   # unix format.
28880   path="$BOOT_JDK"
28881   new_path=`$CYGPATH -u "$path"`
28882 
28883   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28884   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28885   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28886   # "foo.exe" is OK but "foo" is an error.
28887   #
28888   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28889   # It is also a way to make sure we got the proper file name for the real test later on.
28890   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28891   if test "x$test_shortpath" = x; then
28892     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28894     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28895   fi
28896 
28897   # Call helper function which possibly converts this using DOS-style short mode.
28898   # If so, the updated path is stored in $new_path.
28899 
28900   input_path="$new_path"
28901   # Check if we need to convert this using DOS-style short mode. If the path
28902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28903   # take no chances and rewrite it.
28904   # Note: m4 eats our [], so we need to use [ and ] instead.
28905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28906   if test "x$has_forbidden_chars" != x; then
28907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28911       # Going to short mode and back again did indeed matter. Since short mode is
28912       # case insensitive, let's make it lowercase to improve readability.
28913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28914       # Now convert it back to Unix-style (cygpath)
28915       input_path=`$CYGPATH -u "$shortmode_path"`
28916       new_path="$input_path"
28917     fi
28918   fi
28919 
28920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28921   if test "x$test_cygdrive_prefix" = x; then
28922     # As a simple fix, exclude /usr/bin since it's not a real path.
28923     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28925       # a path prefixed by /cygdrive for fixpath to work.
28926       new_path="$CYGWIN_ROOT_PATH$input_path"
28927     fi
28928   fi
28929 
28930 
28931   if test "x$path" != "x$new_path"; then
28932     BOOT_JDK="$new_path"
28933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28934 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28935   fi
28936 
28937     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28938 
28939   path="$BOOT_JDK"
28940   has_colon=`$ECHO $path | $GREP ^.:`
28941   new_path="$path"
28942   if test "x$has_colon" = x; then
28943     # Not in mixed or Windows style, start by that.
28944     new_path=`cmd //c echo $path`
28945   fi
28946 
28947 
28948   input_path="$new_path"
28949   # Check if we need to convert this using DOS-style short mode. If the path
28950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28951   # take no chances and rewrite it.
28952   # Note: m4 eats our [], so we need to use [ and ] instead.
28953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28954   if test "x$has_forbidden_chars" != x; then
28955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28956     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28957   fi
28958 
28959 
28960   windows_path="$new_path"
28961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28962     unix_path=`$CYGPATH -u "$windows_path"`
28963     new_path="$unix_path"
28964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28966     new_path="$unix_path"
28967   fi
28968 
28969   if test "x$path" != "x$new_path"; then
28970     BOOT_JDK="$new_path"
28971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28972 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28973   fi
28974 
28975   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28976   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28977 
28978     else
28979       # We're on a unix platform. Hooray! :)
28980       path="$BOOT_JDK"
28981       has_space=`$ECHO "$path" | $GREP " "`
28982       if test "x$has_space" != x; then
28983         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28984 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28985         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28986       fi
28987 
28988       # Use eval to expand a potential ~
28989       eval path="$path"
28990       if test ! -f "$path" && test ! -d "$path"; then
28991         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28992       fi
28993 
28994       if test -d "$path"; then
28995         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28996       else
28997         dir="`$DIRNAME "$path"`"
28998         base="`$BASENAME "$path"`"
28999         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29000       fi
29001     fi
29002   fi
29003 
29004             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29005 $as_echo_n "checking for Boot JDK... " >&6; }
29006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29007 $as_echo "$BOOT_JDK" >&6; }
29008             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29009 $as_echo_n "checking Boot JDK version... " >&6; }
29010             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29012 $as_echo "$BOOT_JDK_VERSION" >&6; }
29013           fi # end check jdk version
29014         fi # end check javac
29015       fi # end check java
29016     fi # end check boot jdk found
29017   fi
29018 
29019 
29020   if test "x$BOOT_JDK_FOUND" = xno; then
29021     # Now execute the test
29022 
29023   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29024   BOOT_JDK_SUFFIX=""
29025   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29026   if test "x$ALL_JDKS_FOUND" != x; then
29027     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29028 
29029   if test "x$BOOT_JDK_FOUND" = xno; then
29030     # Now execute the test
29031 
29032         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29033         if test -d "$BOOT_JDK"; then
29034           BOOT_JDK_FOUND=maybe
29035           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29036 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29037         fi
29038 
29039 
29040     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29041     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29042       # Do we have a bin/java?
29043       if test ! -x "$BOOT_JDK/bin/java"; then
29044         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29045 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29046         BOOT_JDK_FOUND=no
29047       else
29048         # Do we have a bin/javac?
29049         if test ! -x "$BOOT_JDK/bin/javac"; then
29050           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29052           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29053 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29054           BOOT_JDK_FOUND=no
29055         else
29056           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29057           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29058 
29059           # Extra M4 quote needed to protect [] in grep expression.
29060           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29061           if test "x$FOUND_CORRECT_VERSION" = x; then
29062             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29063 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29064             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29065 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29066             BOOT_JDK_FOUND=no
29067           else
29068             # We're done! :-)
29069             BOOT_JDK_FOUND=yes
29070 
29071   # Only process if variable expands to non-empty
29072 
29073   if test "x$BOOT_JDK" != x; then
29074     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29075 
29076   # Input might be given as Windows format, start by converting to
29077   # unix format.
29078   path="$BOOT_JDK"
29079   new_path=`$CYGPATH -u "$path"`
29080 
29081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29084   # "foo.exe" is OK but "foo" is an error.
29085   #
29086   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29087   # It is also a way to make sure we got the proper file name for the real test later on.
29088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29089   if test "x$test_shortpath" = x; then
29090     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29091 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29092     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29093   fi
29094 
29095   # Call helper function which possibly converts this using DOS-style short mode.
29096   # If so, the updated path is stored in $new_path.
29097 
29098   input_path="$new_path"
29099   # Check if we need to convert this using DOS-style short mode. If the path
29100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29101   # take no chances and rewrite it.
29102   # Note: m4 eats our [], so we need to use [ and ] instead.
29103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29104   if test "x$has_forbidden_chars" != x; then
29105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29106     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29107     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29108     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29109       # Going to short mode and back again did indeed matter. Since short mode is
29110       # case insensitive, let's make it lowercase to improve readability.
29111       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29112       # Now convert it back to Unix-style (cygpath)
29113       input_path=`$CYGPATH -u "$shortmode_path"`
29114       new_path="$input_path"
29115     fi
29116   fi
29117 
29118   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29119   if test "x$test_cygdrive_prefix" = x; then
29120     # As a simple fix, exclude /usr/bin since it's not a real path.
29121     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29122       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29123       # a path prefixed by /cygdrive for fixpath to work.
29124       new_path="$CYGWIN_ROOT_PATH$input_path"
29125     fi
29126   fi
29127 
29128 
29129   if test "x$path" != "x$new_path"; then
29130     BOOT_JDK="$new_path"
29131     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29132 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29133   fi
29134 
29135     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29136 
29137   path="$BOOT_JDK"
29138   has_colon=`$ECHO $path | $GREP ^.:`
29139   new_path="$path"
29140   if test "x$has_colon" = x; then
29141     # Not in mixed or Windows style, start by that.
29142     new_path=`cmd //c echo $path`
29143   fi
29144 
29145 
29146   input_path="$new_path"
29147   # Check if we need to convert this using DOS-style short mode. If the path
29148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29149   # take no chances and rewrite it.
29150   # Note: m4 eats our [], so we need to use [ and ] instead.
29151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29152   if test "x$has_forbidden_chars" != x; then
29153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29154     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29155   fi
29156 
29157 
29158   windows_path="$new_path"
29159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29160     unix_path=`$CYGPATH -u "$windows_path"`
29161     new_path="$unix_path"
29162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29164     new_path="$unix_path"
29165   fi
29166 
29167   if test "x$path" != "x$new_path"; then
29168     BOOT_JDK="$new_path"
29169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29171   fi
29172 
29173   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29174   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29175 
29176     else
29177       # We're on a unix platform. Hooray! :)
29178       path="$BOOT_JDK"
29179       has_space=`$ECHO "$path" | $GREP " "`
29180       if test "x$has_space" != x; then
29181         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29182 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29183         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29184       fi
29185 
29186       # Use eval to expand a potential ~
29187       eval path="$path"
29188       if test ! -f "$path" && test ! -d "$path"; then
29189         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29190       fi
29191 
29192       if test -d "$path"; then
29193         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29194       else
29195         dir="`$DIRNAME "$path"`"
29196         base="`$BASENAME "$path"`"
29197         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29198       fi
29199     fi
29200   fi
29201 
29202             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29203 $as_echo_n "checking for Boot JDK... " >&6; }
29204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29205 $as_echo "$BOOT_JDK" >&6; }
29206             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29207 $as_echo_n "checking Boot JDK version... " >&6; }
29208             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29210 $as_echo "$BOOT_JDK_VERSION" >&6; }
29211           fi # end check jdk version
29212         fi # end check javac
29213       fi # end check java
29214     fi # end check boot jdk found
29215   fi
29216 
29217     done
29218   fi
29219 
29220 
29221     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29222     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29223       # Do we have a bin/java?
29224       if test ! -x "$BOOT_JDK/bin/java"; then
29225         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29227         BOOT_JDK_FOUND=no
29228       else
29229         # Do we have a bin/javac?
29230         if test ! -x "$BOOT_JDK/bin/javac"; then
29231           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29233           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29234 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29235           BOOT_JDK_FOUND=no
29236         else
29237           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29238           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29239 
29240           # Extra M4 quote needed to protect [] in grep expression.
29241           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29242           if test "x$FOUND_CORRECT_VERSION" = x; then
29243             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29244 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29245             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29246 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29247             BOOT_JDK_FOUND=no
29248           else
29249             # We're done! :-)
29250             BOOT_JDK_FOUND=yes
29251 
29252   # Only process if variable expands to non-empty
29253 
29254   if test "x$BOOT_JDK" != x; then
29255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29256 
29257   # Input might be given as Windows format, start by converting to
29258   # unix format.
29259   path="$BOOT_JDK"
29260   new_path=`$CYGPATH -u "$path"`
29261 
29262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29265   # "foo.exe" is OK but "foo" is an error.
29266   #
29267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29268   # It is also a way to make sure we got the proper file name for the real test later on.
29269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29270   if test "x$test_shortpath" = x; then
29271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29272 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29273     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29274   fi
29275 
29276   # Call helper function which possibly converts this using DOS-style short mode.
29277   # If so, the updated path is stored in $new_path.
29278 
29279   input_path="$new_path"
29280   # Check if we need to convert this using DOS-style short mode. If the path
29281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29282   # take no chances and rewrite it.
29283   # Note: m4 eats our [], so we need to use [ and ] instead.
29284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29285   if test "x$has_forbidden_chars" != x; then
29286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29290       # Going to short mode and back again did indeed matter. Since short mode is
29291       # case insensitive, let's make it lowercase to improve readability.
29292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29293       # Now convert it back to Unix-style (cygpath)
29294       input_path=`$CYGPATH -u "$shortmode_path"`
29295       new_path="$input_path"
29296     fi
29297   fi
29298 
29299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29300   if test "x$test_cygdrive_prefix" = x; then
29301     # As a simple fix, exclude /usr/bin since it's not a real path.
29302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29304       # a path prefixed by /cygdrive for fixpath to work.
29305       new_path="$CYGWIN_ROOT_PATH$input_path"
29306     fi
29307   fi
29308 
29309 
29310   if test "x$path" != "x$new_path"; then
29311     BOOT_JDK="$new_path"
29312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29313 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29314   fi
29315 
29316     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29317 
29318   path="$BOOT_JDK"
29319   has_colon=`$ECHO $path | $GREP ^.:`
29320   new_path="$path"
29321   if test "x$has_colon" = x; then
29322     # Not in mixed or Windows style, start by that.
29323     new_path=`cmd //c echo $path`
29324   fi
29325 
29326 
29327   input_path="$new_path"
29328   # Check if we need to convert this using DOS-style short mode. If the path
29329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29330   # take no chances and rewrite it.
29331   # Note: m4 eats our [], so we need to use [ and ] instead.
29332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29333   if test "x$has_forbidden_chars" != x; then
29334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29336   fi
29337 
29338 
29339   windows_path="$new_path"
29340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29341     unix_path=`$CYGPATH -u "$windows_path"`
29342     new_path="$unix_path"
29343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29345     new_path="$unix_path"
29346   fi
29347 
29348   if test "x$path" != "x$new_path"; then
29349     BOOT_JDK="$new_path"
29350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29351 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29352   fi
29353 
29354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29356 
29357     else
29358       # We're on a unix platform. Hooray! :)
29359       path="$BOOT_JDK"
29360       has_space=`$ECHO "$path" | $GREP " "`
29361       if test "x$has_space" != x; then
29362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29363 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29364         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29365       fi
29366 
29367       # Use eval to expand a potential ~
29368       eval path="$path"
29369       if test ! -f "$path" && test ! -d "$path"; then
29370         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29371       fi
29372 
29373       if test -d "$path"; then
29374         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29375       else
29376         dir="`$DIRNAME "$path"`"
29377         base="`$BASENAME "$path"`"
29378         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29379       fi
29380     fi
29381   fi
29382 
29383             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29384 $as_echo_n "checking for Boot JDK... " >&6; }
29385             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29386 $as_echo "$BOOT_JDK" >&6; }
29387             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29388 $as_echo_n "checking Boot JDK version... " >&6; }
29389             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29390             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29391 $as_echo "$BOOT_JDK_VERSION" >&6; }
29392           fi # end check jdk version
29393         fi # end check javac
29394       fi # end check java
29395     fi # end check boot jdk found
29396   fi
29397 
29398   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29399 
29400   if test "x$BOOT_JDK_FOUND" = xno; then
29401     # Now execute the test
29402 
29403   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29404   BOOT_JDK_SUFFIX="/Contents/Home"
29405   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29406   if test "x$ALL_JDKS_FOUND" != x; then
29407     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29408 
29409   if test "x$BOOT_JDK_FOUND" = xno; then
29410     # Now execute the test
29411 
29412         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29413         if test -d "$BOOT_JDK"; then
29414           BOOT_JDK_FOUND=maybe
29415           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29416 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29417         fi
29418 
29419 
29420     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29421     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29422       # Do we have a bin/java?
29423       if test ! -x "$BOOT_JDK/bin/java"; then
29424         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29425 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29426         BOOT_JDK_FOUND=no
29427       else
29428         # Do we have a bin/javac?
29429         if test ! -x "$BOOT_JDK/bin/javac"; then
29430           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29432           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29433 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29434           BOOT_JDK_FOUND=no
29435         else
29436           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29437           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29438 
29439           # Extra M4 quote needed to protect [] in grep expression.
29440           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29441           if test "x$FOUND_CORRECT_VERSION" = x; then
29442             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29443 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29444             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29445 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29446             BOOT_JDK_FOUND=no
29447           else
29448             # We're done! :-)
29449             BOOT_JDK_FOUND=yes
29450 
29451   # Only process if variable expands to non-empty
29452 
29453   if test "x$BOOT_JDK" != x; then
29454     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29455 
29456   # Input might be given as Windows format, start by converting to
29457   # unix format.
29458   path="$BOOT_JDK"
29459   new_path=`$CYGPATH -u "$path"`
29460 
29461   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29462   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29463   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29464   # "foo.exe" is OK but "foo" is an error.
29465   #
29466   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29467   # It is also a way to make sure we got the proper file name for the real test later on.
29468   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29469   if test "x$test_shortpath" = x; then
29470     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29471 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29472     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29473   fi
29474 
29475   # Call helper function which possibly converts this using DOS-style short mode.
29476   # If so, the updated path is stored in $new_path.
29477 
29478   input_path="$new_path"
29479   # Check if we need to convert this using DOS-style short mode. If the path
29480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29481   # take no chances and rewrite it.
29482   # Note: m4 eats our [], so we need to use [ and ] instead.
29483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29484   if test "x$has_forbidden_chars" != x; then
29485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29486     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29487     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29488     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29489       # Going to short mode and back again did indeed matter. Since short mode is
29490       # case insensitive, let's make it lowercase to improve readability.
29491       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29492       # Now convert it back to Unix-style (cygpath)
29493       input_path=`$CYGPATH -u "$shortmode_path"`
29494       new_path="$input_path"
29495     fi
29496   fi
29497 
29498   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29499   if test "x$test_cygdrive_prefix" = x; then
29500     # As a simple fix, exclude /usr/bin since it's not a real path.
29501     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29502       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29503       # a path prefixed by /cygdrive for fixpath to work.
29504       new_path="$CYGWIN_ROOT_PATH$input_path"
29505     fi
29506   fi
29507 
29508 
29509   if test "x$path" != "x$new_path"; then
29510     BOOT_JDK="$new_path"
29511     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29512 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29513   fi
29514 
29515     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29516 
29517   path="$BOOT_JDK"
29518   has_colon=`$ECHO $path | $GREP ^.:`
29519   new_path="$path"
29520   if test "x$has_colon" = x; then
29521     # Not in mixed or Windows style, start by that.
29522     new_path=`cmd //c echo $path`
29523   fi
29524 
29525 
29526   input_path="$new_path"
29527   # Check if we need to convert this using DOS-style short mode. If the path
29528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29529   # take no chances and rewrite it.
29530   # Note: m4 eats our [], so we need to use [ and ] instead.
29531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29532   if test "x$has_forbidden_chars" != x; then
29533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29534     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29535   fi
29536 
29537 
29538   windows_path="$new_path"
29539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29540     unix_path=`$CYGPATH -u "$windows_path"`
29541     new_path="$unix_path"
29542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29544     new_path="$unix_path"
29545   fi
29546 
29547   if test "x$path" != "x$new_path"; then
29548     BOOT_JDK="$new_path"
29549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29550 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29551   fi
29552 
29553   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29554   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29555 
29556     else
29557       # We're on a unix platform. Hooray! :)
29558       path="$BOOT_JDK"
29559       has_space=`$ECHO "$path" | $GREP " "`
29560       if test "x$has_space" != x; then
29561         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29562 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29563         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29564       fi
29565 
29566       # Use eval to expand a potential ~
29567       eval path="$path"
29568       if test ! -f "$path" && test ! -d "$path"; then
29569         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29570       fi
29571 
29572       if test -d "$path"; then
29573         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29574       else
29575         dir="`$DIRNAME "$path"`"
29576         base="`$BASENAME "$path"`"
29577         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29578       fi
29579     fi
29580   fi
29581 
29582             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29583 $as_echo_n "checking for Boot JDK... " >&6; }
29584             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29585 $as_echo "$BOOT_JDK" >&6; }
29586             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29587 $as_echo_n "checking Boot JDK version... " >&6; }
29588             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29589             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29590 $as_echo "$BOOT_JDK_VERSION" >&6; }
29591           fi # end check jdk version
29592         fi # end check javac
29593       fi # end check java
29594     fi # end check boot jdk found
29595   fi
29596 
29597     done
29598   fi
29599 
29600 
29601     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29602     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29603       # Do we have a bin/java?
29604       if test ! -x "$BOOT_JDK/bin/java"; then
29605         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29606 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29607         BOOT_JDK_FOUND=no
29608       else
29609         # Do we have a bin/javac?
29610         if test ! -x "$BOOT_JDK/bin/javac"; then
29611           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29613           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29614 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29615           BOOT_JDK_FOUND=no
29616         else
29617           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29618           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29619 
29620           # Extra M4 quote needed to protect [] in grep expression.
29621           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29622           if test "x$FOUND_CORRECT_VERSION" = x; then
29623             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29625             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29626 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29627             BOOT_JDK_FOUND=no
29628           else
29629             # We're done! :-)
29630             BOOT_JDK_FOUND=yes
29631 
29632   # Only process if variable expands to non-empty
29633 
29634   if test "x$BOOT_JDK" != x; then
29635     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29636 
29637   # Input might be given as Windows format, start by converting to
29638   # unix format.
29639   path="$BOOT_JDK"
29640   new_path=`$CYGPATH -u "$path"`
29641 
29642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29645   # "foo.exe" is OK but "foo" is an error.
29646   #
29647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29648   # It is also a way to make sure we got the proper file name for the real test later on.
29649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29650   if test "x$test_shortpath" = x; then
29651     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29652 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29653     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29654   fi
29655 
29656   # Call helper function which possibly converts this using DOS-style short mode.
29657   # If so, the updated path is stored in $new_path.
29658 
29659   input_path="$new_path"
29660   # Check if we need to convert this using DOS-style short mode. If the path
29661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29662   # take no chances and rewrite it.
29663   # Note: m4 eats our [], so we need to use [ and ] instead.
29664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29665   if test "x$has_forbidden_chars" != x; then
29666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29667     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29668     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29669     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29670       # Going to short mode and back again did indeed matter. Since short mode is
29671       # case insensitive, let's make it lowercase to improve readability.
29672       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29673       # Now convert it back to Unix-style (cygpath)
29674       input_path=`$CYGPATH -u "$shortmode_path"`
29675       new_path="$input_path"
29676     fi
29677   fi
29678 
29679   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29680   if test "x$test_cygdrive_prefix" = x; then
29681     # As a simple fix, exclude /usr/bin since it's not a real path.
29682     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29683       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29684       # a path prefixed by /cygdrive for fixpath to work.
29685       new_path="$CYGWIN_ROOT_PATH$input_path"
29686     fi
29687   fi
29688 
29689 
29690   if test "x$path" != "x$new_path"; then
29691     BOOT_JDK="$new_path"
29692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29694   fi
29695 
29696     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29697 
29698   path="$BOOT_JDK"
29699   has_colon=`$ECHO $path | $GREP ^.:`
29700   new_path="$path"
29701   if test "x$has_colon" = x; then
29702     # Not in mixed or Windows style, start by that.
29703     new_path=`cmd //c echo $path`
29704   fi
29705 
29706 
29707   input_path="$new_path"
29708   # Check if we need to convert this using DOS-style short mode. If the path
29709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29710   # take no chances and rewrite it.
29711   # Note: m4 eats our [], so we need to use [ and ] instead.
29712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29713   if test "x$has_forbidden_chars" != x; then
29714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29716   fi
29717 
29718 
29719   windows_path="$new_path"
29720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29721     unix_path=`$CYGPATH -u "$windows_path"`
29722     new_path="$unix_path"
29723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29725     new_path="$unix_path"
29726   fi
29727 
29728   if test "x$path" != "x$new_path"; then
29729     BOOT_JDK="$new_path"
29730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29731 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29732   fi
29733 
29734   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29735   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29736 
29737     else
29738       # We're on a unix platform. Hooray! :)
29739       path="$BOOT_JDK"
29740       has_space=`$ECHO "$path" | $GREP " "`
29741       if test "x$has_space" != x; then
29742         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29743 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29744         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29745       fi
29746 
29747       # Use eval to expand a potential ~
29748       eval path="$path"
29749       if test ! -f "$path" && test ! -d "$path"; then
29750         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29751       fi
29752 
29753       if test -d "$path"; then
29754         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29755       else
29756         dir="`$DIRNAME "$path"`"
29757         base="`$BASENAME "$path"`"
29758         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29759       fi
29760     fi
29761   fi
29762 
29763             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29764 $as_echo_n "checking for Boot JDK... " >&6; }
29765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29766 $as_echo "$BOOT_JDK" >&6; }
29767             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29768 $as_echo_n "checking Boot JDK version... " >&6; }
29769             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29771 $as_echo "$BOOT_JDK_VERSION" >&6; }
29772           fi # end check jdk version
29773         fi # end check javac
29774       fi # end check java
29775     fi # end check boot jdk found
29776   fi
29777 
29778 
29779   if test "x$BOOT_JDK_FOUND" = xno; then
29780     # Now execute the test
29781 
29782   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29783   BOOT_JDK_SUFFIX="/Contents/Home"
29784   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29785   if test "x$ALL_JDKS_FOUND" != x; then
29786     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29787 
29788   if test "x$BOOT_JDK_FOUND" = xno; then
29789     # Now execute the test
29790 
29791         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29792         if test -d "$BOOT_JDK"; then
29793           BOOT_JDK_FOUND=maybe
29794           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29795 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29796         fi
29797 
29798 
29799     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29800     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29801       # Do we have a bin/java?
29802       if test ! -x "$BOOT_JDK/bin/java"; then
29803         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29804 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29805         BOOT_JDK_FOUND=no
29806       else
29807         # Do we have a bin/javac?
29808         if test ! -x "$BOOT_JDK/bin/javac"; then
29809           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29811           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29812 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29813           BOOT_JDK_FOUND=no
29814         else
29815           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29816           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29817 
29818           # Extra M4 quote needed to protect [] in grep expression.
29819           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29820           if test "x$FOUND_CORRECT_VERSION" = x; then
29821             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29823             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29824 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29825             BOOT_JDK_FOUND=no
29826           else
29827             # We're done! :-)
29828             BOOT_JDK_FOUND=yes
29829 
29830   # Only process if variable expands to non-empty
29831 
29832   if test "x$BOOT_JDK" != x; then
29833     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29834 
29835   # Input might be given as Windows format, start by converting to
29836   # unix format.
29837   path="$BOOT_JDK"
29838   new_path=`$CYGPATH -u "$path"`
29839 
29840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29843   # "foo.exe" is OK but "foo" is an error.
29844   #
29845   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29846   # It is also a way to make sure we got the proper file name for the real test later on.
29847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29848   if test "x$test_shortpath" = x; then
29849     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29850 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29851     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29852   fi
29853 
29854   # Call helper function which possibly converts this using DOS-style short mode.
29855   # If so, the updated path is stored in $new_path.
29856 
29857   input_path="$new_path"
29858   # Check if we need to convert this using DOS-style short mode. If the path
29859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29860   # take no chances and rewrite it.
29861   # Note: m4 eats our [], so we need to use [ and ] instead.
29862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29863   if test "x$has_forbidden_chars" != x; then
29864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29868       # Going to short mode and back again did indeed matter. Since short mode is
29869       # case insensitive, let's make it lowercase to improve readability.
29870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29871       # Now convert it back to Unix-style (cygpath)
29872       input_path=`$CYGPATH -u "$shortmode_path"`
29873       new_path="$input_path"
29874     fi
29875   fi
29876 
29877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29878   if test "x$test_cygdrive_prefix" = x; then
29879     # As a simple fix, exclude /usr/bin since it's not a real path.
29880     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29882       # a path prefixed by /cygdrive for fixpath to work.
29883       new_path="$CYGWIN_ROOT_PATH$input_path"
29884     fi
29885   fi
29886 
29887 
29888   if test "x$path" != "x$new_path"; then
29889     BOOT_JDK="$new_path"
29890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29891 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29892   fi
29893 
29894     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29895 
29896   path="$BOOT_JDK"
29897   has_colon=`$ECHO $path | $GREP ^.:`
29898   new_path="$path"
29899   if test "x$has_colon" = x; then
29900     # Not in mixed or Windows style, start by that.
29901     new_path=`cmd //c echo $path`
29902   fi
29903 
29904 
29905   input_path="$new_path"
29906   # Check if we need to convert this using DOS-style short mode. If the path
29907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29908   # take no chances and rewrite it.
29909   # Note: m4 eats our [], so we need to use [ and ] instead.
29910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29911   if test "x$has_forbidden_chars" != x; then
29912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29913     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29914   fi
29915 
29916 
29917   windows_path="$new_path"
29918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29919     unix_path=`$CYGPATH -u "$windows_path"`
29920     new_path="$unix_path"
29921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29923     new_path="$unix_path"
29924   fi
29925 
29926   if test "x$path" != "x$new_path"; then
29927     BOOT_JDK="$new_path"
29928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29929 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29930   fi
29931 
29932   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29933   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29934 
29935     else
29936       # We're on a unix platform. Hooray! :)
29937       path="$BOOT_JDK"
29938       has_space=`$ECHO "$path" | $GREP " "`
29939       if test "x$has_space" != x; then
29940         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29941 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29942         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29943       fi
29944 
29945       # Use eval to expand a potential ~
29946       eval path="$path"
29947       if test ! -f "$path" && test ! -d "$path"; then
29948         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29949       fi
29950 
29951       if test -d "$path"; then
29952         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29953       else
29954         dir="`$DIRNAME "$path"`"
29955         base="`$BASENAME "$path"`"
29956         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29957       fi
29958     fi
29959   fi
29960 
29961             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29962 $as_echo_n "checking for Boot JDK... " >&6; }
29963             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29964 $as_echo "$BOOT_JDK" >&6; }
29965             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29966 $as_echo_n "checking Boot JDK version... " >&6; }
29967             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29968             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29969 $as_echo "$BOOT_JDK_VERSION" >&6; }
29970           fi # end check jdk version
29971         fi # end check javac
29972       fi # end check java
29973     fi # end check boot jdk found
29974   fi
29975 
29976     done
29977   fi
29978 
29979 
29980     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29981     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29982       # Do we have a bin/java?
29983       if test ! -x "$BOOT_JDK/bin/java"; then
29984         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29985 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29986         BOOT_JDK_FOUND=no
29987       else
29988         # Do we have a bin/javac?
29989         if test ! -x "$BOOT_JDK/bin/javac"; then
29990           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29991 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29992           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29993 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29994           BOOT_JDK_FOUND=no
29995         else
29996           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29997           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29998 
29999           # Extra M4 quote needed to protect [] in grep expression.
30000           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30001           if test "x$FOUND_CORRECT_VERSION" = x; then
30002             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30004             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30005 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30006             BOOT_JDK_FOUND=no
30007           else
30008             # We're done! :-)
30009             BOOT_JDK_FOUND=yes
30010 
30011   # Only process if variable expands to non-empty
30012 
30013   if test "x$BOOT_JDK" != x; then
30014     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30015 
30016   # Input might be given as Windows format, start by converting to
30017   # unix format.
30018   path="$BOOT_JDK"
30019   new_path=`$CYGPATH -u "$path"`
30020 
30021   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30022   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30023   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30024   # "foo.exe" is OK but "foo" is an error.
30025   #
30026   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30027   # It is also a way to make sure we got the proper file name for the real test later on.
30028   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30029   if test "x$test_shortpath" = x; then
30030     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30031 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30032     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30033   fi
30034 
30035   # Call helper function which possibly converts this using DOS-style short mode.
30036   # If so, the updated path is stored in $new_path.
30037 
30038   input_path="$new_path"
30039   # Check if we need to convert this using DOS-style short mode. If the path
30040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30041   # take no chances and rewrite it.
30042   # Note: m4 eats our [], so we need to use [ and ] instead.
30043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30044   if test "x$has_forbidden_chars" != x; then
30045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30049       # Going to short mode and back again did indeed matter. Since short mode is
30050       # case insensitive, let's make it lowercase to improve readability.
30051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30052       # Now convert it back to Unix-style (cygpath)
30053       input_path=`$CYGPATH -u "$shortmode_path"`
30054       new_path="$input_path"
30055     fi
30056   fi
30057 
30058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30059   if test "x$test_cygdrive_prefix" = x; then
30060     # As a simple fix, exclude /usr/bin since it's not a real path.
30061     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30063       # a path prefixed by /cygdrive for fixpath to work.
30064       new_path="$CYGWIN_ROOT_PATH$input_path"
30065     fi
30066   fi
30067 
30068 
30069   if test "x$path" != "x$new_path"; then
30070     BOOT_JDK="$new_path"
30071     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30072 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30073   fi
30074 
30075     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30076 
30077   path="$BOOT_JDK"
30078   has_colon=`$ECHO $path | $GREP ^.:`
30079   new_path="$path"
30080   if test "x$has_colon" = x; then
30081     # Not in mixed or Windows style, start by that.
30082     new_path=`cmd //c echo $path`
30083   fi
30084 
30085 
30086   input_path="$new_path"
30087   # Check if we need to convert this using DOS-style short mode. If the path
30088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30089   # take no chances and rewrite it.
30090   # Note: m4 eats our [], so we need to use [ and ] instead.
30091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30092   if test "x$has_forbidden_chars" != x; then
30093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30094     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30095   fi
30096 
30097 
30098   windows_path="$new_path"
30099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30100     unix_path=`$CYGPATH -u "$windows_path"`
30101     new_path="$unix_path"
30102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30104     new_path="$unix_path"
30105   fi
30106 
30107   if test "x$path" != "x$new_path"; then
30108     BOOT_JDK="$new_path"
30109     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30110 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30111   fi
30112 
30113   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30114   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30115 
30116     else
30117       # We're on a unix platform. Hooray! :)
30118       path="$BOOT_JDK"
30119       has_space=`$ECHO "$path" | $GREP " "`
30120       if test "x$has_space" != x; then
30121         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30122 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30123         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30124       fi
30125 
30126       # Use eval to expand a potential ~
30127       eval path="$path"
30128       if test ! -f "$path" && test ! -d "$path"; then
30129         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30130       fi
30131 
30132       if test -d "$path"; then
30133         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30134       else
30135         dir="`$DIRNAME "$path"`"
30136         base="`$BASENAME "$path"`"
30137         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30138       fi
30139     fi
30140   fi
30141 
30142             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30143 $as_echo_n "checking for Boot JDK... " >&6; }
30144             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30145 $as_echo "$BOOT_JDK" >&6; }
30146             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30147 $as_echo_n "checking Boot JDK version... " >&6; }
30148             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30149             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30150 $as_echo "$BOOT_JDK_VERSION" >&6; }
30151           fi # end check jdk version
30152         fi # end check javac
30153       fi # end check java
30154     fi # end check boot jdk found
30155   fi
30156 
30157   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30158 
30159   if test "x$BOOT_JDK_FOUND" = xno; then
30160     # Now execute the test
30161 
30162   BOOT_JDK_PREFIX="/usr/lib/jvm"
30163   BOOT_JDK_SUFFIX=""
30164   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30165   if test "x$ALL_JDKS_FOUND" != x; then
30166     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30167 
30168   if test "x$BOOT_JDK_FOUND" = xno; then
30169     # Now execute the test
30170 
30171         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30172         if test -d "$BOOT_JDK"; then
30173           BOOT_JDK_FOUND=maybe
30174           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30175 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30176         fi
30177 
30178 
30179     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30180     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30181       # Do we have a bin/java?
30182       if test ! -x "$BOOT_JDK/bin/java"; then
30183         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30185         BOOT_JDK_FOUND=no
30186       else
30187         # Do we have a bin/javac?
30188         if test ! -x "$BOOT_JDK/bin/javac"; then
30189           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30191           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30192 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30193           BOOT_JDK_FOUND=no
30194         else
30195           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30196           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30197 
30198           # Extra M4 quote needed to protect [] in grep expression.
30199           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30200           if test "x$FOUND_CORRECT_VERSION" = x; then
30201             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30203             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30204 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30205             BOOT_JDK_FOUND=no
30206           else
30207             # We're done! :-)
30208             BOOT_JDK_FOUND=yes
30209 
30210   # Only process if variable expands to non-empty
30211 
30212   if test "x$BOOT_JDK" != x; then
30213     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30214 
30215   # Input might be given as Windows format, start by converting to
30216   # unix format.
30217   path="$BOOT_JDK"
30218   new_path=`$CYGPATH -u "$path"`
30219 
30220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30223   # "foo.exe" is OK but "foo" is an error.
30224   #
30225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30226   # It is also a way to make sure we got the proper file name for the real test later on.
30227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30228   if test "x$test_shortpath" = x; then
30229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30231     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30232   fi
30233 
30234   # Call helper function which possibly converts this using DOS-style short mode.
30235   # If so, the updated path is stored in $new_path.
30236 
30237   input_path="$new_path"
30238   # Check if we need to convert this using DOS-style short mode. If the path
30239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30240   # take no chances and rewrite it.
30241   # Note: m4 eats our [], so we need to use [ and ] instead.
30242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30243   if test "x$has_forbidden_chars" != x; then
30244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30248       # Going to short mode and back again did indeed matter. Since short mode is
30249       # case insensitive, let's make it lowercase to improve readability.
30250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30251       # Now convert it back to Unix-style (cygpath)
30252       input_path=`$CYGPATH -u "$shortmode_path"`
30253       new_path="$input_path"
30254     fi
30255   fi
30256 
30257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30258   if test "x$test_cygdrive_prefix" = x; then
30259     # As a simple fix, exclude /usr/bin since it's not a real path.
30260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30262       # a path prefixed by /cygdrive for fixpath to work.
30263       new_path="$CYGWIN_ROOT_PATH$input_path"
30264     fi
30265   fi
30266 
30267 
30268   if test "x$path" != "x$new_path"; then
30269     BOOT_JDK="$new_path"
30270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30272   fi
30273 
30274     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30275 
30276   path="$BOOT_JDK"
30277   has_colon=`$ECHO $path | $GREP ^.:`
30278   new_path="$path"
30279   if test "x$has_colon" = x; then
30280     # Not in mixed or Windows style, start by that.
30281     new_path=`cmd //c echo $path`
30282   fi
30283 
30284 
30285   input_path="$new_path"
30286   # Check if we need to convert this using DOS-style short mode. If the path
30287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30288   # take no chances and rewrite it.
30289   # Note: m4 eats our [], so we need to use [ and ] instead.
30290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30291   if test "x$has_forbidden_chars" != x; then
30292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30294   fi
30295 
30296 
30297   windows_path="$new_path"
30298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30299     unix_path=`$CYGPATH -u "$windows_path"`
30300     new_path="$unix_path"
30301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30303     new_path="$unix_path"
30304   fi
30305 
30306   if test "x$path" != "x$new_path"; then
30307     BOOT_JDK="$new_path"
30308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30310   fi
30311 
30312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30314 
30315     else
30316       # We're on a unix platform. Hooray! :)
30317       path="$BOOT_JDK"
30318       has_space=`$ECHO "$path" | $GREP " "`
30319       if test "x$has_space" != x; then
30320         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30322         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30323       fi
30324 
30325       # Use eval to expand a potential ~
30326       eval path="$path"
30327       if test ! -f "$path" && test ! -d "$path"; then
30328         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30329       fi
30330 
30331       if test -d "$path"; then
30332         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30333       else
30334         dir="`$DIRNAME "$path"`"
30335         base="`$BASENAME "$path"`"
30336         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30337       fi
30338     fi
30339   fi
30340 
30341             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30342 $as_echo_n "checking for Boot JDK... " >&6; }
30343             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30344 $as_echo "$BOOT_JDK" >&6; }
30345             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30346 $as_echo_n "checking Boot JDK version... " >&6; }
30347             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30348             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30349 $as_echo "$BOOT_JDK_VERSION" >&6; }
30350           fi # end check jdk version
30351         fi # end check javac
30352       fi # end check java
30353     fi # end check boot jdk found
30354   fi
30355 
30356     done
30357   fi
30358 
30359 
30360     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30361     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30362       # Do we have a bin/java?
30363       if test ! -x "$BOOT_JDK/bin/java"; then
30364         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30366         BOOT_JDK_FOUND=no
30367       else
30368         # Do we have a bin/javac?
30369         if test ! -x "$BOOT_JDK/bin/javac"; then
30370           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30372           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30373 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30374           BOOT_JDK_FOUND=no
30375         else
30376           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30377           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30378 
30379           # Extra M4 quote needed to protect [] in grep expression.
30380           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30381           if test "x$FOUND_CORRECT_VERSION" = x; then
30382             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30383 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30384             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30385 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30386             BOOT_JDK_FOUND=no
30387           else
30388             # We're done! :-)
30389             BOOT_JDK_FOUND=yes
30390 
30391   # Only process if variable expands to non-empty
30392 
30393   if test "x$BOOT_JDK" != x; then
30394     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30395 
30396   # Input might be given as Windows format, start by converting to
30397   # unix format.
30398   path="$BOOT_JDK"
30399   new_path=`$CYGPATH -u "$path"`
30400 
30401   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30402   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30403   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30404   # "foo.exe" is OK but "foo" is an error.
30405   #
30406   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30407   # It is also a way to make sure we got the proper file name for the real test later on.
30408   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30409   if test "x$test_shortpath" = x; then
30410     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30412     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30413   fi
30414 
30415   # Call helper function which possibly converts this using DOS-style short mode.
30416   # If so, the updated path is stored in $new_path.
30417 
30418   input_path="$new_path"
30419   # Check if we need to convert this using DOS-style short mode. If the path
30420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30421   # take no chances and rewrite it.
30422   # Note: m4 eats our [], so we need to use [ and ] instead.
30423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30424   if test "x$has_forbidden_chars" != x; then
30425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30429       # Going to short mode and back again did indeed matter. Since short mode is
30430       # case insensitive, let's make it lowercase to improve readability.
30431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30432       # Now convert it back to Unix-style (cygpath)
30433       input_path=`$CYGPATH -u "$shortmode_path"`
30434       new_path="$input_path"
30435     fi
30436   fi
30437 
30438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30439   if test "x$test_cygdrive_prefix" = x; then
30440     # As a simple fix, exclude /usr/bin since it's not a real path.
30441     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30443       # a path prefixed by /cygdrive for fixpath to work.
30444       new_path="$CYGWIN_ROOT_PATH$input_path"
30445     fi
30446   fi
30447 
30448 
30449   if test "x$path" != "x$new_path"; then
30450     BOOT_JDK="$new_path"
30451     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30452 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30453   fi
30454 
30455     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30456 
30457   path="$BOOT_JDK"
30458   has_colon=`$ECHO $path | $GREP ^.:`
30459   new_path="$path"
30460   if test "x$has_colon" = x; then
30461     # Not in mixed or Windows style, start by that.
30462     new_path=`cmd //c echo $path`
30463   fi
30464 
30465 
30466   input_path="$new_path"
30467   # Check if we need to convert this using DOS-style short mode. If the path
30468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30469   # take no chances and rewrite it.
30470   # Note: m4 eats our [], so we need to use [ and ] instead.
30471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30472   if test "x$has_forbidden_chars" != x; then
30473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30474     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30475   fi
30476 
30477 
30478   windows_path="$new_path"
30479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30480     unix_path=`$CYGPATH -u "$windows_path"`
30481     new_path="$unix_path"
30482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30484     new_path="$unix_path"
30485   fi
30486 
30487   if test "x$path" != "x$new_path"; then
30488     BOOT_JDK="$new_path"
30489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30490 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30491   fi
30492 
30493   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30494   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30495 
30496     else
30497       # We're on a unix platform. Hooray! :)
30498       path="$BOOT_JDK"
30499       has_space=`$ECHO "$path" | $GREP " "`
30500       if test "x$has_space" != x; then
30501         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30503         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30504       fi
30505 
30506       # Use eval to expand a potential ~
30507       eval path="$path"
30508       if test ! -f "$path" && test ! -d "$path"; then
30509         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30510       fi
30511 
30512       if test -d "$path"; then
30513         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30514       else
30515         dir="`$DIRNAME "$path"`"
30516         base="`$BASENAME "$path"`"
30517         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30518       fi
30519     fi
30520   fi
30521 
30522             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30523 $as_echo_n "checking for Boot JDK... " >&6; }
30524             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30525 $as_echo "$BOOT_JDK" >&6; }
30526             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30527 $as_echo_n "checking Boot JDK version... " >&6; }
30528             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30529             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30530 $as_echo "$BOOT_JDK_VERSION" >&6; }
30531           fi # end check jdk version
30532         fi # end check javac
30533       fi # end check java
30534     fi # end check boot jdk found
30535   fi
30536 
30537   fi
30538 
30539 
30540     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30541     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30542       # Do we have a bin/java?
30543       if test ! -x "$BOOT_JDK/bin/java"; then
30544         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30546         BOOT_JDK_FOUND=no
30547       else
30548         # Do we have a bin/javac?
30549         if test ! -x "$BOOT_JDK/bin/javac"; then
30550           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30551 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30552           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30553 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30554           BOOT_JDK_FOUND=no
30555         else
30556           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30557           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30558 
30559           # Extra M4 quote needed to protect [] in grep expression.
30560           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30561           if test "x$FOUND_CORRECT_VERSION" = x; then
30562             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30564             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30565 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30566             BOOT_JDK_FOUND=no
30567           else
30568             # We're done! :-)
30569             BOOT_JDK_FOUND=yes
30570 
30571   # Only process if variable expands to non-empty
30572 
30573   if test "x$BOOT_JDK" != x; then
30574     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30575 
30576   # Input might be given as Windows format, start by converting to
30577   # unix format.
30578   path="$BOOT_JDK"
30579   new_path=`$CYGPATH -u "$path"`
30580 
30581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30584   # "foo.exe" is OK but "foo" is an error.
30585   #
30586   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30587   # It is also a way to make sure we got the proper file name for the real test later on.
30588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30589   if test "x$test_shortpath" = x; then
30590     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30592     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30593   fi
30594 
30595   # Call helper function which possibly converts this using DOS-style short mode.
30596   # If so, the updated path is stored in $new_path.
30597 
30598   input_path="$new_path"
30599   # Check if we need to convert this using DOS-style short mode. If the path
30600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30601   # take no chances and rewrite it.
30602   # Note: m4 eats our [], so we need to use [ and ] instead.
30603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30604   if test "x$has_forbidden_chars" != x; then
30605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30609       # Going to short mode and back again did indeed matter. Since short mode is
30610       # case insensitive, let's make it lowercase to improve readability.
30611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30612       # Now convert it back to Unix-style (cygpath)
30613       input_path=`$CYGPATH -u "$shortmode_path"`
30614       new_path="$input_path"
30615     fi
30616   fi
30617 
30618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30619   if test "x$test_cygdrive_prefix" = x; then
30620     # As a simple fix, exclude /usr/bin since it's not a real path.
30621     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30623       # a path prefixed by /cygdrive for fixpath to work.
30624       new_path="$CYGWIN_ROOT_PATH$input_path"
30625     fi
30626   fi
30627 
30628 
30629   if test "x$path" != "x$new_path"; then
30630     BOOT_JDK="$new_path"
30631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30632 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30633   fi
30634 
30635     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30636 
30637   path="$BOOT_JDK"
30638   has_colon=`$ECHO $path | $GREP ^.:`
30639   new_path="$path"
30640   if test "x$has_colon" = x; then
30641     # Not in mixed or Windows style, start by that.
30642     new_path=`cmd //c echo $path`
30643   fi
30644 
30645 
30646   input_path="$new_path"
30647   # Check if we need to convert this using DOS-style short mode. If the path
30648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30649   # take no chances and rewrite it.
30650   # Note: m4 eats our [], so we need to use [ and ] instead.
30651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30652   if test "x$has_forbidden_chars" != x; then
30653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30655   fi
30656 
30657 
30658   windows_path="$new_path"
30659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30660     unix_path=`$CYGPATH -u "$windows_path"`
30661     new_path="$unix_path"
30662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30664     new_path="$unix_path"
30665   fi
30666 
30667   if test "x$path" != "x$new_path"; then
30668     BOOT_JDK="$new_path"
30669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30670 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30671   fi
30672 
30673   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30674   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30675 
30676     else
30677       # We're on a unix platform. Hooray! :)
30678       path="$BOOT_JDK"
30679       has_space=`$ECHO "$path" | $GREP " "`
30680       if test "x$has_space" != x; then
30681         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30682 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30683         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30684       fi
30685 
30686       # Use eval to expand a potential ~
30687       eval path="$path"
30688       if test ! -f "$path" && test ! -d "$path"; then
30689         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30690       fi
30691 
30692       if test -d "$path"; then
30693         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30694       else
30695         dir="`$DIRNAME "$path"`"
30696         base="`$BASENAME "$path"`"
30697         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30698       fi
30699     fi
30700   fi
30701 
30702             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30703 $as_echo_n "checking for Boot JDK... " >&6; }
30704             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30705 $as_echo "$BOOT_JDK" >&6; }
30706             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30707 $as_echo_n "checking Boot JDK version... " >&6; }
30708             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30709             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30710 $as_echo "$BOOT_JDK_VERSION" >&6; }
30711           fi # end check jdk version
30712         fi # end check javac
30713       fi # end check java
30714     fi # end check boot jdk found
30715   fi
30716 
30717 
30718   # If we haven't found anything yet, we've truly lost. Give up.
30719   if test "x$BOOT_JDK_FOUND" = xno; then
30720 
30721   # Print a helpful message on how to acquire the necessary build dependency.
30722   # openjdk is the help tag: freetype, cups, alsa etc
30723   MISSING_DEPENDENCY=openjdk
30724 
30725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30726     cygwin_help $MISSING_DEPENDENCY
30727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30728     msys_help $MISSING_DEPENDENCY
30729   else
30730     PKGHANDLER_COMMAND=
30731 
30732     case $PKGHANDLER in
30733       apt-get)
30734         apt_help     $MISSING_DEPENDENCY ;;
30735       yum)
30736         yum_help     $MISSING_DEPENDENCY ;;
30737       brew)
30738         brew_help    $MISSING_DEPENDENCY ;;
30739       port)
30740         port_help    $MISSING_DEPENDENCY ;;
30741       pkgutil)
30742         pkgutil_help $MISSING_DEPENDENCY ;;
30743       pkgadd)
30744         pkgadd_help  $MISSING_DEPENDENCY ;;
30745     esac
30746 
30747     if test "x$PKGHANDLER_COMMAND" != x; then
30748       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30749     fi
30750   fi
30751 
30752     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30753 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30754     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30755 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30756     as_fn_error $? "Cannot continue" "$LINENO" 5
30757   fi
30758 
30759 
30760 
30761   # Setup tools from the Boot JDK.
30762 
30763   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30764 
30765   # Publish this variable in the help.
30766 
30767 
30768   if [ -z "${JAVA+x}" ]; then
30769     # The variable is not set by user, try to locate tool using the code snippet
30770 
30771       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30772 $as_echo_n "checking for java in Boot JDK... " >&6; }
30773       JAVA=$BOOT_JDK/bin/java
30774       if test ! -x $JAVA; then
30775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30776 $as_echo "not found" >&6; }
30777         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30778 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30779         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30780       fi
30781       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30782 $as_echo "ok" >&6; }
30783 
30784 
30785   else
30786     # The variable is set, but is it from the command line or the environment?
30787 
30788     # Try to remove the string !JAVA! from our list.
30789     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30790     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30791       # If it failed, the variable was not from the command line. Ignore it,
30792       # but warn the user (except for BASH, which is always set by the calling BASH).
30793       if test "xJAVA" != xBASH; then
30794         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30795 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30796       fi
30797       # Try to locate tool using the code snippet
30798 
30799       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30800 $as_echo_n "checking for java in Boot JDK... " >&6; }
30801       JAVA=$BOOT_JDK/bin/java
30802       if test ! -x $JAVA; then
30803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30804 $as_echo "not found" >&6; }
30805         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30806 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30807         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30808       fi
30809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30810 $as_echo "ok" >&6; }
30811 
30812 
30813     else
30814       # If it succeeded, then it was overridden by the user. We will use it
30815       # for the tool.
30816 
30817       # First remove it from the list of overridden variables, so we can test
30818       # for unknown variables in the end.
30819       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30820 
30821       # Check if we try to supply an empty value
30822       if test "x$JAVA" = x; then
30823         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30824 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30825         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30826 $as_echo_n "checking for JAVA... " >&6; }
30827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30828 $as_echo "disabled" >&6; }
30829       else
30830         # Check if the provided tool contains a complete path.
30831         tool_specified="$JAVA"
30832         tool_basename="${tool_specified##*/}"
30833         if test "x$tool_basename" = "x$tool_specified"; then
30834           # A command without a complete path is provided, search $PATH.
30835           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30836 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30837           # Extract the first word of "$tool_basename", so it can be a program name with args.
30838 set dummy $tool_basename; ac_word=$2
30839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30840 $as_echo_n "checking for $ac_word... " >&6; }
30841 if ${ac_cv_path_JAVA+:} false; then :
30842   $as_echo_n "(cached) " >&6
30843 else
30844   case $JAVA in
30845   [\\/]* | ?:[\\/]*)
30846   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30847   ;;
30848   *)
30849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30850 for as_dir in $PATH
30851 do
30852   IFS=$as_save_IFS
30853   test -z "$as_dir" && as_dir=.
30854     for ac_exec_ext in '' $ac_executable_extensions; do
30855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30856     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30858     break 2
30859   fi
30860 done
30861   done
30862 IFS=$as_save_IFS
30863 
30864   ;;
30865 esac
30866 fi
30867 JAVA=$ac_cv_path_JAVA
30868 if test -n "$JAVA"; then
30869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30870 $as_echo "$JAVA" >&6; }
30871 else
30872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30873 $as_echo "no" >&6; }
30874 fi
30875 
30876 
30877           if test "x$JAVA" = x; then
30878             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30879           fi
30880         else
30881           # Otherwise we believe it is a complete path. Use it as it is.
30882           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30883 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30884           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30885 $as_echo_n "checking for JAVA... " >&6; }
30886           if test ! -x "$tool_specified"; then
30887             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30888 $as_echo "not found" >&6; }
30889             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30890           fi
30891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30892 $as_echo "$tool_specified" >&6; }
30893         fi
30894       fi
30895     fi
30896 
30897   fi
30898 
30899 
30900 
30901   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30902 
30903   # Publish this variable in the help.
30904 
30905 
30906   if [ -z "${JAVAC+x}" ]; then
30907     # The variable is not set by user, try to locate tool using the code snippet
30908 
30909       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30910 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30911       JAVAC=$BOOT_JDK/bin/javac
30912       if test ! -x $JAVAC; then
30913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30914 $as_echo "not found" >&6; }
30915         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30916 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30917         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30918       fi
30919       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30920 $as_echo "ok" >&6; }
30921 
30922 
30923   else
30924     # The variable is set, but is it from the command line or the environment?
30925 
30926     # Try to remove the string !JAVAC! from our list.
30927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30929       # If it failed, the variable was not from the command line. Ignore it,
30930       # but warn the user (except for BASH, which is always set by the calling BASH).
30931       if test "xJAVAC" != xBASH; then
30932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30933 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30934       fi
30935       # Try to locate tool using the code snippet
30936 
30937       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30938 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30939       JAVAC=$BOOT_JDK/bin/javac
30940       if test ! -x $JAVAC; then
30941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30942 $as_echo "not found" >&6; }
30943         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30944 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30945         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30946       fi
30947       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30948 $as_echo "ok" >&6; }
30949 
30950 
30951     else
30952       # If it succeeded, then it was overridden by the user. We will use it
30953       # for the tool.
30954 
30955       # First remove it from the list of overridden variables, so we can test
30956       # for unknown variables in the end.
30957       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30958 
30959       # Check if we try to supply an empty value
30960       if test "x$JAVAC" = x; then
30961         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30962 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30964 $as_echo_n "checking for JAVAC... " >&6; }
30965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30966 $as_echo "disabled" >&6; }
30967       else
30968         # Check if the provided tool contains a complete path.
30969         tool_specified="$JAVAC"
30970         tool_basename="${tool_specified##*/}"
30971         if test "x$tool_basename" = "x$tool_specified"; then
30972           # A command without a complete path is provided, search $PATH.
30973           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30974 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30975           # Extract the first word of "$tool_basename", so it can be a program name with args.
30976 set dummy $tool_basename; ac_word=$2
30977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30978 $as_echo_n "checking for $ac_word... " >&6; }
30979 if ${ac_cv_path_JAVAC+:} false; then :
30980   $as_echo_n "(cached) " >&6
30981 else
30982   case $JAVAC in
30983   [\\/]* | ?:[\\/]*)
30984   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30985   ;;
30986   *)
30987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30988 for as_dir in $PATH
30989 do
30990   IFS=$as_save_IFS
30991   test -z "$as_dir" && as_dir=.
30992     for ac_exec_ext in '' $ac_executable_extensions; do
30993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30994     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30996     break 2
30997   fi
30998 done
30999   done
31000 IFS=$as_save_IFS
31001 
31002   ;;
31003 esac
31004 fi
31005 JAVAC=$ac_cv_path_JAVAC
31006 if test -n "$JAVAC"; then
31007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31008 $as_echo "$JAVAC" >&6; }
31009 else
31010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31011 $as_echo "no" >&6; }
31012 fi
31013 
31014 
31015           if test "x$JAVAC" = x; then
31016             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31017           fi
31018         else
31019           # Otherwise we believe it is a complete path. Use it as it is.
31020           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31021 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31022           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31023 $as_echo_n "checking for JAVAC... " >&6; }
31024           if test ! -x "$tool_specified"; then
31025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31026 $as_echo "not found" >&6; }
31027             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31028           fi
31029           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31030 $as_echo "$tool_specified" >&6; }
31031         fi
31032       fi
31033     fi
31034 
31035   fi
31036 
31037 
31038 
31039   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31040 
31041   # Publish this variable in the help.
31042 
31043 
31044   if [ -z "${JAVAH+x}" ]; then
31045     # The variable is not set by user, try to locate tool using the code snippet
31046 
31047       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31048 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31049       JAVAH=$BOOT_JDK/bin/javah
31050       if test ! -x $JAVAH; then
31051         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31052 $as_echo "not found" >&6; }
31053         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31054 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31055         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31056       fi
31057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31058 $as_echo "ok" >&6; }
31059 
31060 
31061   else
31062     # The variable is set, but is it from the command line or the environment?
31063 
31064     # Try to remove the string !JAVAH! from our list.
31065     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31066     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31067       # If it failed, the variable was not from the command line. Ignore it,
31068       # but warn the user (except for BASH, which is always set by the calling BASH).
31069       if test "xJAVAH" != xBASH; then
31070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31071 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31072       fi
31073       # Try to locate tool using the code snippet
31074 
31075       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31076 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31077       JAVAH=$BOOT_JDK/bin/javah
31078       if test ! -x $JAVAH; then
31079         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31080 $as_echo "not found" >&6; }
31081         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31082 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31083         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31084       fi
31085       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31086 $as_echo "ok" >&6; }
31087 
31088 
31089     else
31090       # If it succeeded, then it was overridden by the user. We will use it
31091       # for the tool.
31092 
31093       # First remove it from the list of overridden variables, so we can test
31094       # for unknown variables in the end.
31095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31096 
31097       # Check if we try to supply an empty value
31098       if test "x$JAVAH" = x; then
31099         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31100 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31102 $as_echo_n "checking for JAVAH... " >&6; }
31103         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31104 $as_echo "disabled" >&6; }
31105       else
31106         # Check if the provided tool contains a complete path.
31107         tool_specified="$JAVAH"
31108         tool_basename="${tool_specified##*/}"
31109         if test "x$tool_basename" = "x$tool_specified"; then
31110           # A command without a complete path is provided, search $PATH.
31111           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31112 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31113           # Extract the first word of "$tool_basename", so it can be a program name with args.
31114 set dummy $tool_basename; ac_word=$2
31115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31116 $as_echo_n "checking for $ac_word... " >&6; }
31117 if ${ac_cv_path_JAVAH+:} false; then :
31118   $as_echo_n "(cached) " >&6
31119 else
31120   case $JAVAH in
31121   [\\/]* | ?:[\\/]*)
31122   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31123   ;;
31124   *)
31125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31126 for as_dir in $PATH
31127 do
31128   IFS=$as_save_IFS
31129   test -z "$as_dir" && as_dir=.
31130     for ac_exec_ext in '' $ac_executable_extensions; do
31131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31132     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31134     break 2
31135   fi
31136 done
31137   done
31138 IFS=$as_save_IFS
31139 
31140   ;;
31141 esac
31142 fi
31143 JAVAH=$ac_cv_path_JAVAH
31144 if test -n "$JAVAH"; then
31145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31146 $as_echo "$JAVAH" >&6; }
31147 else
31148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31149 $as_echo "no" >&6; }
31150 fi
31151 
31152 
31153           if test "x$JAVAH" = x; then
31154             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31155           fi
31156         else
31157           # Otherwise we believe it is a complete path. Use it as it is.
31158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31159 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31160           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31161 $as_echo_n "checking for JAVAH... " >&6; }
31162           if test ! -x "$tool_specified"; then
31163             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31164 $as_echo "not found" >&6; }
31165             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31166           fi
31167           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31168 $as_echo "$tool_specified" >&6; }
31169         fi
31170       fi
31171     fi
31172 
31173   fi
31174 
31175 
31176 
31177   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31178 
31179   # Publish this variable in the help.
31180 
31181 
31182   if [ -z "${JAR+x}" ]; then
31183     # The variable is not set by user, try to locate tool using the code snippet
31184 
31185       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31186 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31187       JAR=$BOOT_JDK/bin/jar
31188       if test ! -x $JAR; then
31189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31190 $as_echo "not found" >&6; }
31191         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31192 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31193         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31194       fi
31195       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31196 $as_echo "ok" >&6; }
31197 
31198 
31199   else
31200     # The variable is set, but is it from the command line or the environment?
31201 
31202     # Try to remove the string !JAR! from our list.
31203     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31204     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31205       # If it failed, the variable was not from the command line. Ignore it,
31206       # but warn the user (except for BASH, which is always set by the calling BASH).
31207       if test "xJAR" != xBASH; then
31208         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31209 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31210       fi
31211       # Try to locate tool using the code snippet
31212 
31213       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31214 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31215       JAR=$BOOT_JDK/bin/jar
31216       if test ! -x $JAR; then
31217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31218 $as_echo "not found" >&6; }
31219         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31220 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31221         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31222       fi
31223       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31224 $as_echo "ok" >&6; }
31225 
31226 
31227     else
31228       # If it succeeded, then it was overridden by the user. We will use it
31229       # for the tool.
31230 
31231       # First remove it from the list of overridden variables, so we can test
31232       # for unknown variables in the end.
31233       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31234 
31235       # Check if we try to supply an empty value
31236       if test "x$JAR" = x; then
31237         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31238 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31239         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31240 $as_echo_n "checking for JAR... " >&6; }
31241         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31242 $as_echo "disabled" >&6; }
31243       else
31244         # Check if the provided tool contains a complete path.
31245         tool_specified="$JAR"
31246         tool_basename="${tool_specified##*/}"
31247         if test "x$tool_basename" = "x$tool_specified"; then
31248           # A command without a complete path is provided, search $PATH.
31249           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31250 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31251           # Extract the first word of "$tool_basename", so it can be a program name with args.
31252 set dummy $tool_basename; ac_word=$2
31253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31254 $as_echo_n "checking for $ac_word... " >&6; }
31255 if ${ac_cv_path_JAR+:} false; then :
31256   $as_echo_n "(cached) " >&6
31257 else
31258   case $JAR in
31259   [\\/]* | ?:[\\/]*)
31260   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31261   ;;
31262   *)
31263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31264 for as_dir in $PATH
31265 do
31266   IFS=$as_save_IFS
31267   test -z "$as_dir" && as_dir=.
31268     for ac_exec_ext in '' $ac_executable_extensions; do
31269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31270     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31272     break 2
31273   fi
31274 done
31275   done
31276 IFS=$as_save_IFS
31277 
31278   ;;
31279 esac
31280 fi
31281 JAR=$ac_cv_path_JAR
31282 if test -n "$JAR"; then
31283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31284 $as_echo "$JAR" >&6; }
31285 else
31286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31287 $as_echo "no" >&6; }
31288 fi
31289 
31290 
31291           if test "x$JAR" = x; then
31292             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31293           fi
31294         else
31295           # Otherwise we believe it is a complete path. Use it as it is.
31296           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31297 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31298           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31299 $as_echo_n "checking for JAR... " >&6; }
31300           if test ! -x "$tool_specified"; then
31301             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31302 $as_echo "not found" >&6; }
31303             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31304           fi
31305           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31306 $as_echo "$tool_specified" >&6; }
31307         fi
31308       fi
31309     fi
31310 
31311   fi
31312 
31313 
31314 
31315   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31316 
31317   # Publish this variable in the help.
31318 
31319 
31320   if [ -z "${JARSIGNER+x}" ]; then
31321     # The variable is not set by user, try to locate tool using the code snippet
31322 
31323       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31324 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31325       JARSIGNER=$BOOT_JDK/bin/jarsigner
31326       if test ! -x $JARSIGNER; then
31327         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31328 $as_echo "not found" >&6; }
31329         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31330 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31331         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31332       fi
31333       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31334 $as_echo "ok" >&6; }
31335 
31336 
31337   else
31338     # The variable is set, but is it from the command line or the environment?
31339 
31340     # Try to remove the string !JARSIGNER! from our list.
31341     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31342     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31343       # If it failed, the variable was not from the command line. Ignore it,
31344       # but warn the user (except for BASH, which is always set by the calling BASH).
31345       if test "xJARSIGNER" != xBASH; then
31346         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31347 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31348       fi
31349       # Try to locate tool using the code snippet
31350 
31351       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31352 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31353       JARSIGNER=$BOOT_JDK/bin/jarsigner
31354       if test ! -x $JARSIGNER; then
31355         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31356 $as_echo "not found" >&6; }
31357         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31358 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31359         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31360       fi
31361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31362 $as_echo "ok" >&6; }
31363 
31364 
31365     else
31366       # If it succeeded, then it was overridden by the user. We will use it
31367       # for the tool.
31368 
31369       # First remove it from the list of overridden variables, so we can test
31370       # for unknown variables in the end.
31371       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31372 
31373       # Check if we try to supply an empty value
31374       if test "x$JARSIGNER" = x; then
31375         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31376 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31378 $as_echo_n "checking for JARSIGNER... " >&6; }
31379         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31380 $as_echo "disabled" >&6; }
31381       else
31382         # Check if the provided tool contains a complete path.
31383         tool_specified="$JARSIGNER"
31384         tool_basename="${tool_specified##*/}"
31385         if test "x$tool_basename" = "x$tool_specified"; then
31386           # A command without a complete path is provided, search $PATH.
31387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31388 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31389           # Extract the first word of "$tool_basename", so it can be a program name with args.
31390 set dummy $tool_basename; ac_word=$2
31391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31392 $as_echo_n "checking for $ac_word... " >&6; }
31393 if ${ac_cv_path_JARSIGNER+:} false; then :
31394   $as_echo_n "(cached) " >&6
31395 else
31396   case $JARSIGNER in
31397   [\\/]* | ?:[\\/]*)
31398   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31399   ;;
31400   *)
31401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31402 for as_dir in $PATH
31403 do
31404   IFS=$as_save_IFS
31405   test -z "$as_dir" && as_dir=.
31406     for ac_exec_ext in '' $ac_executable_extensions; do
31407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31408     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31410     break 2
31411   fi
31412 done
31413   done
31414 IFS=$as_save_IFS
31415 
31416   ;;
31417 esac
31418 fi
31419 JARSIGNER=$ac_cv_path_JARSIGNER
31420 if test -n "$JARSIGNER"; then
31421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31422 $as_echo "$JARSIGNER" >&6; }
31423 else
31424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31425 $as_echo "no" >&6; }
31426 fi
31427 
31428 
31429           if test "x$JARSIGNER" = x; then
31430             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31431           fi
31432         else
31433           # Otherwise we believe it is a complete path. Use it as it is.
31434           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31435 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31436           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31437 $as_echo_n "checking for JARSIGNER... " >&6; }
31438           if test ! -x "$tool_specified"; then
31439             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31440 $as_echo "not found" >&6; }
31441             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31442           fi
31443           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31444 $as_echo "$tool_specified" >&6; }
31445         fi
31446       fi
31447     fi
31448 
31449   fi
31450 
31451 
31452 
31453   # Finally, set some other options...
31454 
31455   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31456   BOOT_JDK_SOURCETARGET="-source 9 -target 9"
31457 
31458 
31459 
31460 
31461   # Check if the boot jdk is 32 or 64 bit
31462   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31463     BOOT_JDK_BITS="64"
31464   else
31465     BOOT_JDK_BITS="32"
31466   fi
31467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31468 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31470 $as_echo "$BOOT_JDK_BITS" >&6; }
31471 
31472 
31473 
31474 # Check whether --with-build-jdk was given.
31475 if test "${with_build_jdk+set}" = set; then :
31476   withval=$with_build_jdk;
31477 fi
31478 
31479 
31480   CREATE_BUILDJDK=false
31481   EXTERNAL_BUILDJDK=false
31482   BUILD_JDK_FOUND="no"
31483   if test "x$with_build_jdk" != "x"; then
31484 
31485   if test "x$BUILD_JDK_FOUND" = xno; then
31486     # Execute the test
31487 
31488        if test "x$with_build_jdk" != x; then
31489          BUILD_JDK=$with_build_jdk
31490          BUILD_JDK_FOUND=maybe
31491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31492 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31493        fi
31494 
31495     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31496     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31497       # Do we have a bin/java?
31498       if test ! -x "$BUILD_JDK/bin/java"; then
31499         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31500 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31501         BUILD_JDK_FOUND=no
31502       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31503         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31504 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31505         BUILD_JDK_FOUND=no
31506       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31507         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31508 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31509         BUILD_JDK_FOUND=no
31510       elif test ! -x "$BUILD_JDK/bin/javac"; then
31511         # Do we have a bin/javac?
31512         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31513 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31514         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31515 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31516         BUILD_JDK_FOUND=no
31517       else
31518         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31519         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31520 
31521         # Extra M4 quote needed to protect [] in grep expression.
31522         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`
31523         if test "x$FOUND_CORRECT_VERSION" = x; then
31524           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31525 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31526           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 10)" >&5
31527 $as_echo "$as_me: (Your Build JDK must be version 10)" >&6;}
31528           BUILD_JDK_FOUND=no
31529         else
31530           # We're done!
31531           BUILD_JDK_FOUND=yes
31532 
31533   # Only process if variable expands to non-empty
31534 
31535   if test "x$BUILD_JDK" != x; then
31536     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31537 
31538   # Input might be given as Windows format, start by converting to
31539   # unix format.
31540   path="$BUILD_JDK"
31541   new_path=`$CYGPATH -u "$path"`
31542 
31543   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31544   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31545   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31546   # "foo.exe" is OK but "foo" is an error.
31547   #
31548   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31549   # It is also a way to make sure we got the proper file name for the real test later on.
31550   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31551   if test "x$test_shortpath" = x; then
31552     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31553 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31554     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31555   fi
31556 
31557   # Call helper function which possibly converts this using DOS-style short mode.
31558   # If so, the updated path is stored in $new_path.
31559 
31560   input_path="$new_path"
31561   # Check if we need to convert this using DOS-style short mode. If the path
31562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31563   # take no chances and rewrite it.
31564   # Note: m4 eats our [], so we need to use [ and ] instead.
31565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31566   if test "x$has_forbidden_chars" != x; then
31567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31568     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31569     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31570     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31571       # Going to short mode and back again did indeed matter. Since short mode is
31572       # case insensitive, let's make it lowercase to improve readability.
31573       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31574       # Now convert it back to Unix-style (cygpath)
31575       input_path=`$CYGPATH -u "$shortmode_path"`
31576       new_path="$input_path"
31577     fi
31578   fi
31579 
31580   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31581   if test "x$test_cygdrive_prefix" = x; then
31582     # As a simple fix, exclude /usr/bin since it's not a real path.
31583     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31584       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31585       # a path prefixed by /cygdrive for fixpath to work.
31586       new_path="$CYGWIN_ROOT_PATH$input_path"
31587     fi
31588   fi
31589 
31590 
31591   if test "x$path" != "x$new_path"; then
31592     BUILD_JDK="$new_path"
31593     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31594 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31595   fi
31596 
31597     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31598 
31599   path="$BUILD_JDK"
31600   has_colon=`$ECHO $path | $GREP ^.:`
31601   new_path="$path"
31602   if test "x$has_colon" = x; then
31603     # Not in mixed or Windows style, start by that.
31604     new_path=`cmd //c echo $path`
31605   fi
31606 
31607 
31608   input_path="$new_path"
31609   # Check if we need to convert this using DOS-style short mode. If the path
31610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31611   # take no chances and rewrite it.
31612   # Note: m4 eats our [], so we need to use [ and ] instead.
31613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31614   if test "x$has_forbidden_chars" != x; then
31615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31616     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31617   fi
31618 
31619 
31620   windows_path="$new_path"
31621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31622     unix_path=`$CYGPATH -u "$windows_path"`
31623     new_path="$unix_path"
31624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31626     new_path="$unix_path"
31627   fi
31628 
31629   if test "x$path" != "x$new_path"; then
31630     BUILD_JDK="$new_path"
31631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31632 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31633   fi
31634 
31635   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31636   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31637 
31638     else
31639       # We're on a unix platform. Hooray! :)
31640       path="$BUILD_JDK"
31641       has_space=`$ECHO "$path" | $GREP " "`
31642       if test "x$has_space" != x; then
31643         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31644 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31645         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31646       fi
31647 
31648       # Use eval to expand a potential ~
31649       eval path="$path"
31650       if test ! -f "$path" && test ! -d "$path"; then
31651         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31652       fi
31653 
31654       if test -d "$path"; then
31655         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31656       else
31657         dir="`$DIRNAME "$path"`"
31658         base="`$BASENAME "$path"`"
31659         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31660       fi
31661     fi
31662   fi
31663 
31664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31665 $as_echo_n "checking for Build JDK... " >&6; }
31666           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31667 $as_echo "$BUILD_JDK" >&6; }
31668           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31669 $as_echo_n "checking Build JDK version... " >&6; }
31670           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31672 $as_echo "$BUILD_JDK_VERSION" >&6; }
31673         fi # end check jdk version
31674       fi # end check java
31675     fi # end check build jdk found
31676   fi
31677 
31678     EXTERNAL_BUILDJDK=true
31679   else
31680     if test "x$COMPILE_TYPE" = "xcross"; then
31681       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31682       BUILD_JDK_FOUND=yes
31683       CREATE_BUILDJDK=true
31684       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31685 $as_echo_n "checking for Build JDK... " >&6; }
31686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31687 $as_echo "yes, will build it for the host platform" >&6; }
31688     else
31689       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31690       BUILD_JDK_FOUND=yes
31691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31692 $as_echo_n "checking for Build JDK... " >&6; }
31693       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31694 $as_echo "yes, will use output dir" >&6; }
31695     fi
31696   fi
31697 
31698   JMOD="$BUILD_JDK/bin/jmod"
31699   JLINK="$BUILD_JDK/bin/jlink"
31700 
31701 
31702 
31703   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31704     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31705 $as_echo_n "checking for Build JDK... " >&6; }
31706     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31707 $as_echo "no" >&6; }
31708     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31709   fi
31710 
31711 
31712 
31713 
31714 
31715 
31716 ###############################################################################
31717 #
31718 # Configure the sources to use. We can add or override individual directories.
31719 #
31720 ###############################################################################
31721 
31722 
31723   OUTPUTDIR="$OUTPUTDIR"
31724 
31725   JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
31726 
31727   # Where are the sources.
31728 
31729 
31730 
31731 
31732 # Check whether --with-import-modules was given.
31733 if test "${with_import_modules+set}" = set; then :
31734   withval=$with_import_modules;
31735 fi
31736 
31737 
31738   if test "x$with_import_modules" != x \
31739       && test "x$with_import_modules" != "xno"; then
31740     if test -d "$with_import_modules"; then
31741       IMPORT_MODULES_TOPDIR="$with_import_modules"
31742 
31743   # Only process if variable expands to non-empty
31744 
31745   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31747 
31748   # Input might be given as Windows format, start by converting to
31749   # unix format.
31750   path="$IMPORT_MODULES_TOPDIR"
31751   new_path=`$CYGPATH -u "$path"`
31752 
31753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31756   # "foo.exe" is OK but "foo" is an error.
31757   #
31758   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31759   # It is also a way to make sure we got the proper file name for the real test later on.
31760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31761   if test "x$test_shortpath" = x; then
31762     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31763 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31764     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31765   fi
31766 
31767   # Call helper function which possibly converts this using DOS-style short mode.
31768   # If so, the updated path is stored in $new_path.
31769 
31770   input_path="$new_path"
31771   # Check if we need to convert this using DOS-style short mode. If the path
31772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31773   # take no chances and rewrite it.
31774   # Note: m4 eats our [], so we need to use [ and ] instead.
31775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31776   if test "x$has_forbidden_chars" != x; then
31777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31781       # Going to short mode and back again did indeed matter. Since short mode is
31782       # case insensitive, let's make it lowercase to improve readability.
31783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31784       # Now convert it back to Unix-style (cygpath)
31785       input_path=`$CYGPATH -u "$shortmode_path"`
31786       new_path="$input_path"
31787     fi
31788   fi
31789 
31790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31791   if test "x$test_cygdrive_prefix" = x; then
31792     # As a simple fix, exclude /usr/bin since it's not a real path.
31793     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31795       # a path prefixed by /cygdrive for fixpath to work.
31796       new_path="$CYGWIN_ROOT_PATH$input_path"
31797     fi
31798   fi
31799 
31800 
31801   if test "x$path" != "x$new_path"; then
31802     IMPORT_MODULES_TOPDIR="$new_path"
31803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31804 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31805   fi
31806 
31807     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31808 
31809   path="$IMPORT_MODULES_TOPDIR"
31810   has_colon=`$ECHO $path | $GREP ^.:`
31811   new_path="$path"
31812   if test "x$has_colon" = x; then
31813     # Not in mixed or Windows style, start by that.
31814     new_path=`cmd //c echo $path`
31815   fi
31816 
31817 
31818   input_path="$new_path"
31819   # Check if we need to convert this using DOS-style short mode. If the path
31820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31821   # take no chances and rewrite it.
31822   # Note: m4 eats our [], so we need to use [ and ] instead.
31823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31824   if test "x$has_forbidden_chars" != x; then
31825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31827   fi
31828 
31829 
31830   windows_path="$new_path"
31831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31832     unix_path=`$CYGPATH -u "$windows_path"`
31833     new_path="$unix_path"
31834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31836     new_path="$unix_path"
31837   fi
31838 
31839   if test "x$path" != "x$new_path"; then
31840     IMPORT_MODULES_TOPDIR="$new_path"
31841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31842 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31843   fi
31844 
31845   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31846   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31847 
31848     else
31849       # We're on a unix platform. Hooray! :)
31850       path="$IMPORT_MODULES_TOPDIR"
31851       has_space=`$ECHO "$path" | $GREP " "`
31852       if test "x$has_space" != x; then
31853         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31854 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31855         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31856       fi
31857 
31858       # Use eval to expand a potential ~
31859       eval path="$path"
31860       if test ! -f "$path" && test ! -d "$path"; then
31861         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31862       fi
31863 
31864       if test -d "$path"; then
31865         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31866       else
31867         dir="`$DIRNAME "$path"`"
31868         base="`$BASENAME "$path"`"
31869         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31870       fi
31871     fi
31872   fi
31873 
31874     elif test -e "$with_import_modules"; then
31875       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31876       $RM -rf "$IMPORT_MODULES_TOPDIR"
31877       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31878       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31879         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31880       fi
31881     else
31882       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31883     fi
31884   fi
31885 
31886   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31887     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31888   fi
31889   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31890     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31891   fi
31892   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31893     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31894   fi
31895   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31896     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31897   fi
31898   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31899     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31900   fi
31901   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31902     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31903   fi
31904   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31905     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31906   fi
31907   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31908     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31909   fi
31910 
31911 
31912 
31913 
31914 
31915 
31916 
31917 
31918 
31919 
31920 
31921 ###############################################################################
31922 #
31923 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31924 # native code.
31925 #
31926 ###############################################################################
31927 
31928 # See if we are doing a complete static build or not
31929 
31930   # Check whether --enable-static-build was given.
31931 if test "${enable_static_build+set}" = set; then :
31932   enableval=$enable_static_build;
31933 fi
31934 
31935   STATIC_BUILD=false
31936   if test "x$enable_static_build" = "xyes"; then
31937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31938 $as_echo_n "checking if static build is enabled... " >&6; }
31939     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31940 $as_echo "yes" >&6; }
31941     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31942       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31943     fi
31944     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31945     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31946     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31947     STATIC_BUILD=true
31948   elif test "x$enable_static_build" = "xno"; then
31949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31950 $as_echo_n "checking if static build is enabled... " >&6; }
31951     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31952 $as_echo "no" >&6; }
31953   elif test "x$enable_static_build" != "x"; then
31954     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31955   fi
31956 
31957 
31958 
31959 
31960 # First determine the toolchain type (compiler family)
31961 
31962 
31963 # Check whether --with-toolchain-type was given.
31964 if test "${with_toolchain_type+set}" = set; then :
31965   withval=$with_toolchain_type;
31966 fi
31967 
31968 
31969   # Use indirect variable referencing
31970   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31971   VALID_TOOLCHAINS=${!toolchain_var_name}
31972 
31973   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31974     if test -n "$XCODEBUILD"; then
31975       # On Mac OS X, default toolchain to clang after Xcode 5
31976       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31977       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31978       if test $? -ne 0; then
31979         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31980       fi
31981       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31982           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31983           $CUT -f 1 -d .`
31984       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31985 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31986       if test $XCODE_MAJOR_VERSION -ge 5; then
31987           DEFAULT_TOOLCHAIN="clang"
31988       else
31989           DEFAULT_TOOLCHAIN="gcc"
31990       fi
31991     else
31992       # If Xcode is not installed, but the command line tools are
31993       # then we can't run xcodebuild. On these systems we should
31994       # default to clang
31995       DEFAULT_TOOLCHAIN="clang"
31996     fi
31997   else
31998     # First toolchain type in the list is the default
31999     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32000   fi
32001 
32002   if test "x$with_toolchain_type" = xlist; then
32003     # List all toolchains
32004     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32005 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32006     for toolchain in $VALID_TOOLCHAINS; do
32007       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32008       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32009       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32010     done
32011 
32012     exit 0
32013   elif test "x$with_toolchain_type" != x; then
32014     # User override; check that it is valid
32015     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32016       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32017 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32018       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32019 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32020       as_fn_error $? "Cannot continue." "$LINENO" 5
32021     fi
32022     TOOLCHAIN_TYPE=$with_toolchain_type
32023   else
32024     # No flag given, use default
32025     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32026   fi
32027 
32028 
32029   TOOLCHAIN_CC_BINARY_clang="clang"
32030   TOOLCHAIN_CC_BINARY_gcc="gcc"
32031   TOOLCHAIN_CC_BINARY_microsoft="cl"
32032   TOOLCHAIN_CC_BINARY_solstudio="cc"
32033   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32034 
32035   TOOLCHAIN_CXX_BINARY_clang="clang++"
32036   TOOLCHAIN_CXX_BINARY_gcc="g++"
32037   TOOLCHAIN_CXX_BINARY_microsoft="cl"
32038   TOOLCHAIN_CXX_BINARY_solstudio="CC"
32039   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32040 
32041   # Use indirect variable referencing
32042   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32043   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32044   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32045   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32046   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32047   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32048   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32049   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32050 
32051 
32052   # Define filename patterns
32053   if test "x$OPENJDK_TARGET_OS" = xwindows; then
32054     LIBRARY_PREFIX=
32055     SHARED_LIBRARY_SUFFIX='.dll'
32056     STATIC_LIBRARY_SUFFIX='.lib'
32057     SHARED_LIBRARY='$1.dll'
32058     STATIC_LIBRARY='$1.lib'
32059     OBJ_SUFFIX='.obj'
32060     EXE_SUFFIX='.exe'
32061   else
32062     LIBRARY_PREFIX=lib
32063     SHARED_LIBRARY_SUFFIX='.so'
32064     STATIC_LIBRARY_SUFFIX='.a'
32065     SHARED_LIBRARY='lib$1.so'
32066     STATIC_LIBRARY='lib$1.a'
32067     OBJ_SUFFIX='.o'
32068     EXE_SUFFIX=''
32069     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32070       # For full static builds, we're overloading the SHARED_LIBRARY
32071       # variables in order to limit the amount of changes required.
32072       # It would be better to remove SHARED and just use LIBRARY and
32073       # LIBRARY_SUFFIX for libraries that can be built either
32074       # shared or static and use STATIC_* for libraries that are
32075       # always built statically.
32076       if test "x$STATIC_BUILD" = xtrue; then
32077         SHARED_LIBRARY='lib$1.a'
32078         SHARED_LIBRARY_SUFFIX='.a'
32079       else
32080         SHARED_LIBRARY='lib$1.dylib'
32081         SHARED_LIBRARY_SUFFIX='.dylib'
32082       fi
32083     fi
32084   fi
32085 
32086 
32087 
32088 
32089 
32090 
32091 
32092 
32093 
32094 
32095   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32096     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32097 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32098   else
32099     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32100 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32101   fi
32102 
32103 
32104 # User supplied flags should be used when configure detects compilers
32105 
32106   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32107     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32108 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32109   fi
32110 
32111   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32112     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32113 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32114   fi
32115 
32116   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32117     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32118 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32119   fi
32120 
32121 
32122 # Check whether --with-extra-cflags was given.
32123 if test "${with_extra_cflags+set}" = set; then :
32124   withval=$with_extra_cflags;
32125 fi
32126 
32127 
32128 
32129 # Check whether --with-extra-cxxflags was given.
32130 if test "${with_extra_cxxflags+set}" = set; then :
32131   withval=$with_extra_cxxflags;
32132 fi
32133 
32134 
32135 
32136 # Check whether --with-extra-ldflags was given.
32137 if test "${with_extra_ldflags+set}" = set; then :
32138   withval=$with_extra_ldflags;
32139 fi
32140 
32141 
32142   EXTRA_CFLAGS="$with_extra_cflags"
32143   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32144   EXTRA_LDFLAGS="$with_extra_ldflags"
32145 
32146 
32147 
32148 
32149 
32150   # The global CFLAGS and LDLAGS variables are used by configure tests and
32151   # should include the extra parameters
32152   CFLAGS="$EXTRA_CFLAGS"
32153   CXXFLAGS="$EXTRA_CXXFLAGS"
32154   LDFLAGS="$EXTRA_LDFLAGS"
32155   CPPFLAGS=""
32156 
32157 # The sysroot cflags are needed for configure to be able to run the compilers
32158 
32159   if test "x$SYSROOT" != "x"; then
32160     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32161       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32162         # Solaris Studio does not have a concept of sysroot. Instead we must
32163         # make sure the default include and lib dirs are appended to each
32164         # compile and link command line. Must also add -I-xbuiltin to enable
32165         # inlining of system functions and intrinsics.
32166         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32167         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32168             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32169       fi
32170     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32171       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32172       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32173     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32174       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32175       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32176     fi
32177     # The global CFLAGS and LDFLAGS variables need these for configure to function
32178     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32179     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32180     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32181     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32182   fi
32183 
32184   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32185     # We also need -iframework<path>/System/Library/Frameworks
32186     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32187     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32188     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32189     # set this here so it doesn't have to be peppered throughout the forest
32190     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32191     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32192   fi
32193 
32194 
32195 
32196 
32197 
32198 # Then detect the actual binaries needed
32199 
32200   # FIXME: Is this needed?
32201   ac_ext=cpp
32202 ac_cpp='$CXXCPP $CPPFLAGS'
32203 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32204 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32205 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32206 
32207 
32208   # Store the CFLAGS etc passed to the configure script.
32209   ORG_CFLAGS="$CFLAGS"
32210   ORG_CXXFLAGS="$CXXFLAGS"
32211 
32212   # autoconf magic only relies on PATH, so update it if tools dir is specified
32213   OLD_PATH="$PATH"
32214 
32215   # On Windows, we need to detect the visual studio installation first.
32216   # This will change the PATH, but we need to keep that new PATH even
32217   # after toolchain detection is done, since the compiler (on x86) uses
32218   # it for DLL resolution in runtime.
32219   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32220       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32221 
32222   # Store path to cygwin link.exe to help excluding it when searching for
32223   # VS linker. This must be done before changing the PATH when looking for VS.
32224   # Extract the first word of "link", so it can be a program name with args.
32225 set dummy link; ac_word=$2
32226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32227 $as_echo_n "checking for $ac_word... " >&6; }
32228 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32229   $as_echo_n "(cached) " >&6
32230 else
32231   case $CYGWIN_LINK in
32232   [\\/]* | ?:[\\/]*)
32233   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32234   ;;
32235   *)
32236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32237 for as_dir in $PATH
32238 do
32239   IFS=$as_save_IFS
32240   test -z "$as_dir" && as_dir=.
32241     for ac_exec_ext in '' $ac_executable_extensions; do
32242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32243     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32245     break 2
32246   fi
32247 done
32248   done
32249 IFS=$as_save_IFS
32250 
32251   ;;
32252 esac
32253 fi
32254 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32255 if test -n "$CYGWIN_LINK"; then
32256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32257 $as_echo "$CYGWIN_LINK" >&6; }
32258 else
32259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32260 $as_echo "no" >&6; }
32261 fi
32262 
32263 
32264   if test "x$CYGWIN_LINK" != x; then
32265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32266 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32267     "$CYGWIN_LINK" --version > /dev/null
32268     if test $? -eq 0 ; then
32269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32270 $as_echo "yes" >&6; }
32271     else
32272       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32273 $as_echo "no" >&6; }
32274       # This might be the VS linker. Don't exclude it later on.
32275       CYGWIN_LINK=""
32276     fi
32277   fi
32278 
32279   # First-hand choice is to locate and run the vsvars bat file.
32280 
32281 
32282 # Check whether --with-toolchain-version was given.
32283 if test "${with_toolchain_version+set}" = set; then :
32284   withval=$with_toolchain_version;
32285 fi
32286 
32287 
32288   if test "x$with_toolchain_version" = xlist; then
32289     # List all toolchains
32290     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32291 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32292     for version in $VALID_VS_VERSIONS; do
32293       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32294       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32295     done
32296 
32297     exit 0
32298   elif test "x$DEVKIT_VS_VERSION" != x; then
32299     VS_VERSION=$DEVKIT_VS_VERSION
32300     TOOLCHAIN_VERSION=$VS_VERSION
32301     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32302     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32303     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32304     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32305     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32306     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32307 
32308     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32309     # can still be exported as INCLUDE for compiler invocations without
32310     # SYSROOT_CFLAGS
32311     OLDIFS="$IFS"
32312     IFS=";"
32313     for i in $DEVKIT_VS_INCLUDE; do
32314       ipath=$i
32315 
32316   unix_path="$ipath"
32317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32318     windows_path=`$CYGPATH -m "$unix_path"`
32319     ipath="$windows_path"
32320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32321     windows_path=`cmd //c echo $unix_path`
32322     ipath="$windows_path"
32323   fi
32324 
32325       VS_INCLUDE="$VS_INCLUDE;$ipath"
32326     done
32327     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32328     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32329     for i in $DEVKIT_VS_LIB; do
32330       libpath=$i
32331 
32332   unix_path="$libpath"
32333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32334     windows_path=`$CYGPATH -m "$unix_path"`
32335     libpath="$windows_path"
32336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32337     windows_path=`cmd //c echo $unix_path`
32338     libpath="$windows_path"
32339   fi
32340 
32341       VS_LIB="$VS_LIB;$libpath"
32342     done
32343     IFS="$OLDIFS"
32344 
32345     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32346 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32347 
32348   elif test "x$with_toolchain_version" != x; then
32349     # User override; check that it is valid
32350     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32351       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32352 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32353       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32354 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32355       as_fn_error $? "Cannot continue." "$LINENO" 5
32356     fi
32357     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32358   else
32359     # No flag given, use default
32360     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32361   fi
32362 
32363   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32364 
32365   VS_VERSION="$VS_VERSION"
32366   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32367   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32368   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32369   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32370 
32371   # When using --with-tools-dir, assume it points to the correct and default
32372   # version of Visual Studio or that --with-toolchain-version was also set.
32373   if test "x$with_tools_dir" != x; then
32374 
32375   if test "x$VS_ENV_CMD" = x; then
32376     VS_VERSION="${VS_VERSION}"
32377     VS_BASE="$with_tools_dir/../.."
32378     METHOD="--with-tools-dir"
32379 
32380     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32381       VCVARSFILE="vc/bin/vcvars32.bat"
32382     else
32383       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32384     fi
32385 
32386 
32387   windows_path="$VS_BASE"
32388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389     unix_path=`$CYGPATH -u "$windows_path"`
32390     VS_BASE="$unix_path"
32391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393     VS_BASE="$unix_path"
32394   fi
32395 
32396     if test -d "$VS_BASE"; then
32397       if test -f "$VS_BASE/$VCVARSFILE"; then
32398         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32399 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32400         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32401         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32402         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32403         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32404       else
32405         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32406 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32407         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32408 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32409       fi
32410     fi
32411   fi
32412 
32413 
32414   if test "x$VS_ENV_CMD" = x; then
32415     VS_VERSION="${VS_VERSION}"
32416     VS_BASE="$with_tools_dir/../../.."
32417     METHOD="--with-tools-dir"
32418 
32419     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32420       VCVARSFILE="vc/bin/vcvars32.bat"
32421     else
32422       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32423     fi
32424 
32425 
32426   windows_path="$VS_BASE"
32427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32428     unix_path=`$CYGPATH -u "$windows_path"`
32429     VS_BASE="$unix_path"
32430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32432     VS_BASE="$unix_path"
32433   fi
32434 
32435     if test -d "$VS_BASE"; then
32436       if test -f "$VS_BASE/$VCVARSFILE"; then
32437         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32438 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32439         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32440         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32441         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32442         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32443       else
32444         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32445 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32446         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32447 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32448       fi
32449     fi
32450   fi
32451 
32452     if test "x$VS_ENV_CMD" = x; then
32453       # Having specified an argument which is incorrect will produce an instant failure;
32454       # we should not go on looking
32455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32456 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32457       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32458 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32459       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32460 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32461       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32462     fi
32463   fi
32464 
32465   VS_ENV_CMD=""
32466   VS_ENV_ARGS=""
32467 
32468   if test "x$VS_COMNTOOLS" != x; then
32469 
32470   if test "x$VS_ENV_CMD" = x; then
32471     VS_VERSION="${VS_VERSION}"
32472     VS_BASE="$VS_COMNTOOLS/../.."
32473     METHOD="$VS_COMNTOOLS_VAR variable"
32474 
32475     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32476       VCVARSFILE="vc/bin/vcvars32.bat"
32477     else
32478       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32479     fi
32480 
32481 
32482   windows_path="$VS_BASE"
32483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484     unix_path=`$CYGPATH -u "$windows_path"`
32485     VS_BASE="$unix_path"
32486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488     VS_BASE="$unix_path"
32489   fi
32490 
32491     if test -d "$VS_BASE"; then
32492       if test -f "$VS_BASE/$VCVARSFILE"; then
32493         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32494 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32495         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32496         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32497         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32498         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32499       else
32500         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32501 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32502         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32503 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32504       fi
32505     fi
32506   fi
32507 
32508   fi
32509   if test "x$PROGRAMFILES" != x; then
32510 
32511   if test "x$VS_ENV_CMD" = x; then
32512     VS_VERSION="${VS_VERSION}"
32513     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32514     METHOD="well-known name"
32515 
32516     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32517       VCVARSFILE="vc/bin/vcvars32.bat"
32518     else
32519       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32520     fi
32521 
32522 
32523   windows_path="$VS_BASE"
32524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32525     unix_path=`$CYGPATH -u "$windows_path"`
32526     VS_BASE="$unix_path"
32527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32529     VS_BASE="$unix_path"
32530   fi
32531 
32532     if test -d "$VS_BASE"; then
32533       if test -f "$VS_BASE/$VCVARSFILE"; then
32534         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32535 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32536         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32537         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32538         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32539         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32540       else
32541         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32542 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32543         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32544 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32545       fi
32546     fi
32547   fi
32548 
32549   fi
32550   # Work around the insanely named ProgramFiles(x86) env variable
32551   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32552   if test "x$PROGRAMFILES_X86" != x; then
32553 
32554   if test "x$VS_ENV_CMD" = x; then
32555     VS_VERSION="${VS_VERSION}"
32556     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32557     METHOD="well-known name"
32558 
32559     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32560       VCVARSFILE="vc/bin/vcvars32.bat"
32561     else
32562       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32563     fi
32564 
32565 
32566   windows_path="$VS_BASE"
32567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32568     unix_path=`$CYGPATH -u "$windows_path"`
32569     VS_BASE="$unix_path"
32570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32572     VS_BASE="$unix_path"
32573   fi
32574 
32575     if test -d "$VS_BASE"; then
32576       if test -f "$VS_BASE/$VCVARSFILE"; then
32577         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32578 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32579         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32580         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32581         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32582         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32583       else
32584         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32585 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32586         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32587 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32588       fi
32589     fi
32590   fi
32591 
32592   fi
32593 
32594   if test "x$VS_ENV_CMD" = x; then
32595     VS_VERSION="${VS_VERSION}"
32596     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32597     METHOD="well-known name"
32598 
32599     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32600       VCVARSFILE="vc/bin/vcvars32.bat"
32601     else
32602       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32603     fi
32604 
32605 
32606   windows_path="$VS_BASE"
32607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32608     unix_path=`$CYGPATH -u "$windows_path"`
32609     VS_BASE="$unix_path"
32610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32611     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32612     VS_BASE="$unix_path"
32613   fi
32614 
32615     if test -d "$VS_BASE"; then
32616       if test -f "$VS_BASE/$VCVARSFILE"; then
32617         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32618 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32619         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32620         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32621         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32622         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32623       else
32624         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32625 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32626         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32627 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32628       fi
32629     fi
32630   fi
32631 
32632 
32633   if test "x$VS_ENV_CMD" = x; then
32634     VS_VERSION="${VS_VERSION}"
32635     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32636     METHOD="well-known name"
32637 
32638     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32639       VCVARSFILE="vc/bin/vcvars32.bat"
32640     else
32641       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32642     fi
32643 
32644 
32645   windows_path="$VS_BASE"
32646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32647     unix_path=`$CYGPATH -u "$windows_path"`
32648     VS_BASE="$unix_path"
32649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32651     VS_BASE="$unix_path"
32652   fi
32653 
32654     if test -d "$VS_BASE"; then
32655       if test -f "$VS_BASE/$VCVARSFILE"; then
32656         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32657 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32658         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32659         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32660         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32661         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32662       else
32663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32664 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32665         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32666 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32667       fi
32668     fi
32669   fi
32670 
32671 
32672   if test "x$SDK_INSTALL_DIR" != x; then
32673     if test "x$ProgramW6432" != x; then
32674 
32675   if test "x$VS_ENV_CMD" = x; then
32676     VS_VERSION="${VS_VERSION}"
32677     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32678     METHOD="well-known name"
32679 
32680   windows_path="$WIN_SDK_BASE"
32681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32682     unix_path=`$CYGPATH -u "$windows_path"`
32683     WIN_SDK_BASE="$unix_path"
32684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32686     WIN_SDK_BASE="$unix_path"
32687   fi
32688 
32689     if test -d "$WIN_SDK_BASE"; then
32690       # There have been cases of partial or broken SDK installations. A missing
32691       # lib dir is not going to work.
32692       if test ! -d "$WIN_SDK_BASE/lib"; then
32693         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32694 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32695         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32696 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32697       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32698         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32699 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32700         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32701         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32702           VS_ENV_ARGS="/x86"
32703         else
32704           VS_ENV_ARGS="/x64"
32705         fi
32706         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32707         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32708         # TODO: improve detection for other versions of SDK
32709         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32710       else
32711         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32712 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32713         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32714 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32715       fi
32716     fi
32717   fi
32718 
32719     fi
32720     if test "x$PROGRAMW6432" != x; then
32721 
32722   if test "x$VS_ENV_CMD" = x; then
32723     VS_VERSION="${VS_VERSION}"
32724     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32725     METHOD="well-known name"
32726 
32727   windows_path="$WIN_SDK_BASE"
32728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32729     unix_path=`$CYGPATH -u "$windows_path"`
32730     WIN_SDK_BASE="$unix_path"
32731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32733     WIN_SDK_BASE="$unix_path"
32734   fi
32735 
32736     if test -d "$WIN_SDK_BASE"; then
32737       # There have been cases of partial or broken SDK installations. A missing
32738       # lib dir is not going to work.
32739       if test ! -d "$WIN_SDK_BASE/lib"; then
32740         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32741 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32742         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32743 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32744       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32745         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32746 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32747         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32748         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32749           VS_ENV_ARGS="/x86"
32750         else
32751           VS_ENV_ARGS="/x64"
32752         fi
32753         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32754         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32755         # TODO: improve detection for other versions of SDK
32756         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32757       else
32758         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32759 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32760         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32761 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32762       fi
32763     fi
32764   fi
32765 
32766     fi
32767     if test "x$PROGRAMFILES" != x; then
32768 
32769   if test "x$VS_ENV_CMD" = x; then
32770     VS_VERSION="${VS_VERSION}"
32771     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32772     METHOD="well-known name"
32773 
32774   windows_path="$WIN_SDK_BASE"
32775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776     unix_path=`$CYGPATH -u "$windows_path"`
32777     WIN_SDK_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     WIN_SDK_BASE="$unix_path"
32781   fi
32782 
32783     if test -d "$WIN_SDK_BASE"; then
32784       # There have been cases of partial or broken SDK installations. A missing
32785       # lib dir is not going to work.
32786       if test ! -d "$WIN_SDK_BASE/lib"; then
32787         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32788 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32789         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32790 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32791       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32792         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32793 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32794         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32795         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32796           VS_ENV_ARGS="/x86"
32797         else
32798           VS_ENV_ARGS="/x64"
32799         fi
32800         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32801         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32802         # TODO: improve detection for other versions of SDK
32803         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32804       else
32805         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32806 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32807         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32808 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32809       fi
32810     fi
32811   fi
32812 
32813     fi
32814 
32815   if test "x$VS_ENV_CMD" = x; then
32816     VS_VERSION="${VS_VERSION}"
32817     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32818     METHOD="well-known name"
32819 
32820   windows_path="$WIN_SDK_BASE"
32821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822     unix_path=`$CYGPATH -u "$windows_path"`
32823     WIN_SDK_BASE="$unix_path"
32824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32826     WIN_SDK_BASE="$unix_path"
32827   fi
32828 
32829     if test -d "$WIN_SDK_BASE"; then
32830       # There have been cases of partial or broken SDK installations. A missing
32831       # lib dir is not going to work.
32832       if test ! -d "$WIN_SDK_BASE/lib"; then
32833         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32834 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32835         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32836 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32837       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32838         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32839 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32840         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32841         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32842           VS_ENV_ARGS="/x86"
32843         else
32844           VS_ENV_ARGS="/x64"
32845         fi
32846         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32847         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32848         # TODO: improve detection for other versions of SDK
32849         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32850       else
32851         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32852 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32853         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32854 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32855       fi
32856     fi
32857   fi
32858 
32859 
32860   if test "x$VS_ENV_CMD" = x; then
32861     VS_VERSION="${VS_VERSION}"
32862     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32863     METHOD="well-known name"
32864 
32865   windows_path="$WIN_SDK_BASE"
32866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32867     unix_path=`$CYGPATH -u "$windows_path"`
32868     WIN_SDK_BASE="$unix_path"
32869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32871     WIN_SDK_BASE="$unix_path"
32872   fi
32873 
32874     if test -d "$WIN_SDK_BASE"; then
32875       # There have been cases of partial or broken SDK installations. A missing
32876       # lib dir is not going to work.
32877       if test ! -d "$WIN_SDK_BASE/lib"; then
32878         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32879 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32880         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32881 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32882       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32883         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32884 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32885         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32886         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32887           VS_ENV_ARGS="/x86"
32888         else
32889           VS_ENV_ARGS="/x64"
32890         fi
32891         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32892         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32893         # TODO: improve detection for other versions of SDK
32894         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32895       else
32896         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32897 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32898         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32899 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32900       fi
32901     fi
32902   fi
32903 
32904   fi
32905 
32906     if test "x$VS_ENV_CMD" != x; then
32907       TOOLCHAIN_VERSION=$VS_VERSION
32908       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32909       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32910       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32911       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32912       # The rest of the variables are already evaled while probing
32913       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32914 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32915       break
32916     fi
32917   done
32918 
32919 
32920   # If we have a devkit, skip all of the below.
32921   if test "x$DEVKIT_VS_VERSION" = x; then
32922     if test "x$VS_ENV_CMD" != x; then
32923       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32924 
32925   # Only process if variable expands to non-empty
32926 
32927   if test "x$VS_ENV_CMD" != x; then
32928     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32929 
32930   # First separate the path from the arguments. This will split at the first
32931   # space.
32932   complete="$VS_ENV_CMD"
32933   path="${complete%% *}"
32934   tmp="$complete EOL"
32935   arguments="${tmp#* }"
32936 
32937   # Input might be given as Windows format, start by converting to
32938   # unix format.
32939   new_path=`$CYGPATH -u "$path"`
32940 
32941   # Now try to locate executable using which
32942   new_path=`$WHICH "$new_path" 2> /dev/null`
32943   # bat and cmd files are not always considered executable in cygwin causing which
32944   # to not find them
32945   if test "x$new_path" = x \
32946       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32947       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32948     new_path=`$CYGPATH -u "$path"`
32949   fi
32950   if test "x$new_path" = x; then
32951     # Oops. Which didn't find the executable.
32952     # The splitting of arguments from the executable at a space might have been incorrect,
32953     # since paths with space are more likely in Windows. Give it another try with the whole
32954     # argument.
32955     path="$complete"
32956     arguments="EOL"
32957     new_path=`$CYGPATH -u "$path"`
32958     new_path=`$WHICH "$new_path" 2> /dev/null`
32959     # bat and cmd files are not always considered executable in cygwin causing which
32960     # to not find them
32961     if test "x$new_path" = x \
32962         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32963         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32964       new_path=`$CYGPATH -u "$path"`
32965     fi
32966     if test "x$new_path" = x; then
32967       # It's still not found. Now this is an unrecoverable error.
32968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32969 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32970       has_space=`$ECHO "$complete" | $GREP " "`
32971       if test "x$has_space" != x; then
32972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32974       fi
32975       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32976     fi
32977   fi
32978 
32979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32982   # "foo.exe" is OK but "foo" is an error.
32983   #
32984   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32985   # It is also a way to make sure we got the proper file name for the real test later on.
32986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32987   if test "x$test_shortpath" = x; then
32988     # Short path failed, file does not exist as specified.
32989     # Try adding .exe or .cmd
32990     if test -f "${new_path}.exe"; then
32991       input_to_shortpath="${new_path}.exe"
32992     elif test -f "${new_path}.cmd"; then
32993       input_to_shortpath="${new_path}.cmd"
32994     else
32995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32996 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32997       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32998 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32999       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33000     fi
33001   else
33002     input_to_shortpath="$new_path"
33003   fi
33004 
33005   # Call helper function which possibly converts this using DOS-style short mode.
33006   # If so, the updated path is stored in $new_path.
33007   new_path="$input_to_shortpath"
33008 
33009   input_path="$input_to_shortpath"
33010   # Check if we need to convert this using DOS-style short mode. If the path
33011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33012   # take no chances and rewrite it.
33013   # Note: m4 eats our [], so we need to use [ and ] instead.
33014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33015   if test "x$has_forbidden_chars" != x; then
33016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33017     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33018     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33019     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33020       # Going to short mode and back again did indeed matter. Since short mode is
33021       # case insensitive, let's make it lowercase to improve readability.
33022       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33023       # Now convert it back to Unix-style (cygpath)
33024       input_path=`$CYGPATH -u "$shortmode_path"`
33025       new_path="$input_path"
33026     fi
33027   fi
33028 
33029   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33030   if test "x$test_cygdrive_prefix" = x; then
33031     # As a simple fix, exclude /usr/bin since it's not a real path.
33032     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33033       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33034       # a path prefixed by /cygdrive for fixpath to work.
33035       new_path="$CYGWIN_ROOT_PATH$input_path"
33036     fi
33037   fi
33038 
33039   # remove trailing .exe if any
33040   new_path="${new_path/%.exe/}"
33041 
33042     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33043 
33044   # First separate the path from the arguments. This will split at the first
33045   # space.
33046   complete="$VS_ENV_CMD"
33047   path="${complete%% *}"
33048   tmp="$complete EOL"
33049   arguments="${tmp#* }"
33050 
33051   # Input might be given as Windows format, start by converting to
33052   # unix format.
33053   new_path="$path"
33054 
33055   windows_path="$new_path"
33056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33057     unix_path=`$CYGPATH -u "$windows_path"`
33058     new_path="$unix_path"
33059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33061     new_path="$unix_path"
33062   fi
33063 
33064 
33065   # Now try to locate executable using which
33066   new_path=`$WHICH "$new_path" 2> /dev/null`
33067 
33068   if test "x$new_path" = x; then
33069     # Oops. Which didn't find the executable.
33070     # The splitting of arguments from the executable at a space might have been incorrect,
33071     # since paths with space are more likely in Windows. Give it another try with the whole
33072     # argument.
33073     path="$complete"
33074     arguments="EOL"
33075     new_path="$path"
33076 
33077   windows_path="$new_path"
33078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33079     unix_path=`$CYGPATH -u "$windows_path"`
33080     new_path="$unix_path"
33081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33083     new_path="$unix_path"
33084   fi
33085 
33086 
33087     new_path=`$WHICH "$new_path" 2> /dev/null`
33088     # bat and cmd files are not always considered executable in MSYS causing which
33089     # to not find them
33090     if test "x$new_path" = x \
33091         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33092         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33093       new_path="$path"
33094 
33095   windows_path="$new_path"
33096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097     unix_path=`$CYGPATH -u "$windows_path"`
33098     new_path="$unix_path"
33099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33100     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33101     new_path="$unix_path"
33102   fi
33103 
33104     fi
33105 
33106     if test "x$new_path" = x; then
33107       # It's still not found. Now this is an unrecoverable error.
33108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33109 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33110       has_space=`$ECHO "$complete" | $GREP " "`
33111       if test "x$has_space" != x; then
33112         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33113 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33114       fi
33115       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33116     fi
33117   fi
33118 
33119   # Now new_path has a complete unix path to the binary
33120   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33121     # Keep paths in /bin as-is, but remove trailing .exe if any
33122     new_path="${new_path/%.exe/}"
33123     # Do not save /bin paths to all_fixpath_prefixes!
33124   else
33125     # Not in mixed or Windows style, start by that.
33126     new_path=`cmd //c echo $new_path`
33127 
33128   input_path="$new_path"
33129   # Check if we need to convert this using DOS-style short mode. If the path
33130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33131   # take no chances and rewrite it.
33132   # Note: m4 eats our [], so we need to use [ and ] instead.
33133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33134   if test "x$has_forbidden_chars" != x; then
33135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33136     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33137   fi
33138 
33139     # Output is in $new_path
33140 
33141   windows_path="$new_path"
33142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33143     unix_path=`$CYGPATH -u "$windows_path"`
33144     new_path="$unix_path"
33145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33147     new_path="$unix_path"
33148   fi
33149 
33150     # remove trailing .exe if any
33151     new_path="${new_path/%.exe/}"
33152 
33153     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33154     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33155   fi
33156 
33157     else
33158       # We're on a unix platform. Hooray! :)
33159       # First separate the path from the arguments. This will split at the first
33160       # space.
33161       complete="$VS_ENV_CMD"
33162       path="${complete%% *}"
33163       tmp="$complete EOL"
33164       arguments="${tmp#* }"
33165 
33166       # Cannot rely on the command "which" here since it doesn't always work.
33167       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33168       if test -z "$is_absolute_path"; then
33169         # Path to executable is not absolute. Find it.
33170         IFS_save="$IFS"
33171         IFS=:
33172         for p in $PATH; do
33173           if test -f "$p/$path" && test -x "$p/$path"; then
33174             new_path="$p/$path"
33175             break
33176           fi
33177         done
33178         IFS="$IFS_save"
33179       else
33180         # This is an absolute path, we can use it without further modifications.
33181         new_path="$path"
33182       fi
33183 
33184       if test "x$new_path" = x; then
33185         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33186 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33187         has_space=`$ECHO "$complete" | $GREP " "`
33188         if test "x$has_space" != x; then
33189           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33190 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33191         fi
33192         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33193       fi
33194     fi
33195 
33196     # Now join together the path and the arguments once again
33197     if test "x$arguments" != xEOL; then
33198       new_complete="$new_path ${arguments% *}"
33199     else
33200       new_complete="$new_path"
33201     fi
33202 
33203     if test "x$complete" != "x$new_complete"; then
33204       VS_ENV_CMD="$new_complete"
33205       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33206 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33207     fi
33208   fi
33209 
33210 
33211       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33212       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33213 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33214 
33215       # We need to create a couple of temporary files.
33216       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33217       $MKDIR -p $VS_ENV_TMP_DIR
33218 
33219       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33220       # Instead create a shell script which will set the relevant variables when run.
33221       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33222 
33223   unix_path="$WINPATH_VS_ENV_CMD"
33224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33225     windows_path=`$CYGPATH -m "$unix_path"`
33226     WINPATH_VS_ENV_CMD="$windows_path"
33227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33228     windows_path=`cmd //c echo $unix_path`
33229     WINPATH_VS_ENV_CMD="$windows_path"
33230   fi
33231 
33232       WINPATH_BASH="$BASH"
33233 
33234   unix_path="$WINPATH_BASH"
33235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33236     windows_path=`$CYGPATH -m "$unix_path"`
33237     WINPATH_BASH="$windows_path"
33238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33239     windows_path=`cmd //c echo $unix_path`
33240     WINPATH_BASH="$windows_path"
33241   fi
33242 
33243 
33244       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33245       # script (executable by bash) that will setup the important variables.
33246       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33247       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33248       # This will end up something like:
33249       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33250       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33251       # These will end up something like:
33252       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33253       # The trailing space for everyone except PATH is no typo, but is needed due
33254       # to trailing \ in the Windows paths. These will be stripped later.
33255       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33256           >> $EXTRACT_VC_ENV_BAT_FILE
33257       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33258           >> $EXTRACT_VC_ENV_BAT_FILE
33259       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33260           >> $EXTRACT_VC_ENV_BAT_FILE
33261       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33262           >> $EXTRACT_VC_ENV_BAT_FILE
33263       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33264           >> $EXTRACT_VC_ENV_BAT_FILE
33265       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33266           >> $EXTRACT_VC_ENV_BAT_FILE
33267 
33268       # Now execute the newly created bat file.
33269       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33270       # Change directory so we don't need to mess with Windows paths in redirects.
33271       cd $VS_ENV_TMP_DIR
33272       cmd /c extract-vs-env.bat | $CAT
33273       cd $CURDIR
33274 
33275       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33277 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33278         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33279 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33280         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33281 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33282         as_fn_error $? "Cannot continue" "$LINENO" 5
33283       fi
33284 
33285       # Now set all paths and other env variables. This will allow the rest of
33286       # the configure script to find and run the compiler in the proper way.
33287       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33288 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33289       . $VS_ENV_TMP_DIR/set-vs-env.sh
33290       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33291       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33292     else
33293       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33294       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33295 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33296     fi
33297   fi
33298 
33299   # At this point, we should have correct variables in the environment, or we can't continue.
33300   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33301 $as_echo_n "checking for Visual Studio variables... " >&6; }
33302 
33303   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33304       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33305     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33306       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33307 $as_echo "present but broken" >&6; }
33308       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33309     else
33310       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33311 $as_echo "ok" >&6; }
33312       # Remove any trailing "\" ";" and " " from the variables.
33313       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33314       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33315       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33316       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33317       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33318       # Remove any paths containing # (typically F#) as that messes up make. This
33319       # is needed if visual studio was installed with F# support.
33320       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33321 
33322 
33323 
33324 
33325 
33326       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33327       OLDIFS="$IFS"
33328       IFS=";"
33329       for i in $VS_INCLUDE; do
33330         ipath=$i
33331         # Only process non-empty elements
33332         if test "x$ipath" != x; then
33333           IFS="$OLDIFS"
33334           # Check that directory exists before calling fixup_path
33335           testpath=$ipath
33336 
33337   windows_path="$testpath"
33338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33339     unix_path=`$CYGPATH -u "$windows_path"`
33340     testpath="$unix_path"
33341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33343     testpath="$unix_path"
33344   fi
33345 
33346           if test -d "$testpath"; then
33347 
33348   # Only process if variable expands to non-empty
33349 
33350   if test "x$ipath" != x; then
33351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33352 
33353   # Input might be given as Windows format, start by converting to
33354   # unix format.
33355   path="$ipath"
33356   new_path=`$CYGPATH -u "$path"`
33357 
33358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33361   # "foo.exe" is OK but "foo" is an error.
33362   #
33363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33364   # It is also a way to make sure we got the proper file name for the real test later on.
33365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33366   if test "x$test_shortpath" = x; then
33367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33368 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33369     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33370   fi
33371 
33372   # Call helper function which possibly converts this using DOS-style short mode.
33373   # If so, the updated path is stored in $new_path.
33374 
33375   input_path="$new_path"
33376   # Check if we need to convert this using DOS-style short mode. If the path
33377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33378   # take no chances and rewrite it.
33379   # Note: m4 eats our [], so we need to use [ and ] instead.
33380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33381   if test "x$has_forbidden_chars" != x; then
33382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33386       # Going to short mode and back again did indeed matter. Since short mode is
33387       # case insensitive, let's make it lowercase to improve readability.
33388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33389       # Now convert it back to Unix-style (cygpath)
33390       input_path=`$CYGPATH -u "$shortmode_path"`
33391       new_path="$input_path"
33392     fi
33393   fi
33394 
33395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33396   if test "x$test_cygdrive_prefix" = x; then
33397     # As a simple fix, exclude /usr/bin since it's not a real path.
33398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33400       # a path prefixed by /cygdrive for fixpath to work.
33401       new_path="$CYGWIN_ROOT_PATH$input_path"
33402     fi
33403   fi
33404 
33405 
33406   if test "x$path" != "x$new_path"; then
33407     ipath="$new_path"
33408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33409 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33410   fi
33411 
33412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33413 
33414   path="$ipath"
33415   has_colon=`$ECHO $path | $GREP ^.:`
33416   new_path="$path"
33417   if test "x$has_colon" = x; then
33418     # Not in mixed or Windows style, start by that.
33419     new_path=`cmd //c echo $path`
33420   fi
33421 
33422 
33423   input_path="$new_path"
33424   # Check if we need to convert this using DOS-style short mode. If the path
33425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33426   # take no chances and rewrite it.
33427   # Note: m4 eats our [], so we need to use [ and ] instead.
33428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33429   if test "x$has_forbidden_chars" != x; then
33430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33432   fi
33433 
33434 
33435   windows_path="$new_path"
33436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33437     unix_path=`$CYGPATH -u "$windows_path"`
33438     new_path="$unix_path"
33439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33441     new_path="$unix_path"
33442   fi
33443 
33444   if test "x$path" != "x$new_path"; then
33445     ipath="$new_path"
33446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33447 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33448   fi
33449 
33450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33452 
33453     else
33454       # We're on a unix platform. Hooray! :)
33455       path="$ipath"
33456       has_space=`$ECHO "$path" | $GREP " "`
33457       if test "x$has_space" != x; then
33458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33459 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33460         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33461       fi
33462 
33463       # Use eval to expand a potential ~
33464       eval path="$path"
33465       if test ! -f "$path" && test ! -d "$path"; then
33466         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33467       fi
33468 
33469       if test -d "$path"; then
33470         ipath="`cd "$path"; $THEPWDCMD -L`"
33471       else
33472         dir="`$DIRNAME "$path"`"
33473         base="`$BASENAME "$path"`"
33474         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33475       fi
33476     fi
33477   fi
33478 
33479             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33480           fi
33481           IFS=";"
33482         fi
33483       done
33484       # Convert VS_LIB into SYSROOT_LDFLAGS
33485       for i in $VS_LIB; do
33486         libpath=$i
33487         # Only process non-empty elements
33488         if test "x$libpath" != x; then
33489           IFS="$OLDIFS"
33490           # Check that directory exists before calling fixup_path
33491           testpath=$libpath
33492 
33493   windows_path="$testpath"
33494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33495     unix_path=`$CYGPATH -u "$windows_path"`
33496     testpath="$unix_path"
33497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33499     testpath="$unix_path"
33500   fi
33501 
33502           if test -d "$testpath"; then
33503 
33504   # Only process if variable expands to non-empty
33505 
33506   if test "x$libpath" != x; then
33507     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33508 
33509   # Input might be given as Windows format, start by converting to
33510   # unix format.
33511   path="$libpath"
33512   new_path=`$CYGPATH -u "$path"`
33513 
33514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33517   # "foo.exe" is OK but "foo" is an error.
33518   #
33519   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33520   # It is also a way to make sure we got the proper file name for the real test later on.
33521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33522   if test "x$test_shortpath" = x; then
33523     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33524 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33525     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33526   fi
33527 
33528   # Call helper function which possibly converts this using DOS-style short mode.
33529   # If so, the updated path is stored in $new_path.
33530 
33531   input_path="$new_path"
33532   # Check if we need to convert this using DOS-style short mode. If the path
33533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33534   # take no chances and rewrite it.
33535   # Note: m4 eats our [], so we need to use [ and ] instead.
33536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33537   if test "x$has_forbidden_chars" != x; then
33538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33542       # Going to short mode and back again did indeed matter. Since short mode is
33543       # case insensitive, let's make it lowercase to improve readability.
33544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33545       # Now convert it back to Unix-style (cygpath)
33546       input_path=`$CYGPATH -u "$shortmode_path"`
33547       new_path="$input_path"
33548     fi
33549   fi
33550 
33551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33552   if test "x$test_cygdrive_prefix" = x; then
33553     # As a simple fix, exclude /usr/bin since it's not a real path.
33554     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33556       # a path prefixed by /cygdrive for fixpath to work.
33557       new_path="$CYGWIN_ROOT_PATH$input_path"
33558     fi
33559   fi
33560 
33561 
33562   if test "x$path" != "x$new_path"; then
33563     libpath="$new_path"
33564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33565 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33566   fi
33567 
33568     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33569 
33570   path="$libpath"
33571   has_colon=`$ECHO $path | $GREP ^.:`
33572   new_path="$path"
33573   if test "x$has_colon" = x; then
33574     # Not in mixed or Windows style, start by that.
33575     new_path=`cmd //c echo $path`
33576   fi
33577 
33578 
33579   input_path="$new_path"
33580   # Check if we need to convert this using DOS-style short mode. If the path
33581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33582   # take no chances and rewrite it.
33583   # Note: m4 eats our [], so we need to use [ and ] instead.
33584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33585   if test "x$has_forbidden_chars" != x; then
33586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33588   fi
33589 
33590 
33591   windows_path="$new_path"
33592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33593     unix_path=`$CYGPATH -u "$windows_path"`
33594     new_path="$unix_path"
33595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33597     new_path="$unix_path"
33598   fi
33599 
33600   if test "x$path" != "x$new_path"; then
33601     libpath="$new_path"
33602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33603 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33604   fi
33605 
33606   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33607   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33608 
33609     else
33610       # We're on a unix platform. Hooray! :)
33611       path="$libpath"
33612       has_space=`$ECHO "$path" | $GREP " "`
33613       if test "x$has_space" != x; then
33614         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33615 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33616         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33617       fi
33618 
33619       # Use eval to expand a potential ~
33620       eval path="$path"
33621       if test ! -f "$path" && test ! -d "$path"; then
33622         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33623       fi
33624 
33625       if test -d "$path"; then
33626         libpath="`cd "$path"; $THEPWDCMD -L`"
33627       else
33628         dir="`$DIRNAME "$path"`"
33629         base="`$BASENAME "$path"`"
33630         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33631       fi
33632     fi
33633   fi
33634 
33635             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33636           fi
33637           IFS=";"
33638         fi
33639       done
33640       IFS="$OLDIFS"
33641     fi
33642   else
33643     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33644 $as_echo "not found" >&6; }
33645 
33646     if test "x$VS_ENV_CMD" = x; then
33647       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33648 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33649       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33650 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33651     else
33652       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33653 $as_echo "$as_me: Running the extraction script failed." >&6;}
33654     fi
33655     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33656 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33657     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33658 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33659     as_fn_error $? "Cannot continue" "$LINENO" 5
33660   fi
33661 
33662     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33663     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33664     PATH="$VS_PATH"
33665     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33666     export INCLUDE="$VS_INCLUDE"
33667     export LIB="$VS_LIB"
33668   else
33669     if test "x$XCODE_VERSION_OUTPUT" != x; then
33670       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33671       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33672       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33673     else
33674       # Currently we do not define this for other toolchains. This might change as the need arise.
33675       TOOLCHAIN_VERSION=
33676     fi
33677   fi
33678 
33679 
33680   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33681   # override all other locations.
33682   if test "x$TOOLCHAIN_PATH" != x; then
33683     PATH=$TOOLCHAIN_PATH:$PATH
33684   fi
33685 
33686 
33687   #
33688   # Setup the compilers (CC and CXX)
33689   #
33690 
33691   COMPILER_NAME=C
33692   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33693 
33694   if test "x$CC" != x; then
33695     # User has supplied compiler name already, always let that override.
33696     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33697 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33698     if test "x`basename $CC`" = "x$CC"; then
33699       # A command without a complete path is provided, search $PATH.
33700 
33701       for ac_prog in $CC
33702 do
33703   # Extract the first word of "$ac_prog", so it can be a program name with args.
33704 set dummy $ac_prog; ac_word=$2
33705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33706 $as_echo_n "checking for $ac_word... " >&6; }
33707 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33708   $as_echo_n "(cached) " >&6
33709 else
33710   case $POTENTIAL_CC in
33711   [\\/]* | ?:[\\/]*)
33712   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33713   ;;
33714   *)
33715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33716 for as_dir in $PATH
33717 do
33718   IFS=$as_save_IFS
33719   test -z "$as_dir" && as_dir=.
33720     for ac_exec_ext in '' $ac_executable_extensions; do
33721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33722     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33724     break 2
33725   fi
33726 done
33727   done
33728 IFS=$as_save_IFS
33729 
33730   ;;
33731 esac
33732 fi
33733 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33734 if test -n "$POTENTIAL_CC"; then
33735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33736 $as_echo "$POTENTIAL_CC" >&6; }
33737 else
33738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33739 $as_echo "no" >&6; }
33740 fi
33741 
33742 
33743   test -n "$POTENTIAL_CC" && break
33744 done
33745 
33746       if test "x$POTENTIAL_CC" != x; then
33747         CC=$POTENTIAL_CC
33748       else
33749         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33750       fi
33751     else
33752       # Otherwise it might already be a complete path
33753       if test ! -x "$CC"; then
33754         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33755       fi
33756     fi
33757   else
33758     # No user supplied value. Locate compiler ourselves.
33759 
33760     # If we are cross compiling, assume cross compilation tools follows the
33761     # cross compilation standard where they are prefixed with the autoconf
33762     # standard name for the target. For example the binary
33763     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33764     # If we are not cross compiling, then the default compiler name will be
33765     # used.
33766 
33767     CC=
33768     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33769     # before checking the rest of the PATH.
33770     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33771     # step, this should not be necessary.
33772     if test -n "$TOOLCHAIN_PATH"; then
33773       PATH_save="$PATH"
33774       PATH="$TOOLCHAIN_PATH"
33775       if test -n "$ac_tool_prefix"; then
33776   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33777 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33779 $as_echo_n "checking for $ac_word... " >&6; }
33780 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33781   $as_echo_n "(cached) " >&6
33782 else
33783   case $TOOLCHAIN_PATH_CC in
33784   [\\/]* | ?:[\\/]*)
33785   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33786   ;;
33787   *)
33788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33789 for as_dir in $PATH
33790 do
33791   IFS=$as_save_IFS
33792   test -z "$as_dir" && as_dir=.
33793     for ac_exec_ext in '' $ac_executable_extensions; do
33794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33795     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33797     break 2
33798   fi
33799 done
33800   done
33801 IFS=$as_save_IFS
33802 
33803   ;;
33804 esac
33805 fi
33806 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33807 if test -n "$TOOLCHAIN_PATH_CC"; then
33808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33809 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33810 else
33811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33812 $as_echo "no" >&6; }
33813 fi
33814 
33815 
33816 fi
33817 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33818   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33819   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33820 set dummy $SEARCH_LIST; ac_word=$2
33821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33822 $as_echo_n "checking for $ac_word... " >&6; }
33823 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33824   $as_echo_n "(cached) " >&6
33825 else
33826   case $ac_pt_TOOLCHAIN_PATH_CC in
33827   [\\/]* | ?:[\\/]*)
33828   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33829   ;;
33830   *)
33831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33832 for as_dir in $PATH
33833 do
33834   IFS=$as_save_IFS
33835   test -z "$as_dir" && as_dir=.
33836     for ac_exec_ext in '' $ac_executable_extensions; do
33837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33838     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33840     break 2
33841   fi
33842 done
33843   done
33844 IFS=$as_save_IFS
33845 
33846   ;;
33847 esac
33848 fi
33849 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33850 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33852 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33853 else
33854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33855 $as_echo "no" >&6; }
33856 fi
33857 
33858   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33859     TOOLCHAIN_PATH_CC=""
33860   else
33861     case $cross_compiling:$ac_tool_warned in
33862 yes:)
33863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33865 ac_tool_warned=yes ;;
33866 esac
33867     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33868   fi
33869 else
33870   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33871 fi
33872 
33873       CC=$TOOLCHAIN_PATH_CC
33874       PATH="$PATH_save"
33875     fi
33876 
33877     # AC_PATH_TOOL can't be run multiple times with the same variable,
33878     # so create a new name for this run.
33879     if test "x$CC" = x; then
33880       if test -n "$ac_tool_prefix"; then
33881   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33882 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33884 $as_echo_n "checking for $ac_word... " >&6; }
33885 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33886   $as_echo_n "(cached) " >&6
33887 else
33888   case $POTENTIAL_CC in
33889   [\\/]* | ?:[\\/]*)
33890   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33891   ;;
33892   *)
33893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33894 for as_dir in $PATH
33895 do
33896   IFS=$as_save_IFS
33897   test -z "$as_dir" && as_dir=.
33898     for ac_exec_ext in '' $ac_executable_extensions; do
33899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33900     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33902     break 2
33903   fi
33904 done
33905   done
33906 IFS=$as_save_IFS
33907 
33908   ;;
33909 esac
33910 fi
33911 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33912 if test -n "$POTENTIAL_CC"; then
33913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33914 $as_echo "$POTENTIAL_CC" >&6; }
33915 else
33916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917 $as_echo "no" >&6; }
33918 fi
33919 
33920 
33921 fi
33922 if test -z "$ac_cv_path_POTENTIAL_CC"; then
33923   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33924   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33925 set dummy $SEARCH_LIST; ac_word=$2
33926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33927 $as_echo_n "checking for $ac_word... " >&6; }
33928 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33929   $as_echo_n "(cached) " >&6
33930 else
33931   case $ac_pt_POTENTIAL_CC in
33932   [\\/]* | ?:[\\/]*)
33933   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33934   ;;
33935   *)
33936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33937 for as_dir in $PATH
33938 do
33939   IFS=$as_save_IFS
33940   test -z "$as_dir" && as_dir=.
33941     for ac_exec_ext in '' $ac_executable_extensions; do
33942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33943     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33945     break 2
33946   fi
33947 done
33948   done
33949 IFS=$as_save_IFS
33950 
33951   ;;
33952 esac
33953 fi
33954 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33955 if test -n "$ac_pt_POTENTIAL_CC"; then
33956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33957 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33958 else
33959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33960 $as_echo "no" >&6; }
33961 fi
33962 
33963   if test "x$ac_pt_POTENTIAL_CC" = x; then
33964     POTENTIAL_CC=""
33965   else
33966     case $cross_compiling:$ac_tool_warned in
33967 yes:)
33968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33969 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33970 ac_tool_warned=yes ;;
33971 esac
33972     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33973   fi
33974 else
33975   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33976 fi
33977 
33978       CC=$POTENTIAL_CC
33979     fi
33980 
33981     if test "x$CC" = x; then
33982 
33983   # Print a helpful message on how to acquire the necessary build dependency.
33984   # devkit is the help tag: freetype, cups, alsa etc
33985   MISSING_DEPENDENCY=devkit
33986 
33987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33988     cygwin_help $MISSING_DEPENDENCY
33989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33990     msys_help $MISSING_DEPENDENCY
33991   else
33992     PKGHANDLER_COMMAND=
33993 
33994     case $PKGHANDLER in
33995       apt-get)
33996         apt_help     $MISSING_DEPENDENCY ;;
33997       yum)
33998         yum_help     $MISSING_DEPENDENCY ;;
33999       brew)
34000         brew_help    $MISSING_DEPENDENCY ;;
34001       port)
34002         port_help    $MISSING_DEPENDENCY ;;
34003       pkgutil)
34004         pkgutil_help $MISSING_DEPENDENCY ;;
34005       pkgadd)
34006         pkgadd_help  $MISSING_DEPENDENCY ;;
34007     esac
34008 
34009     if test "x$PKGHANDLER_COMMAND" != x; then
34010       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34011     fi
34012   fi
34013 
34014       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34015     fi
34016   fi
34017 
34018   # Now we have a compiler binary in CC. Make sure it's okay.
34019 
34020   # Only process if variable expands to non-empty
34021 
34022   if test "x$CC" != x; then
34023     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34024 
34025   # First separate the path from the arguments. This will split at the first
34026   # space.
34027   complete="$CC"
34028   path="${complete%% *}"
34029   tmp="$complete EOL"
34030   arguments="${tmp#* }"
34031 
34032   # Input might be given as Windows format, start by converting to
34033   # unix format.
34034   new_path=`$CYGPATH -u "$path"`
34035 
34036   # Now try to locate executable using which
34037   new_path=`$WHICH "$new_path" 2> /dev/null`
34038   # bat and cmd files are not always considered executable in cygwin causing which
34039   # to not find them
34040   if test "x$new_path" = x \
34041       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34042       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34043     new_path=`$CYGPATH -u "$path"`
34044   fi
34045   if test "x$new_path" = x; then
34046     # Oops. Which didn't find the executable.
34047     # The splitting of arguments from the executable at a space might have been incorrect,
34048     # since paths with space are more likely in Windows. Give it another try with the whole
34049     # argument.
34050     path="$complete"
34051     arguments="EOL"
34052     new_path=`$CYGPATH -u "$path"`
34053     new_path=`$WHICH "$new_path" 2> /dev/null`
34054     # bat and cmd files are not always considered executable in cygwin causing which
34055     # to not find them
34056     if test "x$new_path" = x \
34057         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34058         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34059       new_path=`$CYGPATH -u "$path"`
34060     fi
34061     if test "x$new_path" = x; then
34062       # It's still not found. Now this is an unrecoverable error.
34063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34064 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34065       has_space=`$ECHO "$complete" | $GREP " "`
34066       if test "x$has_space" != x; then
34067         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34068 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34069       fi
34070       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34071     fi
34072   fi
34073 
34074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34077   # "foo.exe" is OK but "foo" is an error.
34078   #
34079   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34080   # It is also a way to make sure we got the proper file name for the real test later on.
34081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34082   if test "x$test_shortpath" = x; then
34083     # Short path failed, file does not exist as specified.
34084     # Try adding .exe or .cmd
34085     if test -f "${new_path}.exe"; then
34086       input_to_shortpath="${new_path}.exe"
34087     elif test -f "${new_path}.cmd"; then
34088       input_to_shortpath="${new_path}.cmd"
34089     else
34090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34091 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34092       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34093 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34094       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34095     fi
34096   else
34097     input_to_shortpath="$new_path"
34098   fi
34099 
34100   # Call helper function which possibly converts this using DOS-style short mode.
34101   # If so, the updated path is stored in $new_path.
34102   new_path="$input_to_shortpath"
34103 
34104   input_path="$input_to_shortpath"
34105   # Check if we need to convert this using DOS-style short mode. If the path
34106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34107   # take no chances and rewrite it.
34108   # Note: m4 eats our [], so we need to use [ and ] instead.
34109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34110   if test "x$has_forbidden_chars" != x; then
34111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34115       # Going to short mode and back again did indeed matter. Since short mode is
34116       # case insensitive, let's make it lowercase to improve readability.
34117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34118       # Now convert it back to Unix-style (cygpath)
34119       input_path=`$CYGPATH -u "$shortmode_path"`
34120       new_path="$input_path"
34121     fi
34122   fi
34123 
34124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34125   if test "x$test_cygdrive_prefix" = x; then
34126     # As a simple fix, exclude /usr/bin since it's not a real path.
34127     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34129       # a path prefixed by /cygdrive for fixpath to work.
34130       new_path="$CYGWIN_ROOT_PATH$input_path"
34131     fi
34132   fi
34133 
34134   # remove trailing .exe if any
34135   new_path="${new_path/%.exe/}"
34136 
34137     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34138 
34139   # First separate the path from the arguments. This will split at the first
34140   # space.
34141   complete="$CC"
34142   path="${complete%% *}"
34143   tmp="$complete EOL"
34144   arguments="${tmp#* }"
34145 
34146   # Input might be given as Windows format, start by converting to
34147   # unix format.
34148   new_path="$path"
34149 
34150   windows_path="$new_path"
34151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34152     unix_path=`$CYGPATH -u "$windows_path"`
34153     new_path="$unix_path"
34154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34156     new_path="$unix_path"
34157   fi
34158 
34159 
34160   # Now try to locate executable using which
34161   new_path=`$WHICH "$new_path" 2> /dev/null`
34162 
34163   if test "x$new_path" = x; then
34164     # Oops. Which didn't find the executable.
34165     # The splitting of arguments from the executable at a space might have been incorrect,
34166     # since paths with space are more likely in Windows. Give it another try with the whole
34167     # argument.
34168     path="$complete"
34169     arguments="EOL"
34170     new_path="$path"
34171 
34172   windows_path="$new_path"
34173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174     unix_path=`$CYGPATH -u "$windows_path"`
34175     new_path="$unix_path"
34176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178     new_path="$unix_path"
34179   fi
34180 
34181 
34182     new_path=`$WHICH "$new_path" 2> /dev/null`
34183     # bat and cmd files are not always considered executable in MSYS causing which
34184     # to not find them
34185     if test "x$new_path" = x \
34186         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34187         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34188       new_path="$path"
34189 
34190   windows_path="$new_path"
34191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192     unix_path=`$CYGPATH -u "$windows_path"`
34193     new_path="$unix_path"
34194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196     new_path="$unix_path"
34197   fi
34198 
34199     fi
34200 
34201     if test "x$new_path" = x; then
34202       # It's still not found. Now this is an unrecoverable error.
34203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34204 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34205       has_space=`$ECHO "$complete" | $GREP " "`
34206       if test "x$has_space" != x; then
34207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34209       fi
34210       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34211     fi
34212   fi
34213 
34214   # Now new_path has a complete unix path to the binary
34215   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34216     # Keep paths in /bin as-is, but remove trailing .exe if any
34217     new_path="${new_path/%.exe/}"
34218     # Do not save /bin paths to all_fixpath_prefixes!
34219   else
34220     # Not in mixed or Windows style, start by that.
34221     new_path=`cmd //c echo $new_path`
34222 
34223   input_path="$new_path"
34224   # Check if we need to convert this using DOS-style short mode. If the path
34225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34226   # take no chances and rewrite it.
34227   # Note: m4 eats our [], so we need to use [ and ] instead.
34228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34229   if test "x$has_forbidden_chars" != x; then
34230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34232   fi
34233 
34234     # Output is in $new_path
34235 
34236   windows_path="$new_path"
34237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34238     unix_path=`$CYGPATH -u "$windows_path"`
34239     new_path="$unix_path"
34240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34242     new_path="$unix_path"
34243   fi
34244 
34245     # remove trailing .exe if any
34246     new_path="${new_path/%.exe/}"
34247 
34248     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34249     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34250   fi
34251 
34252     else
34253       # We're on a unix platform. Hooray! :)
34254       # First separate the path from the arguments. This will split at the first
34255       # space.
34256       complete="$CC"
34257       path="${complete%% *}"
34258       tmp="$complete EOL"
34259       arguments="${tmp#* }"
34260 
34261       # Cannot rely on the command "which" here since it doesn't always work.
34262       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34263       if test -z "$is_absolute_path"; then
34264         # Path to executable is not absolute. Find it.
34265         IFS_save="$IFS"
34266         IFS=:
34267         for p in $PATH; do
34268           if test -f "$p/$path" && test -x "$p/$path"; then
34269             new_path="$p/$path"
34270             break
34271           fi
34272         done
34273         IFS="$IFS_save"
34274       else
34275         # This is an absolute path, we can use it without further modifications.
34276         new_path="$path"
34277       fi
34278 
34279       if test "x$new_path" = x; then
34280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34281 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34282         has_space=`$ECHO "$complete" | $GREP " "`
34283         if test "x$has_space" != x; then
34284           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34285 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34286         fi
34287         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34288       fi
34289     fi
34290 
34291     # Now join together the path and the arguments once again
34292     if test "x$arguments" != xEOL; then
34293       new_complete="$new_path ${arguments% *}"
34294     else
34295       new_complete="$new_path"
34296     fi
34297 
34298     if test "x$complete" != "x$new_complete"; then
34299       CC="$new_complete"
34300       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34301 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34302     fi
34303   fi
34304 
34305   TEST_COMPILER="$CC"
34306 
34307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34308 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34309   SYMLINK_ORIGINAL="$TEST_COMPILER"
34310 
34311   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34312     # Follow a chain of symbolic links. Use readlink
34313     # where it exists, else fall back to horribly
34314     # complicated shell code.
34315     if test "x$READLINK_TESTED" != yes; then
34316       # On MacOSX there is a readlink tool with a different
34317       # purpose than the GNU readlink tool. Check the found readlink.
34318       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34319       if test "x$ISGNU" = x; then
34320         # A readlink that we do not know how to use.
34321         # Are there other non-GNU readlinks out there?
34322         READLINK_TESTED=yes
34323         READLINK=
34324       fi
34325     fi
34326 
34327     if test "x$READLINK" != x; then
34328       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34329     else
34330       # Save the current directory for restoring afterwards
34331       STARTDIR=$PWD
34332       COUNTER=0
34333       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34334       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34335       cd $sym_link_dir
34336       # Use -P flag to resolve symlinks in directories.
34337       cd `$THEPWDCMD -P`
34338       sym_link_dir=`$THEPWDCMD -P`
34339       # Resolve file symlinks
34340       while test $COUNTER -lt 20; do
34341         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34342         if test "x$ISLINK" == x; then
34343           # This is not a symbolic link! We are done!
34344           break
34345         fi
34346         # Again resolve directory symlinks since the target of the just found
34347         # link could be in a different directory
34348         cd `$DIRNAME $ISLINK`
34349         sym_link_dir=`$THEPWDCMD -P`
34350         sym_link_file=`$BASENAME $ISLINK`
34351         let COUNTER=COUNTER+1
34352       done
34353       cd $STARTDIR
34354       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34355     fi
34356   fi
34357 
34358   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34359     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34360 $as_echo "no symlink" >&6; }
34361   else
34362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34363 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34364 
34365     # We can't handle ccache by gcc wrappers, since we need to know if we're
34366     # using ccache. Instead ccache usage must be controlled by a configure option.
34367     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34368     if test "x$COMPILER_BASENAME" = "xccache"; then
34369       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34370 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34371       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34372     fi
34373   fi
34374 
34375 
34376   COMPILER=$CC
34377   COMPILER_NAME=$COMPILER_NAME
34378 
34379   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34380     # cc -V output typically looks like
34381     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34382     # or
34383     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34384     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34385     # Check that this is likely to be the Solaris Studio cc.
34386     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34387     if test $? -ne 0; then
34388       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34389       { $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
34390 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34391       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34392 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34393       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34394 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34395       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34396     fi
34397     # Remove usage instructions (if present), and
34398     # collapse compiler output into a single line
34399     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34400         $SED -e 's/ *[Uu]sage:.*//'`
34401     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34402         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34403   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34404     # xlc -qversion output typically looks like
34405     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34406     #     Version: 11.01.0000.0015
34407     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34408     # Check that this is likely to be the IBM XL C compiler.
34409     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34410     if test $? -ne 0; then
34411       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34412       { $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
34413 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34414       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34415 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34416       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34417 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34418       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34419     fi
34420     # Collapse compiler output into a single line
34421     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34422     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34423         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34424   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34425     # There is no specific version flag, but all output starts with a version string.
34426     # First line typically looks something like:
34427     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34428     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34429     # Check that this is likely to be Microsoft CL.EXE.
34430     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34431     if test $? -ne 0; then
34432       { $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
34433 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34434       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34435 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34436       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34437     fi
34438     # Collapse compiler output into a single line
34439     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34440     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34441         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34442   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34443     # gcc --version output typically looks like
34444     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34445     #     Copyright (C) 2013 Free Software Foundation, Inc.
34446     #     This is free software; see the source for copying conditions.  There is NO
34447     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34448     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34449     # Check that this is likely to be GCC.
34450     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34451     if test $? -ne 0; then
34452       { $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
34453 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34454       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34455 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34456       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457     fi
34458     # Remove Copyright and legalese from version string, and
34459     # collapse into a single line
34460     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461         $SED -e 's/ *Copyright .*//'`
34462     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34463         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34464   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34465     # clang --version output typically looks like
34466     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34467     #    clang version 3.3 (tags/RELEASE_33/final)
34468     # or
34469     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34470     #    Target: x86_64-pc-linux-gnu
34471     #    Thread model: posix
34472     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34473     # Check that this is likely to be clang
34474     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34475     if test $? -ne 0; then
34476       { $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
34477 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34478       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34479 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34480       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34481     fi
34482     # Collapse compiler output into a single line
34483     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34484     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34485         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34486   else
34487       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34488   fi
34489   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34490   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34491   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34492   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34493 
34494   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34495 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34496 
34497 
34498   # Now that we have resolved CC ourself, let autoconf have its go at it
34499   ac_ext=c
34500 ac_cpp='$CPP $CPPFLAGS'
34501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34504 if test -n "$ac_tool_prefix"; then
34505   for ac_prog in $CC
34506   do
34507     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34508 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34510 $as_echo_n "checking for $ac_word... " >&6; }
34511 if ${ac_cv_prog_CC+:} false; then :
34512   $as_echo_n "(cached) " >&6
34513 else
34514   if test -n "$CC"; then
34515   ac_cv_prog_CC="$CC" # Let the user override the test.
34516 else
34517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34518 for as_dir in $PATH
34519 do
34520   IFS=$as_save_IFS
34521   test -z "$as_dir" && as_dir=.
34522     for ac_exec_ext in '' $ac_executable_extensions; do
34523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34524     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34526     break 2
34527   fi
34528 done
34529   done
34530 IFS=$as_save_IFS
34531 
34532 fi
34533 fi
34534 CC=$ac_cv_prog_CC
34535 if test -n "$CC"; then
34536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34537 $as_echo "$CC" >&6; }
34538 else
34539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34540 $as_echo "no" >&6; }
34541 fi
34542 
34543 
34544     test -n "$CC" && break
34545   done
34546 fi
34547 if test -z "$CC"; then
34548   ac_ct_CC=$CC
34549   for ac_prog in $CC
34550 do
34551   # Extract the first word of "$ac_prog", so it can be a program name with args.
34552 set dummy $ac_prog; ac_word=$2
34553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34554 $as_echo_n "checking for $ac_word... " >&6; }
34555 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34556   $as_echo_n "(cached) " >&6
34557 else
34558   if test -n "$ac_ct_CC"; then
34559   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34560 else
34561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34562 for as_dir in $PATH
34563 do
34564   IFS=$as_save_IFS
34565   test -z "$as_dir" && as_dir=.
34566     for ac_exec_ext in '' $ac_executable_extensions; do
34567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34568     ac_cv_prog_ac_ct_CC="$ac_prog"
34569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34570     break 2
34571   fi
34572 done
34573   done
34574 IFS=$as_save_IFS
34575 
34576 fi
34577 fi
34578 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34579 if test -n "$ac_ct_CC"; then
34580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34581 $as_echo "$ac_ct_CC" >&6; }
34582 else
34583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34584 $as_echo "no" >&6; }
34585 fi
34586 
34587 
34588   test -n "$ac_ct_CC" && break
34589 done
34590 
34591   if test "x$ac_ct_CC" = x; then
34592     CC=""
34593   else
34594     case $cross_compiling:$ac_tool_warned in
34595 yes:)
34596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34597 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34598 ac_tool_warned=yes ;;
34599 esac
34600     CC=$ac_ct_CC
34601   fi
34602 fi
34603 
34604 
34605 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34606 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34607 as_fn_error $? "no acceptable C compiler found in \$PATH
34608 See \`config.log' for more details" "$LINENO" 5; }
34609 
34610 # Provide some information about the compiler.
34611 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34612 set X $ac_compile
34613 ac_compiler=$2
34614 for ac_option in --version -v -V -qversion; do
34615   { { ac_try="$ac_compiler $ac_option >&5"
34616 case "(($ac_try" in
34617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34618   *) ac_try_echo=$ac_try;;
34619 esac
34620 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34621 $as_echo "$ac_try_echo"; } >&5
34622   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34623   ac_status=$?
34624   if test -s conftest.err; then
34625     sed '10a\
34626 ... rest of stderr output deleted ...
34627          10q' conftest.err >conftest.er1
34628     cat conftest.er1 >&5
34629   fi
34630   rm -f conftest.er1 conftest.err
34631   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34632   test $ac_status = 0; }
34633 done
34634 
34635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34636 /* end confdefs.h.  */
34637 
34638 int
34639 main ()
34640 {
34641 
34642   ;
34643   return 0;
34644 }
34645 _ACEOF
34646 ac_clean_files_save=$ac_clean_files
34647 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34648 # Try to create an executable without -o first, disregard a.out.
34649 # It will help us diagnose broken compilers, and finding out an intuition
34650 # of exeext.
34651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34652 $as_echo_n "checking whether the C compiler works... " >&6; }
34653 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34654 
34655 # The possible output files:
34656 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34657 
34658 ac_rmfiles=
34659 for ac_file in $ac_files
34660 do
34661   case $ac_file in
34662     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34663     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34664   esac
34665 done
34666 rm -f $ac_rmfiles
34667 
34668 if { { ac_try="$ac_link_default"
34669 case "(($ac_try" in
34670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34671   *) ac_try_echo=$ac_try;;
34672 esac
34673 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34674 $as_echo "$ac_try_echo"; } >&5
34675   (eval "$ac_link_default") 2>&5
34676   ac_status=$?
34677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34678   test $ac_status = 0; }; then :
34679   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34680 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34681 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34682 # so that the user can short-circuit this test for compilers unknown to
34683 # Autoconf.
34684 for ac_file in $ac_files ''
34685 do
34686   test -f "$ac_file" || continue
34687   case $ac_file in
34688     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34689         ;;
34690     [ab].out )
34691         # We found the default executable, but exeext='' is most
34692         # certainly right.
34693         break;;
34694     *.* )
34695         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34696         then :; else
34697            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34698         fi
34699         # We set ac_cv_exeext here because the later test for it is not
34700         # safe: cross compilers may not add the suffix if given an `-o'
34701         # argument, so we may need to know it at that point already.
34702         # Even if this section looks crufty: it has the advantage of
34703         # actually working.
34704         break;;
34705     * )
34706         break;;
34707   esac
34708 done
34709 test "$ac_cv_exeext" = no && ac_cv_exeext=
34710 
34711 else
34712   ac_file=''
34713 fi
34714 if test -z "$ac_file"; then :
34715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34716 $as_echo "no" >&6; }
34717 $as_echo "$as_me: failed program was:" >&5
34718 sed 's/^/| /' conftest.$ac_ext >&5
34719 
34720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34721 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34722 as_fn_error 77 "C compiler cannot create executables
34723 See \`config.log' for more details" "$LINENO" 5; }
34724 else
34725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34726 $as_echo "yes" >&6; }
34727 fi
34728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34729 $as_echo_n "checking for C compiler default output file name... " >&6; }
34730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34731 $as_echo "$ac_file" >&6; }
34732 ac_exeext=$ac_cv_exeext
34733 
34734 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34735 ac_clean_files=$ac_clean_files_save
34736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34737 $as_echo_n "checking for suffix of executables... " >&6; }
34738 if { { ac_try="$ac_link"
34739 case "(($ac_try" in
34740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34741   *) ac_try_echo=$ac_try;;
34742 esac
34743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34744 $as_echo "$ac_try_echo"; } >&5
34745   (eval "$ac_link") 2>&5
34746   ac_status=$?
34747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34748   test $ac_status = 0; }; then :
34749   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34750 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34751 # work properly (i.e., refer to `conftest.exe'), while it won't with
34752 # `rm'.
34753 for ac_file in conftest.exe conftest conftest.*; do
34754   test -f "$ac_file" || continue
34755   case $ac_file in
34756     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34757     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34758           break;;
34759     * ) break;;
34760   esac
34761 done
34762 else
34763   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34764 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34765 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34766 See \`config.log' for more details" "$LINENO" 5; }
34767 fi
34768 rm -f conftest conftest$ac_cv_exeext
34769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34770 $as_echo "$ac_cv_exeext" >&6; }
34771 
34772 rm -f conftest.$ac_ext
34773 EXEEXT=$ac_cv_exeext
34774 ac_exeext=$EXEEXT
34775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34776 /* end confdefs.h.  */
34777 #include <stdio.h>
34778 int
34779 main ()
34780 {
34781 FILE *f = fopen ("conftest.out", "w");
34782  return ferror (f) || fclose (f) != 0;
34783 
34784   ;
34785   return 0;
34786 }
34787 _ACEOF
34788 ac_clean_files="$ac_clean_files conftest.out"
34789 # Check that the compiler produces executables we can run.  If not, either
34790 # the compiler is broken, or we cross compile.
34791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34792 $as_echo_n "checking whether we are cross compiling... " >&6; }
34793 if test "$cross_compiling" != yes; then
34794   { { ac_try="$ac_link"
34795 case "(($ac_try" in
34796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34797   *) ac_try_echo=$ac_try;;
34798 esac
34799 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34800 $as_echo "$ac_try_echo"; } >&5
34801   (eval "$ac_link") 2>&5
34802   ac_status=$?
34803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34804   test $ac_status = 0; }
34805   if { ac_try='./conftest$ac_cv_exeext'
34806   { { case "(($ac_try" in
34807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34808   *) ac_try_echo=$ac_try;;
34809 esac
34810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34811 $as_echo "$ac_try_echo"; } >&5
34812   (eval "$ac_try") 2>&5
34813   ac_status=$?
34814   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34815   test $ac_status = 0; }; }; then
34816     cross_compiling=no
34817   else
34818     if test "$cross_compiling" = maybe; then
34819         cross_compiling=yes
34820     else
34821         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34823 as_fn_error $? "cannot run C compiled programs.
34824 If you meant to cross compile, use \`--host'.
34825 See \`config.log' for more details" "$LINENO" 5; }
34826     fi
34827   fi
34828 fi
34829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34830 $as_echo "$cross_compiling" >&6; }
34831 
34832 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34833 ac_clean_files=$ac_clean_files_save
34834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34835 $as_echo_n "checking for suffix of object files... " >&6; }
34836 if ${ac_cv_objext+:} false; then :
34837   $as_echo_n "(cached) " >&6
34838 else
34839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34840 /* end confdefs.h.  */
34841 
34842 int
34843 main ()
34844 {
34845 
34846   ;
34847   return 0;
34848 }
34849 _ACEOF
34850 rm -f conftest.o conftest.obj
34851 if { { ac_try="$ac_compile"
34852 case "(($ac_try" in
34853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34854   *) ac_try_echo=$ac_try;;
34855 esac
34856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34857 $as_echo "$ac_try_echo"; } >&5
34858   (eval "$ac_compile") 2>&5
34859   ac_status=$?
34860   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34861   test $ac_status = 0; }; then :
34862   for ac_file in conftest.o conftest.obj conftest.*; do
34863   test -f "$ac_file" || continue;
34864   case $ac_file in
34865     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34866     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34867        break;;
34868   esac
34869 done
34870 else
34871   $as_echo "$as_me: failed program was:" >&5
34872 sed 's/^/| /' conftest.$ac_ext >&5
34873 
34874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34875 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34876 as_fn_error $? "cannot compute suffix of object files: cannot compile
34877 See \`config.log' for more details" "$LINENO" 5; }
34878 fi
34879 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34880 fi
34881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34882 $as_echo "$ac_cv_objext" >&6; }
34883 OBJEXT=$ac_cv_objext
34884 ac_objext=$OBJEXT
34885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34886 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34887 if ${ac_cv_c_compiler_gnu+:} false; then :
34888   $as_echo_n "(cached) " >&6
34889 else
34890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34891 /* end confdefs.h.  */
34892 
34893 int
34894 main ()
34895 {
34896 #ifndef __GNUC__
34897        choke me
34898 #endif
34899 
34900   ;
34901   return 0;
34902 }
34903 _ACEOF
34904 if ac_fn_c_try_compile "$LINENO"; then :
34905   ac_compiler_gnu=yes
34906 else
34907   ac_compiler_gnu=no
34908 fi
34909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34910 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34911 
34912 fi
34913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34914 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34915 if test $ac_compiler_gnu = yes; then
34916   GCC=yes
34917 else
34918   GCC=
34919 fi
34920 ac_test_CFLAGS=${CFLAGS+set}
34921 ac_save_CFLAGS=$CFLAGS
34922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34923 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34924 if ${ac_cv_prog_cc_g+:} false; then :
34925   $as_echo_n "(cached) " >&6
34926 else
34927   ac_save_c_werror_flag=$ac_c_werror_flag
34928    ac_c_werror_flag=yes
34929    ac_cv_prog_cc_g=no
34930    CFLAGS="-g"
34931    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34932 /* end confdefs.h.  */
34933 
34934 int
34935 main ()
34936 {
34937 
34938   ;
34939   return 0;
34940 }
34941 _ACEOF
34942 if ac_fn_c_try_compile "$LINENO"; then :
34943   ac_cv_prog_cc_g=yes
34944 else
34945   CFLAGS=""
34946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34947 /* end confdefs.h.  */
34948 
34949 int
34950 main ()
34951 {
34952 
34953   ;
34954   return 0;
34955 }
34956 _ACEOF
34957 if ac_fn_c_try_compile "$LINENO"; then :
34958 
34959 else
34960   ac_c_werror_flag=$ac_save_c_werror_flag
34961          CFLAGS="-g"
34962          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34963 /* end confdefs.h.  */
34964 
34965 int
34966 main ()
34967 {
34968 
34969   ;
34970   return 0;
34971 }
34972 _ACEOF
34973 if ac_fn_c_try_compile "$LINENO"; then :
34974   ac_cv_prog_cc_g=yes
34975 fi
34976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34977 fi
34978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34979 fi
34980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34981    ac_c_werror_flag=$ac_save_c_werror_flag
34982 fi
34983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34984 $as_echo "$ac_cv_prog_cc_g" >&6; }
34985 if test "$ac_test_CFLAGS" = set; then
34986   CFLAGS=$ac_save_CFLAGS
34987 elif test $ac_cv_prog_cc_g = yes; then
34988   if test "$GCC" = yes; then
34989     CFLAGS="-g -O2"
34990   else
34991     CFLAGS="-g"
34992   fi
34993 else
34994   if test "$GCC" = yes; then
34995     CFLAGS="-O2"
34996   else
34997     CFLAGS=
34998   fi
34999 fi
35000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35001 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35002 if ${ac_cv_prog_cc_c89+:} false; then :
35003   $as_echo_n "(cached) " >&6
35004 else
35005   ac_cv_prog_cc_c89=no
35006 ac_save_CC=$CC
35007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008 /* end confdefs.h.  */
35009 #include <stdarg.h>
35010 #include <stdio.h>
35011 struct stat;
35012 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35013 struct buf { int x; };
35014 FILE * (*rcsopen) (struct buf *, struct stat *, int);
35015 static char *e (p, i)
35016      char **p;
35017      int i;
35018 {
35019   return p[i];
35020 }
35021 static char *f (char * (*g) (char **, int), char **p, ...)
35022 {
35023   char *s;
35024   va_list v;
35025   va_start (v,p);
35026   s = g (p, va_arg (v,int));
35027   va_end (v);
35028   return s;
35029 }
35030 
35031 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35032    function prototypes and stuff, but not '\xHH' hex character constants.
35033    These don't provoke an error unfortunately, instead are silently treated
35034    as 'x'.  The following induces an error, until -std is added to get
35035    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35036    array size at least.  It's necessary to write '\x00'==0 to get something
35037    that's true only with -std.  */
35038 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35039 
35040 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35041    inside strings and character constants.  */
35042 #define FOO(x) 'x'
35043 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35044 
35045 int test (int i, double x);
35046 struct s1 {int (*f) (int a);};
35047 struct s2 {int (*f) (double a);};
35048 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35049 int argc;
35050 char **argv;
35051 int
35052 main ()
35053 {
35054 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35055   ;
35056   return 0;
35057 }
35058 _ACEOF
35059 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35060         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35061 do
35062   CC="$ac_save_CC $ac_arg"
35063   if ac_fn_c_try_compile "$LINENO"; then :
35064   ac_cv_prog_cc_c89=$ac_arg
35065 fi
35066 rm -f core conftest.err conftest.$ac_objext
35067   test "x$ac_cv_prog_cc_c89" != "xno" && break
35068 done
35069 rm -f conftest.$ac_ext
35070 CC=$ac_save_CC
35071 
35072 fi
35073 # AC_CACHE_VAL
35074 case "x$ac_cv_prog_cc_c89" in
35075   x)
35076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35077 $as_echo "none needed" >&6; } ;;
35078   xno)
35079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35080 $as_echo "unsupported" >&6; } ;;
35081   *)
35082     CC="$CC $ac_cv_prog_cc_c89"
35083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35084 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35085 esac
35086 if test "x$ac_cv_prog_cc_c89" != xno; then :
35087 
35088 fi
35089 
35090 ac_ext=cpp
35091 ac_cpp='$CXXCPP $CPPFLAGS'
35092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35095 
35096 
35097 
35098   COMPILER_NAME=C++
35099   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35100 
35101   if test "x$CXX" != x; then
35102     # User has supplied compiler name already, always let that override.
35103     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35104 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35105     if test "x`basename $CXX`" = "x$CXX"; then
35106       # A command without a complete path is provided, search $PATH.
35107 
35108       for ac_prog in $CXX
35109 do
35110   # Extract the first word of "$ac_prog", so it can be a program name with args.
35111 set dummy $ac_prog; ac_word=$2
35112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35113 $as_echo_n "checking for $ac_word... " >&6; }
35114 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35115   $as_echo_n "(cached) " >&6
35116 else
35117   case $POTENTIAL_CXX in
35118   [\\/]* | ?:[\\/]*)
35119   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35120   ;;
35121   *)
35122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35123 for as_dir in $PATH
35124 do
35125   IFS=$as_save_IFS
35126   test -z "$as_dir" && as_dir=.
35127     for ac_exec_ext in '' $ac_executable_extensions; do
35128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35129     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35131     break 2
35132   fi
35133 done
35134   done
35135 IFS=$as_save_IFS
35136 
35137   ;;
35138 esac
35139 fi
35140 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35141 if test -n "$POTENTIAL_CXX"; then
35142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35143 $as_echo "$POTENTIAL_CXX" >&6; }
35144 else
35145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35146 $as_echo "no" >&6; }
35147 fi
35148 
35149 
35150   test -n "$POTENTIAL_CXX" && break
35151 done
35152 
35153       if test "x$POTENTIAL_CXX" != x; then
35154         CXX=$POTENTIAL_CXX
35155       else
35156         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35157       fi
35158     else
35159       # Otherwise it might already be a complete path
35160       if test ! -x "$CXX"; then
35161         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35162       fi
35163     fi
35164   else
35165     # No user supplied value. Locate compiler ourselves.
35166 
35167     # If we are cross compiling, assume cross compilation tools follows the
35168     # cross compilation standard where they are prefixed with the autoconf
35169     # standard name for the target. For example the binary
35170     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35171     # If we are not cross compiling, then the default compiler name will be
35172     # used.
35173 
35174     CXX=
35175     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35176     # before checking the rest of the PATH.
35177     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35178     # step, this should not be necessary.
35179     if test -n "$TOOLCHAIN_PATH"; then
35180       PATH_save="$PATH"
35181       PATH="$TOOLCHAIN_PATH"
35182       if test -n "$ac_tool_prefix"; then
35183   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35184 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35186 $as_echo_n "checking for $ac_word... " >&6; }
35187 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35188   $as_echo_n "(cached) " >&6
35189 else
35190   case $TOOLCHAIN_PATH_CXX in
35191   [\\/]* | ?:[\\/]*)
35192   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35193   ;;
35194   *)
35195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35196 for as_dir in $PATH
35197 do
35198   IFS=$as_save_IFS
35199   test -z "$as_dir" && as_dir=.
35200     for ac_exec_ext in '' $ac_executable_extensions; do
35201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35202     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35204     break 2
35205   fi
35206 done
35207   done
35208 IFS=$as_save_IFS
35209 
35210   ;;
35211 esac
35212 fi
35213 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35214 if test -n "$TOOLCHAIN_PATH_CXX"; then
35215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35216 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35217 else
35218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35219 $as_echo "no" >&6; }
35220 fi
35221 
35222 
35223 fi
35224 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35225   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35226   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35227 set dummy $SEARCH_LIST; ac_word=$2
35228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35229 $as_echo_n "checking for $ac_word... " >&6; }
35230 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35231   $as_echo_n "(cached) " >&6
35232 else
35233   case $ac_pt_TOOLCHAIN_PATH_CXX in
35234   [\\/]* | ?:[\\/]*)
35235   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35236   ;;
35237   *)
35238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35239 for as_dir in $PATH
35240 do
35241   IFS=$as_save_IFS
35242   test -z "$as_dir" && as_dir=.
35243     for ac_exec_ext in '' $ac_executable_extensions; do
35244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35245     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35247     break 2
35248   fi
35249 done
35250   done
35251 IFS=$as_save_IFS
35252 
35253   ;;
35254 esac
35255 fi
35256 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35257 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35259 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35260 else
35261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35262 $as_echo "no" >&6; }
35263 fi
35264 
35265   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35266     TOOLCHAIN_PATH_CXX=""
35267   else
35268     case $cross_compiling:$ac_tool_warned in
35269 yes:)
35270 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35271 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35272 ac_tool_warned=yes ;;
35273 esac
35274     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35275   fi
35276 else
35277   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35278 fi
35279 
35280       CXX=$TOOLCHAIN_PATH_CXX
35281       PATH="$PATH_save"
35282     fi
35283 
35284     # AC_PATH_TOOL can't be run multiple times with the same variable,
35285     # so create a new name for this run.
35286     if test "x$CXX" = x; then
35287       if test -n "$ac_tool_prefix"; then
35288   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35289 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35291 $as_echo_n "checking for $ac_word... " >&6; }
35292 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35293   $as_echo_n "(cached) " >&6
35294 else
35295   case $POTENTIAL_CXX in
35296   [\\/]* | ?:[\\/]*)
35297   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35298   ;;
35299   *)
35300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35301 for as_dir in $PATH
35302 do
35303   IFS=$as_save_IFS
35304   test -z "$as_dir" && as_dir=.
35305     for ac_exec_ext in '' $ac_executable_extensions; do
35306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35307     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35309     break 2
35310   fi
35311 done
35312   done
35313 IFS=$as_save_IFS
35314 
35315   ;;
35316 esac
35317 fi
35318 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35319 if test -n "$POTENTIAL_CXX"; then
35320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35321 $as_echo "$POTENTIAL_CXX" >&6; }
35322 else
35323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35324 $as_echo "no" >&6; }
35325 fi
35326 
35327 
35328 fi
35329 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35330   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35331   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35332 set dummy $SEARCH_LIST; ac_word=$2
35333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35334 $as_echo_n "checking for $ac_word... " >&6; }
35335 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35336   $as_echo_n "(cached) " >&6
35337 else
35338   case $ac_pt_POTENTIAL_CXX in
35339   [\\/]* | ?:[\\/]*)
35340   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35341   ;;
35342   *)
35343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35344 for as_dir in $PATH
35345 do
35346   IFS=$as_save_IFS
35347   test -z "$as_dir" && as_dir=.
35348     for ac_exec_ext in '' $ac_executable_extensions; do
35349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35350     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35352     break 2
35353   fi
35354 done
35355   done
35356 IFS=$as_save_IFS
35357 
35358   ;;
35359 esac
35360 fi
35361 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35362 if test -n "$ac_pt_POTENTIAL_CXX"; then
35363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35364 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35365 else
35366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35367 $as_echo "no" >&6; }
35368 fi
35369 
35370   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35371     POTENTIAL_CXX=""
35372   else
35373     case $cross_compiling:$ac_tool_warned in
35374 yes:)
35375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35376 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35377 ac_tool_warned=yes ;;
35378 esac
35379     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35380   fi
35381 else
35382   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35383 fi
35384 
35385       CXX=$POTENTIAL_CXX
35386     fi
35387 
35388     if test "x$CXX" = x; then
35389 
35390   # Print a helpful message on how to acquire the necessary build dependency.
35391   # devkit is the help tag: freetype, cups, alsa etc
35392   MISSING_DEPENDENCY=devkit
35393 
35394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35395     cygwin_help $MISSING_DEPENDENCY
35396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35397     msys_help $MISSING_DEPENDENCY
35398   else
35399     PKGHANDLER_COMMAND=
35400 
35401     case $PKGHANDLER in
35402       apt-get)
35403         apt_help     $MISSING_DEPENDENCY ;;
35404       yum)
35405         yum_help     $MISSING_DEPENDENCY ;;
35406       brew)
35407         brew_help    $MISSING_DEPENDENCY ;;
35408       port)
35409         port_help    $MISSING_DEPENDENCY ;;
35410       pkgutil)
35411         pkgutil_help $MISSING_DEPENDENCY ;;
35412       pkgadd)
35413         pkgadd_help  $MISSING_DEPENDENCY ;;
35414     esac
35415 
35416     if test "x$PKGHANDLER_COMMAND" != x; then
35417       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35418     fi
35419   fi
35420 
35421       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35422     fi
35423   fi
35424 
35425   # Now we have a compiler binary in CXX. Make sure it's okay.
35426 
35427   # Only process if variable expands to non-empty
35428 
35429   if test "x$CXX" != x; then
35430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35431 
35432   # First separate the path from the arguments. This will split at the first
35433   # space.
35434   complete="$CXX"
35435   path="${complete%% *}"
35436   tmp="$complete EOL"
35437   arguments="${tmp#* }"
35438 
35439   # Input might be given as Windows format, start by converting to
35440   # unix format.
35441   new_path=`$CYGPATH -u "$path"`
35442 
35443   # Now try to locate executable using which
35444   new_path=`$WHICH "$new_path" 2> /dev/null`
35445   # bat and cmd files are not always considered executable in cygwin causing which
35446   # to not find them
35447   if test "x$new_path" = x \
35448       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35449       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35450     new_path=`$CYGPATH -u "$path"`
35451   fi
35452   if test "x$new_path" = x; then
35453     # Oops. Which didn't find the executable.
35454     # The splitting of arguments from the executable at a space might have been incorrect,
35455     # since paths with space are more likely in Windows. Give it another try with the whole
35456     # argument.
35457     path="$complete"
35458     arguments="EOL"
35459     new_path=`$CYGPATH -u "$path"`
35460     new_path=`$WHICH "$new_path" 2> /dev/null`
35461     # bat and cmd files are not always considered executable in cygwin causing which
35462     # to not find them
35463     if test "x$new_path" = x \
35464         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35465         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35466       new_path=`$CYGPATH -u "$path"`
35467     fi
35468     if test "x$new_path" = x; then
35469       # It's still not found. Now this is an unrecoverable error.
35470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35471 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35472       has_space=`$ECHO "$complete" | $GREP " "`
35473       if test "x$has_space" != x; then
35474         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35475 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35476       fi
35477       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35478     fi
35479   fi
35480 
35481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35484   # "foo.exe" is OK but "foo" is an error.
35485   #
35486   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35487   # It is also a way to make sure we got the proper file name for the real test later on.
35488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35489   if test "x$test_shortpath" = x; then
35490     # Short path failed, file does not exist as specified.
35491     # Try adding .exe or .cmd
35492     if test -f "${new_path}.exe"; then
35493       input_to_shortpath="${new_path}.exe"
35494     elif test -f "${new_path}.cmd"; then
35495       input_to_shortpath="${new_path}.cmd"
35496     else
35497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35498 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35499       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35500 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35501       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35502     fi
35503   else
35504     input_to_shortpath="$new_path"
35505   fi
35506 
35507   # Call helper function which possibly converts this using DOS-style short mode.
35508   # If so, the updated path is stored in $new_path.
35509   new_path="$input_to_shortpath"
35510 
35511   input_path="$input_to_shortpath"
35512   # Check if we need to convert this using DOS-style short mode. If the path
35513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35514   # take no chances and rewrite it.
35515   # Note: m4 eats our [], so we need to use [ and ] instead.
35516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35517   if test "x$has_forbidden_chars" != x; then
35518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35519     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35520     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35521     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35522       # Going to short mode and back again did indeed matter. Since short mode is
35523       # case insensitive, let's make it lowercase to improve readability.
35524       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35525       # Now convert it back to Unix-style (cygpath)
35526       input_path=`$CYGPATH -u "$shortmode_path"`
35527       new_path="$input_path"
35528     fi
35529   fi
35530 
35531   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35532   if test "x$test_cygdrive_prefix" = x; then
35533     # As a simple fix, exclude /usr/bin since it's not a real path.
35534     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35535       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35536       # a path prefixed by /cygdrive for fixpath to work.
35537       new_path="$CYGWIN_ROOT_PATH$input_path"
35538     fi
35539   fi
35540 
35541   # remove trailing .exe if any
35542   new_path="${new_path/%.exe/}"
35543 
35544     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35545 
35546   # First separate the path from the arguments. This will split at the first
35547   # space.
35548   complete="$CXX"
35549   path="${complete%% *}"
35550   tmp="$complete EOL"
35551   arguments="${tmp#* }"
35552 
35553   # Input might be given as Windows format, start by converting to
35554   # unix format.
35555   new_path="$path"
35556 
35557   windows_path="$new_path"
35558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35559     unix_path=`$CYGPATH -u "$windows_path"`
35560     new_path="$unix_path"
35561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35563     new_path="$unix_path"
35564   fi
35565 
35566 
35567   # Now try to locate executable using which
35568   new_path=`$WHICH "$new_path" 2> /dev/null`
35569 
35570   if test "x$new_path" = x; then
35571     # Oops. Which didn't find the executable.
35572     # The splitting of arguments from the executable at a space might have been incorrect,
35573     # since paths with space are more likely in Windows. Give it another try with the whole
35574     # argument.
35575     path="$complete"
35576     arguments="EOL"
35577     new_path="$path"
35578 
35579   windows_path="$new_path"
35580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35581     unix_path=`$CYGPATH -u "$windows_path"`
35582     new_path="$unix_path"
35583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35585     new_path="$unix_path"
35586   fi
35587 
35588 
35589     new_path=`$WHICH "$new_path" 2> /dev/null`
35590     # bat and cmd files are not always considered executable in MSYS causing which
35591     # to not find them
35592     if test "x$new_path" = x \
35593         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35594         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35595       new_path="$path"
35596 
35597   windows_path="$new_path"
35598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35599     unix_path=`$CYGPATH -u "$windows_path"`
35600     new_path="$unix_path"
35601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35603     new_path="$unix_path"
35604   fi
35605 
35606     fi
35607 
35608     if test "x$new_path" = x; then
35609       # It's still not found. Now this is an unrecoverable error.
35610       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35611 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35612       has_space=`$ECHO "$complete" | $GREP " "`
35613       if test "x$has_space" != x; then
35614         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35616       fi
35617       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35618     fi
35619   fi
35620 
35621   # Now new_path has a complete unix path to the binary
35622   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35623     # Keep paths in /bin as-is, but remove trailing .exe if any
35624     new_path="${new_path/%.exe/}"
35625     # Do not save /bin paths to all_fixpath_prefixes!
35626   else
35627     # Not in mixed or Windows style, start by that.
35628     new_path=`cmd //c echo $new_path`
35629 
35630   input_path="$new_path"
35631   # Check if we need to convert this using DOS-style short mode. If the path
35632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35633   # take no chances and rewrite it.
35634   # Note: m4 eats our [], so we need to use [ and ] instead.
35635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35636   if test "x$has_forbidden_chars" != x; then
35637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35638     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35639   fi
35640 
35641     # Output is in $new_path
35642 
35643   windows_path="$new_path"
35644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35645     unix_path=`$CYGPATH -u "$windows_path"`
35646     new_path="$unix_path"
35647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35649     new_path="$unix_path"
35650   fi
35651 
35652     # remove trailing .exe if any
35653     new_path="${new_path/%.exe/}"
35654 
35655     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35656     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35657   fi
35658 
35659     else
35660       # We're on a unix platform. Hooray! :)
35661       # First separate the path from the arguments. This will split at the first
35662       # space.
35663       complete="$CXX"
35664       path="${complete%% *}"
35665       tmp="$complete EOL"
35666       arguments="${tmp#* }"
35667 
35668       # Cannot rely on the command "which" here since it doesn't always work.
35669       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35670       if test -z "$is_absolute_path"; then
35671         # Path to executable is not absolute. Find it.
35672         IFS_save="$IFS"
35673         IFS=:
35674         for p in $PATH; do
35675           if test -f "$p/$path" && test -x "$p/$path"; then
35676             new_path="$p/$path"
35677             break
35678           fi
35679         done
35680         IFS="$IFS_save"
35681       else
35682         # This is an absolute path, we can use it without further modifications.
35683         new_path="$path"
35684       fi
35685 
35686       if test "x$new_path" = x; then
35687         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35688 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35689         has_space=`$ECHO "$complete" | $GREP " "`
35690         if test "x$has_space" != x; then
35691           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35692 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35693         fi
35694         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35695       fi
35696     fi
35697 
35698     # Now join together the path and the arguments once again
35699     if test "x$arguments" != xEOL; then
35700       new_complete="$new_path ${arguments% *}"
35701     else
35702       new_complete="$new_path"
35703     fi
35704 
35705     if test "x$complete" != "x$new_complete"; then
35706       CXX="$new_complete"
35707       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35708 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35709     fi
35710   fi
35711 
35712   TEST_COMPILER="$CXX"
35713 
35714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35715 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35716   SYMLINK_ORIGINAL="$TEST_COMPILER"
35717 
35718   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35719     # Follow a chain of symbolic links. Use readlink
35720     # where it exists, else fall back to horribly
35721     # complicated shell code.
35722     if test "x$READLINK_TESTED" != yes; then
35723       # On MacOSX there is a readlink tool with a different
35724       # purpose than the GNU readlink tool. Check the found readlink.
35725       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35726       if test "x$ISGNU" = x; then
35727         # A readlink that we do not know how to use.
35728         # Are there other non-GNU readlinks out there?
35729         READLINK_TESTED=yes
35730         READLINK=
35731       fi
35732     fi
35733 
35734     if test "x$READLINK" != x; then
35735       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35736     else
35737       # Save the current directory for restoring afterwards
35738       STARTDIR=$PWD
35739       COUNTER=0
35740       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35741       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35742       cd $sym_link_dir
35743       # Use -P flag to resolve symlinks in directories.
35744       cd `$THEPWDCMD -P`
35745       sym_link_dir=`$THEPWDCMD -P`
35746       # Resolve file symlinks
35747       while test $COUNTER -lt 20; do
35748         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35749         if test "x$ISLINK" == x; then
35750           # This is not a symbolic link! We are done!
35751           break
35752         fi
35753         # Again resolve directory symlinks since the target of the just found
35754         # link could be in a different directory
35755         cd `$DIRNAME $ISLINK`
35756         sym_link_dir=`$THEPWDCMD -P`
35757         sym_link_file=`$BASENAME $ISLINK`
35758         let COUNTER=COUNTER+1
35759       done
35760       cd $STARTDIR
35761       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35762     fi
35763   fi
35764 
35765   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35766     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35767 $as_echo "no symlink" >&6; }
35768   else
35769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35770 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35771 
35772     # We can't handle ccache by gcc wrappers, since we need to know if we're
35773     # using ccache. Instead ccache usage must be controlled by a configure option.
35774     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35775     if test "x$COMPILER_BASENAME" = "xccache"; then
35776       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35777 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35778       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35779     fi
35780   fi
35781 
35782 
35783   COMPILER=$CXX
35784   COMPILER_NAME=$COMPILER_NAME
35785 
35786   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35787     # cc -V output typically looks like
35788     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35789     # or
35790     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35791     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35792     # Check that this is likely to be the Solaris Studio cc.
35793     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35794     if test $? -ne 0; then
35795       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35796       { $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
35797 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35798       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35799 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35800       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35801 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35802       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35803     fi
35804     # Remove usage instructions (if present), and
35805     # collapse compiler output into a single line
35806     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35807         $SED -e 's/ *[Uu]sage:.*//'`
35808     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35809         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35810   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35811     # xlc -qversion output typically looks like
35812     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35813     #     Version: 11.01.0000.0015
35814     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35815     # Check that this is likely to be the IBM XL C compiler.
35816     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35817     if test $? -ne 0; then
35818       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35819       { $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
35820 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35821       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35822 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35823       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35824 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35825       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35826     fi
35827     # Collapse compiler output into a single line
35828     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35829     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35830         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35831   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35832     # There is no specific version flag, but all output starts with a version string.
35833     # First line typically looks something like:
35834     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35835     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35836     # Check that this is likely to be Microsoft CL.EXE.
35837     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35838     if test $? -ne 0; then
35839       { $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
35840 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35841       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35842 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35843       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35844     fi
35845     # Collapse compiler output into a single line
35846     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35847     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35848         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35849   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35850     # gcc --version output typically looks like
35851     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35852     #     Copyright (C) 2013 Free Software Foundation, Inc.
35853     #     This is free software; see the source for copying conditions.  There is NO
35854     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35855     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35856     # Check that this is likely to be GCC.
35857     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35858     if test $? -ne 0; then
35859       { $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
35860 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35861       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35862 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35863       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35864     fi
35865     # Remove Copyright and legalese from version string, and
35866     # collapse into a single line
35867     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35868         $SED -e 's/ *Copyright .*//'`
35869     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35870         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35871   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35872     # clang --version output typically looks like
35873     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35874     #    clang version 3.3 (tags/RELEASE_33/final)
35875     # or
35876     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35877     #    Target: x86_64-pc-linux-gnu
35878     #    Thread model: posix
35879     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35880     # Check that this is likely to be clang
35881     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35882     if test $? -ne 0; then
35883       { $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
35884 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35885       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35886 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35887       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35888     fi
35889     # Collapse compiler output into a single line
35890     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35891     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35892         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35893   else
35894       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35895   fi
35896   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35897   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35898   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35899   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35900 
35901   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35902 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35903 
35904 
35905   # Now that we have resolved CXX ourself, let autoconf have its go at it
35906   ac_ext=cpp
35907 ac_cpp='$CXXCPP $CPPFLAGS'
35908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35911 if test -z "$CXX"; then
35912   if test -n "$CCC"; then
35913     CXX=$CCC
35914   else
35915     if test -n "$ac_tool_prefix"; then
35916   for ac_prog in $CXX
35917   do
35918     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35919 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35921 $as_echo_n "checking for $ac_word... " >&6; }
35922 if ${ac_cv_prog_CXX+:} false; then :
35923   $as_echo_n "(cached) " >&6
35924 else
35925   if test -n "$CXX"; then
35926   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35927 else
35928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35929 for as_dir in $PATH
35930 do
35931   IFS=$as_save_IFS
35932   test -z "$as_dir" && as_dir=.
35933     for ac_exec_ext in '' $ac_executable_extensions; do
35934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35935     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35937     break 2
35938   fi
35939 done
35940   done
35941 IFS=$as_save_IFS
35942 
35943 fi
35944 fi
35945 CXX=$ac_cv_prog_CXX
35946 if test -n "$CXX"; then
35947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35948 $as_echo "$CXX" >&6; }
35949 else
35950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35951 $as_echo "no" >&6; }
35952 fi
35953 
35954 
35955     test -n "$CXX" && break
35956   done
35957 fi
35958 if test -z "$CXX"; then
35959   ac_ct_CXX=$CXX
35960   for ac_prog in $CXX
35961 do
35962   # Extract the first word of "$ac_prog", so it can be a program name with args.
35963 set dummy $ac_prog; ac_word=$2
35964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35965 $as_echo_n "checking for $ac_word... " >&6; }
35966 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35967   $as_echo_n "(cached) " >&6
35968 else
35969   if test -n "$ac_ct_CXX"; then
35970   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35971 else
35972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35973 for as_dir in $PATH
35974 do
35975   IFS=$as_save_IFS
35976   test -z "$as_dir" && as_dir=.
35977     for ac_exec_ext in '' $ac_executable_extensions; do
35978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35979     ac_cv_prog_ac_ct_CXX="$ac_prog"
35980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35981     break 2
35982   fi
35983 done
35984   done
35985 IFS=$as_save_IFS
35986 
35987 fi
35988 fi
35989 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35990 if test -n "$ac_ct_CXX"; then
35991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35992 $as_echo "$ac_ct_CXX" >&6; }
35993 else
35994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35995 $as_echo "no" >&6; }
35996 fi
35997 
35998 
35999   test -n "$ac_ct_CXX" && break
36000 done
36001 
36002   if test "x$ac_ct_CXX" = x; then
36003     CXX="g++"
36004   else
36005     case $cross_compiling:$ac_tool_warned in
36006 yes:)
36007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36008 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36009 ac_tool_warned=yes ;;
36010 esac
36011     CXX=$ac_ct_CXX
36012   fi
36013 fi
36014 
36015   fi
36016 fi
36017 # Provide some information about the compiler.
36018 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36019 set X $ac_compile
36020 ac_compiler=$2
36021 for ac_option in --version -v -V -qversion; do
36022   { { ac_try="$ac_compiler $ac_option >&5"
36023 case "(($ac_try" in
36024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36025   *) ac_try_echo=$ac_try;;
36026 esac
36027 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36028 $as_echo "$ac_try_echo"; } >&5
36029   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36030   ac_status=$?
36031   if test -s conftest.err; then
36032     sed '10a\
36033 ... rest of stderr output deleted ...
36034          10q' conftest.err >conftest.er1
36035     cat conftest.er1 >&5
36036   fi
36037   rm -f conftest.er1 conftest.err
36038   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36039   test $ac_status = 0; }
36040 done
36041 
36042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36043 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36044 if ${ac_cv_cxx_compiler_gnu+:} false; then :
36045   $as_echo_n "(cached) " >&6
36046 else
36047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36048 /* end confdefs.h.  */
36049 
36050 int
36051 main ()
36052 {
36053 #ifndef __GNUC__
36054        choke me
36055 #endif
36056 
36057   ;
36058   return 0;
36059 }
36060 _ACEOF
36061 if ac_fn_cxx_try_compile "$LINENO"; then :
36062   ac_compiler_gnu=yes
36063 else
36064   ac_compiler_gnu=no
36065 fi
36066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36067 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36068 
36069 fi
36070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36071 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36072 if test $ac_compiler_gnu = yes; then
36073   GXX=yes
36074 else
36075   GXX=
36076 fi
36077 ac_test_CXXFLAGS=${CXXFLAGS+set}
36078 ac_save_CXXFLAGS=$CXXFLAGS
36079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36080 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36081 if ${ac_cv_prog_cxx_g+:} false; then :
36082   $as_echo_n "(cached) " >&6
36083 else
36084   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36085    ac_cxx_werror_flag=yes
36086    ac_cv_prog_cxx_g=no
36087    CXXFLAGS="-g"
36088    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36089 /* end confdefs.h.  */
36090 
36091 int
36092 main ()
36093 {
36094 
36095   ;
36096   return 0;
36097 }
36098 _ACEOF
36099 if ac_fn_cxx_try_compile "$LINENO"; then :
36100   ac_cv_prog_cxx_g=yes
36101 else
36102   CXXFLAGS=""
36103       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36104 /* end confdefs.h.  */
36105 
36106 int
36107 main ()
36108 {
36109 
36110   ;
36111   return 0;
36112 }
36113 _ACEOF
36114 if ac_fn_cxx_try_compile "$LINENO"; then :
36115 
36116 else
36117   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36118          CXXFLAGS="-g"
36119          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36120 /* end confdefs.h.  */
36121 
36122 int
36123 main ()
36124 {
36125 
36126   ;
36127   return 0;
36128 }
36129 _ACEOF
36130 if ac_fn_cxx_try_compile "$LINENO"; then :
36131   ac_cv_prog_cxx_g=yes
36132 fi
36133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36134 fi
36135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36136 fi
36137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36138    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36139 fi
36140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36141 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36142 if test "$ac_test_CXXFLAGS" = set; then
36143   CXXFLAGS=$ac_save_CXXFLAGS
36144 elif test $ac_cv_prog_cxx_g = yes; then
36145   if test "$GXX" = yes; then
36146     CXXFLAGS="-g -O2"
36147   else
36148     CXXFLAGS="-g"
36149   fi
36150 else
36151   if test "$GXX" = yes; then
36152     CXXFLAGS="-O2"
36153   else
36154     CXXFLAGS=
36155   fi
36156 fi
36157 ac_ext=cpp
36158 ac_cpp='$CXXCPP $CPPFLAGS'
36159 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36160 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36161 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36162 
36163 
36164   # This is the compiler version number on the form X.Y[.Z]
36165 
36166 
36167 
36168 
36169   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36170     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36171 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36172     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36173 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36174   fi
36175 
36176   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36177   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36178     { $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
36179 $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;}
36180   fi
36181 
36182   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36183     { $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
36184 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36185   fi
36186 
36187   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36188 
36189 
36190   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36191 
36192 
36193 
36194 
36195 
36196 
36197 
36198 
36199 
36200 
36201 
36202 
36203 
36204 
36205 
36206 
36207 
36208 
36209 
36210 
36211 
36212 
36213 
36214 
36215 
36216 
36217 
36218 
36219 
36220 
36221 
36222 
36223 
36224 
36225 
36226 
36227 
36228 
36229 
36230 
36231 
36232 
36233 
36234 
36235 
36236 
36237 
36238 
36239 
36240     # Execute function body
36241 
36242   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36243   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36244 
36245   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36246     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36247   fi
36248 
36249   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36250     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36251   fi
36252 
36253   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36254   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36255 
36256   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36257     :
36258 
36259   else
36260     :
36261 
36262           { $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
36263 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36264 
36265 
36266   fi
36267 
36268 
36269 
36270 
36271 
36272 
36273 
36274 
36275 
36276 
36277 
36278 
36279 
36280 
36281   fi
36282 
36283   #
36284   # Setup the preprocessor (CPP and CXXCPP)
36285   #
36286   ac_ext=c
36287 ac_cpp='$CPP $CPPFLAGS'
36288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36292 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36293 # On Suns, sometimes $CPP names a directory.
36294 if test -n "$CPP" && test -d "$CPP"; then
36295   CPP=
36296 fi
36297 if test -z "$CPP"; then
36298   if ${ac_cv_prog_CPP+:} false; then :
36299   $as_echo_n "(cached) " >&6
36300 else
36301       # Double quotes because CPP needs to be expanded
36302     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36303     do
36304       ac_preproc_ok=false
36305 for ac_c_preproc_warn_flag in '' yes
36306 do
36307   # Use a header file that comes with gcc, so configuring glibc
36308   # with a fresh cross-compiler works.
36309   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36310   # <limits.h> exists even on freestanding compilers.
36311   # On the NeXT, cc -E runs the code through the compiler's parser,
36312   # not just through cpp. "Syntax error" is here to catch this case.
36313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36314 /* end confdefs.h.  */
36315 #ifdef __STDC__
36316 # include <limits.h>
36317 #else
36318 # include <assert.h>
36319 #endif
36320                      Syntax error
36321 _ACEOF
36322 if ac_fn_c_try_cpp "$LINENO"; then :
36323 
36324 else
36325   # Broken: fails on valid input.
36326 continue
36327 fi
36328 rm -f conftest.err conftest.i conftest.$ac_ext
36329 
36330   # OK, works on sane cases.  Now check whether nonexistent headers
36331   # can be detected and how.
36332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36333 /* end confdefs.h.  */
36334 #include <ac_nonexistent.h>
36335 _ACEOF
36336 if ac_fn_c_try_cpp "$LINENO"; then :
36337   # Broken: success on invalid input.
36338 continue
36339 else
36340   # Passes both tests.
36341 ac_preproc_ok=:
36342 break
36343 fi
36344 rm -f conftest.err conftest.i conftest.$ac_ext
36345 
36346 done
36347 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36348 rm -f conftest.i conftest.err conftest.$ac_ext
36349 if $ac_preproc_ok; then :
36350   break
36351 fi
36352 
36353     done
36354     ac_cv_prog_CPP=$CPP
36355 
36356 fi
36357   CPP=$ac_cv_prog_CPP
36358 else
36359   ac_cv_prog_CPP=$CPP
36360 fi
36361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36362 $as_echo "$CPP" >&6; }
36363 ac_preproc_ok=false
36364 for ac_c_preproc_warn_flag in '' yes
36365 do
36366   # Use a header file that comes with gcc, so configuring glibc
36367   # with a fresh cross-compiler works.
36368   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36369   # <limits.h> exists even on freestanding compilers.
36370   # On the NeXT, cc -E runs the code through the compiler's parser,
36371   # not just through cpp. "Syntax error" is here to catch this case.
36372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36373 /* end confdefs.h.  */
36374 #ifdef __STDC__
36375 # include <limits.h>
36376 #else
36377 # include <assert.h>
36378 #endif
36379                      Syntax error
36380 _ACEOF
36381 if ac_fn_c_try_cpp "$LINENO"; then :
36382 
36383 else
36384   # Broken: fails on valid input.
36385 continue
36386 fi
36387 rm -f conftest.err conftest.i conftest.$ac_ext
36388 
36389   # OK, works on sane cases.  Now check whether nonexistent headers
36390   # can be detected and how.
36391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36392 /* end confdefs.h.  */
36393 #include <ac_nonexistent.h>
36394 _ACEOF
36395 if ac_fn_c_try_cpp "$LINENO"; then :
36396   # Broken: success on invalid input.
36397 continue
36398 else
36399   # Passes both tests.
36400 ac_preproc_ok=:
36401 break
36402 fi
36403 rm -f conftest.err conftest.i conftest.$ac_ext
36404 
36405 done
36406 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36407 rm -f conftest.i conftest.err conftest.$ac_ext
36408 if $ac_preproc_ok; then :
36409 
36410 else
36411   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36412 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36413 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36414 See \`config.log' for more details" "$LINENO" 5; }
36415 fi
36416 
36417 ac_ext=cpp
36418 ac_cpp='$CXXCPP $CPPFLAGS'
36419 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36420 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36421 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36422 
36423 
36424   # Only process if variable expands to non-empty
36425 
36426   if test "x$CPP" != x; then
36427     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36428 
36429   # First separate the path from the arguments. This will split at the first
36430   # space.
36431   complete="$CPP"
36432   path="${complete%% *}"
36433   tmp="$complete EOL"
36434   arguments="${tmp#* }"
36435 
36436   # Input might be given as Windows format, start by converting to
36437   # unix format.
36438   new_path=`$CYGPATH -u "$path"`
36439 
36440   # Now try to locate executable using which
36441   new_path=`$WHICH "$new_path" 2> /dev/null`
36442   # bat and cmd files are not always considered executable in cygwin causing which
36443   # to not find them
36444   if test "x$new_path" = x \
36445       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36446       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36447     new_path=`$CYGPATH -u "$path"`
36448   fi
36449   if test "x$new_path" = x; then
36450     # Oops. Which didn't find the executable.
36451     # The splitting of arguments from the executable at a space might have been incorrect,
36452     # since paths with space are more likely in Windows. Give it another try with the whole
36453     # argument.
36454     path="$complete"
36455     arguments="EOL"
36456     new_path=`$CYGPATH -u "$path"`
36457     new_path=`$WHICH "$new_path" 2> /dev/null`
36458     # bat and cmd files are not always considered executable in cygwin causing which
36459     # to not find them
36460     if test "x$new_path" = x \
36461         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36462         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36463       new_path=`$CYGPATH -u "$path"`
36464     fi
36465     if test "x$new_path" = x; then
36466       # It's still not found. Now this is an unrecoverable error.
36467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36468 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36469       has_space=`$ECHO "$complete" | $GREP " "`
36470       if test "x$has_space" != x; then
36471         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36472 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36473       fi
36474       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36475     fi
36476   fi
36477 
36478   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36479   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36480   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36481   # "foo.exe" is OK but "foo" is an error.
36482   #
36483   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36484   # It is also a way to make sure we got the proper file name for the real test later on.
36485   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36486   if test "x$test_shortpath" = x; then
36487     # Short path failed, file does not exist as specified.
36488     # Try adding .exe or .cmd
36489     if test -f "${new_path}.exe"; then
36490       input_to_shortpath="${new_path}.exe"
36491     elif test -f "${new_path}.cmd"; then
36492       input_to_shortpath="${new_path}.cmd"
36493     else
36494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36495 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36496       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36497 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36498       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36499     fi
36500   else
36501     input_to_shortpath="$new_path"
36502   fi
36503 
36504   # Call helper function which possibly converts this using DOS-style short mode.
36505   # If so, the updated path is stored in $new_path.
36506   new_path="$input_to_shortpath"
36507 
36508   input_path="$input_to_shortpath"
36509   # Check if we need to convert this using DOS-style short mode. If the path
36510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36511   # take no chances and rewrite it.
36512   # Note: m4 eats our [], so we need to use [ and ] instead.
36513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36514   if test "x$has_forbidden_chars" != x; then
36515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36516     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36517     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36518     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36519       # Going to short mode and back again did indeed matter. Since short mode is
36520       # case insensitive, let's make it lowercase to improve readability.
36521       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36522       # Now convert it back to Unix-style (cygpath)
36523       input_path=`$CYGPATH -u "$shortmode_path"`
36524       new_path="$input_path"
36525     fi
36526   fi
36527 
36528   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36529   if test "x$test_cygdrive_prefix" = x; then
36530     # As a simple fix, exclude /usr/bin since it's not a real path.
36531     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36532       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36533       # a path prefixed by /cygdrive for fixpath to work.
36534       new_path="$CYGWIN_ROOT_PATH$input_path"
36535     fi
36536   fi
36537 
36538   # remove trailing .exe if any
36539   new_path="${new_path/%.exe/}"
36540 
36541     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36542 
36543   # First separate the path from the arguments. This will split at the first
36544   # space.
36545   complete="$CPP"
36546   path="${complete%% *}"
36547   tmp="$complete EOL"
36548   arguments="${tmp#* }"
36549 
36550   # Input might be given as Windows format, start by converting to
36551   # unix format.
36552   new_path="$path"
36553 
36554   windows_path="$new_path"
36555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36556     unix_path=`$CYGPATH -u "$windows_path"`
36557     new_path="$unix_path"
36558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36560     new_path="$unix_path"
36561   fi
36562 
36563 
36564   # Now try to locate executable using which
36565   new_path=`$WHICH "$new_path" 2> /dev/null`
36566 
36567   if test "x$new_path" = x; then
36568     # Oops. Which didn't find the executable.
36569     # The splitting of arguments from the executable at a space might have been incorrect,
36570     # since paths with space are more likely in Windows. Give it another try with the whole
36571     # argument.
36572     path="$complete"
36573     arguments="EOL"
36574     new_path="$path"
36575 
36576   windows_path="$new_path"
36577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578     unix_path=`$CYGPATH -u "$windows_path"`
36579     new_path="$unix_path"
36580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36582     new_path="$unix_path"
36583   fi
36584 
36585 
36586     new_path=`$WHICH "$new_path" 2> /dev/null`
36587     # bat and cmd files are not always considered executable in MSYS causing which
36588     # to not find them
36589     if test "x$new_path" = x \
36590         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36591         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36592       new_path="$path"
36593 
36594   windows_path="$new_path"
36595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36596     unix_path=`$CYGPATH -u "$windows_path"`
36597     new_path="$unix_path"
36598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36600     new_path="$unix_path"
36601   fi
36602 
36603     fi
36604 
36605     if test "x$new_path" = x; then
36606       # It's still not found. Now this is an unrecoverable error.
36607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36608 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36609       has_space=`$ECHO "$complete" | $GREP " "`
36610       if test "x$has_space" != x; then
36611         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36612 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36613       fi
36614       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36615     fi
36616   fi
36617 
36618   # Now new_path has a complete unix path to the binary
36619   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36620     # Keep paths in /bin as-is, but remove trailing .exe if any
36621     new_path="${new_path/%.exe/}"
36622     # Do not save /bin paths to all_fixpath_prefixes!
36623   else
36624     # Not in mixed or Windows style, start by that.
36625     new_path=`cmd //c echo $new_path`
36626 
36627   input_path="$new_path"
36628   # Check if we need to convert this using DOS-style short mode. If the path
36629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36630   # take no chances and rewrite it.
36631   # Note: m4 eats our [], so we need to use [ and ] instead.
36632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36633   if test "x$has_forbidden_chars" != x; then
36634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36636   fi
36637 
36638     # Output is in $new_path
36639 
36640   windows_path="$new_path"
36641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36642     unix_path=`$CYGPATH -u "$windows_path"`
36643     new_path="$unix_path"
36644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36646     new_path="$unix_path"
36647   fi
36648 
36649     # remove trailing .exe if any
36650     new_path="${new_path/%.exe/}"
36651 
36652     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36653     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36654   fi
36655 
36656     else
36657       # We're on a unix platform. Hooray! :)
36658       # First separate the path from the arguments. This will split at the first
36659       # space.
36660       complete="$CPP"
36661       path="${complete%% *}"
36662       tmp="$complete EOL"
36663       arguments="${tmp#* }"
36664 
36665       # Cannot rely on the command "which" here since it doesn't always work.
36666       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36667       if test -z "$is_absolute_path"; then
36668         # Path to executable is not absolute. Find it.
36669         IFS_save="$IFS"
36670         IFS=:
36671         for p in $PATH; do
36672           if test -f "$p/$path" && test -x "$p/$path"; then
36673             new_path="$p/$path"
36674             break
36675           fi
36676         done
36677         IFS="$IFS_save"
36678       else
36679         # This is an absolute path, we can use it without further modifications.
36680         new_path="$path"
36681       fi
36682 
36683       if test "x$new_path" = x; then
36684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36685 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36686         has_space=`$ECHO "$complete" | $GREP " "`
36687         if test "x$has_space" != x; then
36688           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36689 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36690         fi
36691         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36692       fi
36693     fi
36694 
36695     # Now join together the path and the arguments once again
36696     if test "x$arguments" != xEOL; then
36697       new_complete="$new_path ${arguments% *}"
36698     else
36699       new_complete="$new_path"
36700     fi
36701 
36702     if test "x$complete" != "x$new_complete"; then
36703       CPP="$new_complete"
36704       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36705 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36706     fi
36707   fi
36708 
36709   ac_ext=cpp
36710 ac_cpp='$CXXCPP $CPPFLAGS'
36711 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36712 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36713 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36715 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36716 if test -z "$CXXCPP"; then
36717   if ${ac_cv_prog_CXXCPP+:} false; then :
36718   $as_echo_n "(cached) " >&6
36719 else
36720       # Double quotes because CXXCPP needs to be expanded
36721     for CXXCPP in "$CXX -E" "/lib/cpp"
36722     do
36723       ac_preproc_ok=false
36724 for ac_cxx_preproc_warn_flag in '' yes
36725 do
36726   # Use a header file that comes with gcc, so configuring glibc
36727   # with a fresh cross-compiler works.
36728   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36729   # <limits.h> exists even on freestanding compilers.
36730   # On the NeXT, cc -E runs the code through the compiler's parser,
36731   # not just through cpp. "Syntax error" is here to catch this case.
36732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36733 /* end confdefs.h.  */
36734 #ifdef __STDC__
36735 # include <limits.h>
36736 #else
36737 # include <assert.h>
36738 #endif
36739                      Syntax error
36740 _ACEOF
36741 if ac_fn_cxx_try_cpp "$LINENO"; then :
36742 
36743 else
36744   # Broken: fails on valid input.
36745 continue
36746 fi
36747 rm -f conftest.err conftest.i conftest.$ac_ext
36748 
36749   # OK, works on sane cases.  Now check whether nonexistent headers
36750   # can be detected and how.
36751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36752 /* end confdefs.h.  */
36753 #include <ac_nonexistent.h>
36754 _ACEOF
36755 if ac_fn_cxx_try_cpp "$LINENO"; then :
36756   # Broken: success on invalid input.
36757 continue
36758 else
36759   # Passes both tests.
36760 ac_preproc_ok=:
36761 break
36762 fi
36763 rm -f conftest.err conftest.i conftest.$ac_ext
36764 
36765 done
36766 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36767 rm -f conftest.i conftest.err conftest.$ac_ext
36768 if $ac_preproc_ok; then :
36769   break
36770 fi
36771 
36772     done
36773     ac_cv_prog_CXXCPP=$CXXCPP
36774 
36775 fi
36776   CXXCPP=$ac_cv_prog_CXXCPP
36777 else
36778   ac_cv_prog_CXXCPP=$CXXCPP
36779 fi
36780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36781 $as_echo "$CXXCPP" >&6; }
36782 ac_preproc_ok=false
36783 for ac_cxx_preproc_warn_flag in '' yes
36784 do
36785   # Use a header file that comes with gcc, so configuring glibc
36786   # with a fresh cross-compiler works.
36787   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36788   # <limits.h> exists even on freestanding compilers.
36789   # On the NeXT, cc -E runs the code through the compiler's parser,
36790   # not just through cpp. "Syntax error" is here to catch this case.
36791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36792 /* end confdefs.h.  */
36793 #ifdef __STDC__
36794 # include <limits.h>
36795 #else
36796 # include <assert.h>
36797 #endif
36798                      Syntax error
36799 _ACEOF
36800 if ac_fn_cxx_try_cpp "$LINENO"; then :
36801 
36802 else
36803   # Broken: fails on valid input.
36804 continue
36805 fi
36806 rm -f conftest.err conftest.i conftest.$ac_ext
36807 
36808   # OK, works on sane cases.  Now check whether nonexistent headers
36809   # can be detected and how.
36810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36811 /* end confdefs.h.  */
36812 #include <ac_nonexistent.h>
36813 _ACEOF
36814 if ac_fn_cxx_try_cpp "$LINENO"; then :
36815   # Broken: success on invalid input.
36816 continue
36817 else
36818   # Passes both tests.
36819 ac_preproc_ok=:
36820 break
36821 fi
36822 rm -f conftest.err conftest.i conftest.$ac_ext
36823 
36824 done
36825 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36826 rm -f conftest.i conftest.err conftest.$ac_ext
36827 if $ac_preproc_ok; then :
36828 
36829 else
36830   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36832 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36833 See \`config.log' for more details" "$LINENO" 5; }
36834 fi
36835 
36836 ac_ext=cpp
36837 ac_cpp='$CXXCPP $CPPFLAGS'
36838 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36839 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36840 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36841 
36842 
36843   # Only process if variable expands to non-empty
36844 
36845   if test "x$CXXCPP" != x; then
36846     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36847 
36848   # First separate the path from the arguments. This will split at the first
36849   # space.
36850   complete="$CXXCPP"
36851   path="${complete%% *}"
36852   tmp="$complete EOL"
36853   arguments="${tmp#* }"
36854 
36855   # Input might be given as Windows format, start by converting to
36856   # unix format.
36857   new_path=`$CYGPATH -u "$path"`
36858 
36859   # Now try to locate executable using which
36860   new_path=`$WHICH "$new_path" 2> /dev/null`
36861   # bat and cmd files are not always considered executable in cygwin causing which
36862   # to not find them
36863   if test "x$new_path" = x \
36864       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36865       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36866     new_path=`$CYGPATH -u "$path"`
36867   fi
36868   if test "x$new_path" = x; then
36869     # Oops. Which didn't find the executable.
36870     # The splitting of arguments from the executable at a space might have been incorrect,
36871     # since paths with space are more likely in Windows. Give it another try with the whole
36872     # argument.
36873     path="$complete"
36874     arguments="EOL"
36875     new_path=`$CYGPATH -u "$path"`
36876     new_path=`$WHICH "$new_path" 2> /dev/null`
36877     # bat and cmd files are not always considered executable in cygwin causing which
36878     # to not find them
36879     if test "x$new_path" = x \
36880         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36881         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36882       new_path=`$CYGPATH -u "$path"`
36883     fi
36884     if test "x$new_path" = x; then
36885       # It's still not found. Now this is an unrecoverable error.
36886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36887 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36888       has_space=`$ECHO "$complete" | $GREP " "`
36889       if test "x$has_space" != x; then
36890         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36892       fi
36893       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36894     fi
36895   fi
36896 
36897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36900   # "foo.exe" is OK but "foo" is an error.
36901   #
36902   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36903   # It is also a way to make sure we got the proper file name for the real test later on.
36904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36905   if test "x$test_shortpath" = x; then
36906     # Short path failed, file does not exist as specified.
36907     # Try adding .exe or .cmd
36908     if test -f "${new_path}.exe"; then
36909       input_to_shortpath="${new_path}.exe"
36910     elif test -f "${new_path}.cmd"; then
36911       input_to_shortpath="${new_path}.cmd"
36912     else
36913       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36914 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36915       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36916 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36917       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36918     fi
36919   else
36920     input_to_shortpath="$new_path"
36921   fi
36922 
36923   # Call helper function which possibly converts this using DOS-style short mode.
36924   # If so, the updated path is stored in $new_path.
36925   new_path="$input_to_shortpath"
36926 
36927   input_path="$input_to_shortpath"
36928   # Check if we need to convert this using DOS-style short mode. If the path
36929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36930   # take no chances and rewrite it.
36931   # Note: m4 eats our [], so we need to use [ and ] instead.
36932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36933   if test "x$has_forbidden_chars" != x; then
36934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36935     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36936     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36937     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36938       # Going to short mode and back again did indeed matter. Since short mode is
36939       # case insensitive, let's make it lowercase to improve readability.
36940       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36941       # Now convert it back to Unix-style (cygpath)
36942       input_path=`$CYGPATH -u "$shortmode_path"`
36943       new_path="$input_path"
36944     fi
36945   fi
36946 
36947   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36948   if test "x$test_cygdrive_prefix" = x; then
36949     # As a simple fix, exclude /usr/bin since it's not a real path.
36950     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36951       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36952       # a path prefixed by /cygdrive for fixpath to work.
36953       new_path="$CYGWIN_ROOT_PATH$input_path"
36954     fi
36955   fi
36956 
36957   # remove trailing .exe if any
36958   new_path="${new_path/%.exe/}"
36959 
36960     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36961 
36962   # First separate the path from the arguments. This will split at the first
36963   # space.
36964   complete="$CXXCPP"
36965   path="${complete%% *}"
36966   tmp="$complete EOL"
36967   arguments="${tmp#* }"
36968 
36969   # Input might be given as Windows format, start by converting to
36970   # unix format.
36971   new_path="$path"
36972 
36973   windows_path="$new_path"
36974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36975     unix_path=`$CYGPATH -u "$windows_path"`
36976     new_path="$unix_path"
36977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36979     new_path="$unix_path"
36980   fi
36981 
36982 
36983   # Now try to locate executable using which
36984   new_path=`$WHICH "$new_path" 2> /dev/null`
36985 
36986   if test "x$new_path" = x; then
36987     # Oops. Which didn't find the executable.
36988     # The splitting of arguments from the executable at a space might have been incorrect,
36989     # since paths with space are more likely in Windows. Give it another try with the whole
36990     # argument.
36991     path="$complete"
36992     arguments="EOL"
36993     new_path="$path"
36994 
36995   windows_path="$new_path"
36996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36997     unix_path=`$CYGPATH -u "$windows_path"`
36998     new_path="$unix_path"
36999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37001     new_path="$unix_path"
37002   fi
37003 
37004 
37005     new_path=`$WHICH "$new_path" 2> /dev/null`
37006     # bat and cmd files are not always considered executable in MSYS causing which
37007     # to not find them
37008     if test "x$new_path" = x \
37009         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37010         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37011       new_path="$path"
37012 
37013   windows_path="$new_path"
37014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37015     unix_path=`$CYGPATH -u "$windows_path"`
37016     new_path="$unix_path"
37017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37019     new_path="$unix_path"
37020   fi
37021 
37022     fi
37023 
37024     if test "x$new_path" = x; then
37025       # It's still not found. Now this is an unrecoverable error.
37026       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37027 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37028       has_space=`$ECHO "$complete" | $GREP " "`
37029       if test "x$has_space" != x; then
37030         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37031 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37032       fi
37033       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37034     fi
37035   fi
37036 
37037   # Now new_path has a complete unix path to the binary
37038   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37039     # Keep paths in /bin as-is, but remove trailing .exe if any
37040     new_path="${new_path/%.exe/}"
37041     # Do not save /bin paths to all_fixpath_prefixes!
37042   else
37043     # Not in mixed or Windows style, start by that.
37044     new_path=`cmd //c echo $new_path`
37045 
37046   input_path="$new_path"
37047   # Check if we need to convert this using DOS-style short mode. If the path
37048   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37049   # take no chances and rewrite it.
37050   # Note: m4 eats our [], so we need to use [ and ] instead.
37051   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37052   if test "x$has_forbidden_chars" != x; then
37053     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37054     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37055   fi
37056 
37057     # Output is in $new_path
37058 
37059   windows_path="$new_path"
37060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37061     unix_path=`$CYGPATH -u "$windows_path"`
37062     new_path="$unix_path"
37063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37065     new_path="$unix_path"
37066   fi
37067 
37068     # remove trailing .exe if any
37069     new_path="${new_path/%.exe/}"
37070 
37071     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37072     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37073   fi
37074 
37075     else
37076       # We're on a unix platform. Hooray! :)
37077       # First separate the path from the arguments. This will split at the first
37078       # space.
37079       complete="$CXXCPP"
37080       path="${complete%% *}"
37081       tmp="$complete EOL"
37082       arguments="${tmp#* }"
37083 
37084       # Cannot rely on the command "which" here since it doesn't always work.
37085       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37086       if test -z "$is_absolute_path"; then
37087         # Path to executable is not absolute. Find it.
37088         IFS_save="$IFS"
37089         IFS=:
37090         for p in $PATH; do
37091           if test -f "$p/$path" && test -x "$p/$path"; then
37092             new_path="$p/$path"
37093             break
37094           fi
37095         done
37096         IFS="$IFS_save"
37097       else
37098         # This is an absolute path, we can use it without further modifications.
37099         new_path="$path"
37100       fi
37101 
37102       if test "x$new_path" = x; then
37103         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37104 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37105         has_space=`$ECHO "$complete" | $GREP " "`
37106         if test "x$has_space" != x; then
37107           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37108 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37109         fi
37110         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37111       fi
37112     fi
37113 
37114     # Now join together the path and the arguments once again
37115     if test "x$arguments" != xEOL; then
37116       new_complete="$new_path ${arguments% *}"
37117     else
37118       new_complete="$new_path"
37119     fi
37120 
37121     if test "x$complete" != "x$new_complete"; then
37122       CXXCPP="$new_complete"
37123       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37124 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37125     fi
37126   fi
37127 
37128 
37129   #
37130   # Setup the linker (LD)
37131   #
37132   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37133     # In the Microsoft toolchain we have a separate LD command "link".
37134     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37135     # a cygwin program for something completely different.
37136     # Extract the first word of "link", so it can be a program name with args.
37137 set dummy link; ac_word=$2
37138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37139 $as_echo_n "checking for $ac_word... " >&6; }
37140 if ${ac_cv_prog_LD+:} false; then :
37141   $as_echo_n "(cached) " >&6
37142 else
37143   if test -n "$LD"; then
37144   ac_cv_prog_LD="$LD" # Let the user override the test.
37145 else
37146   ac_prog_rejected=no
37147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37148 for as_dir in $PATH
37149 do
37150   IFS=$as_save_IFS
37151   test -z "$as_dir" && as_dir=.
37152     for ac_exec_ext in '' $ac_executable_extensions; do
37153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37154     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37155        ac_prog_rejected=yes
37156        continue
37157      fi
37158     ac_cv_prog_LD="link"
37159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37160     break 2
37161   fi
37162 done
37163   done
37164 IFS=$as_save_IFS
37165 
37166 if test $ac_prog_rejected = yes; then
37167   # We found a bogon in the path, so make sure we never use it.
37168   set dummy $ac_cv_prog_LD
37169   shift
37170   if test $# != 0; then
37171     # We chose a different compiler from the bogus one.
37172     # However, it has the same basename, so the bogon will be chosen
37173     # first if we set LD to just the basename; use the full file name.
37174     shift
37175     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37176   fi
37177 fi
37178 fi
37179 fi
37180 LD=$ac_cv_prog_LD
37181 if test -n "$LD"; then
37182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37183 $as_echo "$LD" >&6; }
37184 else
37185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186 $as_echo "no" >&6; }
37187 fi
37188 
37189 
37190 
37191   # Only process if variable expands to non-empty
37192 
37193   if test "x$LD" != x; then
37194     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37195 
37196   # First separate the path from the arguments. This will split at the first
37197   # space.
37198   complete="$LD"
37199   path="${complete%% *}"
37200   tmp="$complete EOL"
37201   arguments="${tmp#* }"
37202 
37203   # Input might be given as Windows format, start by converting to
37204   # unix format.
37205   new_path=`$CYGPATH -u "$path"`
37206 
37207   # Now try to locate executable using which
37208   new_path=`$WHICH "$new_path" 2> /dev/null`
37209   # bat and cmd files are not always considered executable in cygwin causing which
37210   # to not find them
37211   if test "x$new_path" = x \
37212       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37213       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37214     new_path=`$CYGPATH -u "$path"`
37215   fi
37216   if test "x$new_path" = x; then
37217     # Oops. Which didn't find the executable.
37218     # The splitting of arguments from the executable at a space might have been incorrect,
37219     # since paths with space are more likely in Windows. Give it another try with the whole
37220     # argument.
37221     path="$complete"
37222     arguments="EOL"
37223     new_path=`$CYGPATH -u "$path"`
37224     new_path=`$WHICH "$new_path" 2> /dev/null`
37225     # bat and cmd files are not always considered executable in cygwin causing which
37226     # to not find them
37227     if test "x$new_path" = x \
37228         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37229         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37230       new_path=`$CYGPATH -u "$path"`
37231     fi
37232     if test "x$new_path" = x; then
37233       # It's still not found. Now this is an unrecoverable error.
37234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37235 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37236       has_space=`$ECHO "$complete" | $GREP " "`
37237       if test "x$has_space" != x; then
37238         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37239 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37240       fi
37241       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37242     fi
37243   fi
37244 
37245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37248   # "foo.exe" is OK but "foo" is an error.
37249   #
37250   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37251   # It is also a way to make sure we got the proper file name for the real test later on.
37252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37253   if test "x$test_shortpath" = x; then
37254     # Short path failed, file does not exist as specified.
37255     # Try adding .exe or .cmd
37256     if test -f "${new_path}.exe"; then
37257       input_to_shortpath="${new_path}.exe"
37258     elif test -f "${new_path}.cmd"; then
37259       input_to_shortpath="${new_path}.cmd"
37260     else
37261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37262 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37263       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37264 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37265       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37266     fi
37267   else
37268     input_to_shortpath="$new_path"
37269   fi
37270 
37271   # Call helper function which possibly converts this using DOS-style short mode.
37272   # If so, the updated path is stored in $new_path.
37273   new_path="$input_to_shortpath"
37274 
37275   input_path="$input_to_shortpath"
37276   # Check if we need to convert this using DOS-style short mode. If the path
37277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37278   # take no chances and rewrite it.
37279   # Note: m4 eats our [], so we need to use [ and ] instead.
37280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37281   if test "x$has_forbidden_chars" != x; then
37282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37286       # Going to short mode and back again did indeed matter. Since short mode is
37287       # case insensitive, let's make it lowercase to improve readability.
37288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37289       # Now convert it back to Unix-style (cygpath)
37290       input_path=`$CYGPATH -u "$shortmode_path"`
37291       new_path="$input_path"
37292     fi
37293   fi
37294 
37295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37296   if test "x$test_cygdrive_prefix" = x; then
37297     # As a simple fix, exclude /usr/bin since it's not a real path.
37298     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37300       # a path prefixed by /cygdrive for fixpath to work.
37301       new_path="$CYGWIN_ROOT_PATH$input_path"
37302     fi
37303   fi
37304 
37305   # remove trailing .exe if any
37306   new_path="${new_path/%.exe/}"
37307 
37308     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37309 
37310   # First separate the path from the arguments. This will split at the first
37311   # space.
37312   complete="$LD"
37313   path="${complete%% *}"
37314   tmp="$complete EOL"
37315   arguments="${tmp#* }"
37316 
37317   # Input might be given as Windows format, start by converting to
37318   # unix format.
37319   new_path="$path"
37320 
37321   windows_path="$new_path"
37322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37323     unix_path=`$CYGPATH -u "$windows_path"`
37324     new_path="$unix_path"
37325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37327     new_path="$unix_path"
37328   fi
37329 
37330 
37331   # Now try to locate executable using which
37332   new_path=`$WHICH "$new_path" 2> /dev/null`
37333 
37334   if test "x$new_path" = x; then
37335     # Oops. Which didn't find the executable.
37336     # The splitting of arguments from the executable at a space might have been incorrect,
37337     # since paths with space are more likely in Windows. Give it another try with the whole
37338     # argument.
37339     path="$complete"
37340     arguments="EOL"
37341     new_path="$path"
37342 
37343   windows_path="$new_path"
37344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37345     unix_path=`$CYGPATH -u "$windows_path"`
37346     new_path="$unix_path"
37347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37349     new_path="$unix_path"
37350   fi
37351 
37352 
37353     new_path=`$WHICH "$new_path" 2> /dev/null`
37354     # bat and cmd files are not always considered executable in MSYS causing which
37355     # to not find them
37356     if test "x$new_path" = x \
37357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37359       new_path="$path"
37360 
37361   windows_path="$new_path"
37362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37363     unix_path=`$CYGPATH -u "$windows_path"`
37364     new_path="$unix_path"
37365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37367     new_path="$unix_path"
37368   fi
37369 
37370     fi
37371 
37372     if test "x$new_path" = x; then
37373       # It's still not found. Now this is an unrecoverable error.
37374       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37375 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37376       has_space=`$ECHO "$complete" | $GREP " "`
37377       if test "x$has_space" != x; then
37378         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37379 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37380       fi
37381       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37382     fi
37383   fi
37384 
37385   # Now new_path has a complete unix path to the binary
37386   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37387     # Keep paths in /bin as-is, but remove trailing .exe if any
37388     new_path="${new_path/%.exe/}"
37389     # Do not save /bin paths to all_fixpath_prefixes!
37390   else
37391     # Not in mixed or Windows style, start by that.
37392     new_path=`cmd //c echo $new_path`
37393 
37394   input_path="$new_path"
37395   # Check if we need to convert this using DOS-style short mode. If the path
37396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37397   # take no chances and rewrite it.
37398   # Note: m4 eats our [], so we need to use [ and ] instead.
37399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37400   if test "x$has_forbidden_chars" != x; then
37401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37402     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37403   fi
37404 
37405     # Output is in $new_path
37406 
37407   windows_path="$new_path"
37408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37409     unix_path=`$CYGPATH -u "$windows_path"`
37410     new_path="$unix_path"
37411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37413     new_path="$unix_path"
37414   fi
37415 
37416     # remove trailing .exe if any
37417     new_path="${new_path/%.exe/}"
37418 
37419     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37420     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37421   fi
37422 
37423     else
37424       # We're on a unix platform. Hooray! :)
37425       # First separate the path from the arguments. This will split at the first
37426       # space.
37427       complete="$LD"
37428       path="${complete%% *}"
37429       tmp="$complete EOL"
37430       arguments="${tmp#* }"
37431 
37432       # Cannot rely on the command "which" here since it doesn't always work.
37433       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37434       if test -z "$is_absolute_path"; then
37435         # Path to executable is not absolute. Find it.
37436         IFS_save="$IFS"
37437         IFS=:
37438         for p in $PATH; do
37439           if test -f "$p/$path" && test -x "$p/$path"; then
37440             new_path="$p/$path"
37441             break
37442           fi
37443         done
37444         IFS="$IFS_save"
37445       else
37446         # This is an absolute path, we can use it without further modifications.
37447         new_path="$path"
37448       fi
37449 
37450       if test "x$new_path" = x; then
37451         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37452 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37453         has_space=`$ECHO "$complete" | $GREP " "`
37454         if test "x$has_space" != x; then
37455           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37456 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37457         fi
37458         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37459       fi
37460     fi
37461 
37462     # Now join together the path and the arguments once again
37463     if test "x$arguments" != xEOL; then
37464       new_complete="$new_path ${arguments% *}"
37465     else
37466       new_complete="$new_path"
37467     fi
37468 
37469     if test "x$complete" != "x$new_complete"; then
37470       LD="$new_complete"
37471       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37472 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37473     fi
37474   fi
37475 
37476     # Verify that we indeed succeeded with this trick.
37477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37478 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37479     "$LD" --version > /dev/null
37480     if test $? -eq 0 ; then
37481       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37482 $as_echo "no" >&6; }
37483       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37484     else
37485       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37486 $as_echo "yes" >&6; }
37487     fi
37488     LDCXX="$LD"
37489   else
37490     # All other toolchains use the compiler to link.
37491     LD="$CC"
37492     LDCXX="$CXX"
37493   fi
37494 
37495   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37496 
37497 
37498   #
37499   # Setup the assembler (AS)
37500   #
37501   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37502 
37503 
37504   # Publish this variable in the help.
37505 
37506 
37507   if [ -z "${AS+x}" ]; then
37508     # The variable is not set by user, try to locate tool using the code snippet
37509     for ac_prog in as
37510 do
37511   # Extract the first word of "$ac_prog", so it can be a program name with args.
37512 set dummy $ac_prog; ac_word=$2
37513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37514 $as_echo_n "checking for $ac_word... " >&6; }
37515 if ${ac_cv_path_AS+:} false; then :
37516   $as_echo_n "(cached) " >&6
37517 else
37518   case $AS in
37519   [\\/]* | ?:[\\/]*)
37520   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37521   ;;
37522   *)
37523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37524 for as_dir in $PATH
37525 do
37526   IFS=$as_save_IFS
37527   test -z "$as_dir" && as_dir=.
37528     for ac_exec_ext in '' $ac_executable_extensions; do
37529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37530     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37532     break 2
37533   fi
37534 done
37535   done
37536 IFS=$as_save_IFS
37537 
37538   ;;
37539 esac
37540 fi
37541 AS=$ac_cv_path_AS
37542 if test -n "$AS"; then
37543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37544 $as_echo "$AS" >&6; }
37545 else
37546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37547 $as_echo "no" >&6; }
37548 fi
37549 
37550 
37551   test -n "$AS" && break
37552 done
37553 
37554   else
37555     # The variable is set, but is it from the command line or the environment?
37556 
37557     # Try to remove the string !AS! from our list.
37558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37560       # If it failed, the variable was not from the command line. Ignore it,
37561       # but warn the user (except for BASH, which is always set by the calling BASH).
37562       if test "xAS" != xBASH; then
37563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37564 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37565       fi
37566       # Try to locate tool using the code snippet
37567       for ac_prog in as
37568 do
37569   # Extract the first word of "$ac_prog", so it can be a program name with args.
37570 set dummy $ac_prog; ac_word=$2
37571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37572 $as_echo_n "checking for $ac_word... " >&6; }
37573 if ${ac_cv_path_AS+:} false; then :
37574   $as_echo_n "(cached) " >&6
37575 else
37576   case $AS in
37577   [\\/]* | ?:[\\/]*)
37578   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37579   ;;
37580   *)
37581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37582 for as_dir in $PATH
37583 do
37584   IFS=$as_save_IFS
37585   test -z "$as_dir" && as_dir=.
37586     for ac_exec_ext in '' $ac_executable_extensions; do
37587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37588     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37590     break 2
37591   fi
37592 done
37593   done
37594 IFS=$as_save_IFS
37595 
37596   ;;
37597 esac
37598 fi
37599 AS=$ac_cv_path_AS
37600 if test -n "$AS"; then
37601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37602 $as_echo "$AS" >&6; }
37603 else
37604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37605 $as_echo "no" >&6; }
37606 fi
37607 
37608 
37609   test -n "$AS" && break
37610 done
37611 
37612     else
37613       # If it succeeded, then it was overridden by the user. We will use it
37614       # for the tool.
37615 
37616       # First remove it from the list of overridden variables, so we can test
37617       # for unknown variables in the end.
37618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37619 
37620       # Check if we try to supply an empty value
37621       if test "x$AS" = x; then
37622         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37623 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37624         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37625 $as_echo_n "checking for AS... " >&6; }
37626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37627 $as_echo "disabled" >&6; }
37628       else
37629         # Check if the provided tool contains a complete path.
37630         tool_specified="$AS"
37631         tool_basename="${tool_specified##*/}"
37632         if test "x$tool_basename" = "x$tool_specified"; then
37633           # A command without a complete path is provided, search $PATH.
37634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37635 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37636           # Extract the first word of "$tool_basename", so it can be a program name with args.
37637 set dummy $tool_basename; ac_word=$2
37638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37639 $as_echo_n "checking for $ac_word... " >&6; }
37640 if ${ac_cv_path_AS+:} false; then :
37641   $as_echo_n "(cached) " >&6
37642 else
37643   case $AS in
37644   [\\/]* | ?:[\\/]*)
37645   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37646   ;;
37647   *)
37648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37649 for as_dir in $PATH
37650 do
37651   IFS=$as_save_IFS
37652   test -z "$as_dir" && as_dir=.
37653     for ac_exec_ext in '' $ac_executable_extensions; do
37654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37655     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37657     break 2
37658   fi
37659 done
37660   done
37661 IFS=$as_save_IFS
37662 
37663   ;;
37664 esac
37665 fi
37666 AS=$ac_cv_path_AS
37667 if test -n "$AS"; then
37668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37669 $as_echo "$AS" >&6; }
37670 else
37671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37672 $as_echo "no" >&6; }
37673 fi
37674 
37675 
37676           if test "x$AS" = x; then
37677             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37678           fi
37679         else
37680           # Otherwise we believe it is a complete path. Use it as it is.
37681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37682 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37683           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37684 $as_echo_n "checking for AS... " >&6; }
37685           if test ! -x "$tool_specified"; then
37686             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37687 $as_echo "not found" >&6; }
37688             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37689           fi
37690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37691 $as_echo "$tool_specified" >&6; }
37692         fi
37693       fi
37694     fi
37695 
37696   fi
37697 
37698 
37699 
37700   # Only process if variable expands to non-empty
37701 
37702   if test "x$AS" != x; then
37703     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37704 
37705   # First separate the path from the arguments. This will split at the first
37706   # space.
37707   complete="$AS"
37708   path="${complete%% *}"
37709   tmp="$complete EOL"
37710   arguments="${tmp#* }"
37711 
37712   # Input might be given as Windows format, start by converting to
37713   # unix format.
37714   new_path=`$CYGPATH -u "$path"`
37715 
37716   # Now try to locate executable using which
37717   new_path=`$WHICH "$new_path" 2> /dev/null`
37718   # bat and cmd files are not always considered executable in cygwin causing which
37719   # to not find them
37720   if test "x$new_path" = x \
37721       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37722       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37723     new_path=`$CYGPATH -u "$path"`
37724   fi
37725   if test "x$new_path" = x; then
37726     # Oops. Which didn't find the executable.
37727     # The splitting of arguments from the executable at a space might have been incorrect,
37728     # since paths with space are more likely in Windows. Give it another try with the whole
37729     # argument.
37730     path="$complete"
37731     arguments="EOL"
37732     new_path=`$CYGPATH -u "$path"`
37733     new_path=`$WHICH "$new_path" 2> /dev/null`
37734     # bat and cmd files are not always considered executable in cygwin causing which
37735     # to not find them
37736     if test "x$new_path" = x \
37737         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37738         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37739       new_path=`$CYGPATH -u "$path"`
37740     fi
37741     if test "x$new_path" = x; then
37742       # It's still not found. Now this is an unrecoverable error.
37743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37744 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37745       has_space=`$ECHO "$complete" | $GREP " "`
37746       if test "x$has_space" != x; then
37747         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37748 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37749       fi
37750       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37751     fi
37752   fi
37753 
37754   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37755   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37756   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37757   # "foo.exe" is OK but "foo" is an error.
37758   #
37759   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37760   # It is also a way to make sure we got the proper file name for the real test later on.
37761   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37762   if test "x$test_shortpath" = x; then
37763     # Short path failed, file does not exist as specified.
37764     # Try adding .exe or .cmd
37765     if test -f "${new_path}.exe"; then
37766       input_to_shortpath="${new_path}.exe"
37767     elif test -f "${new_path}.cmd"; then
37768       input_to_shortpath="${new_path}.cmd"
37769     else
37770       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37771 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37772       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37773 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37774       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37775     fi
37776   else
37777     input_to_shortpath="$new_path"
37778   fi
37779 
37780   # Call helper function which possibly converts this using DOS-style short mode.
37781   # If so, the updated path is stored in $new_path.
37782   new_path="$input_to_shortpath"
37783 
37784   input_path="$input_to_shortpath"
37785   # Check if we need to convert this using DOS-style short mode. If the path
37786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37787   # take no chances and rewrite it.
37788   # Note: m4 eats our [], so we need to use [ and ] instead.
37789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37790   if test "x$has_forbidden_chars" != x; then
37791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37792     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37793     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37794     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37795       # Going to short mode and back again did indeed matter. Since short mode is
37796       # case insensitive, let's make it lowercase to improve readability.
37797       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37798       # Now convert it back to Unix-style (cygpath)
37799       input_path=`$CYGPATH -u "$shortmode_path"`
37800       new_path="$input_path"
37801     fi
37802   fi
37803 
37804   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37805   if test "x$test_cygdrive_prefix" = x; then
37806     # As a simple fix, exclude /usr/bin since it's not a real path.
37807     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37808       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37809       # a path prefixed by /cygdrive for fixpath to work.
37810       new_path="$CYGWIN_ROOT_PATH$input_path"
37811     fi
37812   fi
37813 
37814   # remove trailing .exe if any
37815   new_path="${new_path/%.exe/}"
37816 
37817     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37818 
37819   # First separate the path from the arguments. This will split at the first
37820   # space.
37821   complete="$AS"
37822   path="${complete%% *}"
37823   tmp="$complete EOL"
37824   arguments="${tmp#* }"
37825 
37826   # Input might be given as Windows format, start by converting to
37827   # unix format.
37828   new_path="$path"
37829 
37830   windows_path="$new_path"
37831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37832     unix_path=`$CYGPATH -u "$windows_path"`
37833     new_path="$unix_path"
37834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37836     new_path="$unix_path"
37837   fi
37838 
37839 
37840   # Now try to locate executable using which
37841   new_path=`$WHICH "$new_path" 2> /dev/null`
37842 
37843   if test "x$new_path" = x; then
37844     # Oops. Which didn't find the executable.
37845     # The splitting of arguments from the executable at a space might have been incorrect,
37846     # since paths with space are more likely in Windows. Give it another try with the whole
37847     # argument.
37848     path="$complete"
37849     arguments="EOL"
37850     new_path="$path"
37851 
37852   windows_path="$new_path"
37853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37854     unix_path=`$CYGPATH -u "$windows_path"`
37855     new_path="$unix_path"
37856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37858     new_path="$unix_path"
37859   fi
37860 
37861 
37862     new_path=`$WHICH "$new_path" 2> /dev/null`
37863     # bat and cmd files are not always considered executable in MSYS causing which
37864     # to not find them
37865     if test "x$new_path" = x \
37866         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37867         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37868       new_path="$path"
37869 
37870   windows_path="$new_path"
37871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872     unix_path=`$CYGPATH -u "$windows_path"`
37873     new_path="$unix_path"
37874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37876     new_path="$unix_path"
37877   fi
37878 
37879     fi
37880 
37881     if test "x$new_path" = x; then
37882       # It's still not found. Now this is an unrecoverable error.
37883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37884 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37885       has_space=`$ECHO "$complete" | $GREP " "`
37886       if test "x$has_space" != x; then
37887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37889       fi
37890       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37891     fi
37892   fi
37893 
37894   # Now new_path has a complete unix path to the binary
37895   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37896     # Keep paths in /bin as-is, but remove trailing .exe if any
37897     new_path="${new_path/%.exe/}"
37898     # Do not save /bin paths to all_fixpath_prefixes!
37899   else
37900     # Not in mixed or Windows style, start by that.
37901     new_path=`cmd //c echo $new_path`
37902 
37903   input_path="$new_path"
37904   # Check if we need to convert this using DOS-style short mode. If the path
37905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37906   # take no chances and rewrite it.
37907   # Note: m4 eats our [], so we need to use [ and ] instead.
37908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37909   if test "x$has_forbidden_chars" != x; then
37910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37912   fi
37913 
37914     # Output is in $new_path
37915 
37916   windows_path="$new_path"
37917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37918     unix_path=`$CYGPATH -u "$windows_path"`
37919     new_path="$unix_path"
37920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37922     new_path="$unix_path"
37923   fi
37924 
37925     # remove trailing .exe if any
37926     new_path="${new_path/%.exe/}"
37927 
37928     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37929     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37930   fi
37931 
37932     else
37933       # We're on a unix platform. Hooray! :)
37934       # First separate the path from the arguments. This will split at the first
37935       # space.
37936       complete="$AS"
37937       path="${complete%% *}"
37938       tmp="$complete EOL"
37939       arguments="${tmp#* }"
37940 
37941       # Cannot rely on the command "which" here since it doesn't always work.
37942       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37943       if test -z "$is_absolute_path"; then
37944         # Path to executable is not absolute. Find it.
37945         IFS_save="$IFS"
37946         IFS=:
37947         for p in $PATH; do
37948           if test -f "$p/$path" && test -x "$p/$path"; then
37949             new_path="$p/$path"
37950             break
37951           fi
37952         done
37953         IFS="$IFS_save"
37954       else
37955         # This is an absolute path, we can use it without further modifications.
37956         new_path="$path"
37957       fi
37958 
37959       if test "x$new_path" = x; then
37960         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37961 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37962         has_space=`$ECHO "$complete" | $GREP " "`
37963         if test "x$has_space" != x; then
37964           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37965 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37966         fi
37967         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37968       fi
37969     fi
37970 
37971     # Now join together the path and the arguments once again
37972     if test "x$arguments" != xEOL; then
37973       new_complete="$new_path ${arguments% *}"
37974     else
37975       new_complete="$new_path"
37976     fi
37977 
37978     if test "x$complete" != "x$new_complete"; then
37979       AS="$new_complete"
37980       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37981 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37982     fi
37983   fi
37984 
37985     if test "x$AS" = x; then
37986       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37987     fi
37988   else
37989     # FIXME: is this correct for microsoft?
37990     AS="$CC -c"
37991   fi
37992 
37993 
37994   #
37995   # Setup the archiver (AR)
37996   #
37997   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37998     # The corresponding ar tool is lib.exe (used to create static libraries)
37999     # Extract the first word of "lib", so it can be a program name with args.
38000 set dummy lib; ac_word=$2
38001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38002 $as_echo_n "checking for $ac_word... " >&6; }
38003 if ${ac_cv_prog_AR+:} false; then :
38004   $as_echo_n "(cached) " >&6
38005 else
38006   if test -n "$AR"; then
38007   ac_cv_prog_AR="$AR" # Let the user override the test.
38008 else
38009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38010 for as_dir in $PATH
38011 do
38012   IFS=$as_save_IFS
38013   test -z "$as_dir" && as_dir=.
38014     for ac_exec_ext in '' $ac_executable_extensions; do
38015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38016     ac_cv_prog_AR="lib"
38017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38018     break 2
38019   fi
38020 done
38021   done
38022 IFS=$as_save_IFS
38023 
38024 fi
38025 fi
38026 AR=$ac_cv_prog_AR
38027 if test -n "$AR"; then
38028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38029 $as_echo "$AR" >&6; }
38030 else
38031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38032 $as_echo "no" >&6; }
38033 fi
38034 
38035 
38036   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38037 
38038 
38039   # Publish this variable in the help.
38040 
38041 
38042   if [ -z "${AR+x}" ]; then
38043     # The variable is not set by user, try to locate tool using the code snippet
38044     if test -n "$ac_tool_prefix"; then
38045   for ac_prog in ar gcc-ar
38046   do
38047     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38048 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38050 $as_echo_n "checking for $ac_word... " >&6; }
38051 if ${ac_cv_prog_AR+:} false; then :
38052   $as_echo_n "(cached) " >&6
38053 else
38054   if test -n "$AR"; then
38055   ac_cv_prog_AR="$AR" # Let the user override the test.
38056 else
38057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38058 for as_dir in $PATH
38059 do
38060   IFS=$as_save_IFS
38061   test -z "$as_dir" && as_dir=.
38062     for ac_exec_ext in '' $ac_executable_extensions; do
38063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38064     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38066     break 2
38067   fi
38068 done
38069   done
38070 IFS=$as_save_IFS
38071 
38072 fi
38073 fi
38074 AR=$ac_cv_prog_AR
38075 if test -n "$AR"; then
38076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38077 $as_echo "$AR" >&6; }
38078 else
38079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38080 $as_echo "no" >&6; }
38081 fi
38082 
38083 
38084     test -n "$AR" && break
38085   done
38086 fi
38087 if test -z "$AR"; then
38088   ac_ct_AR=$AR
38089   for ac_prog in ar gcc-ar
38090 do
38091   # Extract the first word of "$ac_prog", so it can be a program name with args.
38092 set dummy $ac_prog; ac_word=$2
38093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38094 $as_echo_n "checking for $ac_word... " >&6; }
38095 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38096   $as_echo_n "(cached) " >&6
38097 else
38098   if test -n "$ac_ct_AR"; then
38099   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38100 else
38101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38102 for as_dir in $PATH
38103 do
38104   IFS=$as_save_IFS
38105   test -z "$as_dir" && as_dir=.
38106     for ac_exec_ext in '' $ac_executable_extensions; do
38107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38108     ac_cv_prog_ac_ct_AR="$ac_prog"
38109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38110     break 2
38111   fi
38112 done
38113   done
38114 IFS=$as_save_IFS
38115 
38116 fi
38117 fi
38118 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38119 if test -n "$ac_ct_AR"; then
38120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38121 $as_echo "$ac_ct_AR" >&6; }
38122 else
38123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38124 $as_echo "no" >&6; }
38125 fi
38126 
38127 
38128   test -n "$ac_ct_AR" && break
38129 done
38130 
38131   if test "x$ac_ct_AR" = x; then
38132     AR=""
38133   else
38134     case $cross_compiling:$ac_tool_warned in
38135 yes:)
38136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38137 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38138 ac_tool_warned=yes ;;
38139 esac
38140     AR=$ac_ct_AR
38141   fi
38142 fi
38143 
38144   else
38145     # The variable is set, but is it from the command line or the environment?
38146 
38147     # Try to remove the string !AR! from our list.
38148     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38149     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38150       # If it failed, the variable was not from the command line. Ignore it,
38151       # but warn the user (except for BASH, which is always set by the calling BASH).
38152       if test "xAR" != xBASH; then
38153         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38154 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38155       fi
38156       # Try to locate tool using the code snippet
38157       if test -n "$ac_tool_prefix"; then
38158   for ac_prog in ar gcc-ar
38159   do
38160     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38161 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38163 $as_echo_n "checking for $ac_word... " >&6; }
38164 if ${ac_cv_prog_AR+:} false; then :
38165   $as_echo_n "(cached) " >&6
38166 else
38167   if test -n "$AR"; then
38168   ac_cv_prog_AR="$AR" # Let the user override the test.
38169 else
38170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38171 for as_dir in $PATH
38172 do
38173   IFS=$as_save_IFS
38174   test -z "$as_dir" && as_dir=.
38175     for ac_exec_ext in '' $ac_executable_extensions; do
38176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38177     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38179     break 2
38180   fi
38181 done
38182   done
38183 IFS=$as_save_IFS
38184 
38185 fi
38186 fi
38187 AR=$ac_cv_prog_AR
38188 if test -n "$AR"; then
38189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38190 $as_echo "$AR" >&6; }
38191 else
38192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38193 $as_echo "no" >&6; }
38194 fi
38195 
38196 
38197     test -n "$AR" && break
38198   done
38199 fi
38200 if test -z "$AR"; then
38201   ac_ct_AR=$AR
38202   for ac_prog in ar gcc-ar
38203 do
38204   # Extract the first word of "$ac_prog", so it can be a program name with args.
38205 set dummy $ac_prog; ac_word=$2
38206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38207 $as_echo_n "checking for $ac_word... " >&6; }
38208 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38209   $as_echo_n "(cached) " >&6
38210 else
38211   if test -n "$ac_ct_AR"; then
38212   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38213 else
38214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38215 for as_dir in $PATH
38216 do
38217   IFS=$as_save_IFS
38218   test -z "$as_dir" && as_dir=.
38219     for ac_exec_ext in '' $ac_executable_extensions; do
38220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38221     ac_cv_prog_ac_ct_AR="$ac_prog"
38222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38223     break 2
38224   fi
38225 done
38226   done
38227 IFS=$as_save_IFS
38228 
38229 fi
38230 fi
38231 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38232 if test -n "$ac_ct_AR"; then
38233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38234 $as_echo "$ac_ct_AR" >&6; }
38235 else
38236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38237 $as_echo "no" >&6; }
38238 fi
38239 
38240 
38241   test -n "$ac_ct_AR" && break
38242 done
38243 
38244   if test "x$ac_ct_AR" = x; then
38245     AR=""
38246   else
38247     case $cross_compiling:$ac_tool_warned in
38248 yes:)
38249 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38250 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38251 ac_tool_warned=yes ;;
38252 esac
38253     AR=$ac_ct_AR
38254   fi
38255 fi
38256 
38257     else
38258       # If it succeeded, then it was overridden by the user. We will use it
38259       # for the tool.
38260 
38261       # First remove it from the list of overridden variables, so we can test
38262       # for unknown variables in the end.
38263       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38264 
38265       # Check if we try to supply an empty value
38266       if test "x$AR" = x; then
38267         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38268 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38270 $as_echo_n "checking for AR... " >&6; }
38271         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38272 $as_echo "disabled" >&6; }
38273       else
38274         # Check if the provided tool contains a complete path.
38275         tool_specified="$AR"
38276         tool_basename="${tool_specified##*/}"
38277         if test "x$tool_basename" = "x$tool_specified"; then
38278           # A command without a complete path is provided, search $PATH.
38279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38280 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38281           # Extract the first word of "$tool_basename", so it can be a program name with args.
38282 set dummy $tool_basename; ac_word=$2
38283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38284 $as_echo_n "checking for $ac_word... " >&6; }
38285 if ${ac_cv_path_AR+:} false; then :
38286   $as_echo_n "(cached) " >&6
38287 else
38288   case $AR in
38289   [\\/]* | ?:[\\/]*)
38290   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38291   ;;
38292   *)
38293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38294 for as_dir in $PATH
38295 do
38296   IFS=$as_save_IFS
38297   test -z "$as_dir" && as_dir=.
38298     for ac_exec_ext in '' $ac_executable_extensions; do
38299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38300     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38302     break 2
38303   fi
38304 done
38305   done
38306 IFS=$as_save_IFS
38307 
38308   ;;
38309 esac
38310 fi
38311 AR=$ac_cv_path_AR
38312 if test -n "$AR"; then
38313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38314 $as_echo "$AR" >&6; }
38315 else
38316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38317 $as_echo "no" >&6; }
38318 fi
38319 
38320 
38321           if test "x$AR" = x; then
38322             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38323           fi
38324         else
38325           # Otherwise we believe it is a complete path. Use it as it is.
38326           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38327 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38328           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38329 $as_echo_n "checking for AR... " >&6; }
38330           if test ! -x "$tool_specified"; then
38331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38332 $as_echo "not found" >&6; }
38333             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38334           fi
38335           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38336 $as_echo "$tool_specified" >&6; }
38337         fi
38338       fi
38339     fi
38340 
38341   fi
38342 
38343 
38344   else
38345 
38346 
38347   # Publish this variable in the help.
38348 
38349 
38350   if [ -z "${AR+x}" ]; then
38351     # The variable is not set by user, try to locate tool using the code snippet
38352     if test -n "$ac_tool_prefix"; then
38353   for ac_prog in ar
38354   do
38355     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38356 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38358 $as_echo_n "checking for $ac_word... " >&6; }
38359 if ${ac_cv_prog_AR+:} false; then :
38360   $as_echo_n "(cached) " >&6
38361 else
38362   if test -n "$AR"; then
38363   ac_cv_prog_AR="$AR" # Let the user override the test.
38364 else
38365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38366 for as_dir in $PATH
38367 do
38368   IFS=$as_save_IFS
38369   test -z "$as_dir" && as_dir=.
38370     for ac_exec_ext in '' $ac_executable_extensions; do
38371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38372     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38374     break 2
38375   fi
38376 done
38377   done
38378 IFS=$as_save_IFS
38379 
38380 fi
38381 fi
38382 AR=$ac_cv_prog_AR
38383 if test -n "$AR"; then
38384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38385 $as_echo "$AR" >&6; }
38386 else
38387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38388 $as_echo "no" >&6; }
38389 fi
38390 
38391 
38392     test -n "$AR" && break
38393   done
38394 fi
38395 if test -z "$AR"; then
38396   ac_ct_AR=$AR
38397   for ac_prog in ar
38398 do
38399   # Extract the first word of "$ac_prog", so it can be a program name with args.
38400 set dummy $ac_prog; ac_word=$2
38401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38402 $as_echo_n "checking for $ac_word... " >&6; }
38403 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38404   $as_echo_n "(cached) " >&6
38405 else
38406   if test -n "$ac_ct_AR"; then
38407   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38408 else
38409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38410 for as_dir in $PATH
38411 do
38412   IFS=$as_save_IFS
38413   test -z "$as_dir" && as_dir=.
38414     for ac_exec_ext in '' $ac_executable_extensions; do
38415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38416     ac_cv_prog_ac_ct_AR="$ac_prog"
38417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38418     break 2
38419   fi
38420 done
38421   done
38422 IFS=$as_save_IFS
38423 
38424 fi
38425 fi
38426 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38427 if test -n "$ac_ct_AR"; then
38428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38429 $as_echo "$ac_ct_AR" >&6; }
38430 else
38431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38432 $as_echo "no" >&6; }
38433 fi
38434 
38435 
38436   test -n "$ac_ct_AR" && break
38437 done
38438 
38439   if test "x$ac_ct_AR" = x; then
38440     AR=""
38441   else
38442     case $cross_compiling:$ac_tool_warned in
38443 yes:)
38444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38445 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38446 ac_tool_warned=yes ;;
38447 esac
38448     AR=$ac_ct_AR
38449   fi
38450 fi
38451 
38452   else
38453     # The variable is set, but is it from the command line or the environment?
38454 
38455     # Try to remove the string !AR! from our list.
38456     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38457     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38458       # If it failed, the variable was not from the command line. Ignore it,
38459       # but warn the user (except for BASH, which is always set by the calling BASH).
38460       if test "xAR" != xBASH; then
38461         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38462 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38463       fi
38464       # Try to locate tool using the code snippet
38465       if test -n "$ac_tool_prefix"; then
38466   for ac_prog in ar
38467   do
38468     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38469 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471 $as_echo_n "checking for $ac_word... " >&6; }
38472 if ${ac_cv_prog_AR+:} false; then :
38473   $as_echo_n "(cached) " >&6
38474 else
38475   if test -n "$AR"; then
38476   ac_cv_prog_AR="$AR" # Let the user override the test.
38477 else
38478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38479 for as_dir in $PATH
38480 do
38481   IFS=$as_save_IFS
38482   test -z "$as_dir" && as_dir=.
38483     for ac_exec_ext in '' $ac_executable_extensions; do
38484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38485     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38487     break 2
38488   fi
38489 done
38490   done
38491 IFS=$as_save_IFS
38492 
38493 fi
38494 fi
38495 AR=$ac_cv_prog_AR
38496 if test -n "$AR"; then
38497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38498 $as_echo "$AR" >&6; }
38499 else
38500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38501 $as_echo "no" >&6; }
38502 fi
38503 
38504 
38505     test -n "$AR" && break
38506   done
38507 fi
38508 if test -z "$AR"; then
38509   ac_ct_AR=$AR
38510   for ac_prog in ar
38511 do
38512   # Extract the first word of "$ac_prog", so it can be a program name with args.
38513 set dummy $ac_prog; ac_word=$2
38514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38515 $as_echo_n "checking for $ac_word... " >&6; }
38516 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38517   $as_echo_n "(cached) " >&6
38518 else
38519   if test -n "$ac_ct_AR"; then
38520   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38521 else
38522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38523 for as_dir in $PATH
38524 do
38525   IFS=$as_save_IFS
38526   test -z "$as_dir" && as_dir=.
38527     for ac_exec_ext in '' $ac_executable_extensions; do
38528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38529     ac_cv_prog_ac_ct_AR="$ac_prog"
38530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38531     break 2
38532   fi
38533 done
38534   done
38535 IFS=$as_save_IFS
38536 
38537 fi
38538 fi
38539 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38540 if test -n "$ac_ct_AR"; then
38541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38542 $as_echo "$ac_ct_AR" >&6; }
38543 else
38544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38545 $as_echo "no" >&6; }
38546 fi
38547 
38548 
38549   test -n "$ac_ct_AR" && break
38550 done
38551 
38552   if test "x$ac_ct_AR" = x; then
38553     AR=""
38554   else
38555     case $cross_compiling:$ac_tool_warned in
38556 yes:)
38557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38559 ac_tool_warned=yes ;;
38560 esac
38561     AR=$ac_ct_AR
38562   fi
38563 fi
38564 
38565     else
38566       # If it succeeded, then it was overridden by the user. We will use it
38567       # for the tool.
38568 
38569       # First remove it from the list of overridden variables, so we can test
38570       # for unknown variables in the end.
38571       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38572 
38573       # Check if we try to supply an empty value
38574       if test "x$AR" = x; then
38575         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38576 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38577         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38578 $as_echo_n "checking for AR... " >&6; }
38579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38580 $as_echo "disabled" >&6; }
38581       else
38582         # Check if the provided tool contains a complete path.
38583         tool_specified="$AR"
38584         tool_basename="${tool_specified##*/}"
38585         if test "x$tool_basename" = "x$tool_specified"; then
38586           # A command without a complete path is provided, search $PATH.
38587           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38588 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38589           # Extract the first word of "$tool_basename", so it can be a program name with args.
38590 set dummy $tool_basename; ac_word=$2
38591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38592 $as_echo_n "checking for $ac_word... " >&6; }
38593 if ${ac_cv_path_AR+:} false; then :
38594   $as_echo_n "(cached) " >&6
38595 else
38596   case $AR in
38597   [\\/]* | ?:[\\/]*)
38598   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38599   ;;
38600   *)
38601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38602 for as_dir in $PATH
38603 do
38604   IFS=$as_save_IFS
38605   test -z "$as_dir" && as_dir=.
38606     for ac_exec_ext in '' $ac_executable_extensions; do
38607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38608     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38610     break 2
38611   fi
38612 done
38613   done
38614 IFS=$as_save_IFS
38615 
38616   ;;
38617 esac
38618 fi
38619 AR=$ac_cv_path_AR
38620 if test -n "$AR"; then
38621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38622 $as_echo "$AR" >&6; }
38623 else
38624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38625 $as_echo "no" >&6; }
38626 fi
38627 
38628 
38629           if test "x$AR" = x; then
38630             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38631           fi
38632         else
38633           # Otherwise we believe it is a complete path. Use it as it is.
38634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38635 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38636           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38637 $as_echo_n "checking for AR... " >&6; }
38638           if test ! -x "$tool_specified"; then
38639             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38640 $as_echo "not found" >&6; }
38641             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38642           fi
38643           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38644 $as_echo "$tool_specified" >&6; }
38645         fi
38646       fi
38647     fi
38648 
38649   fi
38650 
38651 
38652   fi
38653 
38654   # Only process if variable expands to non-empty
38655 
38656   if test "x$AR" != x; then
38657     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38658 
38659   # First separate the path from the arguments. This will split at the first
38660   # space.
38661   complete="$AR"
38662   path="${complete%% *}"
38663   tmp="$complete EOL"
38664   arguments="${tmp#* }"
38665 
38666   # Input might be given as Windows format, start by converting to
38667   # unix format.
38668   new_path=`$CYGPATH -u "$path"`
38669 
38670   # Now try to locate executable using which
38671   new_path=`$WHICH "$new_path" 2> /dev/null`
38672   # bat and cmd files are not always considered executable in cygwin causing which
38673   # to not find them
38674   if test "x$new_path" = x \
38675       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38676       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38677     new_path=`$CYGPATH -u "$path"`
38678   fi
38679   if test "x$new_path" = x; then
38680     # Oops. Which didn't find the executable.
38681     # The splitting of arguments from the executable at a space might have been incorrect,
38682     # since paths with space are more likely in Windows. Give it another try with the whole
38683     # argument.
38684     path="$complete"
38685     arguments="EOL"
38686     new_path=`$CYGPATH -u "$path"`
38687     new_path=`$WHICH "$new_path" 2> /dev/null`
38688     # bat and cmd files are not always considered executable in cygwin causing which
38689     # to not find them
38690     if test "x$new_path" = x \
38691         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38692         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38693       new_path=`$CYGPATH -u "$path"`
38694     fi
38695     if test "x$new_path" = x; then
38696       # It's still not found. Now this is an unrecoverable error.
38697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38698 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38699       has_space=`$ECHO "$complete" | $GREP " "`
38700       if test "x$has_space" != x; then
38701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38703       fi
38704       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38705     fi
38706   fi
38707 
38708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38711   # "foo.exe" is OK but "foo" is an error.
38712   #
38713   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38714   # It is also a way to make sure we got the proper file name for the real test later on.
38715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38716   if test "x$test_shortpath" = x; then
38717     # Short path failed, file does not exist as specified.
38718     # Try adding .exe or .cmd
38719     if test -f "${new_path}.exe"; then
38720       input_to_shortpath="${new_path}.exe"
38721     elif test -f "${new_path}.cmd"; then
38722       input_to_shortpath="${new_path}.cmd"
38723     else
38724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38725 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38726       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38727 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38728       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38729     fi
38730   else
38731     input_to_shortpath="$new_path"
38732   fi
38733 
38734   # Call helper function which possibly converts this using DOS-style short mode.
38735   # If so, the updated path is stored in $new_path.
38736   new_path="$input_to_shortpath"
38737 
38738   input_path="$input_to_shortpath"
38739   # Check if we need to convert this using DOS-style short mode. If the path
38740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38741   # take no chances and rewrite it.
38742   # Note: m4 eats our [], so we need to use [ and ] instead.
38743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38744   if test "x$has_forbidden_chars" != x; then
38745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38749       # Going to short mode and back again did indeed matter. Since short mode is
38750       # case insensitive, let's make it lowercase to improve readability.
38751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38752       # Now convert it back to Unix-style (cygpath)
38753       input_path=`$CYGPATH -u "$shortmode_path"`
38754       new_path="$input_path"
38755     fi
38756   fi
38757 
38758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38759   if test "x$test_cygdrive_prefix" = x; then
38760     # As a simple fix, exclude /usr/bin since it's not a real path.
38761     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38763       # a path prefixed by /cygdrive for fixpath to work.
38764       new_path="$CYGWIN_ROOT_PATH$input_path"
38765     fi
38766   fi
38767 
38768   # remove trailing .exe if any
38769   new_path="${new_path/%.exe/}"
38770 
38771     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38772 
38773   # First separate the path from the arguments. This will split at the first
38774   # space.
38775   complete="$AR"
38776   path="${complete%% *}"
38777   tmp="$complete EOL"
38778   arguments="${tmp#* }"
38779 
38780   # Input might be given as Windows format, start by converting to
38781   # unix format.
38782   new_path="$path"
38783 
38784   windows_path="$new_path"
38785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38786     unix_path=`$CYGPATH -u "$windows_path"`
38787     new_path="$unix_path"
38788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38790     new_path="$unix_path"
38791   fi
38792 
38793 
38794   # Now try to locate executable using which
38795   new_path=`$WHICH "$new_path" 2> /dev/null`
38796 
38797   if test "x$new_path" = x; then
38798     # Oops. Which didn't find the executable.
38799     # The splitting of arguments from the executable at a space might have been incorrect,
38800     # since paths with space are more likely in Windows. Give it another try with the whole
38801     # argument.
38802     path="$complete"
38803     arguments="EOL"
38804     new_path="$path"
38805 
38806   windows_path="$new_path"
38807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38808     unix_path=`$CYGPATH -u "$windows_path"`
38809     new_path="$unix_path"
38810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38812     new_path="$unix_path"
38813   fi
38814 
38815 
38816     new_path=`$WHICH "$new_path" 2> /dev/null`
38817     # bat and cmd files are not always considered executable in MSYS causing which
38818     # to not find them
38819     if test "x$new_path" = x \
38820         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38821         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38822       new_path="$path"
38823 
38824   windows_path="$new_path"
38825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38826     unix_path=`$CYGPATH -u "$windows_path"`
38827     new_path="$unix_path"
38828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38830     new_path="$unix_path"
38831   fi
38832 
38833     fi
38834 
38835     if test "x$new_path" = x; then
38836       # It's still not found. Now this is an unrecoverable error.
38837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38838 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38839       has_space=`$ECHO "$complete" | $GREP " "`
38840       if test "x$has_space" != x; then
38841         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38842 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38843       fi
38844       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38845     fi
38846   fi
38847 
38848   # Now new_path has a complete unix path to the binary
38849   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38850     # Keep paths in /bin as-is, but remove trailing .exe if any
38851     new_path="${new_path/%.exe/}"
38852     # Do not save /bin paths to all_fixpath_prefixes!
38853   else
38854     # Not in mixed or Windows style, start by that.
38855     new_path=`cmd //c echo $new_path`
38856 
38857   input_path="$new_path"
38858   # Check if we need to convert this using DOS-style short mode. If the path
38859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38860   # take no chances and rewrite it.
38861   # Note: m4 eats our [], so we need to use [ and ] instead.
38862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38863   if test "x$has_forbidden_chars" != x; then
38864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38865     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38866   fi
38867 
38868     # Output is in $new_path
38869 
38870   windows_path="$new_path"
38871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38872     unix_path=`$CYGPATH -u "$windows_path"`
38873     new_path="$unix_path"
38874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38876     new_path="$unix_path"
38877   fi
38878 
38879     # remove trailing .exe if any
38880     new_path="${new_path/%.exe/}"
38881 
38882     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38883     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38884   fi
38885 
38886     else
38887       # We're on a unix platform. Hooray! :)
38888       # First separate the path from the arguments. This will split at the first
38889       # space.
38890       complete="$AR"
38891       path="${complete%% *}"
38892       tmp="$complete EOL"
38893       arguments="${tmp#* }"
38894 
38895       # Cannot rely on the command "which" here since it doesn't always work.
38896       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38897       if test -z "$is_absolute_path"; then
38898         # Path to executable is not absolute. Find it.
38899         IFS_save="$IFS"
38900         IFS=:
38901         for p in $PATH; do
38902           if test -f "$p/$path" && test -x "$p/$path"; then
38903             new_path="$p/$path"
38904             break
38905           fi
38906         done
38907         IFS="$IFS_save"
38908       else
38909         # This is an absolute path, we can use it without further modifications.
38910         new_path="$path"
38911       fi
38912 
38913       if test "x$new_path" = x; then
38914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38915 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38916         has_space=`$ECHO "$complete" | $GREP " "`
38917         if test "x$has_space" != x; then
38918           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38919 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38920         fi
38921         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38922       fi
38923     fi
38924 
38925     # Now join together the path and the arguments once again
38926     if test "x$arguments" != xEOL; then
38927       new_complete="$new_path ${arguments% *}"
38928     else
38929       new_complete="$new_path"
38930     fi
38931 
38932     if test "x$complete" != "x$new_complete"; then
38933       AR="$new_complete"
38934       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38935 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38936     fi
38937   fi
38938 
38939 
38940 
38941   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38942 
38943 
38944   # Publish this variable in the help.
38945 
38946 
38947   if [ -z "${LIPO+x}" ]; then
38948     # The variable is not set by user, try to locate tool using the code snippet
38949     for ac_prog in lipo
38950 do
38951   # Extract the first word of "$ac_prog", so it can be a program name with args.
38952 set dummy $ac_prog; ac_word=$2
38953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38954 $as_echo_n "checking for $ac_word... " >&6; }
38955 if ${ac_cv_path_LIPO+:} false; then :
38956   $as_echo_n "(cached) " >&6
38957 else
38958   case $LIPO in
38959   [\\/]* | ?:[\\/]*)
38960   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38961   ;;
38962   *)
38963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38964 for as_dir in $PATH
38965 do
38966   IFS=$as_save_IFS
38967   test -z "$as_dir" && as_dir=.
38968     for ac_exec_ext in '' $ac_executable_extensions; do
38969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38970     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38972     break 2
38973   fi
38974 done
38975   done
38976 IFS=$as_save_IFS
38977 
38978   ;;
38979 esac
38980 fi
38981 LIPO=$ac_cv_path_LIPO
38982 if test -n "$LIPO"; then
38983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38984 $as_echo "$LIPO" >&6; }
38985 else
38986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38987 $as_echo "no" >&6; }
38988 fi
38989 
38990 
38991   test -n "$LIPO" && break
38992 done
38993 
38994   else
38995     # The variable is set, but is it from the command line or the environment?
38996 
38997     # Try to remove the string !LIPO! from our list.
38998     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38999     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39000       # If it failed, the variable was not from the command line. Ignore it,
39001       # but warn the user (except for BASH, which is always set by the calling BASH).
39002       if test "xLIPO" != xBASH; then
39003         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39004 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39005       fi
39006       # Try to locate tool using the code snippet
39007       for ac_prog in lipo
39008 do
39009   # Extract the first word of "$ac_prog", so it can be a program name with args.
39010 set dummy $ac_prog; ac_word=$2
39011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39012 $as_echo_n "checking for $ac_word... " >&6; }
39013 if ${ac_cv_path_LIPO+:} false; then :
39014   $as_echo_n "(cached) " >&6
39015 else
39016   case $LIPO in
39017   [\\/]* | ?:[\\/]*)
39018   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39019   ;;
39020   *)
39021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39022 for as_dir in $PATH
39023 do
39024   IFS=$as_save_IFS
39025   test -z "$as_dir" && as_dir=.
39026     for ac_exec_ext in '' $ac_executable_extensions; do
39027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39028     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39030     break 2
39031   fi
39032 done
39033   done
39034 IFS=$as_save_IFS
39035 
39036   ;;
39037 esac
39038 fi
39039 LIPO=$ac_cv_path_LIPO
39040 if test -n "$LIPO"; then
39041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39042 $as_echo "$LIPO" >&6; }
39043 else
39044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39045 $as_echo "no" >&6; }
39046 fi
39047 
39048 
39049   test -n "$LIPO" && break
39050 done
39051 
39052     else
39053       # If it succeeded, then it was overridden by the user. We will use it
39054       # for the tool.
39055 
39056       # First remove it from the list of overridden variables, so we can test
39057       # for unknown variables in the end.
39058       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39059 
39060       # Check if we try to supply an empty value
39061       if test "x$LIPO" = x; then
39062         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39063 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39065 $as_echo_n "checking for LIPO... " >&6; }
39066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39067 $as_echo "disabled" >&6; }
39068       else
39069         # Check if the provided tool contains a complete path.
39070         tool_specified="$LIPO"
39071         tool_basename="${tool_specified##*/}"
39072         if test "x$tool_basename" = "x$tool_specified"; then
39073           # A command without a complete path is provided, search $PATH.
39074           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39075 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39076           # Extract the first word of "$tool_basename", so it can be a program name with args.
39077 set dummy $tool_basename; ac_word=$2
39078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39079 $as_echo_n "checking for $ac_word... " >&6; }
39080 if ${ac_cv_path_LIPO+:} false; then :
39081   $as_echo_n "(cached) " >&6
39082 else
39083   case $LIPO in
39084   [\\/]* | ?:[\\/]*)
39085   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39086   ;;
39087   *)
39088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39089 for as_dir in $PATH
39090 do
39091   IFS=$as_save_IFS
39092   test -z "$as_dir" && as_dir=.
39093     for ac_exec_ext in '' $ac_executable_extensions; do
39094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39095     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39097     break 2
39098   fi
39099 done
39100   done
39101 IFS=$as_save_IFS
39102 
39103   ;;
39104 esac
39105 fi
39106 LIPO=$ac_cv_path_LIPO
39107 if test -n "$LIPO"; then
39108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39109 $as_echo "$LIPO" >&6; }
39110 else
39111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39112 $as_echo "no" >&6; }
39113 fi
39114 
39115 
39116           if test "x$LIPO" = x; then
39117             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39118           fi
39119         else
39120           # Otherwise we believe it is a complete path. Use it as it is.
39121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39122 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39123           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39124 $as_echo_n "checking for LIPO... " >&6; }
39125           if test ! -x "$tool_specified"; then
39126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39127 $as_echo "not found" >&6; }
39128             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39129           fi
39130           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39131 $as_echo "$tool_specified" >&6; }
39132         fi
39133       fi
39134     fi
39135 
39136   fi
39137 
39138 
39139 
39140   # Only process if variable expands to non-empty
39141 
39142   if test "x$LIPO" != x; then
39143     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39144 
39145   # First separate the path from the arguments. This will split at the first
39146   # space.
39147   complete="$LIPO"
39148   path="${complete%% *}"
39149   tmp="$complete EOL"
39150   arguments="${tmp#* }"
39151 
39152   # Input might be given as Windows format, start by converting to
39153   # unix format.
39154   new_path=`$CYGPATH -u "$path"`
39155 
39156   # Now try to locate executable using which
39157   new_path=`$WHICH "$new_path" 2> /dev/null`
39158   # bat and cmd files are not always considered executable in cygwin causing which
39159   # to not find them
39160   if test "x$new_path" = x \
39161       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39162       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39163     new_path=`$CYGPATH -u "$path"`
39164   fi
39165   if test "x$new_path" = x; then
39166     # Oops. Which didn't find the executable.
39167     # The splitting of arguments from the executable at a space might have been incorrect,
39168     # since paths with space are more likely in Windows. Give it another try with the whole
39169     # argument.
39170     path="$complete"
39171     arguments="EOL"
39172     new_path=`$CYGPATH -u "$path"`
39173     new_path=`$WHICH "$new_path" 2> /dev/null`
39174     # bat and cmd files are not always considered executable in cygwin causing which
39175     # to not find them
39176     if test "x$new_path" = x \
39177         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39178         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39179       new_path=`$CYGPATH -u "$path"`
39180     fi
39181     if test "x$new_path" = x; then
39182       # It's still not found. Now this is an unrecoverable error.
39183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39184 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39185       has_space=`$ECHO "$complete" | $GREP " "`
39186       if test "x$has_space" != x; then
39187         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39188 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39189       fi
39190       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39191     fi
39192   fi
39193 
39194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39197   # "foo.exe" is OK but "foo" is an error.
39198   #
39199   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39200   # It is also a way to make sure we got the proper file name for the real test later on.
39201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39202   if test "x$test_shortpath" = x; then
39203     # Short path failed, file does not exist as specified.
39204     # Try adding .exe or .cmd
39205     if test -f "${new_path}.exe"; then
39206       input_to_shortpath="${new_path}.exe"
39207     elif test -f "${new_path}.cmd"; then
39208       input_to_shortpath="${new_path}.cmd"
39209     else
39210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39211 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39212       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39213 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39214       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39215     fi
39216   else
39217     input_to_shortpath="$new_path"
39218   fi
39219 
39220   # Call helper function which possibly converts this using DOS-style short mode.
39221   # If so, the updated path is stored in $new_path.
39222   new_path="$input_to_shortpath"
39223 
39224   input_path="$input_to_shortpath"
39225   # Check if we need to convert this using DOS-style short mode. If the path
39226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39227   # take no chances and rewrite it.
39228   # Note: m4 eats our [], so we need to use [ and ] instead.
39229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39230   if test "x$has_forbidden_chars" != x; then
39231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39235       # Going to short mode and back again did indeed matter. Since short mode is
39236       # case insensitive, let's make it lowercase to improve readability.
39237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39238       # Now convert it back to Unix-style (cygpath)
39239       input_path=`$CYGPATH -u "$shortmode_path"`
39240       new_path="$input_path"
39241     fi
39242   fi
39243 
39244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39245   if test "x$test_cygdrive_prefix" = x; then
39246     # As a simple fix, exclude /usr/bin since it's not a real path.
39247     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39249       # a path prefixed by /cygdrive for fixpath to work.
39250       new_path="$CYGWIN_ROOT_PATH$input_path"
39251     fi
39252   fi
39253 
39254   # remove trailing .exe if any
39255   new_path="${new_path/%.exe/}"
39256 
39257     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39258 
39259   # First separate the path from the arguments. This will split at the first
39260   # space.
39261   complete="$LIPO"
39262   path="${complete%% *}"
39263   tmp="$complete EOL"
39264   arguments="${tmp#* }"
39265 
39266   # Input might be given as Windows format, start by converting to
39267   # unix format.
39268   new_path="$path"
39269 
39270   windows_path="$new_path"
39271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39272     unix_path=`$CYGPATH -u "$windows_path"`
39273     new_path="$unix_path"
39274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39276     new_path="$unix_path"
39277   fi
39278 
39279 
39280   # Now try to locate executable using which
39281   new_path=`$WHICH "$new_path" 2> /dev/null`
39282 
39283   if test "x$new_path" = x; then
39284     # Oops. Which didn't find the executable.
39285     # The splitting of arguments from the executable at a space might have been incorrect,
39286     # since paths with space are more likely in Windows. Give it another try with the whole
39287     # argument.
39288     path="$complete"
39289     arguments="EOL"
39290     new_path="$path"
39291 
39292   windows_path="$new_path"
39293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39294     unix_path=`$CYGPATH -u "$windows_path"`
39295     new_path="$unix_path"
39296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39298     new_path="$unix_path"
39299   fi
39300 
39301 
39302     new_path=`$WHICH "$new_path" 2> /dev/null`
39303     # bat and cmd files are not always considered executable in MSYS causing which
39304     # to not find them
39305     if test "x$new_path" = x \
39306         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39307         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39308       new_path="$path"
39309 
39310   windows_path="$new_path"
39311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39312     unix_path=`$CYGPATH -u "$windows_path"`
39313     new_path="$unix_path"
39314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39316     new_path="$unix_path"
39317   fi
39318 
39319     fi
39320 
39321     if test "x$new_path" = x; then
39322       # It's still not found. Now this is an unrecoverable error.
39323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39324 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39325       has_space=`$ECHO "$complete" | $GREP " "`
39326       if test "x$has_space" != x; then
39327         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39328 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39329       fi
39330       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39331     fi
39332   fi
39333 
39334   # Now new_path has a complete unix path to the binary
39335   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39336     # Keep paths in /bin as-is, but remove trailing .exe if any
39337     new_path="${new_path/%.exe/}"
39338     # Do not save /bin paths to all_fixpath_prefixes!
39339   else
39340     # Not in mixed or Windows style, start by that.
39341     new_path=`cmd //c echo $new_path`
39342 
39343   input_path="$new_path"
39344   # Check if we need to convert this using DOS-style short mode. If the path
39345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39346   # take no chances and rewrite it.
39347   # Note: m4 eats our [], so we need to use [ and ] instead.
39348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39349   if test "x$has_forbidden_chars" != x; then
39350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39351     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39352   fi
39353 
39354     # Output is in $new_path
39355 
39356   windows_path="$new_path"
39357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39358     unix_path=`$CYGPATH -u "$windows_path"`
39359     new_path="$unix_path"
39360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39362     new_path="$unix_path"
39363   fi
39364 
39365     # remove trailing .exe if any
39366     new_path="${new_path/%.exe/}"
39367 
39368     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39369     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39370   fi
39371 
39372     else
39373       # We're on a unix platform. Hooray! :)
39374       # First separate the path from the arguments. This will split at the first
39375       # space.
39376       complete="$LIPO"
39377       path="${complete%% *}"
39378       tmp="$complete EOL"
39379       arguments="${tmp#* }"
39380 
39381       # Cannot rely on the command "which" here since it doesn't always work.
39382       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39383       if test -z "$is_absolute_path"; then
39384         # Path to executable is not absolute. Find it.
39385         IFS_save="$IFS"
39386         IFS=:
39387         for p in $PATH; do
39388           if test -f "$p/$path" && test -x "$p/$path"; then
39389             new_path="$p/$path"
39390             break
39391           fi
39392         done
39393         IFS="$IFS_save"
39394       else
39395         # This is an absolute path, we can use it without further modifications.
39396         new_path="$path"
39397       fi
39398 
39399       if test "x$new_path" = x; then
39400         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39401 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39402         has_space=`$ECHO "$complete" | $GREP " "`
39403         if test "x$has_space" != x; then
39404           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39405 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39406         fi
39407         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39408       fi
39409     fi
39410 
39411     # Now join together the path and the arguments once again
39412     if test "x$arguments" != xEOL; then
39413       new_complete="$new_path ${arguments% *}"
39414     else
39415       new_complete="$new_path"
39416     fi
39417 
39418     if test "x$complete" != "x$new_complete"; then
39419       LIPO="$new_complete"
39420       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39421 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39422     fi
39423   fi
39424 
39425   fi
39426 
39427   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39428     # Extract the first word of "mt", so it can be a program name with args.
39429 set dummy mt; ac_word=$2
39430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39431 $as_echo_n "checking for $ac_word... " >&6; }
39432 if ${ac_cv_prog_MT+:} false; then :
39433   $as_echo_n "(cached) " >&6
39434 else
39435   if test -n "$MT"; then
39436   ac_cv_prog_MT="$MT" # Let the user override the test.
39437 else
39438   ac_prog_rejected=no
39439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39440 for as_dir in $PATH
39441 do
39442   IFS=$as_save_IFS
39443   test -z "$as_dir" && as_dir=.
39444     for ac_exec_ext in '' $ac_executable_extensions; do
39445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39446     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39447        ac_prog_rejected=yes
39448        continue
39449      fi
39450     ac_cv_prog_MT="mt"
39451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39452     break 2
39453   fi
39454 done
39455   done
39456 IFS=$as_save_IFS
39457 
39458 if test $ac_prog_rejected = yes; then
39459   # We found a bogon in the path, so make sure we never use it.
39460   set dummy $ac_cv_prog_MT
39461   shift
39462   if test $# != 0; then
39463     # We chose a different compiler from the bogus one.
39464     # However, it has the same basename, so the bogon will be chosen
39465     # first if we set MT to just the basename; use the full file name.
39466     shift
39467     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39468   fi
39469 fi
39470 fi
39471 fi
39472 MT=$ac_cv_prog_MT
39473 if test -n "$MT"; then
39474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39475 $as_echo "$MT" >&6; }
39476 else
39477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39478 $as_echo "no" >&6; }
39479 fi
39480 
39481 
39482 
39483   # Only process if variable expands to non-empty
39484 
39485   if test "x$MT" != x; then
39486     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39487 
39488   # First separate the path from the arguments. This will split at the first
39489   # space.
39490   complete="$MT"
39491   path="${complete%% *}"
39492   tmp="$complete EOL"
39493   arguments="${tmp#* }"
39494 
39495   # Input might be given as Windows format, start by converting to
39496   # unix format.
39497   new_path=`$CYGPATH -u "$path"`
39498 
39499   # Now try to locate executable using which
39500   new_path=`$WHICH "$new_path" 2> /dev/null`
39501   # bat and cmd files are not always considered executable in cygwin causing which
39502   # to not find them
39503   if test "x$new_path" = x \
39504       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39505       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39506     new_path=`$CYGPATH -u "$path"`
39507   fi
39508   if test "x$new_path" = x; then
39509     # Oops. Which didn't find the executable.
39510     # The splitting of arguments from the executable at a space might have been incorrect,
39511     # since paths with space are more likely in Windows. Give it another try with the whole
39512     # argument.
39513     path="$complete"
39514     arguments="EOL"
39515     new_path=`$CYGPATH -u "$path"`
39516     new_path=`$WHICH "$new_path" 2> /dev/null`
39517     # bat and cmd files are not always considered executable in cygwin causing which
39518     # to not find them
39519     if test "x$new_path" = x \
39520         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39521         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39522       new_path=`$CYGPATH -u "$path"`
39523     fi
39524     if test "x$new_path" = x; then
39525       # It's still not found. Now this is an unrecoverable error.
39526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39527 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39528       has_space=`$ECHO "$complete" | $GREP " "`
39529       if test "x$has_space" != x; then
39530         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39531 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39532       fi
39533       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39534     fi
39535   fi
39536 
39537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39540   # "foo.exe" is OK but "foo" is an error.
39541   #
39542   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39543   # It is also a way to make sure we got the proper file name for the real test later on.
39544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39545   if test "x$test_shortpath" = x; then
39546     # Short path failed, file does not exist as specified.
39547     # Try adding .exe or .cmd
39548     if test -f "${new_path}.exe"; then
39549       input_to_shortpath="${new_path}.exe"
39550     elif test -f "${new_path}.cmd"; then
39551       input_to_shortpath="${new_path}.cmd"
39552     else
39553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39554 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39555       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39556 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39557       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39558     fi
39559   else
39560     input_to_shortpath="$new_path"
39561   fi
39562 
39563   # Call helper function which possibly converts this using DOS-style short mode.
39564   # If so, the updated path is stored in $new_path.
39565   new_path="$input_to_shortpath"
39566 
39567   input_path="$input_to_shortpath"
39568   # Check if we need to convert this using DOS-style short mode. If the path
39569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39570   # take no chances and rewrite it.
39571   # Note: m4 eats our [], so we need to use [ and ] instead.
39572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39573   if test "x$has_forbidden_chars" != x; then
39574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39575     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39576     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39577     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39578       # Going to short mode and back again did indeed matter. Since short mode is
39579       # case insensitive, let's make it lowercase to improve readability.
39580       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39581       # Now convert it back to Unix-style (cygpath)
39582       input_path=`$CYGPATH -u "$shortmode_path"`
39583       new_path="$input_path"
39584     fi
39585   fi
39586 
39587   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39588   if test "x$test_cygdrive_prefix" = x; then
39589     # As a simple fix, exclude /usr/bin since it's not a real path.
39590     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39591       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39592       # a path prefixed by /cygdrive for fixpath to work.
39593       new_path="$CYGWIN_ROOT_PATH$input_path"
39594     fi
39595   fi
39596 
39597   # remove trailing .exe if any
39598   new_path="${new_path/%.exe/}"
39599 
39600     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39601 
39602   # First separate the path from the arguments. This will split at the first
39603   # space.
39604   complete="$MT"
39605   path="${complete%% *}"
39606   tmp="$complete EOL"
39607   arguments="${tmp#* }"
39608 
39609   # Input might be given as Windows format, start by converting to
39610   # unix format.
39611   new_path="$path"
39612 
39613   windows_path="$new_path"
39614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39615     unix_path=`$CYGPATH -u "$windows_path"`
39616     new_path="$unix_path"
39617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39619     new_path="$unix_path"
39620   fi
39621 
39622 
39623   # Now try to locate executable using which
39624   new_path=`$WHICH "$new_path" 2> /dev/null`
39625 
39626   if test "x$new_path" = x; then
39627     # Oops. Which didn't find the executable.
39628     # The splitting of arguments from the executable at a space might have been incorrect,
39629     # since paths with space are more likely in Windows. Give it another try with the whole
39630     # argument.
39631     path="$complete"
39632     arguments="EOL"
39633     new_path="$path"
39634 
39635   windows_path="$new_path"
39636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39637     unix_path=`$CYGPATH -u "$windows_path"`
39638     new_path="$unix_path"
39639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39641     new_path="$unix_path"
39642   fi
39643 
39644 
39645     new_path=`$WHICH "$new_path" 2> /dev/null`
39646     # bat and cmd files are not always considered executable in MSYS causing which
39647     # to not find them
39648     if test "x$new_path" = x \
39649         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39650         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39651       new_path="$path"
39652 
39653   windows_path="$new_path"
39654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39655     unix_path=`$CYGPATH -u "$windows_path"`
39656     new_path="$unix_path"
39657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39659     new_path="$unix_path"
39660   fi
39661 
39662     fi
39663 
39664     if test "x$new_path" = x; then
39665       # It's still not found. Now this is an unrecoverable error.
39666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39667 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39668       has_space=`$ECHO "$complete" | $GREP " "`
39669       if test "x$has_space" != x; then
39670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39672       fi
39673       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39674     fi
39675   fi
39676 
39677   # Now new_path has a complete unix path to the binary
39678   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39679     # Keep paths in /bin as-is, but remove trailing .exe if any
39680     new_path="${new_path/%.exe/}"
39681     # Do not save /bin paths to all_fixpath_prefixes!
39682   else
39683     # Not in mixed or Windows style, start by that.
39684     new_path=`cmd //c echo $new_path`
39685 
39686   input_path="$new_path"
39687   # Check if we need to convert this using DOS-style short mode. If the path
39688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39689   # take no chances and rewrite it.
39690   # Note: m4 eats our [], so we need to use [ and ] instead.
39691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39692   if test "x$has_forbidden_chars" != x; then
39693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39695   fi
39696 
39697     # Output is in $new_path
39698 
39699   windows_path="$new_path"
39700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39701     unix_path=`$CYGPATH -u "$windows_path"`
39702     new_path="$unix_path"
39703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39705     new_path="$unix_path"
39706   fi
39707 
39708     # remove trailing .exe if any
39709     new_path="${new_path/%.exe/}"
39710 
39711     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39712     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39713   fi
39714 
39715     else
39716       # We're on a unix platform. Hooray! :)
39717       # First separate the path from the arguments. This will split at the first
39718       # space.
39719       complete="$MT"
39720       path="${complete%% *}"
39721       tmp="$complete EOL"
39722       arguments="${tmp#* }"
39723 
39724       # Cannot rely on the command "which" here since it doesn't always work.
39725       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39726       if test -z "$is_absolute_path"; then
39727         # Path to executable is not absolute. Find it.
39728         IFS_save="$IFS"
39729         IFS=:
39730         for p in $PATH; do
39731           if test -f "$p/$path" && test -x "$p/$path"; then
39732             new_path="$p/$path"
39733             break
39734           fi
39735         done
39736         IFS="$IFS_save"
39737       else
39738         # This is an absolute path, we can use it without further modifications.
39739         new_path="$path"
39740       fi
39741 
39742       if test "x$new_path" = x; then
39743         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39744 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39745         has_space=`$ECHO "$complete" | $GREP " "`
39746         if test "x$has_space" != x; then
39747           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39748 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39749         fi
39750         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39751       fi
39752     fi
39753 
39754     # Now join together the path and the arguments once again
39755     if test "x$arguments" != xEOL; then
39756       new_complete="$new_path ${arguments% *}"
39757     else
39758       new_complete="$new_path"
39759     fi
39760 
39761     if test "x$complete" != "x$new_complete"; then
39762       MT="$new_complete"
39763       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39764 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39765     fi
39766   fi
39767 
39768     # Setup the resource compiler (RC)
39769     # Extract the first word of "rc", so it can be a program name with args.
39770 set dummy rc; ac_word=$2
39771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39772 $as_echo_n "checking for $ac_word... " >&6; }
39773 if ${ac_cv_prog_RC+:} false; then :
39774   $as_echo_n "(cached) " >&6
39775 else
39776   if test -n "$RC"; then
39777   ac_cv_prog_RC="$RC" # Let the user override the test.
39778 else
39779   ac_prog_rejected=no
39780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39781 for as_dir in $PATH
39782 do
39783   IFS=$as_save_IFS
39784   test -z "$as_dir" && as_dir=.
39785     for ac_exec_ext in '' $ac_executable_extensions; do
39786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39787     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39788        ac_prog_rejected=yes
39789        continue
39790      fi
39791     ac_cv_prog_RC="rc"
39792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39793     break 2
39794   fi
39795 done
39796   done
39797 IFS=$as_save_IFS
39798 
39799 if test $ac_prog_rejected = yes; then
39800   # We found a bogon in the path, so make sure we never use it.
39801   set dummy $ac_cv_prog_RC
39802   shift
39803   if test $# != 0; then
39804     # We chose a different compiler from the bogus one.
39805     # However, it has the same basename, so the bogon will be chosen
39806     # first if we set RC to just the basename; use the full file name.
39807     shift
39808     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39809   fi
39810 fi
39811 fi
39812 fi
39813 RC=$ac_cv_prog_RC
39814 if test -n "$RC"; then
39815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39816 $as_echo "$RC" >&6; }
39817 else
39818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39819 $as_echo "no" >&6; }
39820 fi
39821 
39822 
39823 
39824   # Only process if variable expands to non-empty
39825 
39826   if test "x$RC" != x; then
39827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39828 
39829   # First separate the path from the arguments. This will split at the first
39830   # space.
39831   complete="$RC"
39832   path="${complete%% *}"
39833   tmp="$complete EOL"
39834   arguments="${tmp#* }"
39835 
39836   # Input might be given as Windows format, start by converting to
39837   # unix format.
39838   new_path=`$CYGPATH -u "$path"`
39839 
39840   # Now try to locate executable using which
39841   new_path=`$WHICH "$new_path" 2> /dev/null`
39842   # bat and cmd files are not always considered executable in cygwin causing which
39843   # to not find them
39844   if test "x$new_path" = x \
39845       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39846       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39847     new_path=`$CYGPATH -u "$path"`
39848   fi
39849   if test "x$new_path" = x; then
39850     # Oops. Which didn't find the executable.
39851     # The splitting of arguments from the executable at a space might have been incorrect,
39852     # since paths with space are more likely in Windows. Give it another try with the whole
39853     # argument.
39854     path="$complete"
39855     arguments="EOL"
39856     new_path=`$CYGPATH -u "$path"`
39857     new_path=`$WHICH "$new_path" 2> /dev/null`
39858     # bat and cmd files are not always considered executable in cygwin causing which
39859     # to not find them
39860     if test "x$new_path" = x \
39861         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39862         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39863       new_path=`$CYGPATH -u "$path"`
39864     fi
39865     if test "x$new_path" = x; then
39866       # It's still not found. Now this is an unrecoverable error.
39867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39868 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39869       has_space=`$ECHO "$complete" | $GREP " "`
39870       if test "x$has_space" != x; then
39871         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39872 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39873       fi
39874       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39875     fi
39876   fi
39877 
39878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39881   # "foo.exe" is OK but "foo" is an error.
39882   #
39883   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39884   # It is also a way to make sure we got the proper file name for the real test later on.
39885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39886   if test "x$test_shortpath" = x; then
39887     # Short path failed, file does not exist as specified.
39888     # Try adding .exe or .cmd
39889     if test -f "${new_path}.exe"; then
39890       input_to_shortpath="${new_path}.exe"
39891     elif test -f "${new_path}.cmd"; then
39892       input_to_shortpath="${new_path}.cmd"
39893     else
39894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39895 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39896       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39897 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39898       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39899     fi
39900   else
39901     input_to_shortpath="$new_path"
39902   fi
39903 
39904   # Call helper function which possibly converts this using DOS-style short mode.
39905   # If so, the updated path is stored in $new_path.
39906   new_path="$input_to_shortpath"
39907 
39908   input_path="$input_to_shortpath"
39909   # Check if we need to convert this using DOS-style short mode. If the path
39910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39911   # take no chances and rewrite it.
39912   # Note: m4 eats our [], so we need to use [ and ] instead.
39913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39914   if test "x$has_forbidden_chars" != x; then
39915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39919       # Going to short mode and back again did indeed matter. Since short mode is
39920       # case insensitive, let's make it lowercase to improve readability.
39921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39922       # Now convert it back to Unix-style (cygpath)
39923       input_path=`$CYGPATH -u "$shortmode_path"`
39924       new_path="$input_path"
39925     fi
39926   fi
39927 
39928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39929   if test "x$test_cygdrive_prefix" = x; then
39930     # As a simple fix, exclude /usr/bin since it's not a real path.
39931     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39933       # a path prefixed by /cygdrive for fixpath to work.
39934       new_path="$CYGWIN_ROOT_PATH$input_path"
39935     fi
39936   fi
39937 
39938   # remove trailing .exe if any
39939   new_path="${new_path/%.exe/}"
39940 
39941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942 
39943   # First separate the path from the arguments. This will split at the first
39944   # space.
39945   complete="$RC"
39946   path="${complete%% *}"
39947   tmp="$complete EOL"
39948   arguments="${tmp#* }"
39949 
39950   # Input might be given as Windows format, start by converting to
39951   # unix format.
39952   new_path="$path"
39953 
39954   windows_path="$new_path"
39955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39956     unix_path=`$CYGPATH -u "$windows_path"`
39957     new_path="$unix_path"
39958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39960     new_path="$unix_path"
39961   fi
39962 
39963 
39964   # Now try to locate executable using which
39965   new_path=`$WHICH "$new_path" 2> /dev/null`
39966 
39967   if test "x$new_path" = x; then
39968     # Oops. Which didn't find the executable.
39969     # The splitting of arguments from the executable at a space might have been incorrect,
39970     # since paths with space are more likely in Windows. Give it another try with the whole
39971     # argument.
39972     path="$complete"
39973     arguments="EOL"
39974     new_path="$path"
39975 
39976   windows_path="$new_path"
39977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978     unix_path=`$CYGPATH -u "$windows_path"`
39979     new_path="$unix_path"
39980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982     new_path="$unix_path"
39983   fi
39984 
39985 
39986     new_path=`$WHICH "$new_path" 2> /dev/null`
39987     # bat and cmd files are not always considered executable in MSYS causing which
39988     # to not find them
39989     if test "x$new_path" = x \
39990         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39991         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39992       new_path="$path"
39993 
39994   windows_path="$new_path"
39995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39996     unix_path=`$CYGPATH -u "$windows_path"`
39997     new_path="$unix_path"
39998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40000     new_path="$unix_path"
40001   fi
40002 
40003     fi
40004 
40005     if test "x$new_path" = x; then
40006       # It's still not found. Now this is an unrecoverable error.
40007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40008 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40009       has_space=`$ECHO "$complete" | $GREP " "`
40010       if test "x$has_space" != x; then
40011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40013       fi
40014       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40015     fi
40016   fi
40017 
40018   # Now new_path has a complete unix path to the binary
40019   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40020     # Keep paths in /bin as-is, but remove trailing .exe if any
40021     new_path="${new_path/%.exe/}"
40022     # Do not save /bin paths to all_fixpath_prefixes!
40023   else
40024     # Not in mixed or Windows style, start by that.
40025     new_path=`cmd //c echo $new_path`
40026 
40027   input_path="$new_path"
40028   # Check if we need to convert this using DOS-style short mode. If the path
40029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40030   # take no chances and rewrite it.
40031   # Note: m4 eats our [], so we need to use [ and ] instead.
40032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40033   if test "x$has_forbidden_chars" != x; then
40034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40036   fi
40037 
40038     # Output is in $new_path
40039 
40040   windows_path="$new_path"
40041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40042     unix_path=`$CYGPATH -u "$windows_path"`
40043     new_path="$unix_path"
40044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40046     new_path="$unix_path"
40047   fi
40048 
40049     # remove trailing .exe if any
40050     new_path="${new_path/%.exe/}"
40051 
40052     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40053     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40054   fi
40055 
40056     else
40057       # We're on a unix platform. Hooray! :)
40058       # First separate the path from the arguments. This will split at the first
40059       # space.
40060       complete="$RC"
40061       path="${complete%% *}"
40062       tmp="$complete EOL"
40063       arguments="${tmp#* }"
40064 
40065       # Cannot rely on the command "which" here since it doesn't always work.
40066       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40067       if test -z "$is_absolute_path"; then
40068         # Path to executable is not absolute. Find it.
40069         IFS_save="$IFS"
40070         IFS=:
40071         for p in $PATH; do
40072           if test -f "$p/$path" && test -x "$p/$path"; then
40073             new_path="$p/$path"
40074             break
40075           fi
40076         done
40077         IFS="$IFS_save"
40078       else
40079         # This is an absolute path, we can use it without further modifications.
40080         new_path="$path"
40081       fi
40082 
40083       if test "x$new_path" = x; then
40084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40085 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40086         has_space=`$ECHO "$complete" | $GREP " "`
40087         if test "x$has_space" != x; then
40088           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40089 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40090         fi
40091         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40092       fi
40093     fi
40094 
40095     # Now join together the path and the arguments once again
40096     if test "x$arguments" != xEOL; then
40097       new_complete="$new_path ${arguments% *}"
40098     else
40099       new_complete="$new_path"
40100     fi
40101 
40102     if test "x$complete" != "x$new_complete"; then
40103       RC="$new_complete"
40104       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40105 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40106     fi
40107   fi
40108 
40109     # Extract the first word of "dumpbin", so it can be a program name with args.
40110 set dummy dumpbin; ac_word=$2
40111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40112 $as_echo_n "checking for $ac_word... " >&6; }
40113 if ${ac_cv_prog_DUMPBIN+:} false; then :
40114   $as_echo_n "(cached) " >&6
40115 else
40116   if test -n "$DUMPBIN"; then
40117   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40118 else
40119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40120 for as_dir in $PATH
40121 do
40122   IFS=$as_save_IFS
40123   test -z "$as_dir" && as_dir=.
40124     for ac_exec_ext in '' $ac_executable_extensions; do
40125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40126     ac_cv_prog_DUMPBIN="dumpbin"
40127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40128     break 2
40129   fi
40130 done
40131   done
40132 IFS=$as_save_IFS
40133 
40134 fi
40135 fi
40136 DUMPBIN=$ac_cv_prog_DUMPBIN
40137 if test -n "$DUMPBIN"; then
40138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40139 $as_echo "$DUMPBIN" >&6; }
40140 else
40141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40142 $as_echo "no" >&6; }
40143 fi
40144 
40145 
40146 
40147   # Only process if variable expands to non-empty
40148 
40149   if test "x$DUMPBIN" != x; then
40150     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40151 
40152   # First separate the path from the arguments. This will split at the first
40153   # space.
40154   complete="$DUMPBIN"
40155   path="${complete%% *}"
40156   tmp="$complete EOL"
40157   arguments="${tmp#* }"
40158 
40159   # Input might be given as Windows format, start by converting to
40160   # unix format.
40161   new_path=`$CYGPATH -u "$path"`
40162 
40163   # Now try to locate executable using which
40164   new_path=`$WHICH "$new_path" 2> /dev/null`
40165   # bat and cmd files are not always considered executable in cygwin causing which
40166   # to not find them
40167   if test "x$new_path" = x \
40168       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40169       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40170     new_path=`$CYGPATH -u "$path"`
40171   fi
40172   if test "x$new_path" = x; then
40173     # Oops. Which didn't find the executable.
40174     # The splitting of arguments from the executable at a space might have been incorrect,
40175     # since paths with space are more likely in Windows. Give it another try with the whole
40176     # argument.
40177     path="$complete"
40178     arguments="EOL"
40179     new_path=`$CYGPATH -u "$path"`
40180     new_path=`$WHICH "$new_path" 2> /dev/null`
40181     # bat and cmd files are not always considered executable in cygwin causing which
40182     # to not find them
40183     if test "x$new_path" = x \
40184         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40185         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40186       new_path=`$CYGPATH -u "$path"`
40187     fi
40188     if test "x$new_path" = x; then
40189       # It's still not found. Now this is an unrecoverable error.
40190       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40191 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40192       has_space=`$ECHO "$complete" | $GREP " "`
40193       if test "x$has_space" != x; then
40194         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40195 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40196       fi
40197       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40198     fi
40199   fi
40200 
40201   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40202   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40203   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40204   # "foo.exe" is OK but "foo" is an error.
40205   #
40206   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40207   # It is also a way to make sure we got the proper file name for the real test later on.
40208   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40209   if test "x$test_shortpath" = x; then
40210     # Short path failed, file does not exist as specified.
40211     # Try adding .exe or .cmd
40212     if test -f "${new_path}.exe"; then
40213       input_to_shortpath="${new_path}.exe"
40214     elif test -f "${new_path}.cmd"; then
40215       input_to_shortpath="${new_path}.cmd"
40216     else
40217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40218 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40219       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40220 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40221       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40222     fi
40223   else
40224     input_to_shortpath="$new_path"
40225   fi
40226 
40227   # Call helper function which possibly converts this using DOS-style short mode.
40228   # If so, the updated path is stored in $new_path.
40229   new_path="$input_to_shortpath"
40230 
40231   input_path="$input_to_shortpath"
40232   # Check if we need to convert this using DOS-style short mode. If the path
40233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40234   # take no chances and rewrite it.
40235   # Note: m4 eats our [], so we need to use [ and ] instead.
40236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40237   if test "x$has_forbidden_chars" != x; then
40238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40239     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40240     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40241     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40242       # Going to short mode and back again did indeed matter. Since short mode is
40243       # case insensitive, let's make it lowercase to improve readability.
40244       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40245       # Now convert it back to Unix-style (cygpath)
40246       input_path=`$CYGPATH -u "$shortmode_path"`
40247       new_path="$input_path"
40248     fi
40249   fi
40250 
40251   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40252   if test "x$test_cygdrive_prefix" = x; then
40253     # As a simple fix, exclude /usr/bin since it's not a real path.
40254     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40255       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40256       # a path prefixed by /cygdrive for fixpath to work.
40257       new_path="$CYGWIN_ROOT_PATH$input_path"
40258     fi
40259   fi
40260 
40261   # remove trailing .exe if any
40262   new_path="${new_path/%.exe/}"
40263 
40264     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40265 
40266   # First separate the path from the arguments. This will split at the first
40267   # space.
40268   complete="$DUMPBIN"
40269   path="${complete%% *}"
40270   tmp="$complete EOL"
40271   arguments="${tmp#* }"
40272 
40273   # Input might be given as Windows format, start by converting to
40274   # unix format.
40275   new_path="$path"
40276 
40277   windows_path="$new_path"
40278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40279     unix_path=`$CYGPATH -u "$windows_path"`
40280     new_path="$unix_path"
40281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40283     new_path="$unix_path"
40284   fi
40285 
40286 
40287   # Now try to locate executable using which
40288   new_path=`$WHICH "$new_path" 2> /dev/null`
40289 
40290   if test "x$new_path" = x; then
40291     # Oops. Which didn't find the executable.
40292     # The splitting of arguments from the executable at a space might have been incorrect,
40293     # since paths with space are more likely in Windows. Give it another try with the whole
40294     # argument.
40295     path="$complete"
40296     arguments="EOL"
40297     new_path="$path"
40298 
40299   windows_path="$new_path"
40300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40301     unix_path=`$CYGPATH -u "$windows_path"`
40302     new_path="$unix_path"
40303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40305     new_path="$unix_path"
40306   fi
40307 
40308 
40309     new_path=`$WHICH "$new_path" 2> /dev/null`
40310     # bat and cmd files are not always considered executable in MSYS causing which
40311     # to not find them
40312     if test "x$new_path" = x \
40313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40315       new_path="$path"
40316 
40317   windows_path="$new_path"
40318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40319     unix_path=`$CYGPATH -u "$windows_path"`
40320     new_path="$unix_path"
40321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40323     new_path="$unix_path"
40324   fi
40325 
40326     fi
40327 
40328     if test "x$new_path" = x; then
40329       # It's still not found. Now this is an unrecoverable error.
40330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40331 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40332       has_space=`$ECHO "$complete" | $GREP " "`
40333       if test "x$has_space" != x; then
40334         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40335 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40336       fi
40337       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40338     fi
40339   fi
40340 
40341   # Now new_path has a complete unix path to the binary
40342   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40343     # Keep paths in /bin as-is, but remove trailing .exe if any
40344     new_path="${new_path/%.exe/}"
40345     # Do not save /bin paths to all_fixpath_prefixes!
40346   else
40347     # Not in mixed or Windows style, start by that.
40348     new_path=`cmd //c echo $new_path`
40349 
40350   input_path="$new_path"
40351   # Check if we need to convert this using DOS-style short mode. If the path
40352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40353   # take no chances and rewrite it.
40354   # Note: m4 eats our [], so we need to use [ and ] instead.
40355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40356   if test "x$has_forbidden_chars" != x; then
40357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40358     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40359   fi
40360 
40361     # Output is in $new_path
40362 
40363   windows_path="$new_path"
40364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40365     unix_path=`$CYGPATH -u "$windows_path"`
40366     new_path="$unix_path"
40367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40369     new_path="$unix_path"
40370   fi
40371 
40372     # remove trailing .exe if any
40373     new_path="${new_path/%.exe/}"
40374 
40375     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40376     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40377   fi
40378 
40379     else
40380       # We're on a unix platform. Hooray! :)
40381       # First separate the path from the arguments. This will split at the first
40382       # space.
40383       complete="$DUMPBIN"
40384       path="${complete%% *}"
40385       tmp="$complete EOL"
40386       arguments="${tmp#* }"
40387 
40388       # Cannot rely on the command "which" here since it doesn't always work.
40389       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40390       if test -z "$is_absolute_path"; then
40391         # Path to executable is not absolute. Find it.
40392         IFS_save="$IFS"
40393         IFS=:
40394         for p in $PATH; do
40395           if test -f "$p/$path" && test -x "$p/$path"; then
40396             new_path="$p/$path"
40397             break
40398           fi
40399         done
40400         IFS="$IFS_save"
40401       else
40402         # This is an absolute path, we can use it without further modifications.
40403         new_path="$path"
40404       fi
40405 
40406       if test "x$new_path" = x; then
40407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40408 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40409         has_space=`$ECHO "$complete" | $GREP " "`
40410         if test "x$has_space" != x; then
40411           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40412 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40413         fi
40414         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40415       fi
40416     fi
40417 
40418     # Now join together the path and the arguments once again
40419     if test "x$arguments" != xEOL; then
40420       new_complete="$new_path ${arguments% *}"
40421     else
40422       new_complete="$new_path"
40423     fi
40424 
40425     if test "x$complete" != "x$new_complete"; then
40426       DUMPBIN="$new_complete"
40427       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40428 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40429     fi
40430   fi
40431 
40432     # We need to check for 'msbuild.exe' because at the place where we expect to
40433     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40434     # won't find the 'msbuild.exe' executable in that case (and the
40435     # 'ac_executable_extensions' is unusable due to performance reasons).
40436     # Notice that we intentionally don't fix up the path to MSBUILD because we
40437     # will call it in a DOS shell during freetype detection on Windows (see
40438     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40439     # Extract the first word of "msbuild.exe", so it can be a program name with args.
40440 set dummy msbuild.exe; ac_word=$2
40441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40442 $as_echo_n "checking for $ac_word... " >&6; }
40443 if ${ac_cv_prog_MSBUILD+:} false; then :
40444   $as_echo_n "(cached) " >&6
40445 else
40446   if test -n "$MSBUILD"; then
40447   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40448 else
40449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40450 for as_dir in $PATH
40451 do
40452   IFS=$as_save_IFS
40453   test -z "$as_dir" && as_dir=.
40454     for ac_exec_ext in '' $ac_executable_extensions; do
40455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40456     ac_cv_prog_MSBUILD="msbuild.exe"
40457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40458     break 2
40459   fi
40460 done
40461   done
40462 IFS=$as_save_IFS
40463 
40464 fi
40465 fi
40466 MSBUILD=$ac_cv_prog_MSBUILD
40467 if test -n "$MSBUILD"; then
40468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40469 $as_echo "$MSBUILD" >&6; }
40470 else
40471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40472 $as_echo "no" >&6; }
40473 fi
40474 
40475 
40476   fi
40477 
40478   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40479 
40480 
40481   # Publish this variable in the help.
40482 
40483 
40484   if [ -z "${STRIP+x}" ]; then
40485     # The variable is not set by user, try to locate tool using the code snippet
40486     for ac_prog in strip
40487 do
40488   # Extract the first word of "$ac_prog", so it can be a program name with args.
40489 set dummy $ac_prog; ac_word=$2
40490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40491 $as_echo_n "checking for $ac_word... " >&6; }
40492 if ${ac_cv_path_STRIP+:} false; then :
40493   $as_echo_n "(cached) " >&6
40494 else
40495   case $STRIP in
40496   [\\/]* | ?:[\\/]*)
40497   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40498   ;;
40499   *)
40500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40501 for as_dir in $PATH
40502 do
40503   IFS=$as_save_IFS
40504   test -z "$as_dir" && as_dir=.
40505     for ac_exec_ext in '' $ac_executable_extensions; do
40506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40507     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40509     break 2
40510   fi
40511 done
40512   done
40513 IFS=$as_save_IFS
40514 
40515   ;;
40516 esac
40517 fi
40518 STRIP=$ac_cv_path_STRIP
40519 if test -n "$STRIP"; then
40520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40521 $as_echo "$STRIP" >&6; }
40522 else
40523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40524 $as_echo "no" >&6; }
40525 fi
40526 
40527 
40528   test -n "$STRIP" && break
40529 done
40530 
40531   else
40532     # The variable is set, but is it from the command line or the environment?
40533 
40534     # Try to remove the string !STRIP! from our list.
40535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40537       # If it failed, the variable was not from the command line. Ignore it,
40538       # but warn the user (except for BASH, which is always set by the calling BASH).
40539       if test "xSTRIP" != xBASH; then
40540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40541 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40542       fi
40543       # Try to locate tool using the code snippet
40544       for ac_prog in strip
40545 do
40546   # Extract the first word of "$ac_prog", so it can be a program name with args.
40547 set dummy $ac_prog; ac_word=$2
40548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40549 $as_echo_n "checking for $ac_word... " >&6; }
40550 if ${ac_cv_path_STRIP+:} false; then :
40551   $as_echo_n "(cached) " >&6
40552 else
40553   case $STRIP in
40554   [\\/]* | ?:[\\/]*)
40555   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40556   ;;
40557   *)
40558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40559 for as_dir in $PATH
40560 do
40561   IFS=$as_save_IFS
40562   test -z "$as_dir" && as_dir=.
40563     for ac_exec_ext in '' $ac_executable_extensions; do
40564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40565     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40567     break 2
40568   fi
40569 done
40570   done
40571 IFS=$as_save_IFS
40572 
40573   ;;
40574 esac
40575 fi
40576 STRIP=$ac_cv_path_STRIP
40577 if test -n "$STRIP"; then
40578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40579 $as_echo "$STRIP" >&6; }
40580 else
40581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40582 $as_echo "no" >&6; }
40583 fi
40584 
40585 
40586   test -n "$STRIP" && break
40587 done
40588 
40589     else
40590       # If it succeeded, then it was overridden by the user. We will use it
40591       # for the tool.
40592 
40593       # First remove it from the list of overridden variables, so we can test
40594       # for unknown variables in the end.
40595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40596 
40597       # Check if we try to supply an empty value
40598       if test "x$STRIP" = x; then
40599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40600 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40602 $as_echo_n "checking for STRIP... " >&6; }
40603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40604 $as_echo "disabled" >&6; }
40605       else
40606         # Check if the provided tool contains a complete path.
40607         tool_specified="$STRIP"
40608         tool_basename="${tool_specified##*/}"
40609         if test "x$tool_basename" = "x$tool_specified"; then
40610           # A command without a complete path is provided, search $PATH.
40611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40612 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40613           # Extract the first word of "$tool_basename", so it can be a program name with args.
40614 set dummy $tool_basename; ac_word=$2
40615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40616 $as_echo_n "checking for $ac_word... " >&6; }
40617 if ${ac_cv_path_STRIP+:} false; then :
40618   $as_echo_n "(cached) " >&6
40619 else
40620   case $STRIP in
40621   [\\/]* | ?:[\\/]*)
40622   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40623   ;;
40624   *)
40625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40626 for as_dir in $PATH
40627 do
40628   IFS=$as_save_IFS
40629   test -z "$as_dir" && as_dir=.
40630     for ac_exec_ext in '' $ac_executable_extensions; do
40631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40632     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40634     break 2
40635   fi
40636 done
40637   done
40638 IFS=$as_save_IFS
40639 
40640   ;;
40641 esac
40642 fi
40643 STRIP=$ac_cv_path_STRIP
40644 if test -n "$STRIP"; then
40645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40646 $as_echo "$STRIP" >&6; }
40647 else
40648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40649 $as_echo "no" >&6; }
40650 fi
40651 
40652 
40653           if test "x$STRIP" = x; then
40654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40655           fi
40656         else
40657           # Otherwise we believe it is a complete path. Use it as it is.
40658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40659 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40661 $as_echo_n "checking for STRIP... " >&6; }
40662           if test ! -x "$tool_specified"; then
40663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40664 $as_echo "not found" >&6; }
40665             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40666           fi
40667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40668 $as_echo "$tool_specified" >&6; }
40669         fi
40670       fi
40671     fi
40672 
40673   fi
40674 
40675 
40676 
40677   # Only process if variable expands to non-empty
40678 
40679   if test "x$STRIP" != x; then
40680     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40681 
40682   # First separate the path from the arguments. This will split at the first
40683   # space.
40684   complete="$STRIP"
40685   path="${complete%% *}"
40686   tmp="$complete EOL"
40687   arguments="${tmp#* }"
40688 
40689   # Input might be given as Windows format, start by converting to
40690   # unix format.
40691   new_path=`$CYGPATH -u "$path"`
40692 
40693   # Now try to locate executable using which
40694   new_path=`$WHICH "$new_path" 2> /dev/null`
40695   # bat and cmd files are not always considered executable in cygwin causing which
40696   # to not find them
40697   if test "x$new_path" = x \
40698       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40699       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40700     new_path=`$CYGPATH -u "$path"`
40701   fi
40702   if test "x$new_path" = x; then
40703     # Oops. Which didn't find the executable.
40704     # The splitting of arguments from the executable at a space might have been incorrect,
40705     # since paths with space are more likely in Windows. Give it another try with the whole
40706     # argument.
40707     path="$complete"
40708     arguments="EOL"
40709     new_path=`$CYGPATH -u "$path"`
40710     new_path=`$WHICH "$new_path" 2> /dev/null`
40711     # bat and cmd files are not always considered executable in cygwin causing which
40712     # to not find them
40713     if test "x$new_path" = x \
40714         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40715         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40716       new_path=`$CYGPATH -u "$path"`
40717     fi
40718     if test "x$new_path" = x; then
40719       # It's still not found. Now this is an unrecoverable error.
40720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40721 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40722       has_space=`$ECHO "$complete" | $GREP " "`
40723       if test "x$has_space" != x; then
40724         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40725 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40726       fi
40727       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40728     fi
40729   fi
40730 
40731   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40732   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40733   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40734   # "foo.exe" is OK but "foo" is an error.
40735   #
40736   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40737   # It is also a way to make sure we got the proper file name for the real test later on.
40738   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40739   if test "x$test_shortpath" = x; then
40740     # Short path failed, file does not exist as specified.
40741     # Try adding .exe or .cmd
40742     if test -f "${new_path}.exe"; then
40743       input_to_shortpath="${new_path}.exe"
40744     elif test -f "${new_path}.cmd"; then
40745       input_to_shortpath="${new_path}.cmd"
40746     else
40747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40748 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40749       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40750 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40751       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40752     fi
40753   else
40754     input_to_shortpath="$new_path"
40755   fi
40756 
40757   # Call helper function which possibly converts this using DOS-style short mode.
40758   # If so, the updated path is stored in $new_path.
40759   new_path="$input_to_shortpath"
40760 
40761   input_path="$input_to_shortpath"
40762   # Check if we need to convert this using DOS-style short mode. If the path
40763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40764   # take no chances and rewrite it.
40765   # Note: m4 eats our [], so we need to use [ and ] instead.
40766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40767   if test "x$has_forbidden_chars" != x; then
40768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40772       # Going to short mode and back again did indeed matter. Since short mode is
40773       # case insensitive, let's make it lowercase to improve readability.
40774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40775       # Now convert it back to Unix-style (cygpath)
40776       input_path=`$CYGPATH -u "$shortmode_path"`
40777       new_path="$input_path"
40778     fi
40779   fi
40780 
40781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40782   if test "x$test_cygdrive_prefix" = x; then
40783     # As a simple fix, exclude /usr/bin since it's not a real path.
40784     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40786       # a path prefixed by /cygdrive for fixpath to work.
40787       new_path="$CYGWIN_ROOT_PATH$input_path"
40788     fi
40789   fi
40790 
40791   # remove trailing .exe if any
40792   new_path="${new_path/%.exe/}"
40793 
40794     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40795 
40796   # First separate the path from the arguments. This will split at the first
40797   # space.
40798   complete="$STRIP"
40799   path="${complete%% *}"
40800   tmp="$complete EOL"
40801   arguments="${tmp#* }"
40802 
40803   # Input might be given as Windows format, start by converting to
40804   # unix format.
40805   new_path="$path"
40806 
40807   windows_path="$new_path"
40808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40809     unix_path=`$CYGPATH -u "$windows_path"`
40810     new_path="$unix_path"
40811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40813     new_path="$unix_path"
40814   fi
40815 
40816 
40817   # Now try to locate executable using which
40818   new_path=`$WHICH "$new_path" 2> /dev/null`
40819 
40820   if test "x$new_path" = x; then
40821     # Oops. Which didn't find the executable.
40822     # The splitting of arguments from the executable at a space might have been incorrect,
40823     # since paths with space are more likely in Windows. Give it another try with the whole
40824     # argument.
40825     path="$complete"
40826     arguments="EOL"
40827     new_path="$path"
40828 
40829   windows_path="$new_path"
40830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40831     unix_path=`$CYGPATH -u "$windows_path"`
40832     new_path="$unix_path"
40833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40835     new_path="$unix_path"
40836   fi
40837 
40838 
40839     new_path=`$WHICH "$new_path" 2> /dev/null`
40840     # bat and cmd files are not always considered executable in MSYS causing which
40841     # to not find them
40842     if test "x$new_path" = x \
40843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40845       new_path="$path"
40846 
40847   windows_path="$new_path"
40848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849     unix_path=`$CYGPATH -u "$windows_path"`
40850     new_path="$unix_path"
40851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40853     new_path="$unix_path"
40854   fi
40855 
40856     fi
40857 
40858     if test "x$new_path" = x; then
40859       # It's still not found. Now this is an unrecoverable error.
40860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40861 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40862       has_space=`$ECHO "$complete" | $GREP " "`
40863       if test "x$has_space" != x; then
40864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40866       fi
40867       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40868     fi
40869   fi
40870 
40871   # Now new_path has a complete unix path to the binary
40872   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40873     # Keep paths in /bin as-is, but remove trailing .exe if any
40874     new_path="${new_path/%.exe/}"
40875     # Do not save /bin paths to all_fixpath_prefixes!
40876   else
40877     # Not in mixed or Windows style, start by that.
40878     new_path=`cmd //c echo $new_path`
40879 
40880   input_path="$new_path"
40881   # Check if we need to convert this using DOS-style short mode. If the path
40882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40883   # take no chances and rewrite it.
40884   # Note: m4 eats our [], so we need to use [ and ] instead.
40885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40886   if test "x$has_forbidden_chars" != x; then
40887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40889   fi
40890 
40891     # Output is in $new_path
40892 
40893   windows_path="$new_path"
40894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895     unix_path=`$CYGPATH -u "$windows_path"`
40896     new_path="$unix_path"
40897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899     new_path="$unix_path"
40900   fi
40901 
40902     # remove trailing .exe if any
40903     new_path="${new_path/%.exe/}"
40904 
40905     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40906     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40907   fi
40908 
40909     else
40910       # We're on a unix platform. Hooray! :)
40911       # First separate the path from the arguments. This will split at the first
40912       # space.
40913       complete="$STRIP"
40914       path="${complete%% *}"
40915       tmp="$complete EOL"
40916       arguments="${tmp#* }"
40917 
40918       # Cannot rely on the command "which" here since it doesn't always work.
40919       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40920       if test -z "$is_absolute_path"; then
40921         # Path to executable is not absolute. Find it.
40922         IFS_save="$IFS"
40923         IFS=:
40924         for p in $PATH; do
40925           if test -f "$p/$path" && test -x "$p/$path"; then
40926             new_path="$p/$path"
40927             break
40928           fi
40929         done
40930         IFS="$IFS_save"
40931       else
40932         # This is an absolute path, we can use it without further modifications.
40933         new_path="$path"
40934       fi
40935 
40936       if test "x$new_path" = x; then
40937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40938 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40939         has_space=`$ECHO "$complete" | $GREP " "`
40940         if test "x$has_space" != x; then
40941           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40942 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40943         fi
40944         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40945       fi
40946     fi
40947 
40948     # Now join together the path and the arguments once again
40949     if test "x$arguments" != xEOL; then
40950       new_complete="$new_path ${arguments% *}"
40951     else
40952       new_complete="$new_path"
40953     fi
40954 
40955     if test "x$complete" != "x$new_complete"; then
40956       STRIP="$new_complete"
40957       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40958 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40959     fi
40960   fi
40961 
40962 
40963 
40964   # Publish this variable in the help.
40965 
40966 
40967   if [ -z "${NM+x}" ]; then
40968     # The variable is not set by user, try to locate tool using the code snippet
40969     for ac_prog in nm
40970 do
40971   # Extract the first word of "$ac_prog", so it can be a program name with args.
40972 set dummy $ac_prog; ac_word=$2
40973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40974 $as_echo_n "checking for $ac_word... " >&6; }
40975 if ${ac_cv_path_NM+:} false; then :
40976   $as_echo_n "(cached) " >&6
40977 else
40978   case $NM in
40979   [\\/]* | ?:[\\/]*)
40980   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40981   ;;
40982   *)
40983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40984 for as_dir in $PATH
40985 do
40986   IFS=$as_save_IFS
40987   test -z "$as_dir" && as_dir=.
40988     for ac_exec_ext in '' $ac_executable_extensions; do
40989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40990     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40992     break 2
40993   fi
40994 done
40995   done
40996 IFS=$as_save_IFS
40997 
40998   ;;
40999 esac
41000 fi
41001 NM=$ac_cv_path_NM
41002 if test -n "$NM"; then
41003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41004 $as_echo "$NM" >&6; }
41005 else
41006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41007 $as_echo "no" >&6; }
41008 fi
41009 
41010 
41011   test -n "$NM" && break
41012 done
41013 
41014   else
41015     # The variable is set, but is it from the command line or the environment?
41016 
41017     # Try to remove the string !NM! from our list.
41018     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41019     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41020       # If it failed, the variable was not from the command line. Ignore it,
41021       # but warn the user (except for BASH, which is always set by the calling BASH).
41022       if test "xNM" != xBASH; then
41023         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41024 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41025       fi
41026       # Try to locate tool using the code snippet
41027       for ac_prog in nm
41028 do
41029   # Extract the first word of "$ac_prog", so it can be a program name with args.
41030 set dummy $ac_prog; ac_word=$2
41031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41032 $as_echo_n "checking for $ac_word... " >&6; }
41033 if ${ac_cv_path_NM+:} false; then :
41034   $as_echo_n "(cached) " >&6
41035 else
41036   case $NM in
41037   [\\/]* | ?:[\\/]*)
41038   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41039   ;;
41040   *)
41041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41042 for as_dir in $PATH
41043 do
41044   IFS=$as_save_IFS
41045   test -z "$as_dir" && as_dir=.
41046     for ac_exec_ext in '' $ac_executable_extensions; do
41047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41048     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41050     break 2
41051   fi
41052 done
41053   done
41054 IFS=$as_save_IFS
41055 
41056   ;;
41057 esac
41058 fi
41059 NM=$ac_cv_path_NM
41060 if test -n "$NM"; then
41061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41062 $as_echo "$NM" >&6; }
41063 else
41064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41065 $as_echo "no" >&6; }
41066 fi
41067 
41068 
41069   test -n "$NM" && break
41070 done
41071 
41072     else
41073       # If it succeeded, then it was overridden by the user. We will use it
41074       # for the tool.
41075 
41076       # First remove it from the list of overridden variables, so we can test
41077       # for unknown variables in the end.
41078       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41079 
41080       # Check if we try to supply an empty value
41081       if test "x$NM" = x; then
41082         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41083 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41085 $as_echo_n "checking for NM... " >&6; }
41086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41087 $as_echo "disabled" >&6; }
41088       else
41089         # Check if the provided tool contains a complete path.
41090         tool_specified="$NM"
41091         tool_basename="${tool_specified##*/}"
41092         if test "x$tool_basename" = "x$tool_specified"; then
41093           # A command without a complete path is provided, search $PATH.
41094           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41095 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41096           # Extract the first word of "$tool_basename", so it can be a program name with args.
41097 set dummy $tool_basename; ac_word=$2
41098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41099 $as_echo_n "checking for $ac_word... " >&6; }
41100 if ${ac_cv_path_NM+:} false; then :
41101   $as_echo_n "(cached) " >&6
41102 else
41103   case $NM in
41104   [\\/]* | ?:[\\/]*)
41105   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41106   ;;
41107   *)
41108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41109 for as_dir in $PATH
41110 do
41111   IFS=$as_save_IFS
41112   test -z "$as_dir" && as_dir=.
41113     for ac_exec_ext in '' $ac_executable_extensions; do
41114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41115     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41117     break 2
41118   fi
41119 done
41120   done
41121 IFS=$as_save_IFS
41122 
41123   ;;
41124 esac
41125 fi
41126 NM=$ac_cv_path_NM
41127 if test -n "$NM"; then
41128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41129 $as_echo "$NM" >&6; }
41130 else
41131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41132 $as_echo "no" >&6; }
41133 fi
41134 
41135 
41136           if test "x$NM" = x; then
41137             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41138           fi
41139         else
41140           # Otherwise we believe it is a complete path. Use it as it is.
41141           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41142 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41143           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41144 $as_echo_n "checking for NM... " >&6; }
41145           if test ! -x "$tool_specified"; then
41146             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41147 $as_echo "not found" >&6; }
41148             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41149           fi
41150           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41151 $as_echo "$tool_specified" >&6; }
41152         fi
41153       fi
41154     fi
41155 
41156   fi
41157 
41158 
41159 
41160   # Only process if variable expands to non-empty
41161 
41162   if test "x$NM" != x; then
41163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41164 
41165   # First separate the path from the arguments. This will split at the first
41166   # space.
41167   complete="$NM"
41168   path="${complete%% *}"
41169   tmp="$complete EOL"
41170   arguments="${tmp#* }"
41171 
41172   # Input might be given as Windows format, start by converting to
41173   # unix format.
41174   new_path=`$CYGPATH -u "$path"`
41175 
41176   # Now try to locate executable using which
41177   new_path=`$WHICH "$new_path" 2> /dev/null`
41178   # bat and cmd files are not always considered executable in cygwin causing which
41179   # to not find them
41180   if test "x$new_path" = x \
41181       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41182       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41183     new_path=`$CYGPATH -u "$path"`
41184   fi
41185   if test "x$new_path" = x; then
41186     # Oops. Which didn't find the executable.
41187     # The splitting of arguments from the executable at a space might have been incorrect,
41188     # since paths with space are more likely in Windows. Give it another try with the whole
41189     # argument.
41190     path="$complete"
41191     arguments="EOL"
41192     new_path=`$CYGPATH -u "$path"`
41193     new_path=`$WHICH "$new_path" 2> /dev/null`
41194     # bat and cmd files are not always considered executable in cygwin causing which
41195     # to not find them
41196     if test "x$new_path" = x \
41197         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41198         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41199       new_path=`$CYGPATH -u "$path"`
41200     fi
41201     if test "x$new_path" = x; then
41202       # It's still not found. Now this is an unrecoverable error.
41203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41204 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41205       has_space=`$ECHO "$complete" | $GREP " "`
41206       if test "x$has_space" != x; then
41207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41209       fi
41210       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41211     fi
41212   fi
41213 
41214   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41215   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41216   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41217   # "foo.exe" is OK but "foo" is an error.
41218   #
41219   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41220   # It is also a way to make sure we got the proper file name for the real test later on.
41221   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41222   if test "x$test_shortpath" = x; then
41223     # Short path failed, file does not exist as specified.
41224     # Try adding .exe or .cmd
41225     if test -f "${new_path}.exe"; then
41226       input_to_shortpath="${new_path}.exe"
41227     elif test -f "${new_path}.cmd"; then
41228       input_to_shortpath="${new_path}.cmd"
41229     else
41230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41231 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41232       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41233 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41234       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41235     fi
41236   else
41237     input_to_shortpath="$new_path"
41238   fi
41239 
41240   # Call helper function which possibly converts this using DOS-style short mode.
41241   # If so, the updated path is stored in $new_path.
41242   new_path="$input_to_shortpath"
41243 
41244   input_path="$input_to_shortpath"
41245   # Check if we need to convert this using DOS-style short mode. If the path
41246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41247   # take no chances and rewrite it.
41248   # Note: m4 eats our [], so we need to use [ and ] instead.
41249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41250   if test "x$has_forbidden_chars" != x; then
41251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41255       # Going to short mode and back again did indeed matter. Since short mode is
41256       # case insensitive, let's make it lowercase to improve readability.
41257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41258       # Now convert it back to Unix-style (cygpath)
41259       input_path=`$CYGPATH -u "$shortmode_path"`
41260       new_path="$input_path"
41261     fi
41262   fi
41263 
41264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41265   if test "x$test_cygdrive_prefix" = x; then
41266     # As a simple fix, exclude /usr/bin since it's not a real path.
41267     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41269       # a path prefixed by /cygdrive for fixpath to work.
41270       new_path="$CYGWIN_ROOT_PATH$input_path"
41271     fi
41272   fi
41273 
41274   # remove trailing .exe if any
41275   new_path="${new_path/%.exe/}"
41276 
41277     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41278 
41279   # First separate the path from the arguments. This will split at the first
41280   # space.
41281   complete="$NM"
41282   path="${complete%% *}"
41283   tmp="$complete EOL"
41284   arguments="${tmp#* }"
41285 
41286   # Input might be given as Windows format, start by converting to
41287   # unix format.
41288   new_path="$path"
41289 
41290   windows_path="$new_path"
41291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41292     unix_path=`$CYGPATH -u "$windows_path"`
41293     new_path="$unix_path"
41294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41296     new_path="$unix_path"
41297   fi
41298 
41299 
41300   # Now try to locate executable using which
41301   new_path=`$WHICH "$new_path" 2> /dev/null`
41302 
41303   if test "x$new_path" = x; then
41304     # Oops. Which didn't find the executable.
41305     # The splitting of arguments from the executable at a space might have been incorrect,
41306     # since paths with space are more likely in Windows. Give it another try with the whole
41307     # argument.
41308     path="$complete"
41309     arguments="EOL"
41310     new_path="$path"
41311 
41312   windows_path="$new_path"
41313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41314     unix_path=`$CYGPATH -u "$windows_path"`
41315     new_path="$unix_path"
41316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41318     new_path="$unix_path"
41319   fi
41320 
41321 
41322     new_path=`$WHICH "$new_path" 2> /dev/null`
41323     # bat and cmd files are not always considered executable in MSYS causing which
41324     # to not find them
41325     if test "x$new_path" = x \
41326         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41327         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41328       new_path="$path"
41329 
41330   windows_path="$new_path"
41331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41332     unix_path=`$CYGPATH -u "$windows_path"`
41333     new_path="$unix_path"
41334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41336     new_path="$unix_path"
41337   fi
41338 
41339     fi
41340 
41341     if test "x$new_path" = x; then
41342       # It's still not found. Now this is an unrecoverable error.
41343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41344 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41345       has_space=`$ECHO "$complete" | $GREP " "`
41346       if test "x$has_space" != x; then
41347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41349       fi
41350       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41351     fi
41352   fi
41353 
41354   # Now new_path has a complete unix path to the binary
41355   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41356     # Keep paths in /bin as-is, but remove trailing .exe if any
41357     new_path="${new_path/%.exe/}"
41358     # Do not save /bin paths to all_fixpath_prefixes!
41359   else
41360     # Not in mixed or Windows style, start by that.
41361     new_path=`cmd //c echo $new_path`
41362 
41363   input_path="$new_path"
41364   # Check if we need to convert this using DOS-style short mode. If the path
41365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41366   # take no chances and rewrite it.
41367   # Note: m4 eats our [], so we need to use [ and ] instead.
41368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41369   if test "x$has_forbidden_chars" != x; then
41370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41372   fi
41373 
41374     # Output is in $new_path
41375 
41376   windows_path="$new_path"
41377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41378     unix_path=`$CYGPATH -u "$windows_path"`
41379     new_path="$unix_path"
41380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41382     new_path="$unix_path"
41383   fi
41384 
41385     # remove trailing .exe if any
41386     new_path="${new_path/%.exe/}"
41387 
41388     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41389     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41390   fi
41391 
41392     else
41393       # We're on a unix platform. Hooray! :)
41394       # First separate the path from the arguments. This will split at the first
41395       # space.
41396       complete="$NM"
41397       path="${complete%% *}"
41398       tmp="$complete EOL"
41399       arguments="${tmp#* }"
41400 
41401       # Cannot rely on the command "which" here since it doesn't always work.
41402       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41403       if test -z "$is_absolute_path"; then
41404         # Path to executable is not absolute. Find it.
41405         IFS_save="$IFS"
41406         IFS=:
41407         for p in $PATH; do
41408           if test -f "$p/$path" && test -x "$p/$path"; then
41409             new_path="$p/$path"
41410             break
41411           fi
41412         done
41413         IFS="$IFS_save"
41414       else
41415         # This is an absolute path, we can use it without further modifications.
41416         new_path="$path"
41417       fi
41418 
41419       if test "x$new_path" = x; then
41420         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41421 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41422         has_space=`$ECHO "$complete" | $GREP " "`
41423         if test "x$has_space" != x; then
41424           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41425 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41426         fi
41427         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41428       fi
41429     fi
41430 
41431     # Now join together the path and the arguments once again
41432     if test "x$arguments" != xEOL; then
41433       new_complete="$new_path ${arguments% *}"
41434     else
41435       new_complete="$new_path"
41436     fi
41437 
41438     if test "x$complete" != "x$new_complete"; then
41439       NM="$new_complete"
41440       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41441 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41442     fi
41443   fi
41444 
41445 
41446 
41447   # Publish this variable in the help.
41448 
41449 
41450   if [ -z "${GNM+x}" ]; then
41451     # The variable is not set by user, try to locate tool using the code snippet
41452     for ac_prog in gnm
41453 do
41454   # Extract the first word of "$ac_prog", so it can be a program name with args.
41455 set dummy $ac_prog; ac_word=$2
41456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41457 $as_echo_n "checking for $ac_word... " >&6; }
41458 if ${ac_cv_path_GNM+:} false; then :
41459   $as_echo_n "(cached) " >&6
41460 else
41461   case $GNM in
41462   [\\/]* | ?:[\\/]*)
41463   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41464   ;;
41465   *)
41466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41467 for as_dir in $PATH
41468 do
41469   IFS=$as_save_IFS
41470   test -z "$as_dir" && as_dir=.
41471     for ac_exec_ext in '' $ac_executable_extensions; do
41472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41473     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41475     break 2
41476   fi
41477 done
41478   done
41479 IFS=$as_save_IFS
41480 
41481   ;;
41482 esac
41483 fi
41484 GNM=$ac_cv_path_GNM
41485 if test -n "$GNM"; then
41486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41487 $as_echo "$GNM" >&6; }
41488 else
41489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41490 $as_echo "no" >&6; }
41491 fi
41492 
41493 
41494   test -n "$GNM" && break
41495 done
41496 
41497   else
41498     # The variable is set, but is it from the command line or the environment?
41499 
41500     # Try to remove the string !GNM! from our list.
41501     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41502     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41503       # If it failed, the variable was not from the command line. Ignore it,
41504       # but warn the user (except for BASH, which is always set by the calling BASH).
41505       if test "xGNM" != xBASH; then
41506         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41507 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41508       fi
41509       # Try to locate tool using the code snippet
41510       for ac_prog in gnm
41511 do
41512   # Extract the first word of "$ac_prog", so it can be a program name with args.
41513 set dummy $ac_prog; ac_word=$2
41514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41515 $as_echo_n "checking for $ac_word... " >&6; }
41516 if ${ac_cv_path_GNM+:} false; then :
41517   $as_echo_n "(cached) " >&6
41518 else
41519   case $GNM in
41520   [\\/]* | ?:[\\/]*)
41521   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41522   ;;
41523   *)
41524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41525 for as_dir in $PATH
41526 do
41527   IFS=$as_save_IFS
41528   test -z "$as_dir" && as_dir=.
41529     for ac_exec_ext in '' $ac_executable_extensions; do
41530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41531     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41533     break 2
41534   fi
41535 done
41536   done
41537 IFS=$as_save_IFS
41538 
41539   ;;
41540 esac
41541 fi
41542 GNM=$ac_cv_path_GNM
41543 if test -n "$GNM"; then
41544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41545 $as_echo "$GNM" >&6; }
41546 else
41547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41548 $as_echo "no" >&6; }
41549 fi
41550 
41551 
41552   test -n "$GNM" && break
41553 done
41554 
41555     else
41556       # If it succeeded, then it was overridden by the user. We will use it
41557       # for the tool.
41558 
41559       # First remove it from the list of overridden variables, so we can test
41560       # for unknown variables in the end.
41561       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41562 
41563       # Check if we try to supply an empty value
41564       if test "x$GNM" = x; then
41565         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41566 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41567         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41568 $as_echo_n "checking for GNM... " >&6; }
41569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41570 $as_echo "disabled" >&6; }
41571       else
41572         # Check if the provided tool contains a complete path.
41573         tool_specified="$GNM"
41574         tool_basename="${tool_specified##*/}"
41575         if test "x$tool_basename" = "x$tool_specified"; then
41576           # A command without a complete path is provided, search $PATH.
41577           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41578 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41579           # Extract the first word of "$tool_basename", so it can be a program name with args.
41580 set dummy $tool_basename; ac_word=$2
41581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41582 $as_echo_n "checking for $ac_word... " >&6; }
41583 if ${ac_cv_path_GNM+:} false; then :
41584   $as_echo_n "(cached) " >&6
41585 else
41586   case $GNM in
41587   [\\/]* | ?:[\\/]*)
41588   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41589   ;;
41590   *)
41591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41592 for as_dir in $PATH
41593 do
41594   IFS=$as_save_IFS
41595   test -z "$as_dir" && as_dir=.
41596     for ac_exec_ext in '' $ac_executable_extensions; do
41597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41598     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41600     break 2
41601   fi
41602 done
41603   done
41604 IFS=$as_save_IFS
41605 
41606   ;;
41607 esac
41608 fi
41609 GNM=$ac_cv_path_GNM
41610 if test -n "$GNM"; then
41611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41612 $as_echo "$GNM" >&6; }
41613 else
41614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41615 $as_echo "no" >&6; }
41616 fi
41617 
41618 
41619           if test "x$GNM" = x; then
41620             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41621           fi
41622         else
41623           # Otherwise we believe it is a complete path. Use it as it is.
41624           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41625 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41626           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41627 $as_echo_n "checking for GNM... " >&6; }
41628           if test ! -x "$tool_specified"; then
41629             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41630 $as_echo "not found" >&6; }
41631             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41632           fi
41633           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41634 $as_echo "$tool_specified" >&6; }
41635         fi
41636       fi
41637     fi
41638 
41639   fi
41640 
41641 
41642 
41643   # Only process if variable expands to non-empty
41644 
41645   if test "x$GNM" != x; then
41646     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41647 
41648   # First separate the path from the arguments. This will split at the first
41649   # space.
41650   complete="$GNM"
41651   path="${complete%% *}"
41652   tmp="$complete EOL"
41653   arguments="${tmp#* }"
41654 
41655   # Input might be given as Windows format, start by converting to
41656   # unix format.
41657   new_path=`$CYGPATH -u "$path"`
41658 
41659   # Now try to locate executable using which
41660   new_path=`$WHICH "$new_path" 2> /dev/null`
41661   # bat and cmd files are not always considered executable in cygwin causing which
41662   # to not find them
41663   if test "x$new_path" = x \
41664       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41665       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41666     new_path=`$CYGPATH -u "$path"`
41667   fi
41668   if test "x$new_path" = x; then
41669     # Oops. Which didn't find the executable.
41670     # The splitting of arguments from the executable at a space might have been incorrect,
41671     # since paths with space are more likely in Windows. Give it another try with the whole
41672     # argument.
41673     path="$complete"
41674     arguments="EOL"
41675     new_path=`$CYGPATH -u "$path"`
41676     new_path=`$WHICH "$new_path" 2> /dev/null`
41677     # bat and cmd files are not always considered executable in cygwin causing which
41678     # to not find them
41679     if test "x$new_path" = x \
41680         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41681         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41682       new_path=`$CYGPATH -u "$path"`
41683     fi
41684     if test "x$new_path" = x; then
41685       # It's still not found. Now this is an unrecoverable error.
41686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41687 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41688       has_space=`$ECHO "$complete" | $GREP " "`
41689       if test "x$has_space" != x; then
41690         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41691 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41692       fi
41693       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41694     fi
41695   fi
41696 
41697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41700   # "foo.exe" is OK but "foo" is an error.
41701   #
41702   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41703   # It is also a way to make sure we got the proper file name for the real test later on.
41704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41705   if test "x$test_shortpath" = x; then
41706     # Short path failed, file does not exist as specified.
41707     # Try adding .exe or .cmd
41708     if test -f "${new_path}.exe"; then
41709       input_to_shortpath="${new_path}.exe"
41710     elif test -f "${new_path}.cmd"; then
41711       input_to_shortpath="${new_path}.cmd"
41712     else
41713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41714 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41715       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41716 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41717       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41718     fi
41719   else
41720     input_to_shortpath="$new_path"
41721   fi
41722 
41723   # Call helper function which possibly converts this using DOS-style short mode.
41724   # If so, the updated path is stored in $new_path.
41725   new_path="$input_to_shortpath"
41726 
41727   input_path="$input_to_shortpath"
41728   # Check if we need to convert this using DOS-style short mode. If the path
41729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41730   # take no chances and rewrite it.
41731   # Note: m4 eats our [], so we need to use [ and ] instead.
41732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41733   if test "x$has_forbidden_chars" != x; then
41734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41735     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41736     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41737     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41738       # Going to short mode and back again did indeed matter. Since short mode is
41739       # case insensitive, let's make it lowercase to improve readability.
41740       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41741       # Now convert it back to Unix-style (cygpath)
41742       input_path=`$CYGPATH -u "$shortmode_path"`
41743       new_path="$input_path"
41744     fi
41745   fi
41746 
41747   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41748   if test "x$test_cygdrive_prefix" = x; then
41749     # As a simple fix, exclude /usr/bin since it's not a real path.
41750     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41751       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41752       # a path prefixed by /cygdrive for fixpath to work.
41753       new_path="$CYGWIN_ROOT_PATH$input_path"
41754     fi
41755   fi
41756 
41757   # remove trailing .exe if any
41758   new_path="${new_path/%.exe/}"
41759 
41760     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41761 
41762   # First separate the path from the arguments. This will split at the first
41763   # space.
41764   complete="$GNM"
41765   path="${complete%% *}"
41766   tmp="$complete EOL"
41767   arguments="${tmp#* }"
41768 
41769   # Input might be given as Windows format, start by converting to
41770   # unix format.
41771   new_path="$path"
41772 
41773   windows_path="$new_path"
41774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41775     unix_path=`$CYGPATH -u "$windows_path"`
41776     new_path="$unix_path"
41777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41779     new_path="$unix_path"
41780   fi
41781 
41782 
41783   # Now try to locate executable using which
41784   new_path=`$WHICH "$new_path" 2> /dev/null`
41785 
41786   if test "x$new_path" = x; then
41787     # Oops. Which didn't find the executable.
41788     # The splitting of arguments from the executable at a space might have been incorrect,
41789     # since paths with space are more likely in Windows. Give it another try with the whole
41790     # argument.
41791     path="$complete"
41792     arguments="EOL"
41793     new_path="$path"
41794 
41795   windows_path="$new_path"
41796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41797     unix_path=`$CYGPATH -u "$windows_path"`
41798     new_path="$unix_path"
41799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41801     new_path="$unix_path"
41802   fi
41803 
41804 
41805     new_path=`$WHICH "$new_path" 2> /dev/null`
41806     # bat and cmd files are not always considered executable in MSYS causing which
41807     # to not find them
41808     if test "x$new_path" = x \
41809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41811       new_path="$path"
41812 
41813   windows_path="$new_path"
41814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41815     unix_path=`$CYGPATH -u "$windows_path"`
41816     new_path="$unix_path"
41817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41819     new_path="$unix_path"
41820   fi
41821 
41822     fi
41823 
41824     if test "x$new_path" = x; then
41825       # It's still not found. Now this is an unrecoverable error.
41826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41827 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41828       has_space=`$ECHO "$complete" | $GREP " "`
41829       if test "x$has_space" != x; then
41830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41832       fi
41833       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41834     fi
41835   fi
41836 
41837   # Now new_path has a complete unix path to the binary
41838   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41839     # Keep paths in /bin as-is, but remove trailing .exe if any
41840     new_path="${new_path/%.exe/}"
41841     # Do not save /bin paths to all_fixpath_prefixes!
41842   else
41843     # Not in mixed or Windows style, start by that.
41844     new_path=`cmd //c echo $new_path`
41845 
41846   input_path="$new_path"
41847   # Check if we need to convert this using DOS-style short mode. If the path
41848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41849   # take no chances and rewrite it.
41850   # Note: m4 eats our [], so we need to use [ and ] instead.
41851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41852   if test "x$has_forbidden_chars" != x; then
41853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41855   fi
41856 
41857     # Output is in $new_path
41858 
41859   windows_path="$new_path"
41860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41861     unix_path=`$CYGPATH -u "$windows_path"`
41862     new_path="$unix_path"
41863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41865     new_path="$unix_path"
41866   fi
41867 
41868     # remove trailing .exe if any
41869     new_path="${new_path/%.exe/}"
41870 
41871     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41872     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41873   fi
41874 
41875     else
41876       # We're on a unix platform. Hooray! :)
41877       # First separate the path from the arguments. This will split at the first
41878       # space.
41879       complete="$GNM"
41880       path="${complete%% *}"
41881       tmp="$complete EOL"
41882       arguments="${tmp#* }"
41883 
41884       # Cannot rely on the command "which" here since it doesn't always work.
41885       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41886       if test -z "$is_absolute_path"; then
41887         # Path to executable is not absolute. Find it.
41888         IFS_save="$IFS"
41889         IFS=:
41890         for p in $PATH; do
41891           if test -f "$p/$path" && test -x "$p/$path"; then
41892             new_path="$p/$path"
41893             break
41894           fi
41895         done
41896         IFS="$IFS_save"
41897       else
41898         # This is an absolute path, we can use it without further modifications.
41899         new_path="$path"
41900       fi
41901 
41902       if test "x$new_path" = x; then
41903         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41904 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41905         has_space=`$ECHO "$complete" | $GREP " "`
41906         if test "x$has_space" != x; then
41907           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41908 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41909         fi
41910         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41911       fi
41912     fi
41913 
41914     # Now join together the path and the arguments once again
41915     if test "x$arguments" != xEOL; then
41916       new_complete="$new_path ${arguments% *}"
41917     else
41918       new_complete="$new_path"
41919     fi
41920 
41921     if test "x$complete" != "x$new_complete"; then
41922       GNM="$new_complete"
41923       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41924 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41925     fi
41926   fi
41927 
41928   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41929     # FIXME: we should unify this with the solaris case above.
41930 
41931 
41932   # Publish this variable in the help.
41933 
41934 
41935   if [ -z "${STRIP+x}" ]; then
41936     # The variable is not set by user, try to locate tool using the code snippet
41937     if test -n "$ac_tool_prefix"; then
41938   for ac_prog in strip
41939   do
41940     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41941 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943 $as_echo_n "checking for $ac_word... " >&6; }
41944 if ${ac_cv_prog_STRIP+:} false; then :
41945   $as_echo_n "(cached) " >&6
41946 else
41947   if test -n "$STRIP"; then
41948   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41949 else
41950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951 for as_dir in $PATH
41952 do
41953   IFS=$as_save_IFS
41954   test -z "$as_dir" && as_dir=.
41955     for ac_exec_ext in '' $ac_executable_extensions; do
41956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959     break 2
41960   fi
41961 done
41962   done
41963 IFS=$as_save_IFS
41964 
41965 fi
41966 fi
41967 STRIP=$ac_cv_prog_STRIP
41968 if test -n "$STRIP"; then
41969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41970 $as_echo "$STRIP" >&6; }
41971 else
41972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973 $as_echo "no" >&6; }
41974 fi
41975 
41976 
41977     test -n "$STRIP" && break
41978   done
41979 fi
41980 if test -z "$STRIP"; then
41981   ac_ct_STRIP=$STRIP
41982   for ac_prog in strip
41983 do
41984   # Extract the first word of "$ac_prog", so it can be a program name with args.
41985 set dummy $ac_prog; ac_word=$2
41986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41987 $as_echo_n "checking for $ac_word... " >&6; }
41988 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41989   $as_echo_n "(cached) " >&6
41990 else
41991   if test -n "$ac_ct_STRIP"; then
41992   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41993 else
41994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41995 for as_dir in $PATH
41996 do
41997   IFS=$as_save_IFS
41998   test -z "$as_dir" && as_dir=.
41999     for ac_exec_ext in '' $ac_executable_extensions; do
42000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42001     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42003     break 2
42004   fi
42005 done
42006   done
42007 IFS=$as_save_IFS
42008 
42009 fi
42010 fi
42011 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42012 if test -n "$ac_ct_STRIP"; then
42013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42014 $as_echo "$ac_ct_STRIP" >&6; }
42015 else
42016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42017 $as_echo "no" >&6; }
42018 fi
42019 
42020 
42021   test -n "$ac_ct_STRIP" && break
42022 done
42023 
42024   if test "x$ac_ct_STRIP" = x; then
42025     STRIP=""
42026   else
42027     case $cross_compiling:$ac_tool_warned in
42028 yes:)
42029 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42030 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42031 ac_tool_warned=yes ;;
42032 esac
42033     STRIP=$ac_ct_STRIP
42034   fi
42035 fi
42036 
42037   else
42038     # The variable is set, but is it from the command line or the environment?
42039 
42040     # Try to remove the string !STRIP! from our list.
42041     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42042     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42043       # If it failed, the variable was not from the command line. Ignore it,
42044       # but warn the user (except for BASH, which is always set by the calling BASH).
42045       if test "xSTRIP" != xBASH; then
42046         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42047 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42048       fi
42049       # Try to locate tool using the code snippet
42050       if test -n "$ac_tool_prefix"; then
42051   for ac_prog in strip
42052   do
42053     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42054 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056 $as_echo_n "checking for $ac_word... " >&6; }
42057 if ${ac_cv_prog_STRIP+:} false; then :
42058   $as_echo_n "(cached) " >&6
42059 else
42060   if test -n "$STRIP"; then
42061   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42062 else
42063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42064 for as_dir in $PATH
42065 do
42066   IFS=$as_save_IFS
42067   test -z "$as_dir" && as_dir=.
42068     for ac_exec_ext in '' $ac_executable_extensions; do
42069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42070     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42072     break 2
42073   fi
42074 done
42075   done
42076 IFS=$as_save_IFS
42077 
42078 fi
42079 fi
42080 STRIP=$ac_cv_prog_STRIP
42081 if test -n "$STRIP"; then
42082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42083 $as_echo "$STRIP" >&6; }
42084 else
42085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086 $as_echo "no" >&6; }
42087 fi
42088 
42089 
42090     test -n "$STRIP" && break
42091   done
42092 fi
42093 if test -z "$STRIP"; then
42094   ac_ct_STRIP=$STRIP
42095   for ac_prog in strip
42096 do
42097   # Extract the first word of "$ac_prog", so it can be a program name with args.
42098 set dummy $ac_prog; ac_word=$2
42099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42100 $as_echo_n "checking for $ac_word... " >&6; }
42101 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42102   $as_echo_n "(cached) " >&6
42103 else
42104   if test -n "$ac_ct_STRIP"; then
42105   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42106 else
42107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42108 for as_dir in $PATH
42109 do
42110   IFS=$as_save_IFS
42111   test -z "$as_dir" && as_dir=.
42112     for ac_exec_ext in '' $ac_executable_extensions; do
42113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42114     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42116     break 2
42117   fi
42118 done
42119   done
42120 IFS=$as_save_IFS
42121 
42122 fi
42123 fi
42124 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42125 if test -n "$ac_ct_STRIP"; then
42126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42127 $as_echo "$ac_ct_STRIP" >&6; }
42128 else
42129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42130 $as_echo "no" >&6; }
42131 fi
42132 
42133 
42134   test -n "$ac_ct_STRIP" && break
42135 done
42136 
42137   if test "x$ac_ct_STRIP" = x; then
42138     STRIP=""
42139   else
42140     case $cross_compiling:$ac_tool_warned in
42141 yes:)
42142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42143 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42144 ac_tool_warned=yes ;;
42145 esac
42146     STRIP=$ac_ct_STRIP
42147   fi
42148 fi
42149 
42150     else
42151       # If it succeeded, then it was overridden by the user. We will use it
42152       # for the tool.
42153 
42154       # First remove it from the list of overridden variables, so we can test
42155       # for unknown variables in the end.
42156       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42157 
42158       # Check if we try to supply an empty value
42159       if test "x$STRIP" = x; then
42160         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42161 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42163 $as_echo_n "checking for STRIP... " >&6; }
42164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42165 $as_echo "disabled" >&6; }
42166       else
42167         # Check if the provided tool contains a complete path.
42168         tool_specified="$STRIP"
42169         tool_basename="${tool_specified##*/}"
42170         if test "x$tool_basename" = "x$tool_specified"; then
42171           # A command without a complete path is provided, search $PATH.
42172           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42173 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42174           # Extract the first word of "$tool_basename", so it can be a program name with args.
42175 set dummy $tool_basename; ac_word=$2
42176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42177 $as_echo_n "checking for $ac_word... " >&6; }
42178 if ${ac_cv_path_STRIP+:} false; then :
42179   $as_echo_n "(cached) " >&6
42180 else
42181   case $STRIP in
42182   [\\/]* | ?:[\\/]*)
42183   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42184   ;;
42185   *)
42186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187 for as_dir in $PATH
42188 do
42189   IFS=$as_save_IFS
42190   test -z "$as_dir" && as_dir=.
42191     for ac_exec_ext in '' $ac_executable_extensions; do
42192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195     break 2
42196   fi
42197 done
42198   done
42199 IFS=$as_save_IFS
42200 
42201   ;;
42202 esac
42203 fi
42204 STRIP=$ac_cv_path_STRIP
42205 if test -n "$STRIP"; then
42206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42207 $as_echo "$STRIP" >&6; }
42208 else
42209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42210 $as_echo "no" >&6; }
42211 fi
42212 
42213 
42214           if test "x$STRIP" = x; then
42215             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42216           fi
42217         else
42218           # Otherwise we believe it is a complete path. Use it as it is.
42219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42220 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42221           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42222 $as_echo_n "checking for STRIP... " >&6; }
42223           if test ! -x "$tool_specified"; then
42224             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42225 $as_echo "not found" >&6; }
42226             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42227           fi
42228           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42229 $as_echo "$tool_specified" >&6; }
42230         fi
42231       fi
42232     fi
42233 
42234   fi
42235 
42236 
42237 
42238   # Only process if variable expands to non-empty
42239 
42240   if test "x$STRIP" != x; then
42241     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42242 
42243   # First separate the path from the arguments. This will split at the first
42244   # space.
42245   complete="$STRIP"
42246   path="${complete%% *}"
42247   tmp="$complete EOL"
42248   arguments="${tmp#* }"
42249 
42250   # Input might be given as Windows format, start by converting to
42251   # unix format.
42252   new_path=`$CYGPATH -u "$path"`
42253 
42254   # Now try to locate executable using which
42255   new_path=`$WHICH "$new_path" 2> /dev/null`
42256   # bat and cmd files are not always considered executable in cygwin causing which
42257   # to not find them
42258   if test "x$new_path" = x \
42259       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42260       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42261     new_path=`$CYGPATH -u "$path"`
42262   fi
42263   if test "x$new_path" = x; then
42264     # Oops. Which didn't find the executable.
42265     # The splitting of arguments from the executable at a space might have been incorrect,
42266     # since paths with space are more likely in Windows. Give it another try with the whole
42267     # argument.
42268     path="$complete"
42269     arguments="EOL"
42270     new_path=`$CYGPATH -u "$path"`
42271     new_path=`$WHICH "$new_path" 2> /dev/null`
42272     # bat and cmd files are not always considered executable in cygwin causing which
42273     # to not find them
42274     if test "x$new_path" = x \
42275         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42276         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42277       new_path=`$CYGPATH -u "$path"`
42278     fi
42279     if test "x$new_path" = x; then
42280       # It's still not found. Now this is an unrecoverable error.
42281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42282 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42283       has_space=`$ECHO "$complete" | $GREP " "`
42284       if test "x$has_space" != x; then
42285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42287       fi
42288       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42289     fi
42290   fi
42291 
42292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42295   # "foo.exe" is OK but "foo" is an error.
42296   #
42297   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42298   # It is also a way to make sure we got the proper file name for the real test later on.
42299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42300   if test "x$test_shortpath" = x; then
42301     # Short path failed, file does not exist as specified.
42302     # Try adding .exe or .cmd
42303     if test -f "${new_path}.exe"; then
42304       input_to_shortpath="${new_path}.exe"
42305     elif test -f "${new_path}.cmd"; then
42306       input_to_shortpath="${new_path}.cmd"
42307     else
42308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42309 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42310       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42311 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42312       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42313     fi
42314   else
42315     input_to_shortpath="$new_path"
42316   fi
42317 
42318   # Call helper function which possibly converts this using DOS-style short mode.
42319   # If so, the updated path is stored in $new_path.
42320   new_path="$input_to_shortpath"
42321 
42322   input_path="$input_to_shortpath"
42323   # Check if we need to convert this using DOS-style short mode. If the path
42324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42325   # take no chances and rewrite it.
42326   # Note: m4 eats our [], so we need to use [ and ] instead.
42327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42328   if test "x$has_forbidden_chars" != x; then
42329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42333       # Going to short mode and back again did indeed matter. Since short mode is
42334       # case insensitive, let's make it lowercase to improve readability.
42335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42336       # Now convert it back to Unix-style (cygpath)
42337       input_path=`$CYGPATH -u "$shortmode_path"`
42338       new_path="$input_path"
42339     fi
42340   fi
42341 
42342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42343   if test "x$test_cygdrive_prefix" = x; then
42344     # As a simple fix, exclude /usr/bin since it's not a real path.
42345     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42347       # a path prefixed by /cygdrive for fixpath to work.
42348       new_path="$CYGWIN_ROOT_PATH$input_path"
42349     fi
42350   fi
42351 
42352   # remove trailing .exe if any
42353   new_path="${new_path/%.exe/}"
42354 
42355     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42356 
42357   # First separate the path from the arguments. This will split at the first
42358   # space.
42359   complete="$STRIP"
42360   path="${complete%% *}"
42361   tmp="$complete EOL"
42362   arguments="${tmp#* }"
42363 
42364   # Input might be given as Windows format, start by converting to
42365   # unix format.
42366   new_path="$path"
42367 
42368   windows_path="$new_path"
42369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42370     unix_path=`$CYGPATH -u "$windows_path"`
42371     new_path="$unix_path"
42372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42374     new_path="$unix_path"
42375   fi
42376 
42377 
42378   # Now try to locate executable using which
42379   new_path=`$WHICH "$new_path" 2> /dev/null`
42380 
42381   if test "x$new_path" = x; then
42382     # Oops. Which didn't find the executable.
42383     # The splitting of arguments from the executable at a space might have been incorrect,
42384     # since paths with space are more likely in Windows. Give it another try with the whole
42385     # argument.
42386     path="$complete"
42387     arguments="EOL"
42388     new_path="$path"
42389 
42390   windows_path="$new_path"
42391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42392     unix_path=`$CYGPATH -u "$windows_path"`
42393     new_path="$unix_path"
42394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42396     new_path="$unix_path"
42397   fi
42398 
42399 
42400     new_path=`$WHICH "$new_path" 2> /dev/null`
42401     # bat and cmd files are not always considered executable in MSYS causing which
42402     # to not find them
42403     if test "x$new_path" = x \
42404         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42405         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42406       new_path="$path"
42407 
42408   windows_path="$new_path"
42409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42410     unix_path=`$CYGPATH -u "$windows_path"`
42411     new_path="$unix_path"
42412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42413     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42414     new_path="$unix_path"
42415   fi
42416 
42417     fi
42418 
42419     if test "x$new_path" = x; then
42420       # It's still not found. Now this is an unrecoverable error.
42421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42422 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42423       has_space=`$ECHO "$complete" | $GREP " "`
42424       if test "x$has_space" != x; then
42425         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42426 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42427       fi
42428       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42429     fi
42430   fi
42431 
42432   # Now new_path has a complete unix path to the binary
42433   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42434     # Keep paths in /bin as-is, but remove trailing .exe if any
42435     new_path="${new_path/%.exe/}"
42436     # Do not save /bin paths to all_fixpath_prefixes!
42437   else
42438     # Not in mixed or Windows style, start by that.
42439     new_path=`cmd //c echo $new_path`
42440 
42441   input_path="$new_path"
42442   # Check if we need to convert this using DOS-style short mode. If the path
42443   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42444   # take no chances and rewrite it.
42445   # Note: m4 eats our [], so we need to use [ and ] instead.
42446   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42447   if test "x$has_forbidden_chars" != x; then
42448     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42449     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42450   fi
42451 
42452     # Output is in $new_path
42453 
42454   windows_path="$new_path"
42455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42456     unix_path=`$CYGPATH -u "$windows_path"`
42457     new_path="$unix_path"
42458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42460     new_path="$unix_path"
42461   fi
42462 
42463     # remove trailing .exe if any
42464     new_path="${new_path/%.exe/}"
42465 
42466     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42467     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42468   fi
42469 
42470     else
42471       # We're on a unix platform. Hooray! :)
42472       # First separate the path from the arguments. This will split at the first
42473       # space.
42474       complete="$STRIP"
42475       path="${complete%% *}"
42476       tmp="$complete EOL"
42477       arguments="${tmp#* }"
42478 
42479       # Cannot rely on the command "which" here since it doesn't always work.
42480       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42481       if test -z "$is_absolute_path"; then
42482         # Path to executable is not absolute. Find it.
42483         IFS_save="$IFS"
42484         IFS=:
42485         for p in $PATH; do
42486           if test -f "$p/$path" && test -x "$p/$path"; then
42487             new_path="$p/$path"
42488             break
42489           fi
42490         done
42491         IFS="$IFS_save"
42492       else
42493         # This is an absolute path, we can use it without further modifications.
42494         new_path="$path"
42495       fi
42496 
42497       if test "x$new_path" = x; then
42498         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42499 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42500         has_space=`$ECHO "$complete" | $GREP " "`
42501         if test "x$has_space" != x; then
42502           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42503 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42504         fi
42505         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42506       fi
42507     fi
42508 
42509     # Now join together the path and the arguments once again
42510     if test "x$arguments" != xEOL; then
42511       new_complete="$new_path ${arguments% *}"
42512     else
42513       new_complete="$new_path"
42514     fi
42515 
42516     if test "x$complete" != "x$new_complete"; then
42517       STRIP="$new_complete"
42518       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42519 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42520     fi
42521   fi
42522 
42523     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42524 
42525 
42526   # Publish this variable in the help.
42527 
42528 
42529   if [ -z "${NM+x}" ]; then
42530     # The variable is not set by user, try to locate tool using the code snippet
42531     if test -n "$ac_tool_prefix"; then
42532   for ac_prog in nm gcc-nm
42533   do
42534     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42535 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42537 $as_echo_n "checking for $ac_word... " >&6; }
42538 if ${ac_cv_prog_NM+:} false; then :
42539   $as_echo_n "(cached) " >&6
42540 else
42541   if test -n "$NM"; then
42542   ac_cv_prog_NM="$NM" # Let the user override the test.
42543 else
42544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42545 for as_dir in $PATH
42546 do
42547   IFS=$as_save_IFS
42548   test -z "$as_dir" && as_dir=.
42549     for ac_exec_ext in '' $ac_executable_extensions; do
42550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42551     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42553     break 2
42554   fi
42555 done
42556   done
42557 IFS=$as_save_IFS
42558 
42559 fi
42560 fi
42561 NM=$ac_cv_prog_NM
42562 if test -n "$NM"; then
42563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42564 $as_echo "$NM" >&6; }
42565 else
42566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42567 $as_echo "no" >&6; }
42568 fi
42569 
42570 
42571     test -n "$NM" && break
42572   done
42573 fi
42574 if test -z "$NM"; then
42575   ac_ct_NM=$NM
42576   for ac_prog in nm gcc-nm
42577 do
42578   # Extract the first word of "$ac_prog", so it can be a program name with args.
42579 set dummy $ac_prog; ac_word=$2
42580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42581 $as_echo_n "checking for $ac_word... " >&6; }
42582 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42583   $as_echo_n "(cached) " >&6
42584 else
42585   if test -n "$ac_ct_NM"; then
42586   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42587 else
42588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42589 for as_dir in $PATH
42590 do
42591   IFS=$as_save_IFS
42592   test -z "$as_dir" && as_dir=.
42593     for ac_exec_ext in '' $ac_executable_extensions; do
42594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42595     ac_cv_prog_ac_ct_NM="$ac_prog"
42596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42597     break 2
42598   fi
42599 done
42600   done
42601 IFS=$as_save_IFS
42602 
42603 fi
42604 fi
42605 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42606 if test -n "$ac_ct_NM"; then
42607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42608 $as_echo "$ac_ct_NM" >&6; }
42609 else
42610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42611 $as_echo "no" >&6; }
42612 fi
42613 
42614 
42615   test -n "$ac_ct_NM" && break
42616 done
42617 
42618   if test "x$ac_ct_NM" = x; then
42619     NM=""
42620   else
42621     case $cross_compiling:$ac_tool_warned in
42622 yes:)
42623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42624 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42625 ac_tool_warned=yes ;;
42626 esac
42627     NM=$ac_ct_NM
42628   fi
42629 fi
42630 
42631   else
42632     # The variable is set, but is it from the command line or the environment?
42633 
42634     # Try to remove the string !NM! from our list.
42635     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42636     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42637       # If it failed, the variable was not from the command line. Ignore it,
42638       # but warn the user (except for BASH, which is always set by the calling BASH).
42639       if test "xNM" != xBASH; then
42640         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42641 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42642       fi
42643       # Try to locate tool using the code snippet
42644       if test -n "$ac_tool_prefix"; then
42645   for ac_prog in nm gcc-nm
42646   do
42647     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42648 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42650 $as_echo_n "checking for $ac_word... " >&6; }
42651 if ${ac_cv_prog_NM+:} false; then :
42652   $as_echo_n "(cached) " >&6
42653 else
42654   if test -n "$NM"; then
42655   ac_cv_prog_NM="$NM" # Let the user override the test.
42656 else
42657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42658 for as_dir in $PATH
42659 do
42660   IFS=$as_save_IFS
42661   test -z "$as_dir" && as_dir=.
42662     for ac_exec_ext in '' $ac_executable_extensions; do
42663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42664     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42666     break 2
42667   fi
42668 done
42669   done
42670 IFS=$as_save_IFS
42671 
42672 fi
42673 fi
42674 NM=$ac_cv_prog_NM
42675 if test -n "$NM"; then
42676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42677 $as_echo "$NM" >&6; }
42678 else
42679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680 $as_echo "no" >&6; }
42681 fi
42682 
42683 
42684     test -n "$NM" && break
42685   done
42686 fi
42687 if test -z "$NM"; then
42688   ac_ct_NM=$NM
42689   for ac_prog in nm gcc-nm
42690 do
42691   # Extract the first word of "$ac_prog", so it can be a program name with args.
42692 set dummy $ac_prog; ac_word=$2
42693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42694 $as_echo_n "checking for $ac_word... " >&6; }
42695 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42696   $as_echo_n "(cached) " >&6
42697 else
42698   if test -n "$ac_ct_NM"; then
42699   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42700 else
42701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42702 for as_dir in $PATH
42703 do
42704   IFS=$as_save_IFS
42705   test -z "$as_dir" && as_dir=.
42706     for ac_exec_ext in '' $ac_executable_extensions; do
42707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42708     ac_cv_prog_ac_ct_NM="$ac_prog"
42709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42710     break 2
42711   fi
42712 done
42713   done
42714 IFS=$as_save_IFS
42715 
42716 fi
42717 fi
42718 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42719 if test -n "$ac_ct_NM"; then
42720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42721 $as_echo "$ac_ct_NM" >&6; }
42722 else
42723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42724 $as_echo "no" >&6; }
42725 fi
42726 
42727 
42728   test -n "$ac_ct_NM" && break
42729 done
42730 
42731   if test "x$ac_ct_NM" = x; then
42732     NM=""
42733   else
42734     case $cross_compiling:$ac_tool_warned in
42735 yes:)
42736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42738 ac_tool_warned=yes ;;
42739 esac
42740     NM=$ac_ct_NM
42741   fi
42742 fi
42743 
42744     else
42745       # If it succeeded, then it was overridden by the user. We will use it
42746       # for the tool.
42747 
42748       # First remove it from the list of overridden variables, so we can test
42749       # for unknown variables in the end.
42750       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42751 
42752       # Check if we try to supply an empty value
42753       if test "x$NM" = x; then
42754         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42755 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42756         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42757 $as_echo_n "checking for NM... " >&6; }
42758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42759 $as_echo "disabled" >&6; }
42760       else
42761         # Check if the provided tool contains a complete path.
42762         tool_specified="$NM"
42763         tool_basename="${tool_specified##*/}"
42764         if test "x$tool_basename" = "x$tool_specified"; then
42765           # A command without a complete path is provided, search $PATH.
42766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42767 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42768           # Extract the first word of "$tool_basename", so it can be a program name with args.
42769 set dummy $tool_basename; ac_word=$2
42770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42771 $as_echo_n "checking for $ac_word... " >&6; }
42772 if ${ac_cv_path_NM+:} false; then :
42773   $as_echo_n "(cached) " >&6
42774 else
42775   case $NM in
42776   [\\/]* | ?:[\\/]*)
42777   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42778   ;;
42779   *)
42780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42781 for as_dir in $PATH
42782 do
42783   IFS=$as_save_IFS
42784   test -z "$as_dir" && as_dir=.
42785     for ac_exec_ext in '' $ac_executable_extensions; do
42786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42787     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42789     break 2
42790   fi
42791 done
42792   done
42793 IFS=$as_save_IFS
42794 
42795   ;;
42796 esac
42797 fi
42798 NM=$ac_cv_path_NM
42799 if test -n "$NM"; then
42800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42801 $as_echo "$NM" >&6; }
42802 else
42803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42804 $as_echo "no" >&6; }
42805 fi
42806 
42807 
42808           if test "x$NM" = x; then
42809             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42810           fi
42811         else
42812           # Otherwise we believe it is a complete path. Use it as it is.
42813           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42814 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42815           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42816 $as_echo_n "checking for NM... " >&6; }
42817           if test ! -x "$tool_specified"; then
42818             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42819 $as_echo "not found" >&6; }
42820             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42821           fi
42822           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42823 $as_echo "$tool_specified" >&6; }
42824         fi
42825       fi
42826     fi
42827 
42828   fi
42829 
42830 
42831     else
42832 
42833 
42834   # Publish this variable in the help.
42835 
42836 
42837   if [ -z "${NM+x}" ]; then
42838     # The variable is not set by user, try to locate tool using the code snippet
42839     if test -n "$ac_tool_prefix"; then
42840   for ac_prog in nm
42841   do
42842     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42843 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42845 $as_echo_n "checking for $ac_word... " >&6; }
42846 if ${ac_cv_prog_NM+:} false; then :
42847   $as_echo_n "(cached) " >&6
42848 else
42849   if test -n "$NM"; then
42850   ac_cv_prog_NM="$NM" # Let the user override the test.
42851 else
42852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42853 for as_dir in $PATH
42854 do
42855   IFS=$as_save_IFS
42856   test -z "$as_dir" && as_dir=.
42857     for ac_exec_ext in '' $ac_executable_extensions; do
42858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42859     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42861     break 2
42862   fi
42863 done
42864   done
42865 IFS=$as_save_IFS
42866 
42867 fi
42868 fi
42869 NM=$ac_cv_prog_NM
42870 if test -n "$NM"; then
42871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42872 $as_echo "$NM" >&6; }
42873 else
42874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42875 $as_echo "no" >&6; }
42876 fi
42877 
42878 
42879     test -n "$NM" && break
42880   done
42881 fi
42882 if test -z "$NM"; then
42883   ac_ct_NM=$NM
42884   for ac_prog in nm
42885 do
42886   # Extract the first word of "$ac_prog", so it can be a program name with args.
42887 set dummy $ac_prog; ac_word=$2
42888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42889 $as_echo_n "checking for $ac_word... " >&6; }
42890 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42891   $as_echo_n "(cached) " >&6
42892 else
42893   if test -n "$ac_ct_NM"; then
42894   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42895 else
42896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42897 for as_dir in $PATH
42898 do
42899   IFS=$as_save_IFS
42900   test -z "$as_dir" && as_dir=.
42901     for ac_exec_ext in '' $ac_executable_extensions; do
42902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42903     ac_cv_prog_ac_ct_NM="$ac_prog"
42904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42905     break 2
42906   fi
42907 done
42908   done
42909 IFS=$as_save_IFS
42910 
42911 fi
42912 fi
42913 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42914 if test -n "$ac_ct_NM"; then
42915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42916 $as_echo "$ac_ct_NM" >&6; }
42917 else
42918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42919 $as_echo "no" >&6; }
42920 fi
42921 
42922 
42923   test -n "$ac_ct_NM" && break
42924 done
42925 
42926   if test "x$ac_ct_NM" = x; then
42927     NM=""
42928   else
42929     case $cross_compiling:$ac_tool_warned in
42930 yes:)
42931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42933 ac_tool_warned=yes ;;
42934 esac
42935     NM=$ac_ct_NM
42936   fi
42937 fi
42938 
42939   else
42940     # The variable is set, but is it from the command line or the environment?
42941 
42942     # Try to remove the string !NM! from our list.
42943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42945       # If it failed, the variable was not from the command line. Ignore it,
42946       # but warn the user (except for BASH, which is always set by the calling BASH).
42947       if test "xNM" != xBASH; then
42948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42949 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42950       fi
42951       # Try to locate tool using the code snippet
42952       if test -n "$ac_tool_prefix"; then
42953   for ac_prog in nm
42954   do
42955     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42956 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42958 $as_echo_n "checking for $ac_word... " >&6; }
42959 if ${ac_cv_prog_NM+:} false; then :
42960   $as_echo_n "(cached) " >&6
42961 else
42962   if test -n "$NM"; then
42963   ac_cv_prog_NM="$NM" # Let the user override the test.
42964 else
42965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42966 for as_dir in $PATH
42967 do
42968   IFS=$as_save_IFS
42969   test -z "$as_dir" && as_dir=.
42970     for ac_exec_ext in '' $ac_executable_extensions; do
42971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42972     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42974     break 2
42975   fi
42976 done
42977   done
42978 IFS=$as_save_IFS
42979 
42980 fi
42981 fi
42982 NM=$ac_cv_prog_NM
42983 if test -n "$NM"; then
42984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42985 $as_echo "$NM" >&6; }
42986 else
42987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42988 $as_echo "no" >&6; }
42989 fi
42990 
42991 
42992     test -n "$NM" && break
42993   done
42994 fi
42995 if test -z "$NM"; then
42996   ac_ct_NM=$NM
42997   for ac_prog in nm
42998 do
42999   # Extract the first word of "$ac_prog", so it can be a program name with args.
43000 set dummy $ac_prog; ac_word=$2
43001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43002 $as_echo_n "checking for $ac_word... " >&6; }
43003 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43004   $as_echo_n "(cached) " >&6
43005 else
43006   if test -n "$ac_ct_NM"; then
43007   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43008 else
43009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43010 for as_dir in $PATH
43011 do
43012   IFS=$as_save_IFS
43013   test -z "$as_dir" && as_dir=.
43014     for ac_exec_ext in '' $ac_executable_extensions; do
43015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43016     ac_cv_prog_ac_ct_NM="$ac_prog"
43017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43018     break 2
43019   fi
43020 done
43021   done
43022 IFS=$as_save_IFS
43023 
43024 fi
43025 fi
43026 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43027 if test -n "$ac_ct_NM"; then
43028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43029 $as_echo "$ac_ct_NM" >&6; }
43030 else
43031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43032 $as_echo "no" >&6; }
43033 fi
43034 
43035 
43036   test -n "$ac_ct_NM" && break
43037 done
43038 
43039   if test "x$ac_ct_NM" = x; then
43040     NM=""
43041   else
43042     case $cross_compiling:$ac_tool_warned in
43043 yes:)
43044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43045 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43046 ac_tool_warned=yes ;;
43047 esac
43048     NM=$ac_ct_NM
43049   fi
43050 fi
43051 
43052     else
43053       # If it succeeded, then it was overridden by the user. We will use it
43054       # for the tool.
43055 
43056       # First remove it from the list of overridden variables, so we can test
43057       # for unknown variables in the end.
43058       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43059 
43060       # Check if we try to supply an empty value
43061       if test "x$NM" = x; then
43062         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43063 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43065 $as_echo_n "checking for NM... " >&6; }
43066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43067 $as_echo "disabled" >&6; }
43068       else
43069         # Check if the provided tool contains a complete path.
43070         tool_specified="$NM"
43071         tool_basename="${tool_specified##*/}"
43072         if test "x$tool_basename" = "x$tool_specified"; then
43073           # A command without a complete path is provided, search $PATH.
43074           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43075 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43076           # Extract the first word of "$tool_basename", so it can be a program name with args.
43077 set dummy $tool_basename; ac_word=$2
43078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43079 $as_echo_n "checking for $ac_word... " >&6; }
43080 if ${ac_cv_path_NM+:} false; then :
43081   $as_echo_n "(cached) " >&6
43082 else
43083   case $NM in
43084   [\\/]* | ?:[\\/]*)
43085   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43086   ;;
43087   *)
43088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43089 for as_dir in $PATH
43090 do
43091   IFS=$as_save_IFS
43092   test -z "$as_dir" && as_dir=.
43093     for ac_exec_ext in '' $ac_executable_extensions; do
43094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43095     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43097     break 2
43098   fi
43099 done
43100   done
43101 IFS=$as_save_IFS
43102 
43103   ;;
43104 esac
43105 fi
43106 NM=$ac_cv_path_NM
43107 if test -n "$NM"; then
43108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43109 $as_echo "$NM" >&6; }
43110 else
43111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43112 $as_echo "no" >&6; }
43113 fi
43114 
43115 
43116           if test "x$NM" = x; then
43117             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43118           fi
43119         else
43120           # Otherwise we believe it is a complete path. Use it as it is.
43121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43122 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43123           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43124 $as_echo_n "checking for NM... " >&6; }
43125           if test ! -x "$tool_specified"; then
43126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43127 $as_echo "not found" >&6; }
43128             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43129           fi
43130           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43131 $as_echo "$tool_specified" >&6; }
43132         fi
43133       fi
43134     fi
43135 
43136   fi
43137 
43138 
43139     fi
43140 
43141   # Only process if variable expands to non-empty
43142 
43143   if test "x$NM" != x; then
43144     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43145 
43146   # First separate the path from the arguments. This will split at the first
43147   # space.
43148   complete="$NM"
43149   path="${complete%% *}"
43150   tmp="$complete EOL"
43151   arguments="${tmp#* }"
43152 
43153   # Input might be given as Windows format, start by converting to
43154   # unix format.
43155   new_path=`$CYGPATH -u "$path"`
43156 
43157   # Now try to locate executable using which
43158   new_path=`$WHICH "$new_path" 2> /dev/null`
43159   # bat and cmd files are not always considered executable in cygwin causing which
43160   # to not find them
43161   if test "x$new_path" = x \
43162       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43163       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43164     new_path=`$CYGPATH -u "$path"`
43165   fi
43166   if test "x$new_path" = x; then
43167     # Oops. Which didn't find the executable.
43168     # The splitting of arguments from the executable at a space might have been incorrect,
43169     # since paths with space are more likely in Windows. Give it another try with the whole
43170     # argument.
43171     path="$complete"
43172     arguments="EOL"
43173     new_path=`$CYGPATH -u "$path"`
43174     new_path=`$WHICH "$new_path" 2> /dev/null`
43175     # bat and cmd files are not always considered executable in cygwin causing which
43176     # to not find them
43177     if test "x$new_path" = x \
43178         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43179         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43180       new_path=`$CYGPATH -u "$path"`
43181     fi
43182     if test "x$new_path" = x; then
43183       # It's still not found. Now this is an unrecoverable error.
43184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43185 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43186       has_space=`$ECHO "$complete" | $GREP " "`
43187       if test "x$has_space" != x; then
43188         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43189 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43190       fi
43191       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43192     fi
43193   fi
43194 
43195   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43196   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43197   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43198   # "foo.exe" is OK but "foo" is an error.
43199   #
43200   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43201   # It is also a way to make sure we got the proper file name for the real test later on.
43202   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43203   if test "x$test_shortpath" = x; then
43204     # Short path failed, file does not exist as specified.
43205     # Try adding .exe or .cmd
43206     if test -f "${new_path}.exe"; then
43207       input_to_shortpath="${new_path}.exe"
43208     elif test -f "${new_path}.cmd"; then
43209       input_to_shortpath="${new_path}.cmd"
43210     else
43211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43212 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43213       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43214 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43215       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43216     fi
43217   else
43218     input_to_shortpath="$new_path"
43219   fi
43220 
43221   # Call helper function which possibly converts this using DOS-style short mode.
43222   # If so, the updated path is stored in $new_path.
43223   new_path="$input_to_shortpath"
43224 
43225   input_path="$input_to_shortpath"
43226   # Check if we need to convert this using DOS-style short mode. If the path
43227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43228   # take no chances and rewrite it.
43229   # Note: m4 eats our [], so we need to use [ and ] instead.
43230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43231   if test "x$has_forbidden_chars" != x; then
43232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43233     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43234     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43235     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43236       # Going to short mode and back again did indeed matter. Since short mode is
43237       # case insensitive, let's make it lowercase to improve readability.
43238       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43239       # Now convert it back to Unix-style (cygpath)
43240       input_path=`$CYGPATH -u "$shortmode_path"`
43241       new_path="$input_path"
43242     fi
43243   fi
43244 
43245   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43246   if test "x$test_cygdrive_prefix" = x; then
43247     # As a simple fix, exclude /usr/bin since it's not a real path.
43248     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43249       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43250       # a path prefixed by /cygdrive for fixpath to work.
43251       new_path="$CYGWIN_ROOT_PATH$input_path"
43252     fi
43253   fi
43254 
43255   # remove trailing .exe if any
43256   new_path="${new_path/%.exe/}"
43257 
43258     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43259 
43260   # First separate the path from the arguments. This will split at the first
43261   # space.
43262   complete="$NM"
43263   path="${complete%% *}"
43264   tmp="$complete EOL"
43265   arguments="${tmp#* }"
43266 
43267   # Input might be given as Windows format, start by converting to
43268   # unix format.
43269   new_path="$path"
43270 
43271   windows_path="$new_path"
43272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43273     unix_path=`$CYGPATH -u "$windows_path"`
43274     new_path="$unix_path"
43275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43277     new_path="$unix_path"
43278   fi
43279 
43280 
43281   # Now try to locate executable using which
43282   new_path=`$WHICH "$new_path" 2> /dev/null`
43283 
43284   if test "x$new_path" = x; then
43285     # Oops. Which didn't find the executable.
43286     # The splitting of arguments from the executable at a space might have been incorrect,
43287     # since paths with space are more likely in Windows. Give it another try with the whole
43288     # argument.
43289     path="$complete"
43290     arguments="EOL"
43291     new_path="$path"
43292 
43293   windows_path="$new_path"
43294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43295     unix_path=`$CYGPATH -u "$windows_path"`
43296     new_path="$unix_path"
43297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43299     new_path="$unix_path"
43300   fi
43301 
43302 
43303     new_path=`$WHICH "$new_path" 2> /dev/null`
43304     # bat and cmd files are not always considered executable in MSYS causing which
43305     # to not find them
43306     if test "x$new_path" = x \
43307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43309       new_path="$path"
43310 
43311   windows_path="$new_path"
43312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43313     unix_path=`$CYGPATH -u "$windows_path"`
43314     new_path="$unix_path"
43315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43317     new_path="$unix_path"
43318   fi
43319 
43320     fi
43321 
43322     if test "x$new_path" = x; then
43323       # It's still not found. Now this is an unrecoverable error.
43324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43325 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43326       has_space=`$ECHO "$complete" | $GREP " "`
43327       if test "x$has_space" != x; then
43328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43330       fi
43331       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43332     fi
43333   fi
43334 
43335   # Now new_path has a complete unix path to the binary
43336   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43337     # Keep paths in /bin as-is, but remove trailing .exe if any
43338     new_path="${new_path/%.exe/}"
43339     # Do not save /bin paths to all_fixpath_prefixes!
43340   else
43341     # Not in mixed or Windows style, start by that.
43342     new_path=`cmd //c echo $new_path`
43343 
43344   input_path="$new_path"
43345   # Check if we need to convert this using DOS-style short mode. If the path
43346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43347   # take no chances and rewrite it.
43348   # Note: m4 eats our [], so we need to use [ and ] instead.
43349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43350   if test "x$has_forbidden_chars" != x; then
43351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43352     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43353   fi
43354 
43355     # Output is in $new_path
43356 
43357   windows_path="$new_path"
43358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43359     unix_path=`$CYGPATH -u "$windows_path"`
43360     new_path="$unix_path"
43361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43363     new_path="$unix_path"
43364   fi
43365 
43366     # remove trailing .exe if any
43367     new_path="${new_path/%.exe/}"
43368 
43369     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43370     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43371   fi
43372 
43373     else
43374       # We're on a unix platform. Hooray! :)
43375       # First separate the path from the arguments. This will split at the first
43376       # space.
43377       complete="$NM"
43378       path="${complete%% *}"
43379       tmp="$complete EOL"
43380       arguments="${tmp#* }"
43381 
43382       # Cannot rely on the command "which" here since it doesn't always work.
43383       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43384       if test -z "$is_absolute_path"; then
43385         # Path to executable is not absolute. Find it.
43386         IFS_save="$IFS"
43387         IFS=:
43388         for p in $PATH; do
43389           if test -f "$p/$path" && test -x "$p/$path"; then
43390             new_path="$p/$path"
43391             break
43392           fi
43393         done
43394         IFS="$IFS_save"
43395       else
43396         # This is an absolute path, we can use it without further modifications.
43397         new_path="$path"
43398       fi
43399 
43400       if test "x$new_path" = x; then
43401         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43402 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43403         has_space=`$ECHO "$complete" | $GREP " "`
43404         if test "x$has_space" != x; then
43405           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43406 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43407         fi
43408         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43409       fi
43410     fi
43411 
43412     # Now join together the path and the arguments once again
43413     if test "x$arguments" != xEOL; then
43414       new_complete="$new_path ${arguments% *}"
43415     else
43416       new_complete="$new_path"
43417     fi
43418 
43419     if test "x$complete" != "x$new_complete"; then
43420       NM="$new_complete"
43421       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43422 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43423     fi
43424   fi
43425 
43426     GNM="$NM"
43427 
43428   fi
43429 
43430   # objcopy is used for moving debug symbols to separate files when
43431   # full debug symbols are enabled.
43432   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43433 
43434 
43435   # Publish this variable in the help.
43436 
43437 
43438   if [ -z "${OBJCOPY+x}" ]; then
43439     # The variable is not set by user, try to locate tool using the code snippet
43440     if test -n "$ac_tool_prefix"; then
43441   for ac_prog in gobjcopy objcopy
43442   do
43443     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43444 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43446 $as_echo_n "checking for $ac_word... " >&6; }
43447 if ${ac_cv_prog_OBJCOPY+:} false; then :
43448   $as_echo_n "(cached) " >&6
43449 else
43450   if test -n "$OBJCOPY"; then
43451   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43452 else
43453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43454 for as_dir in $PATH
43455 do
43456   IFS=$as_save_IFS
43457   test -z "$as_dir" && as_dir=.
43458     for ac_exec_ext in '' $ac_executable_extensions; do
43459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43460     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43462     break 2
43463   fi
43464 done
43465   done
43466 IFS=$as_save_IFS
43467 
43468 fi
43469 fi
43470 OBJCOPY=$ac_cv_prog_OBJCOPY
43471 if test -n "$OBJCOPY"; then
43472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43473 $as_echo "$OBJCOPY" >&6; }
43474 else
43475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43476 $as_echo "no" >&6; }
43477 fi
43478 
43479 
43480     test -n "$OBJCOPY" && break
43481   done
43482 fi
43483 if test -z "$OBJCOPY"; then
43484   ac_ct_OBJCOPY=$OBJCOPY
43485   for ac_prog in gobjcopy objcopy
43486 do
43487   # Extract the first word of "$ac_prog", so it can be a program name with args.
43488 set dummy $ac_prog; ac_word=$2
43489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43490 $as_echo_n "checking for $ac_word... " >&6; }
43491 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43492   $as_echo_n "(cached) " >&6
43493 else
43494   if test -n "$ac_ct_OBJCOPY"; then
43495   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43496 else
43497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43498 for as_dir in $PATH
43499 do
43500   IFS=$as_save_IFS
43501   test -z "$as_dir" && as_dir=.
43502     for ac_exec_ext in '' $ac_executable_extensions; do
43503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43504     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43506     break 2
43507   fi
43508 done
43509   done
43510 IFS=$as_save_IFS
43511 
43512 fi
43513 fi
43514 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43515 if test -n "$ac_ct_OBJCOPY"; then
43516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43517 $as_echo "$ac_ct_OBJCOPY" >&6; }
43518 else
43519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43520 $as_echo "no" >&6; }
43521 fi
43522 
43523 
43524   test -n "$ac_ct_OBJCOPY" && break
43525 done
43526 
43527   if test "x$ac_ct_OBJCOPY" = x; then
43528     OBJCOPY=""
43529   else
43530     case $cross_compiling:$ac_tool_warned in
43531 yes:)
43532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43533 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43534 ac_tool_warned=yes ;;
43535 esac
43536     OBJCOPY=$ac_ct_OBJCOPY
43537   fi
43538 fi
43539 
43540   else
43541     # The variable is set, but is it from the command line or the environment?
43542 
43543     # Try to remove the string !OBJCOPY! from our list.
43544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43546       # If it failed, the variable was not from the command line. Ignore it,
43547       # but warn the user (except for BASH, which is always set by the calling BASH).
43548       if test "xOBJCOPY" != xBASH; then
43549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43550 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43551       fi
43552       # Try to locate tool using the code snippet
43553       if test -n "$ac_tool_prefix"; then
43554   for ac_prog in gobjcopy objcopy
43555   do
43556     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43557 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43559 $as_echo_n "checking for $ac_word... " >&6; }
43560 if ${ac_cv_prog_OBJCOPY+:} false; then :
43561   $as_echo_n "(cached) " >&6
43562 else
43563   if test -n "$OBJCOPY"; then
43564   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43565 else
43566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43567 for as_dir in $PATH
43568 do
43569   IFS=$as_save_IFS
43570   test -z "$as_dir" && as_dir=.
43571     for ac_exec_ext in '' $ac_executable_extensions; do
43572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43573     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43575     break 2
43576   fi
43577 done
43578   done
43579 IFS=$as_save_IFS
43580 
43581 fi
43582 fi
43583 OBJCOPY=$ac_cv_prog_OBJCOPY
43584 if test -n "$OBJCOPY"; then
43585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43586 $as_echo "$OBJCOPY" >&6; }
43587 else
43588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43589 $as_echo "no" >&6; }
43590 fi
43591 
43592 
43593     test -n "$OBJCOPY" && break
43594   done
43595 fi
43596 if test -z "$OBJCOPY"; then
43597   ac_ct_OBJCOPY=$OBJCOPY
43598   for ac_prog in gobjcopy objcopy
43599 do
43600   # Extract the first word of "$ac_prog", so it can be a program name with args.
43601 set dummy $ac_prog; ac_word=$2
43602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43603 $as_echo_n "checking for $ac_word... " >&6; }
43604 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43605   $as_echo_n "(cached) " >&6
43606 else
43607   if test -n "$ac_ct_OBJCOPY"; then
43608   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43609 else
43610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43611 for as_dir in $PATH
43612 do
43613   IFS=$as_save_IFS
43614   test -z "$as_dir" && as_dir=.
43615     for ac_exec_ext in '' $ac_executable_extensions; do
43616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43617     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43619     break 2
43620   fi
43621 done
43622   done
43623 IFS=$as_save_IFS
43624 
43625 fi
43626 fi
43627 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43628 if test -n "$ac_ct_OBJCOPY"; then
43629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43630 $as_echo "$ac_ct_OBJCOPY" >&6; }
43631 else
43632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43633 $as_echo "no" >&6; }
43634 fi
43635 
43636 
43637   test -n "$ac_ct_OBJCOPY" && break
43638 done
43639 
43640   if test "x$ac_ct_OBJCOPY" = x; then
43641     OBJCOPY=""
43642   else
43643     case $cross_compiling:$ac_tool_warned in
43644 yes:)
43645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43646 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43647 ac_tool_warned=yes ;;
43648 esac
43649     OBJCOPY=$ac_ct_OBJCOPY
43650   fi
43651 fi
43652 
43653     else
43654       # If it succeeded, then it was overridden by the user. We will use it
43655       # for the tool.
43656 
43657       # First remove it from the list of overridden variables, so we can test
43658       # for unknown variables in the end.
43659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43660 
43661       # Check if we try to supply an empty value
43662       if test "x$OBJCOPY" = x; then
43663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43664 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43666 $as_echo_n "checking for OBJCOPY... " >&6; }
43667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43668 $as_echo "disabled" >&6; }
43669       else
43670         # Check if the provided tool contains a complete path.
43671         tool_specified="$OBJCOPY"
43672         tool_basename="${tool_specified##*/}"
43673         if test "x$tool_basename" = "x$tool_specified"; then
43674           # A command without a complete path is provided, search $PATH.
43675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43676 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43677           # Extract the first word of "$tool_basename", so it can be a program name with args.
43678 set dummy $tool_basename; ac_word=$2
43679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43680 $as_echo_n "checking for $ac_word... " >&6; }
43681 if ${ac_cv_path_OBJCOPY+:} false; then :
43682   $as_echo_n "(cached) " >&6
43683 else
43684   case $OBJCOPY in
43685   [\\/]* | ?:[\\/]*)
43686   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43687   ;;
43688   *)
43689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43690 for as_dir in $PATH
43691 do
43692   IFS=$as_save_IFS
43693   test -z "$as_dir" && as_dir=.
43694     for ac_exec_ext in '' $ac_executable_extensions; do
43695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43696     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43698     break 2
43699   fi
43700 done
43701   done
43702 IFS=$as_save_IFS
43703 
43704   ;;
43705 esac
43706 fi
43707 OBJCOPY=$ac_cv_path_OBJCOPY
43708 if test -n "$OBJCOPY"; then
43709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43710 $as_echo "$OBJCOPY" >&6; }
43711 else
43712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43713 $as_echo "no" >&6; }
43714 fi
43715 
43716 
43717           if test "x$OBJCOPY" = x; then
43718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43719           fi
43720         else
43721           # Otherwise we believe it is a complete path. Use it as it is.
43722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43723 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43725 $as_echo_n "checking for OBJCOPY... " >&6; }
43726           if test ! -x "$tool_specified"; then
43727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43728 $as_echo "not found" >&6; }
43729             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43730           fi
43731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43732 $as_echo "$tool_specified" >&6; }
43733         fi
43734       fi
43735     fi
43736 
43737   fi
43738 
43739 
43740     # Only call fixup if objcopy was found.
43741     if test -n "$OBJCOPY"; then
43742 
43743   # Only process if variable expands to non-empty
43744 
43745   if test "x$OBJCOPY" != x; then
43746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43747 
43748   # First separate the path from the arguments. This will split at the first
43749   # space.
43750   complete="$OBJCOPY"
43751   path="${complete%% *}"
43752   tmp="$complete EOL"
43753   arguments="${tmp#* }"
43754 
43755   # Input might be given as Windows format, start by converting to
43756   # unix format.
43757   new_path=`$CYGPATH -u "$path"`
43758 
43759   # Now try to locate executable using which
43760   new_path=`$WHICH "$new_path" 2> /dev/null`
43761   # bat and cmd files are not always considered executable in cygwin causing which
43762   # to not find them
43763   if test "x$new_path" = x \
43764       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43765       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43766     new_path=`$CYGPATH -u "$path"`
43767   fi
43768   if test "x$new_path" = x; then
43769     # Oops. Which didn't find the executable.
43770     # The splitting of arguments from the executable at a space might have been incorrect,
43771     # since paths with space are more likely in Windows. Give it another try with the whole
43772     # argument.
43773     path="$complete"
43774     arguments="EOL"
43775     new_path=`$CYGPATH -u "$path"`
43776     new_path=`$WHICH "$new_path" 2> /dev/null`
43777     # bat and cmd files are not always considered executable in cygwin causing which
43778     # to not find them
43779     if test "x$new_path" = x \
43780         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43781         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43782       new_path=`$CYGPATH -u "$path"`
43783     fi
43784     if test "x$new_path" = x; then
43785       # It's still not found. Now this is an unrecoverable error.
43786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43787 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43788       has_space=`$ECHO "$complete" | $GREP " "`
43789       if test "x$has_space" != x; then
43790         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43791 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43792       fi
43793       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43794     fi
43795   fi
43796 
43797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43800   # "foo.exe" is OK but "foo" is an error.
43801   #
43802   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43803   # It is also a way to make sure we got the proper file name for the real test later on.
43804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43805   if test "x$test_shortpath" = x; then
43806     # Short path failed, file does not exist as specified.
43807     # Try adding .exe or .cmd
43808     if test -f "${new_path}.exe"; then
43809       input_to_shortpath="${new_path}.exe"
43810     elif test -f "${new_path}.cmd"; then
43811       input_to_shortpath="${new_path}.cmd"
43812     else
43813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43814 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43815       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43816 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43817       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43818     fi
43819   else
43820     input_to_shortpath="$new_path"
43821   fi
43822 
43823   # Call helper function which possibly converts this using DOS-style short mode.
43824   # If so, the updated path is stored in $new_path.
43825   new_path="$input_to_shortpath"
43826 
43827   input_path="$input_to_shortpath"
43828   # Check if we need to convert this using DOS-style short mode. If the path
43829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43830   # take no chances and rewrite it.
43831   # Note: m4 eats our [], so we need to use [ and ] instead.
43832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43833   if test "x$has_forbidden_chars" != x; then
43834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43835     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43836     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43837     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43838       # Going to short mode and back again did indeed matter. Since short mode is
43839       # case insensitive, let's make it lowercase to improve readability.
43840       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43841       # Now convert it back to Unix-style (cygpath)
43842       input_path=`$CYGPATH -u "$shortmode_path"`
43843       new_path="$input_path"
43844     fi
43845   fi
43846 
43847   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43848   if test "x$test_cygdrive_prefix" = x; then
43849     # As a simple fix, exclude /usr/bin since it's not a real path.
43850     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43851       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43852       # a path prefixed by /cygdrive for fixpath to work.
43853       new_path="$CYGWIN_ROOT_PATH$input_path"
43854     fi
43855   fi
43856 
43857   # remove trailing .exe if any
43858   new_path="${new_path/%.exe/}"
43859 
43860     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43861 
43862   # First separate the path from the arguments. This will split at the first
43863   # space.
43864   complete="$OBJCOPY"
43865   path="${complete%% *}"
43866   tmp="$complete EOL"
43867   arguments="${tmp#* }"
43868 
43869   # Input might be given as Windows format, start by converting to
43870   # unix format.
43871   new_path="$path"
43872 
43873   windows_path="$new_path"
43874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43875     unix_path=`$CYGPATH -u "$windows_path"`
43876     new_path="$unix_path"
43877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43879     new_path="$unix_path"
43880   fi
43881 
43882 
43883   # Now try to locate executable using which
43884   new_path=`$WHICH "$new_path" 2> /dev/null`
43885 
43886   if test "x$new_path" = x; then
43887     # Oops. Which didn't find the executable.
43888     # The splitting of arguments from the executable at a space might have been incorrect,
43889     # since paths with space are more likely in Windows. Give it another try with the whole
43890     # argument.
43891     path="$complete"
43892     arguments="EOL"
43893     new_path="$path"
43894 
43895   windows_path="$new_path"
43896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43897     unix_path=`$CYGPATH -u "$windows_path"`
43898     new_path="$unix_path"
43899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43901     new_path="$unix_path"
43902   fi
43903 
43904 
43905     new_path=`$WHICH "$new_path" 2> /dev/null`
43906     # bat and cmd files are not always considered executable in MSYS causing which
43907     # to not find them
43908     if test "x$new_path" = x \
43909         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43910         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43911       new_path="$path"
43912 
43913   windows_path="$new_path"
43914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43915     unix_path=`$CYGPATH -u "$windows_path"`
43916     new_path="$unix_path"
43917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43919     new_path="$unix_path"
43920   fi
43921 
43922     fi
43923 
43924     if test "x$new_path" = x; then
43925       # It's still not found. Now this is an unrecoverable error.
43926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43927 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43928       has_space=`$ECHO "$complete" | $GREP " "`
43929       if test "x$has_space" != x; then
43930         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43931 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43932       fi
43933       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43934     fi
43935   fi
43936 
43937   # Now new_path has a complete unix path to the binary
43938   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43939     # Keep paths in /bin as-is, but remove trailing .exe if any
43940     new_path="${new_path/%.exe/}"
43941     # Do not save /bin paths to all_fixpath_prefixes!
43942   else
43943     # Not in mixed or Windows style, start by that.
43944     new_path=`cmd //c echo $new_path`
43945 
43946   input_path="$new_path"
43947   # Check if we need to convert this using DOS-style short mode. If the path
43948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43949   # take no chances and rewrite it.
43950   # Note: m4 eats our [], so we need to use [ and ] instead.
43951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43952   if test "x$has_forbidden_chars" != x; then
43953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43954     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43955   fi
43956 
43957     # Output is in $new_path
43958 
43959   windows_path="$new_path"
43960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43961     unix_path=`$CYGPATH -u "$windows_path"`
43962     new_path="$unix_path"
43963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43965     new_path="$unix_path"
43966   fi
43967 
43968     # remove trailing .exe if any
43969     new_path="${new_path/%.exe/}"
43970 
43971     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43972     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43973   fi
43974 
43975     else
43976       # We're on a unix platform. Hooray! :)
43977       # First separate the path from the arguments. This will split at the first
43978       # space.
43979       complete="$OBJCOPY"
43980       path="${complete%% *}"
43981       tmp="$complete EOL"
43982       arguments="${tmp#* }"
43983 
43984       # Cannot rely on the command "which" here since it doesn't always work.
43985       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43986       if test -z "$is_absolute_path"; then
43987         # Path to executable is not absolute. Find it.
43988         IFS_save="$IFS"
43989         IFS=:
43990         for p in $PATH; do
43991           if test -f "$p/$path" && test -x "$p/$path"; then
43992             new_path="$p/$path"
43993             break
43994           fi
43995         done
43996         IFS="$IFS_save"
43997       else
43998         # This is an absolute path, we can use it without further modifications.
43999         new_path="$path"
44000       fi
44001 
44002       if test "x$new_path" = x; then
44003         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44004 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44005         has_space=`$ECHO "$complete" | $GREP " "`
44006         if test "x$has_space" != x; then
44007           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44008 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44009         fi
44010         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44011       fi
44012     fi
44013 
44014     # Now join together the path and the arguments once again
44015     if test "x$arguments" != xEOL; then
44016       new_complete="$new_path ${arguments% *}"
44017     else
44018       new_complete="$new_path"
44019     fi
44020 
44021     if test "x$complete" != "x$new_complete"; then
44022       OBJCOPY="$new_complete"
44023       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44024 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44025     fi
44026   fi
44027 
44028       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44029         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44030         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44031         # - version number is last blank separate word on first line
44032         # - version number formats that have been seen:
44033         #   - <major>.<minor>
44034         #   - <major>.<minor>.<micro>
44035         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44036         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44037          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44038               -e 's/.* //' \
44039               -e '/^[01]\./b bad' \
44040               -e '/^2\./{' \
44041               -e '  s/^2\.//' \
44042               -e '  /^[0-9]$/b bad' \
44043               -e '  /^[0-9]\./b bad' \
44044               -e '  /^1[0-9]$/b bad' \
44045               -e '  /^1[0-9]\./b bad' \
44046               -e '  /^20\./b bad' \
44047               -e '  /^21\.0$/b bad' \
44048               -e '  /^21\.0\./b bad' \
44049               -e '}' \
44050               -e ':good' \
44051               -e 's/.*/VALID_VERSION/p' \
44052               -e 'q' \
44053               -e ':bad' \
44054               -e 's/.*/BAD_VERSION/p' \
44055               -e 'q'`
44056         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44057           OBJCOPY=
44058           { $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
44059 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44060           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44061 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44062           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44063 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44064           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44065 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44066           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44067 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44068         fi
44069       fi
44070     fi
44071   fi
44072 
44073 
44074 
44075   # Publish this variable in the help.
44076 
44077 
44078   if [ -z "${OBJDUMP+x}" ]; then
44079     # The variable is not set by user, try to locate tool using the code snippet
44080     if test -n "$ac_tool_prefix"; then
44081   for ac_prog in gobjdump objdump
44082   do
44083     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44084 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44086 $as_echo_n "checking for $ac_word... " >&6; }
44087 if ${ac_cv_prog_OBJDUMP+:} false; then :
44088   $as_echo_n "(cached) " >&6
44089 else
44090   if test -n "$OBJDUMP"; then
44091   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44092 else
44093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44094 for as_dir in $PATH
44095 do
44096   IFS=$as_save_IFS
44097   test -z "$as_dir" && as_dir=.
44098     for ac_exec_ext in '' $ac_executable_extensions; do
44099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44100     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44102     break 2
44103   fi
44104 done
44105   done
44106 IFS=$as_save_IFS
44107 
44108 fi
44109 fi
44110 OBJDUMP=$ac_cv_prog_OBJDUMP
44111 if test -n "$OBJDUMP"; then
44112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44113 $as_echo "$OBJDUMP" >&6; }
44114 else
44115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44116 $as_echo "no" >&6; }
44117 fi
44118 
44119 
44120     test -n "$OBJDUMP" && break
44121   done
44122 fi
44123 if test -z "$OBJDUMP"; then
44124   ac_ct_OBJDUMP=$OBJDUMP
44125   for ac_prog in gobjdump objdump
44126 do
44127   # Extract the first word of "$ac_prog", so it can be a program name with args.
44128 set dummy $ac_prog; ac_word=$2
44129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44130 $as_echo_n "checking for $ac_word... " >&6; }
44131 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44132   $as_echo_n "(cached) " >&6
44133 else
44134   if test -n "$ac_ct_OBJDUMP"; then
44135   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44136 else
44137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44138 for as_dir in $PATH
44139 do
44140   IFS=$as_save_IFS
44141   test -z "$as_dir" && as_dir=.
44142     for ac_exec_ext in '' $ac_executable_extensions; do
44143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44144     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44146     break 2
44147   fi
44148 done
44149   done
44150 IFS=$as_save_IFS
44151 
44152 fi
44153 fi
44154 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44155 if test -n "$ac_ct_OBJDUMP"; then
44156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44157 $as_echo "$ac_ct_OBJDUMP" >&6; }
44158 else
44159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44160 $as_echo "no" >&6; }
44161 fi
44162 
44163 
44164   test -n "$ac_ct_OBJDUMP" && break
44165 done
44166 
44167   if test "x$ac_ct_OBJDUMP" = x; then
44168     OBJDUMP=""
44169   else
44170     case $cross_compiling:$ac_tool_warned in
44171 yes:)
44172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44173 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44174 ac_tool_warned=yes ;;
44175 esac
44176     OBJDUMP=$ac_ct_OBJDUMP
44177   fi
44178 fi
44179 
44180   else
44181     # The variable is set, but is it from the command line or the environment?
44182 
44183     # Try to remove the string !OBJDUMP! from our list.
44184     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44185     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44186       # If it failed, the variable was not from the command line. Ignore it,
44187       # but warn the user (except for BASH, which is always set by the calling BASH).
44188       if test "xOBJDUMP" != xBASH; then
44189         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44190 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44191       fi
44192       # Try to locate tool using the code snippet
44193       if test -n "$ac_tool_prefix"; then
44194   for ac_prog in gobjdump objdump
44195   do
44196     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44197 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44199 $as_echo_n "checking for $ac_word... " >&6; }
44200 if ${ac_cv_prog_OBJDUMP+:} false; then :
44201   $as_echo_n "(cached) " >&6
44202 else
44203   if test -n "$OBJDUMP"; then
44204   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44205 else
44206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44207 for as_dir in $PATH
44208 do
44209   IFS=$as_save_IFS
44210   test -z "$as_dir" && as_dir=.
44211     for ac_exec_ext in '' $ac_executable_extensions; do
44212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44213     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44215     break 2
44216   fi
44217 done
44218   done
44219 IFS=$as_save_IFS
44220 
44221 fi
44222 fi
44223 OBJDUMP=$ac_cv_prog_OBJDUMP
44224 if test -n "$OBJDUMP"; then
44225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44226 $as_echo "$OBJDUMP" >&6; }
44227 else
44228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44229 $as_echo "no" >&6; }
44230 fi
44231 
44232 
44233     test -n "$OBJDUMP" && break
44234   done
44235 fi
44236 if test -z "$OBJDUMP"; then
44237   ac_ct_OBJDUMP=$OBJDUMP
44238   for ac_prog in gobjdump objdump
44239 do
44240   # Extract the first word of "$ac_prog", so it can be a program name with args.
44241 set dummy $ac_prog; ac_word=$2
44242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44243 $as_echo_n "checking for $ac_word... " >&6; }
44244 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44245   $as_echo_n "(cached) " >&6
44246 else
44247   if test -n "$ac_ct_OBJDUMP"; then
44248   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44249 else
44250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44251 for as_dir in $PATH
44252 do
44253   IFS=$as_save_IFS
44254   test -z "$as_dir" && as_dir=.
44255     for ac_exec_ext in '' $ac_executable_extensions; do
44256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44257     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44259     break 2
44260   fi
44261 done
44262   done
44263 IFS=$as_save_IFS
44264 
44265 fi
44266 fi
44267 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44268 if test -n "$ac_ct_OBJDUMP"; then
44269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44270 $as_echo "$ac_ct_OBJDUMP" >&6; }
44271 else
44272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44273 $as_echo "no" >&6; }
44274 fi
44275 
44276 
44277   test -n "$ac_ct_OBJDUMP" && break
44278 done
44279 
44280   if test "x$ac_ct_OBJDUMP" = x; then
44281     OBJDUMP=""
44282   else
44283     case $cross_compiling:$ac_tool_warned in
44284 yes:)
44285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44286 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44287 ac_tool_warned=yes ;;
44288 esac
44289     OBJDUMP=$ac_ct_OBJDUMP
44290   fi
44291 fi
44292 
44293     else
44294       # If it succeeded, then it was overridden by the user. We will use it
44295       # for the tool.
44296 
44297       # First remove it from the list of overridden variables, so we can test
44298       # for unknown variables in the end.
44299       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44300 
44301       # Check if we try to supply an empty value
44302       if test "x$OBJDUMP" = x; then
44303         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44304 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44305         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44306 $as_echo_n "checking for OBJDUMP... " >&6; }
44307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44308 $as_echo "disabled" >&6; }
44309       else
44310         # Check if the provided tool contains a complete path.
44311         tool_specified="$OBJDUMP"
44312         tool_basename="${tool_specified##*/}"
44313         if test "x$tool_basename" = "x$tool_specified"; then
44314           # A command without a complete path is provided, search $PATH.
44315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44316 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44317           # Extract the first word of "$tool_basename", so it can be a program name with args.
44318 set dummy $tool_basename; ac_word=$2
44319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44320 $as_echo_n "checking for $ac_word... " >&6; }
44321 if ${ac_cv_path_OBJDUMP+:} false; then :
44322   $as_echo_n "(cached) " >&6
44323 else
44324   case $OBJDUMP in
44325   [\\/]* | ?:[\\/]*)
44326   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44327   ;;
44328   *)
44329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44330 for as_dir in $PATH
44331 do
44332   IFS=$as_save_IFS
44333   test -z "$as_dir" && as_dir=.
44334     for ac_exec_ext in '' $ac_executable_extensions; do
44335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44336     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44338     break 2
44339   fi
44340 done
44341   done
44342 IFS=$as_save_IFS
44343 
44344   ;;
44345 esac
44346 fi
44347 OBJDUMP=$ac_cv_path_OBJDUMP
44348 if test -n "$OBJDUMP"; then
44349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44350 $as_echo "$OBJDUMP" >&6; }
44351 else
44352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44353 $as_echo "no" >&6; }
44354 fi
44355 
44356 
44357           if test "x$OBJDUMP" = x; then
44358             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44359           fi
44360         else
44361           # Otherwise we believe it is a complete path. Use it as it is.
44362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44363 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44364           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44365 $as_echo_n "checking for OBJDUMP... " >&6; }
44366           if test ! -x "$tool_specified"; then
44367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44368 $as_echo "not found" >&6; }
44369             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44370           fi
44371           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44372 $as_echo "$tool_specified" >&6; }
44373         fi
44374       fi
44375     fi
44376 
44377   fi
44378 
44379 
44380   if test "x$OBJDUMP" != x; then
44381     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44382     # bails if argument is missing.
44383 
44384   # Only process if variable expands to non-empty
44385 
44386   if test "x$OBJDUMP" != x; then
44387     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44388 
44389   # First separate the path from the arguments. This will split at the first
44390   # space.
44391   complete="$OBJDUMP"
44392   path="${complete%% *}"
44393   tmp="$complete EOL"
44394   arguments="${tmp#* }"
44395 
44396   # Input might be given as Windows format, start by converting to
44397   # unix format.
44398   new_path=`$CYGPATH -u "$path"`
44399 
44400   # Now try to locate executable using which
44401   new_path=`$WHICH "$new_path" 2> /dev/null`
44402   # bat and cmd files are not always considered executable in cygwin causing which
44403   # to not find them
44404   if test "x$new_path" = x \
44405       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44406       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44407     new_path=`$CYGPATH -u "$path"`
44408   fi
44409   if test "x$new_path" = x; then
44410     # Oops. Which didn't find the executable.
44411     # The splitting of arguments from the executable at a space might have been incorrect,
44412     # since paths with space are more likely in Windows. Give it another try with the whole
44413     # argument.
44414     path="$complete"
44415     arguments="EOL"
44416     new_path=`$CYGPATH -u "$path"`
44417     new_path=`$WHICH "$new_path" 2> /dev/null`
44418     # bat and cmd files are not always considered executable in cygwin causing which
44419     # to not find them
44420     if test "x$new_path" = x \
44421         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44422         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44423       new_path=`$CYGPATH -u "$path"`
44424     fi
44425     if test "x$new_path" = x; then
44426       # It's still not found. Now this is an unrecoverable error.
44427       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44428 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44429       has_space=`$ECHO "$complete" | $GREP " "`
44430       if test "x$has_space" != x; then
44431         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44432 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44433       fi
44434       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44435     fi
44436   fi
44437 
44438   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44439   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44440   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44441   # "foo.exe" is OK but "foo" is an error.
44442   #
44443   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44444   # It is also a way to make sure we got the proper file name for the real test later on.
44445   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44446   if test "x$test_shortpath" = x; then
44447     # Short path failed, file does not exist as specified.
44448     # Try adding .exe or .cmd
44449     if test -f "${new_path}.exe"; then
44450       input_to_shortpath="${new_path}.exe"
44451     elif test -f "${new_path}.cmd"; then
44452       input_to_shortpath="${new_path}.cmd"
44453     else
44454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44455 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44456       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44457 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44458       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44459     fi
44460   else
44461     input_to_shortpath="$new_path"
44462   fi
44463 
44464   # Call helper function which possibly converts this using DOS-style short mode.
44465   # If so, the updated path is stored in $new_path.
44466   new_path="$input_to_shortpath"
44467 
44468   input_path="$input_to_shortpath"
44469   # Check if we need to convert this using DOS-style short mode. If the path
44470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44471   # take no chances and rewrite it.
44472   # Note: m4 eats our [], so we need to use [ and ] instead.
44473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44474   if test "x$has_forbidden_chars" != x; then
44475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44479       # Going to short mode and back again did indeed matter. Since short mode is
44480       # case insensitive, let's make it lowercase to improve readability.
44481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44482       # Now convert it back to Unix-style (cygpath)
44483       input_path=`$CYGPATH -u "$shortmode_path"`
44484       new_path="$input_path"
44485     fi
44486   fi
44487 
44488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44489   if test "x$test_cygdrive_prefix" = x; then
44490     # As a simple fix, exclude /usr/bin since it's not a real path.
44491     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44493       # a path prefixed by /cygdrive for fixpath to work.
44494       new_path="$CYGWIN_ROOT_PATH$input_path"
44495     fi
44496   fi
44497 
44498   # remove trailing .exe if any
44499   new_path="${new_path/%.exe/}"
44500 
44501     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44502 
44503   # First separate the path from the arguments. This will split at the first
44504   # space.
44505   complete="$OBJDUMP"
44506   path="${complete%% *}"
44507   tmp="$complete EOL"
44508   arguments="${tmp#* }"
44509 
44510   # Input might be given as Windows format, start by converting to
44511   # unix format.
44512   new_path="$path"
44513 
44514   windows_path="$new_path"
44515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44516     unix_path=`$CYGPATH -u "$windows_path"`
44517     new_path="$unix_path"
44518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44520     new_path="$unix_path"
44521   fi
44522 
44523 
44524   # Now try to locate executable using which
44525   new_path=`$WHICH "$new_path" 2> /dev/null`
44526 
44527   if test "x$new_path" = x; then
44528     # Oops. Which didn't find the executable.
44529     # The splitting of arguments from the executable at a space might have been incorrect,
44530     # since paths with space are more likely in Windows. Give it another try with the whole
44531     # argument.
44532     path="$complete"
44533     arguments="EOL"
44534     new_path="$path"
44535 
44536   windows_path="$new_path"
44537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44538     unix_path=`$CYGPATH -u "$windows_path"`
44539     new_path="$unix_path"
44540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44542     new_path="$unix_path"
44543   fi
44544 
44545 
44546     new_path=`$WHICH "$new_path" 2> /dev/null`
44547     # bat and cmd files are not always considered executable in MSYS causing which
44548     # to not find them
44549     if test "x$new_path" = x \
44550         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44551         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44552       new_path="$path"
44553 
44554   windows_path="$new_path"
44555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44556     unix_path=`$CYGPATH -u "$windows_path"`
44557     new_path="$unix_path"
44558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44560     new_path="$unix_path"
44561   fi
44562 
44563     fi
44564 
44565     if test "x$new_path" = x; then
44566       # It's still not found. Now this is an unrecoverable error.
44567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44568 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44569       has_space=`$ECHO "$complete" | $GREP " "`
44570       if test "x$has_space" != x; then
44571         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44572 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44573       fi
44574       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44575     fi
44576   fi
44577 
44578   # Now new_path has a complete unix path to the binary
44579   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44580     # Keep paths in /bin as-is, but remove trailing .exe if any
44581     new_path="${new_path/%.exe/}"
44582     # Do not save /bin paths to all_fixpath_prefixes!
44583   else
44584     # Not in mixed or Windows style, start by that.
44585     new_path=`cmd //c echo $new_path`
44586 
44587   input_path="$new_path"
44588   # Check if we need to convert this using DOS-style short mode. If the path
44589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44590   # take no chances and rewrite it.
44591   # Note: m4 eats our [], so we need to use [ and ] instead.
44592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44593   if test "x$has_forbidden_chars" != x; then
44594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44595     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44596   fi
44597 
44598     # Output is in $new_path
44599 
44600   windows_path="$new_path"
44601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44602     unix_path=`$CYGPATH -u "$windows_path"`
44603     new_path="$unix_path"
44604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44606     new_path="$unix_path"
44607   fi
44608 
44609     # remove trailing .exe if any
44610     new_path="${new_path/%.exe/}"
44611 
44612     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44613     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44614   fi
44615 
44616     else
44617       # We're on a unix platform. Hooray! :)
44618       # First separate the path from the arguments. This will split at the first
44619       # space.
44620       complete="$OBJDUMP"
44621       path="${complete%% *}"
44622       tmp="$complete EOL"
44623       arguments="${tmp#* }"
44624 
44625       # Cannot rely on the command "which" here since it doesn't always work.
44626       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44627       if test -z "$is_absolute_path"; then
44628         # Path to executable is not absolute. Find it.
44629         IFS_save="$IFS"
44630         IFS=:
44631         for p in $PATH; do
44632           if test -f "$p/$path" && test -x "$p/$path"; then
44633             new_path="$p/$path"
44634             break
44635           fi
44636         done
44637         IFS="$IFS_save"
44638       else
44639         # This is an absolute path, we can use it without further modifications.
44640         new_path="$path"
44641       fi
44642 
44643       if test "x$new_path" = x; then
44644         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44645 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44646         has_space=`$ECHO "$complete" | $GREP " "`
44647         if test "x$has_space" != x; then
44648           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44649 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44650         fi
44651         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44652       fi
44653     fi
44654 
44655     # Now join together the path and the arguments once again
44656     if test "x$arguments" != xEOL; then
44657       new_complete="$new_path ${arguments% *}"
44658     else
44659       new_complete="$new_path"
44660     fi
44661 
44662     if test "x$complete" != "x$new_complete"; then
44663       OBJDUMP="$new_complete"
44664       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44665 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44666     fi
44667   fi
44668 
44669   fi
44670 
44671 
44672   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44673   # to remain in place. Otherwise the compiler will not work in some siutations
44674   # in later configure checks.
44675   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44676     PATH="$OLD_PATH"
44677   fi
44678 
44679   # Restore the flags to the user specified values.
44680   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44681   CFLAGS="$ORG_CFLAGS"
44682   CXXFLAGS="$ORG_CXXFLAGS"
44683 
44684 
44685 # Finally do some processing after the detection phase
44686 
44687   if test "x$COMPILE_TYPE" = "xcross"; then
44688     # Now we need to find a C/C++ compiler that can build executables for the
44689     # build platform. We can't use the AC_PROG_CC macro, since it can only be
44690     # used once. Also, we need to do this without adding a tools dir to the
44691     # path, otherwise we might pick up cross-compilers which don't use standard
44692     # naming.
44693 
44694     OLDPATH="$PATH"
44695 
44696 
44697 # Check whether --with-build-devkit was given.
44698 if test "${with_build_devkit+set}" = set; then :
44699   withval=$with_build_devkit;
44700 fi
44701 
44702     if test "x$with_build_devkit" = "xyes"; then
44703       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44704     elif test -n "$with_build_devkit"; then
44705       if test ! -d "$with_build_devkit"; then
44706         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44707       else
44708 
44709   # Only process if variable expands to non-empty
44710 
44711   if test "x$with_build_devkit" != x; then
44712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44713 
44714   # Input might be given as Windows format, start by converting to
44715   # unix format.
44716   path="$with_build_devkit"
44717   new_path=`$CYGPATH -u "$path"`
44718 
44719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44722   # "foo.exe" is OK but "foo" is an error.
44723   #
44724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44725   # It is also a way to make sure we got the proper file name for the real test later on.
44726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44727   if test "x$test_shortpath" = x; then
44728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44729 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44730     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44731   fi
44732 
44733   # Call helper function which possibly converts this using DOS-style short mode.
44734   # If so, the updated path is stored in $new_path.
44735 
44736   input_path="$new_path"
44737   # Check if we need to convert this using DOS-style short mode. If the path
44738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44739   # take no chances and rewrite it.
44740   # Note: m4 eats our [], so we need to use [ and ] instead.
44741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44742   if test "x$has_forbidden_chars" != x; then
44743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44747       # Going to short mode and back again did indeed matter. Since short mode is
44748       # case insensitive, let's make it lowercase to improve readability.
44749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44750       # Now convert it back to Unix-style (cygpath)
44751       input_path=`$CYGPATH -u "$shortmode_path"`
44752       new_path="$input_path"
44753     fi
44754   fi
44755 
44756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44757   if test "x$test_cygdrive_prefix" = x; then
44758     # As a simple fix, exclude /usr/bin since it's not a real path.
44759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44761       # a path prefixed by /cygdrive for fixpath to work.
44762       new_path="$CYGWIN_ROOT_PATH$input_path"
44763     fi
44764   fi
44765 
44766 
44767   if test "x$path" != "x$new_path"; then
44768     with_build_devkit="$new_path"
44769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44770 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44771   fi
44772 
44773     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44774 
44775   path="$with_build_devkit"
44776   has_colon=`$ECHO $path | $GREP ^.:`
44777   new_path="$path"
44778   if test "x$has_colon" = x; then
44779     # Not in mixed or Windows style, start by that.
44780     new_path=`cmd //c echo $path`
44781   fi
44782 
44783 
44784   input_path="$new_path"
44785   # Check if we need to convert this using DOS-style short mode. If the path
44786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787   # take no chances and rewrite it.
44788   # Note: m4 eats our [], so we need to use [ and ] instead.
44789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44790   if test "x$has_forbidden_chars" != x; then
44791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44793   fi
44794 
44795 
44796   windows_path="$new_path"
44797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798     unix_path=`$CYGPATH -u "$windows_path"`
44799     new_path="$unix_path"
44800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44802     new_path="$unix_path"
44803   fi
44804 
44805   if test "x$path" != "x$new_path"; then
44806     with_build_devkit="$new_path"
44807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44808 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44809   fi
44810 
44811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44813 
44814     else
44815       # We're on a unix platform. Hooray! :)
44816       path="$with_build_devkit"
44817       has_space=`$ECHO "$path" | $GREP " "`
44818       if test "x$has_space" != x; then
44819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44820 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44821         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44822       fi
44823 
44824       # Use eval to expand a potential ~
44825       eval path="$path"
44826       if test ! -f "$path" && test ! -d "$path"; then
44827         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44828       fi
44829 
44830       if test -d "$path"; then
44831         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44832       else
44833         dir="`$DIRNAME "$path"`"
44834         base="`$BASENAME "$path"`"
44835         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44836       fi
44837     fi
44838   fi
44839 
44840         BUILD_DEVKIT_ROOT="$with_build_devkit"
44841         # Check for a meta data info file in the root of the devkit
44842         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44843           # Process devkit.info so that existing devkit variables are not
44844           # modified by this
44845           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44846               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44847               -e "s/\$host/\$build/g" \
44848               $BUILD_DEVKIT_ROOT/devkit.info \
44849               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44850           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44851           # This potentially sets the following:
44852           # A descriptive name of the devkit
44853 
44854   if test "x$BUILD_DEVKIT_NAME" = x; then
44855     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44856   fi
44857 
44858           # Corresponds to --with-extra-path
44859 
44860   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44861     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44862   fi
44863 
44864           # Corresponds to --with-toolchain-path
44865 
44866   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44867     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44868   fi
44869 
44870           # Corresponds to --with-sysroot
44871 
44872   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44873     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44874   fi
44875 
44876           # Skip the Window specific parts
44877         fi
44878 
44879         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44880 $as_echo_n "checking for build platform devkit... " >&6; }
44881         if test "x$BUILD_DEVKIT_NAME" != x; then
44882           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44883 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44884         else
44885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44886 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44887         fi
44888 
44889         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44890 
44891   if test "x$BUILD_SYSROOT" != "x"; then
44892     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44893       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44894         # Solaris Studio does not have a concept of sysroot. Instead we must
44895         # make sure the default include and lib dirs are appended to each
44896         # compile and link command line. Must also add -I-xbuiltin to enable
44897         # inlining of system functions and intrinsics.
44898         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44899         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44900             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44901       fi
44902     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44903       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44904       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44905     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44906       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44907       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44908     fi
44909     # The global CFLAGS and LDFLAGS variables need these for configure to function
44910     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44911     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44912     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44913     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44914   fi
44915 
44916   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44917     # We also need -iframework<path>/System/Library/Frameworks
44918     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44919     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44920     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44921     # set this here so it doesn't have to be peppered throughout the forest
44922     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44923     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44924   fi
44925 
44926 
44927 
44928 
44929 
44930          # Fallback default of just /bin if DEVKIT_PATH is not defined
44931         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44932           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44933         fi
44934         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44935       fi
44936     fi
44937 
44938     # FIXME: we should list the discovered compilers as an exclude pattern!
44939     # If we do that, we can do this detection before POST_DETECTION, and still
44940     # find the build compilers in the tools dir, if needed.
44941 
44942 
44943 
44944   # Publish this variable in the help.
44945 
44946 
44947   if [ -z "${BUILD_CC+x}" ]; then
44948     # The variable is not set by user, try to locate tool using the code snippet
44949     for ac_prog in cl cc gcc
44950 do
44951   # Extract the first word of "$ac_prog", so it can be a program name with args.
44952 set dummy $ac_prog; ac_word=$2
44953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44954 $as_echo_n "checking for $ac_word... " >&6; }
44955 if ${ac_cv_path_BUILD_CC+:} false; then :
44956   $as_echo_n "(cached) " >&6
44957 else
44958   case $BUILD_CC in
44959   [\\/]* | ?:[\\/]*)
44960   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44961   ;;
44962   *)
44963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44964 for as_dir in $PATH
44965 do
44966   IFS=$as_save_IFS
44967   test -z "$as_dir" && as_dir=.
44968     for ac_exec_ext in '' $ac_executable_extensions; do
44969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44970     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44972     break 2
44973   fi
44974 done
44975   done
44976 IFS=$as_save_IFS
44977 
44978   ;;
44979 esac
44980 fi
44981 BUILD_CC=$ac_cv_path_BUILD_CC
44982 if test -n "$BUILD_CC"; then
44983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44984 $as_echo "$BUILD_CC" >&6; }
44985 else
44986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44987 $as_echo "no" >&6; }
44988 fi
44989 
44990 
44991   test -n "$BUILD_CC" && break
44992 done
44993 
44994   else
44995     # The variable is set, but is it from the command line or the environment?
44996 
44997     # Try to remove the string !BUILD_CC! from our list.
44998     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44999     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45000       # If it failed, the variable was not from the command line. Ignore it,
45001       # but warn the user (except for BASH, which is always set by the calling BASH).
45002       if test "xBUILD_CC" != xBASH; then
45003         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45004 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45005       fi
45006       # Try to locate tool using the code snippet
45007       for ac_prog in cl cc gcc
45008 do
45009   # Extract the first word of "$ac_prog", so it can be a program name with args.
45010 set dummy $ac_prog; ac_word=$2
45011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45012 $as_echo_n "checking for $ac_word... " >&6; }
45013 if ${ac_cv_path_BUILD_CC+:} false; then :
45014   $as_echo_n "(cached) " >&6
45015 else
45016   case $BUILD_CC in
45017   [\\/]* | ?:[\\/]*)
45018   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45019   ;;
45020   *)
45021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45022 for as_dir in $PATH
45023 do
45024   IFS=$as_save_IFS
45025   test -z "$as_dir" && as_dir=.
45026     for ac_exec_ext in '' $ac_executable_extensions; do
45027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45028     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45030     break 2
45031   fi
45032 done
45033   done
45034 IFS=$as_save_IFS
45035 
45036   ;;
45037 esac
45038 fi
45039 BUILD_CC=$ac_cv_path_BUILD_CC
45040 if test -n "$BUILD_CC"; then
45041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45042 $as_echo "$BUILD_CC" >&6; }
45043 else
45044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45045 $as_echo "no" >&6; }
45046 fi
45047 
45048 
45049   test -n "$BUILD_CC" && break
45050 done
45051 
45052     else
45053       # If it succeeded, then it was overridden by the user. We will use it
45054       # for the tool.
45055 
45056       # First remove it from the list of overridden variables, so we can test
45057       # for unknown variables in the end.
45058       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45059 
45060       # Check if we try to supply an empty value
45061       if test "x$BUILD_CC" = x; then
45062         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45063 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45065 $as_echo_n "checking for BUILD_CC... " >&6; }
45066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45067 $as_echo "disabled" >&6; }
45068       else
45069         # Check if the provided tool contains a complete path.
45070         tool_specified="$BUILD_CC"
45071         tool_basename="${tool_specified##*/}"
45072         if test "x$tool_basename" = "x$tool_specified"; then
45073           # A command without a complete path is provided, search $PATH.
45074           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45075 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45076           # Extract the first word of "$tool_basename", so it can be a program name with args.
45077 set dummy $tool_basename; ac_word=$2
45078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45079 $as_echo_n "checking for $ac_word... " >&6; }
45080 if ${ac_cv_path_BUILD_CC+:} false; then :
45081   $as_echo_n "(cached) " >&6
45082 else
45083   case $BUILD_CC in
45084   [\\/]* | ?:[\\/]*)
45085   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45086   ;;
45087   *)
45088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45089 for as_dir in $PATH
45090 do
45091   IFS=$as_save_IFS
45092   test -z "$as_dir" && as_dir=.
45093     for ac_exec_ext in '' $ac_executable_extensions; do
45094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45095     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45097     break 2
45098   fi
45099 done
45100   done
45101 IFS=$as_save_IFS
45102 
45103   ;;
45104 esac
45105 fi
45106 BUILD_CC=$ac_cv_path_BUILD_CC
45107 if test -n "$BUILD_CC"; then
45108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45109 $as_echo "$BUILD_CC" >&6; }
45110 else
45111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45112 $as_echo "no" >&6; }
45113 fi
45114 
45115 
45116           if test "x$BUILD_CC" = x; then
45117             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45118           fi
45119         else
45120           # Otherwise we believe it is a complete path. Use it as it is.
45121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45122 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45123           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45124 $as_echo_n "checking for BUILD_CC... " >&6; }
45125           if test ! -x "$tool_specified"; then
45126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45127 $as_echo "not found" >&6; }
45128             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45129           fi
45130           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45131 $as_echo "$tool_specified" >&6; }
45132         fi
45133       fi
45134     fi
45135 
45136   fi
45137 
45138 
45139 
45140   if test "x$BUILD_CC" = x; then
45141     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45142   fi
45143 
45144 
45145 
45146   # Only process if variable expands to non-empty
45147 
45148   if test "x$BUILD_CC" != x; then
45149     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45150 
45151   # First separate the path from the arguments. This will split at the first
45152   # space.
45153   complete="$BUILD_CC"
45154   path="${complete%% *}"
45155   tmp="$complete EOL"
45156   arguments="${tmp#* }"
45157 
45158   # Input might be given as Windows format, start by converting to
45159   # unix format.
45160   new_path=`$CYGPATH -u "$path"`
45161 
45162   # Now try to locate executable using which
45163   new_path=`$WHICH "$new_path" 2> /dev/null`
45164   # bat and cmd files are not always considered executable in cygwin causing which
45165   # to not find them
45166   if test "x$new_path" = x \
45167       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45168       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45169     new_path=`$CYGPATH -u "$path"`
45170   fi
45171   if test "x$new_path" = x; then
45172     # Oops. Which didn't find the executable.
45173     # The splitting of arguments from the executable at a space might have been incorrect,
45174     # since paths with space are more likely in Windows. Give it another try with the whole
45175     # argument.
45176     path="$complete"
45177     arguments="EOL"
45178     new_path=`$CYGPATH -u "$path"`
45179     new_path=`$WHICH "$new_path" 2> /dev/null`
45180     # bat and cmd files are not always considered executable in cygwin causing which
45181     # to not find them
45182     if test "x$new_path" = x \
45183         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45184         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45185       new_path=`$CYGPATH -u "$path"`
45186     fi
45187     if test "x$new_path" = x; then
45188       # It's still not found. Now this is an unrecoverable error.
45189       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45190 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45191       has_space=`$ECHO "$complete" | $GREP " "`
45192       if test "x$has_space" != x; then
45193         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45194 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45195       fi
45196       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45197     fi
45198   fi
45199 
45200   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45201   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45202   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45203   # "foo.exe" is OK but "foo" is an error.
45204   #
45205   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45206   # It is also a way to make sure we got the proper file name for the real test later on.
45207   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45208   if test "x$test_shortpath" = x; then
45209     # Short path failed, file does not exist as specified.
45210     # Try adding .exe or .cmd
45211     if test -f "${new_path}.exe"; then
45212       input_to_shortpath="${new_path}.exe"
45213     elif test -f "${new_path}.cmd"; then
45214       input_to_shortpath="${new_path}.cmd"
45215     else
45216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45217 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45218       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45219 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45220       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45221     fi
45222   else
45223     input_to_shortpath="$new_path"
45224   fi
45225 
45226   # Call helper function which possibly converts this using DOS-style short mode.
45227   # If so, the updated path is stored in $new_path.
45228   new_path="$input_to_shortpath"
45229 
45230   input_path="$input_to_shortpath"
45231   # Check if we need to convert this using DOS-style short mode. If the path
45232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45233   # take no chances and rewrite it.
45234   # Note: m4 eats our [], so we need to use [ and ] instead.
45235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45236   if test "x$has_forbidden_chars" != x; then
45237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45238     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45239     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45240     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45241       # Going to short mode and back again did indeed matter. Since short mode is
45242       # case insensitive, let's make it lowercase to improve readability.
45243       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45244       # Now convert it back to Unix-style (cygpath)
45245       input_path=`$CYGPATH -u "$shortmode_path"`
45246       new_path="$input_path"
45247     fi
45248   fi
45249 
45250   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45251   if test "x$test_cygdrive_prefix" = x; then
45252     # As a simple fix, exclude /usr/bin since it's not a real path.
45253     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45254       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45255       # a path prefixed by /cygdrive for fixpath to work.
45256       new_path="$CYGWIN_ROOT_PATH$input_path"
45257     fi
45258   fi
45259 
45260   # remove trailing .exe if any
45261   new_path="${new_path/%.exe/}"
45262 
45263     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45264 
45265   # First separate the path from the arguments. This will split at the first
45266   # space.
45267   complete="$BUILD_CC"
45268   path="${complete%% *}"
45269   tmp="$complete EOL"
45270   arguments="${tmp#* }"
45271 
45272   # Input might be given as Windows format, start by converting to
45273   # unix format.
45274   new_path="$path"
45275 
45276   windows_path="$new_path"
45277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45278     unix_path=`$CYGPATH -u "$windows_path"`
45279     new_path="$unix_path"
45280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45282     new_path="$unix_path"
45283   fi
45284 
45285 
45286   # Now try to locate executable using which
45287   new_path=`$WHICH "$new_path" 2> /dev/null`
45288 
45289   if test "x$new_path" = x; then
45290     # Oops. Which didn't find the executable.
45291     # The splitting of arguments from the executable at a space might have been incorrect,
45292     # since paths with space are more likely in Windows. Give it another try with the whole
45293     # argument.
45294     path="$complete"
45295     arguments="EOL"
45296     new_path="$path"
45297 
45298   windows_path="$new_path"
45299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45300     unix_path=`$CYGPATH -u "$windows_path"`
45301     new_path="$unix_path"
45302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45304     new_path="$unix_path"
45305   fi
45306 
45307 
45308     new_path=`$WHICH "$new_path" 2> /dev/null`
45309     # bat and cmd files are not always considered executable in MSYS causing which
45310     # to not find them
45311     if test "x$new_path" = x \
45312         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45313         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45314       new_path="$path"
45315 
45316   windows_path="$new_path"
45317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45318     unix_path=`$CYGPATH -u "$windows_path"`
45319     new_path="$unix_path"
45320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45322     new_path="$unix_path"
45323   fi
45324 
45325     fi
45326 
45327     if test "x$new_path" = x; then
45328       # It's still not found. Now this is an unrecoverable error.
45329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45330 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45331       has_space=`$ECHO "$complete" | $GREP " "`
45332       if test "x$has_space" != x; then
45333         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45334 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45335       fi
45336       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45337     fi
45338   fi
45339 
45340   # Now new_path has a complete unix path to the binary
45341   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45342     # Keep paths in /bin as-is, but remove trailing .exe if any
45343     new_path="${new_path/%.exe/}"
45344     # Do not save /bin paths to all_fixpath_prefixes!
45345   else
45346     # Not in mixed or Windows style, start by that.
45347     new_path=`cmd //c echo $new_path`
45348 
45349   input_path="$new_path"
45350   # Check if we need to convert this using DOS-style short mode. If the path
45351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45352   # take no chances and rewrite it.
45353   # Note: m4 eats our [], so we need to use [ and ] instead.
45354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45355   if test "x$has_forbidden_chars" != x; then
45356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45357     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45358   fi
45359 
45360     # Output is in $new_path
45361 
45362   windows_path="$new_path"
45363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364     unix_path=`$CYGPATH -u "$windows_path"`
45365     new_path="$unix_path"
45366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368     new_path="$unix_path"
45369   fi
45370 
45371     # remove trailing .exe if any
45372     new_path="${new_path/%.exe/}"
45373 
45374     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45375     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45376   fi
45377 
45378     else
45379       # We're on a unix platform. Hooray! :)
45380       # First separate the path from the arguments. This will split at the first
45381       # space.
45382       complete="$BUILD_CC"
45383       path="${complete%% *}"
45384       tmp="$complete EOL"
45385       arguments="${tmp#* }"
45386 
45387       # Cannot rely on the command "which" here since it doesn't always work.
45388       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45389       if test -z "$is_absolute_path"; then
45390         # Path to executable is not absolute. Find it.
45391         IFS_save="$IFS"
45392         IFS=:
45393         for p in $PATH; do
45394           if test -f "$p/$path" && test -x "$p/$path"; then
45395             new_path="$p/$path"
45396             break
45397           fi
45398         done
45399         IFS="$IFS_save"
45400       else
45401         # This is an absolute path, we can use it without further modifications.
45402         new_path="$path"
45403       fi
45404 
45405       if test "x$new_path" = x; then
45406         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45407 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45408         has_space=`$ECHO "$complete" | $GREP " "`
45409         if test "x$has_space" != x; then
45410           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45411 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45412         fi
45413         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45414       fi
45415     fi
45416 
45417     # Now join together the path and the arguments once again
45418     if test "x$arguments" != xEOL; then
45419       new_complete="$new_path ${arguments% *}"
45420     else
45421       new_complete="$new_path"
45422     fi
45423 
45424     if test "x$complete" != "x$new_complete"; then
45425       BUILD_CC="$new_complete"
45426       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45427 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45428     fi
45429   fi
45430 
45431 
45432 
45433 
45434   # Publish this variable in the help.
45435 
45436 
45437   if [ -z "${BUILD_CXX+x}" ]; then
45438     # The variable is not set by user, try to locate tool using the code snippet
45439     for ac_prog in cl CC g++
45440 do
45441   # Extract the first word of "$ac_prog", so it can be a program name with args.
45442 set dummy $ac_prog; ac_word=$2
45443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45444 $as_echo_n "checking for $ac_word... " >&6; }
45445 if ${ac_cv_path_BUILD_CXX+:} false; then :
45446   $as_echo_n "(cached) " >&6
45447 else
45448   case $BUILD_CXX in
45449   [\\/]* | ?:[\\/]*)
45450   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45451   ;;
45452   *)
45453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45454 for as_dir in $PATH
45455 do
45456   IFS=$as_save_IFS
45457   test -z "$as_dir" && as_dir=.
45458     for ac_exec_ext in '' $ac_executable_extensions; do
45459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45460     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45462     break 2
45463   fi
45464 done
45465   done
45466 IFS=$as_save_IFS
45467 
45468   ;;
45469 esac
45470 fi
45471 BUILD_CXX=$ac_cv_path_BUILD_CXX
45472 if test -n "$BUILD_CXX"; then
45473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45474 $as_echo "$BUILD_CXX" >&6; }
45475 else
45476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45477 $as_echo "no" >&6; }
45478 fi
45479 
45480 
45481   test -n "$BUILD_CXX" && break
45482 done
45483 
45484   else
45485     # The variable is set, but is it from the command line or the environment?
45486 
45487     # Try to remove the string !BUILD_CXX! from our list.
45488     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45489     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45490       # If it failed, the variable was not from the command line. Ignore it,
45491       # but warn the user (except for BASH, which is always set by the calling BASH).
45492       if test "xBUILD_CXX" != xBASH; then
45493         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45494 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45495       fi
45496       # Try to locate tool using the code snippet
45497       for ac_prog in cl CC g++
45498 do
45499   # Extract the first word of "$ac_prog", so it can be a program name with args.
45500 set dummy $ac_prog; ac_word=$2
45501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45502 $as_echo_n "checking for $ac_word... " >&6; }
45503 if ${ac_cv_path_BUILD_CXX+:} false; then :
45504   $as_echo_n "(cached) " >&6
45505 else
45506   case $BUILD_CXX in
45507   [\\/]* | ?:[\\/]*)
45508   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45509   ;;
45510   *)
45511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45512 for as_dir in $PATH
45513 do
45514   IFS=$as_save_IFS
45515   test -z "$as_dir" && as_dir=.
45516     for ac_exec_ext in '' $ac_executable_extensions; do
45517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45518     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45520     break 2
45521   fi
45522 done
45523   done
45524 IFS=$as_save_IFS
45525 
45526   ;;
45527 esac
45528 fi
45529 BUILD_CXX=$ac_cv_path_BUILD_CXX
45530 if test -n "$BUILD_CXX"; then
45531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45532 $as_echo "$BUILD_CXX" >&6; }
45533 else
45534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45535 $as_echo "no" >&6; }
45536 fi
45537 
45538 
45539   test -n "$BUILD_CXX" && break
45540 done
45541 
45542     else
45543       # If it succeeded, then it was overridden by the user. We will use it
45544       # for the tool.
45545 
45546       # First remove it from the list of overridden variables, so we can test
45547       # for unknown variables in the end.
45548       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45549 
45550       # Check if we try to supply an empty value
45551       if test "x$BUILD_CXX" = x; then
45552         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45553 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45555 $as_echo_n "checking for BUILD_CXX... " >&6; }
45556         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45557 $as_echo "disabled" >&6; }
45558       else
45559         # Check if the provided tool contains a complete path.
45560         tool_specified="$BUILD_CXX"
45561         tool_basename="${tool_specified##*/}"
45562         if test "x$tool_basename" = "x$tool_specified"; then
45563           # A command without a complete path is provided, search $PATH.
45564           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45565 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45566           # Extract the first word of "$tool_basename", so it can be a program name with args.
45567 set dummy $tool_basename; ac_word=$2
45568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45569 $as_echo_n "checking for $ac_word... " >&6; }
45570 if ${ac_cv_path_BUILD_CXX+:} false; then :
45571   $as_echo_n "(cached) " >&6
45572 else
45573   case $BUILD_CXX in
45574   [\\/]* | ?:[\\/]*)
45575   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45576   ;;
45577   *)
45578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45579 for as_dir in $PATH
45580 do
45581   IFS=$as_save_IFS
45582   test -z "$as_dir" && as_dir=.
45583     for ac_exec_ext in '' $ac_executable_extensions; do
45584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45585     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45587     break 2
45588   fi
45589 done
45590   done
45591 IFS=$as_save_IFS
45592 
45593   ;;
45594 esac
45595 fi
45596 BUILD_CXX=$ac_cv_path_BUILD_CXX
45597 if test -n "$BUILD_CXX"; then
45598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45599 $as_echo "$BUILD_CXX" >&6; }
45600 else
45601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45602 $as_echo "no" >&6; }
45603 fi
45604 
45605 
45606           if test "x$BUILD_CXX" = x; then
45607             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45608           fi
45609         else
45610           # Otherwise we believe it is a complete path. Use it as it is.
45611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45612 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45613           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45614 $as_echo_n "checking for BUILD_CXX... " >&6; }
45615           if test ! -x "$tool_specified"; then
45616             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45617 $as_echo "not found" >&6; }
45618             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45619           fi
45620           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45621 $as_echo "$tool_specified" >&6; }
45622         fi
45623       fi
45624     fi
45625 
45626   fi
45627 
45628 
45629 
45630   if test "x$BUILD_CXX" = x; then
45631     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45632   fi
45633 
45634 
45635 
45636   # Only process if variable expands to non-empty
45637 
45638   if test "x$BUILD_CXX" != x; then
45639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45640 
45641   # First separate the path from the arguments. This will split at the first
45642   # space.
45643   complete="$BUILD_CXX"
45644   path="${complete%% *}"
45645   tmp="$complete EOL"
45646   arguments="${tmp#* }"
45647 
45648   # Input might be given as Windows format, start by converting to
45649   # unix format.
45650   new_path=`$CYGPATH -u "$path"`
45651 
45652   # Now try to locate executable using which
45653   new_path=`$WHICH "$new_path" 2> /dev/null`
45654   # bat and cmd files are not always considered executable in cygwin causing which
45655   # to not find them
45656   if test "x$new_path" = x \
45657       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45658       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45659     new_path=`$CYGPATH -u "$path"`
45660   fi
45661   if test "x$new_path" = x; then
45662     # Oops. Which didn't find the executable.
45663     # The splitting of arguments from the executable at a space might have been incorrect,
45664     # since paths with space are more likely in Windows. Give it another try with the whole
45665     # argument.
45666     path="$complete"
45667     arguments="EOL"
45668     new_path=`$CYGPATH -u "$path"`
45669     new_path=`$WHICH "$new_path" 2> /dev/null`
45670     # bat and cmd files are not always considered executable in cygwin causing which
45671     # to not find them
45672     if test "x$new_path" = x \
45673         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45674         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45675       new_path=`$CYGPATH -u "$path"`
45676     fi
45677     if test "x$new_path" = x; then
45678       # It's still not found. Now this is an unrecoverable error.
45679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45680 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45681       has_space=`$ECHO "$complete" | $GREP " "`
45682       if test "x$has_space" != x; then
45683         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45684 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45685       fi
45686       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45687     fi
45688   fi
45689 
45690   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45691   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45692   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45693   # "foo.exe" is OK but "foo" is an error.
45694   #
45695   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45696   # It is also a way to make sure we got the proper file name for the real test later on.
45697   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45698   if test "x$test_shortpath" = x; then
45699     # Short path failed, file does not exist as specified.
45700     # Try adding .exe or .cmd
45701     if test -f "${new_path}.exe"; then
45702       input_to_shortpath="${new_path}.exe"
45703     elif test -f "${new_path}.cmd"; then
45704       input_to_shortpath="${new_path}.cmd"
45705     else
45706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45707 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45708       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45709 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45710       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45711     fi
45712   else
45713     input_to_shortpath="$new_path"
45714   fi
45715 
45716   # Call helper function which possibly converts this using DOS-style short mode.
45717   # If so, the updated path is stored in $new_path.
45718   new_path="$input_to_shortpath"
45719 
45720   input_path="$input_to_shortpath"
45721   # Check if we need to convert this using DOS-style short mode. If the path
45722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45723   # take no chances and rewrite it.
45724   # Note: m4 eats our [], so we need to use [ and ] instead.
45725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45726   if test "x$has_forbidden_chars" != x; then
45727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45728     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45729     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45730     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45731       # Going to short mode and back again did indeed matter. Since short mode is
45732       # case insensitive, let's make it lowercase to improve readability.
45733       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45734       # Now convert it back to Unix-style (cygpath)
45735       input_path=`$CYGPATH -u "$shortmode_path"`
45736       new_path="$input_path"
45737     fi
45738   fi
45739 
45740   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45741   if test "x$test_cygdrive_prefix" = x; then
45742     # As a simple fix, exclude /usr/bin since it's not a real path.
45743     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45744       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45745       # a path prefixed by /cygdrive for fixpath to work.
45746       new_path="$CYGWIN_ROOT_PATH$input_path"
45747     fi
45748   fi
45749 
45750   # remove trailing .exe if any
45751   new_path="${new_path/%.exe/}"
45752 
45753     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45754 
45755   # First separate the path from the arguments. This will split at the first
45756   # space.
45757   complete="$BUILD_CXX"
45758   path="${complete%% *}"
45759   tmp="$complete EOL"
45760   arguments="${tmp#* }"
45761 
45762   # Input might be given as Windows format, start by converting to
45763   # unix format.
45764   new_path="$path"
45765 
45766   windows_path="$new_path"
45767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45768     unix_path=`$CYGPATH -u "$windows_path"`
45769     new_path="$unix_path"
45770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45772     new_path="$unix_path"
45773   fi
45774 
45775 
45776   # Now try to locate executable using which
45777   new_path=`$WHICH "$new_path" 2> /dev/null`
45778 
45779   if test "x$new_path" = x; then
45780     # Oops. Which didn't find the executable.
45781     # The splitting of arguments from the executable at a space might have been incorrect,
45782     # since paths with space are more likely in Windows. Give it another try with the whole
45783     # argument.
45784     path="$complete"
45785     arguments="EOL"
45786     new_path="$path"
45787 
45788   windows_path="$new_path"
45789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45790     unix_path=`$CYGPATH -u "$windows_path"`
45791     new_path="$unix_path"
45792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45794     new_path="$unix_path"
45795   fi
45796 
45797 
45798     new_path=`$WHICH "$new_path" 2> /dev/null`
45799     # bat and cmd files are not always considered executable in MSYS causing which
45800     # to not find them
45801     if test "x$new_path" = x \
45802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45804       new_path="$path"
45805 
45806   windows_path="$new_path"
45807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45808     unix_path=`$CYGPATH -u "$windows_path"`
45809     new_path="$unix_path"
45810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45812     new_path="$unix_path"
45813   fi
45814 
45815     fi
45816 
45817     if test "x$new_path" = x; then
45818       # It's still not found. Now this is an unrecoverable error.
45819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45820 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45821       has_space=`$ECHO "$complete" | $GREP " "`
45822       if test "x$has_space" != x; then
45823         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45824 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45825       fi
45826       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45827     fi
45828   fi
45829 
45830   # Now new_path has a complete unix path to the binary
45831   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45832     # Keep paths in /bin as-is, but remove trailing .exe if any
45833     new_path="${new_path/%.exe/}"
45834     # Do not save /bin paths to all_fixpath_prefixes!
45835   else
45836     # Not in mixed or Windows style, start by that.
45837     new_path=`cmd //c echo $new_path`
45838 
45839   input_path="$new_path"
45840   # Check if we need to convert this using DOS-style short mode. If the path
45841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45842   # take no chances and rewrite it.
45843   # Note: m4 eats our [], so we need to use [ and ] instead.
45844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45845   if test "x$has_forbidden_chars" != x; then
45846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45848   fi
45849 
45850     # Output is in $new_path
45851 
45852   windows_path="$new_path"
45853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45854     unix_path=`$CYGPATH -u "$windows_path"`
45855     new_path="$unix_path"
45856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45858     new_path="$unix_path"
45859   fi
45860 
45861     # remove trailing .exe if any
45862     new_path="${new_path/%.exe/}"
45863 
45864     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45865     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45866   fi
45867 
45868     else
45869       # We're on a unix platform. Hooray! :)
45870       # First separate the path from the arguments. This will split at the first
45871       # space.
45872       complete="$BUILD_CXX"
45873       path="${complete%% *}"
45874       tmp="$complete EOL"
45875       arguments="${tmp#* }"
45876 
45877       # Cannot rely on the command "which" here since it doesn't always work.
45878       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45879       if test -z "$is_absolute_path"; then
45880         # Path to executable is not absolute. Find it.
45881         IFS_save="$IFS"
45882         IFS=:
45883         for p in $PATH; do
45884           if test -f "$p/$path" && test -x "$p/$path"; then
45885             new_path="$p/$path"
45886             break
45887           fi
45888         done
45889         IFS="$IFS_save"
45890       else
45891         # This is an absolute path, we can use it without further modifications.
45892         new_path="$path"
45893       fi
45894 
45895       if test "x$new_path" = x; then
45896         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45897 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45898         has_space=`$ECHO "$complete" | $GREP " "`
45899         if test "x$has_space" != x; then
45900           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45901 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45902         fi
45903         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45904       fi
45905     fi
45906 
45907     # Now join together the path and the arguments once again
45908     if test "x$arguments" != xEOL; then
45909       new_complete="$new_path ${arguments% *}"
45910     else
45911       new_complete="$new_path"
45912     fi
45913 
45914     if test "x$complete" != "x$new_complete"; then
45915       BUILD_CXX="$new_complete"
45916       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45917 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45918     fi
45919   fi
45920 
45921 
45922 
45923   # Publish this variable in the help.
45924 
45925 
45926   if [ -z "${BUILD_NM+x}" ]; then
45927     # The variable is not set by user, try to locate tool using the code snippet
45928     for ac_prog in nm gcc-nm
45929 do
45930   # Extract the first word of "$ac_prog", so it can be a program name with args.
45931 set dummy $ac_prog; ac_word=$2
45932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45933 $as_echo_n "checking for $ac_word... " >&6; }
45934 if ${ac_cv_path_BUILD_NM+:} false; then :
45935   $as_echo_n "(cached) " >&6
45936 else
45937   case $BUILD_NM in
45938   [\\/]* | ?:[\\/]*)
45939   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45940   ;;
45941   *)
45942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45943 for as_dir in $PATH
45944 do
45945   IFS=$as_save_IFS
45946   test -z "$as_dir" && as_dir=.
45947     for ac_exec_ext in '' $ac_executable_extensions; do
45948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45949     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45951     break 2
45952   fi
45953 done
45954   done
45955 IFS=$as_save_IFS
45956 
45957   ;;
45958 esac
45959 fi
45960 BUILD_NM=$ac_cv_path_BUILD_NM
45961 if test -n "$BUILD_NM"; then
45962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45963 $as_echo "$BUILD_NM" >&6; }
45964 else
45965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45966 $as_echo "no" >&6; }
45967 fi
45968 
45969 
45970   test -n "$BUILD_NM" && break
45971 done
45972 
45973   else
45974     # The variable is set, but is it from the command line or the environment?
45975 
45976     # Try to remove the string !BUILD_NM! from our list.
45977     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45978     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45979       # If it failed, the variable was not from the command line. Ignore it,
45980       # but warn the user (except for BASH, which is always set by the calling BASH).
45981       if test "xBUILD_NM" != xBASH; then
45982         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45983 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45984       fi
45985       # Try to locate tool using the code snippet
45986       for ac_prog in nm gcc-nm
45987 do
45988   # Extract the first word of "$ac_prog", so it can be a program name with args.
45989 set dummy $ac_prog; ac_word=$2
45990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45991 $as_echo_n "checking for $ac_word... " >&6; }
45992 if ${ac_cv_path_BUILD_NM+:} false; then :
45993   $as_echo_n "(cached) " >&6
45994 else
45995   case $BUILD_NM in
45996   [\\/]* | ?:[\\/]*)
45997   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45998   ;;
45999   *)
46000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46001 for as_dir in $PATH
46002 do
46003   IFS=$as_save_IFS
46004   test -z "$as_dir" && as_dir=.
46005     for ac_exec_ext in '' $ac_executable_extensions; do
46006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46007     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46009     break 2
46010   fi
46011 done
46012   done
46013 IFS=$as_save_IFS
46014 
46015   ;;
46016 esac
46017 fi
46018 BUILD_NM=$ac_cv_path_BUILD_NM
46019 if test -n "$BUILD_NM"; then
46020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46021 $as_echo "$BUILD_NM" >&6; }
46022 else
46023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46024 $as_echo "no" >&6; }
46025 fi
46026 
46027 
46028   test -n "$BUILD_NM" && break
46029 done
46030 
46031     else
46032       # If it succeeded, then it was overridden by the user. We will use it
46033       # for the tool.
46034 
46035       # First remove it from the list of overridden variables, so we can test
46036       # for unknown variables in the end.
46037       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46038 
46039       # Check if we try to supply an empty value
46040       if test "x$BUILD_NM" = x; then
46041         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46042 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46044 $as_echo_n "checking for BUILD_NM... " >&6; }
46045         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46046 $as_echo "disabled" >&6; }
46047       else
46048         # Check if the provided tool contains a complete path.
46049         tool_specified="$BUILD_NM"
46050         tool_basename="${tool_specified##*/}"
46051         if test "x$tool_basename" = "x$tool_specified"; then
46052           # A command without a complete path is provided, search $PATH.
46053           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46054 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46055           # Extract the first word of "$tool_basename", so it can be a program name with args.
46056 set dummy $tool_basename; ac_word=$2
46057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46058 $as_echo_n "checking for $ac_word... " >&6; }
46059 if ${ac_cv_path_BUILD_NM+:} false; then :
46060   $as_echo_n "(cached) " >&6
46061 else
46062   case $BUILD_NM in
46063   [\\/]* | ?:[\\/]*)
46064   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46065   ;;
46066   *)
46067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46068 for as_dir in $PATH
46069 do
46070   IFS=$as_save_IFS
46071   test -z "$as_dir" && as_dir=.
46072     for ac_exec_ext in '' $ac_executable_extensions; do
46073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46074     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46076     break 2
46077   fi
46078 done
46079   done
46080 IFS=$as_save_IFS
46081 
46082   ;;
46083 esac
46084 fi
46085 BUILD_NM=$ac_cv_path_BUILD_NM
46086 if test -n "$BUILD_NM"; then
46087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46088 $as_echo "$BUILD_NM" >&6; }
46089 else
46090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46091 $as_echo "no" >&6; }
46092 fi
46093 
46094 
46095           if test "x$BUILD_NM" = x; then
46096             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46097           fi
46098         else
46099           # Otherwise we believe it is a complete path. Use it as it is.
46100           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46101 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46102           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46103 $as_echo_n "checking for BUILD_NM... " >&6; }
46104           if test ! -x "$tool_specified"; then
46105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46106 $as_echo "not found" >&6; }
46107             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46108           fi
46109           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46110 $as_echo "$tool_specified" >&6; }
46111         fi
46112       fi
46113     fi
46114 
46115   fi
46116 
46117 
46118 
46119   # Only process if variable expands to non-empty
46120 
46121   if test "x$BUILD_NM" != x; then
46122     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46123 
46124   # First separate the path from the arguments. This will split at the first
46125   # space.
46126   complete="$BUILD_NM"
46127   path="${complete%% *}"
46128   tmp="$complete EOL"
46129   arguments="${tmp#* }"
46130 
46131   # Input might be given as Windows format, start by converting to
46132   # unix format.
46133   new_path=`$CYGPATH -u "$path"`
46134 
46135   # Now try to locate executable using which
46136   new_path=`$WHICH "$new_path" 2> /dev/null`
46137   # bat and cmd files are not always considered executable in cygwin causing which
46138   # to not find them
46139   if test "x$new_path" = x \
46140       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46141       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46142     new_path=`$CYGPATH -u "$path"`
46143   fi
46144   if test "x$new_path" = x; then
46145     # Oops. Which didn't find the executable.
46146     # The splitting of arguments from the executable at a space might have been incorrect,
46147     # since paths with space are more likely in Windows. Give it another try with the whole
46148     # argument.
46149     path="$complete"
46150     arguments="EOL"
46151     new_path=`$CYGPATH -u "$path"`
46152     new_path=`$WHICH "$new_path" 2> /dev/null`
46153     # bat and cmd files are not always considered executable in cygwin causing which
46154     # to not find them
46155     if test "x$new_path" = x \
46156         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46157         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46158       new_path=`$CYGPATH -u "$path"`
46159     fi
46160     if test "x$new_path" = x; then
46161       # It's still not found. Now this is an unrecoverable error.
46162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46163 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46164       has_space=`$ECHO "$complete" | $GREP " "`
46165       if test "x$has_space" != x; then
46166         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46167 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46168       fi
46169       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46170     fi
46171   fi
46172 
46173   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46174   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46175   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46176   # "foo.exe" is OK but "foo" is an error.
46177   #
46178   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46179   # It is also a way to make sure we got the proper file name for the real test later on.
46180   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46181   if test "x$test_shortpath" = x; then
46182     # Short path failed, file does not exist as specified.
46183     # Try adding .exe or .cmd
46184     if test -f "${new_path}.exe"; then
46185       input_to_shortpath="${new_path}.exe"
46186     elif test -f "${new_path}.cmd"; then
46187       input_to_shortpath="${new_path}.cmd"
46188     else
46189       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46190 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46191       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46192 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46193       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46194     fi
46195   else
46196     input_to_shortpath="$new_path"
46197   fi
46198 
46199   # Call helper function which possibly converts this using DOS-style short mode.
46200   # If so, the updated path is stored in $new_path.
46201   new_path="$input_to_shortpath"
46202 
46203   input_path="$input_to_shortpath"
46204   # Check if we need to convert this using DOS-style short mode. If the path
46205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46206   # take no chances and rewrite it.
46207   # Note: m4 eats our [], so we need to use [ and ] instead.
46208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46209   if test "x$has_forbidden_chars" != x; then
46210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46211     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46212     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46213     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46214       # Going to short mode and back again did indeed matter. Since short mode is
46215       # case insensitive, let's make it lowercase to improve readability.
46216       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46217       # Now convert it back to Unix-style (cygpath)
46218       input_path=`$CYGPATH -u "$shortmode_path"`
46219       new_path="$input_path"
46220     fi
46221   fi
46222 
46223   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46224   if test "x$test_cygdrive_prefix" = x; then
46225     # As a simple fix, exclude /usr/bin since it's not a real path.
46226     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46227       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46228       # a path prefixed by /cygdrive for fixpath to work.
46229       new_path="$CYGWIN_ROOT_PATH$input_path"
46230     fi
46231   fi
46232 
46233   # remove trailing .exe if any
46234   new_path="${new_path/%.exe/}"
46235 
46236     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46237 
46238   # First separate the path from the arguments. This will split at the first
46239   # space.
46240   complete="$BUILD_NM"
46241   path="${complete%% *}"
46242   tmp="$complete EOL"
46243   arguments="${tmp#* }"
46244 
46245   # Input might be given as Windows format, start by converting to
46246   # unix format.
46247   new_path="$path"
46248 
46249   windows_path="$new_path"
46250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46251     unix_path=`$CYGPATH -u "$windows_path"`
46252     new_path="$unix_path"
46253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46255     new_path="$unix_path"
46256   fi
46257 
46258 
46259   # Now try to locate executable using which
46260   new_path=`$WHICH "$new_path" 2> /dev/null`
46261 
46262   if test "x$new_path" = x; then
46263     # Oops. Which didn't find the executable.
46264     # The splitting of arguments from the executable at a space might have been incorrect,
46265     # since paths with space are more likely in Windows. Give it another try with the whole
46266     # argument.
46267     path="$complete"
46268     arguments="EOL"
46269     new_path="$path"
46270 
46271   windows_path="$new_path"
46272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46273     unix_path=`$CYGPATH -u "$windows_path"`
46274     new_path="$unix_path"
46275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46277     new_path="$unix_path"
46278   fi
46279 
46280 
46281     new_path=`$WHICH "$new_path" 2> /dev/null`
46282     # bat and cmd files are not always considered executable in MSYS causing which
46283     # to not find them
46284     if test "x$new_path" = x \
46285         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46286         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46287       new_path="$path"
46288 
46289   windows_path="$new_path"
46290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46291     unix_path=`$CYGPATH -u "$windows_path"`
46292     new_path="$unix_path"
46293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46295     new_path="$unix_path"
46296   fi
46297 
46298     fi
46299 
46300     if test "x$new_path" = x; then
46301       # It's still not found. Now this is an unrecoverable error.
46302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46303 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46304       has_space=`$ECHO "$complete" | $GREP " "`
46305       if test "x$has_space" != x; then
46306         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46307 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46308       fi
46309       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46310     fi
46311   fi
46312 
46313   # Now new_path has a complete unix path to the binary
46314   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46315     # Keep paths in /bin as-is, but remove trailing .exe if any
46316     new_path="${new_path/%.exe/}"
46317     # Do not save /bin paths to all_fixpath_prefixes!
46318   else
46319     # Not in mixed or Windows style, start by that.
46320     new_path=`cmd //c echo $new_path`
46321 
46322   input_path="$new_path"
46323   # Check if we need to convert this using DOS-style short mode. If the path
46324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46325   # take no chances and rewrite it.
46326   # Note: m4 eats our [], so we need to use [ and ] instead.
46327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46328   if test "x$has_forbidden_chars" != x; then
46329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46330     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46331   fi
46332 
46333     # Output is in $new_path
46334 
46335   windows_path="$new_path"
46336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46337     unix_path=`$CYGPATH -u "$windows_path"`
46338     new_path="$unix_path"
46339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46341     new_path="$unix_path"
46342   fi
46343 
46344     # remove trailing .exe if any
46345     new_path="${new_path/%.exe/}"
46346 
46347     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46348     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46349   fi
46350 
46351     else
46352       # We're on a unix platform. Hooray! :)
46353       # First separate the path from the arguments. This will split at the first
46354       # space.
46355       complete="$BUILD_NM"
46356       path="${complete%% *}"
46357       tmp="$complete EOL"
46358       arguments="${tmp#* }"
46359 
46360       # Cannot rely on the command "which" here since it doesn't always work.
46361       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46362       if test -z "$is_absolute_path"; then
46363         # Path to executable is not absolute. Find it.
46364         IFS_save="$IFS"
46365         IFS=:
46366         for p in $PATH; do
46367           if test -f "$p/$path" && test -x "$p/$path"; then
46368             new_path="$p/$path"
46369             break
46370           fi
46371         done
46372         IFS="$IFS_save"
46373       else
46374         # This is an absolute path, we can use it without further modifications.
46375         new_path="$path"
46376       fi
46377 
46378       if test "x$new_path" = x; then
46379         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46380 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46381         has_space=`$ECHO "$complete" | $GREP " "`
46382         if test "x$has_space" != x; then
46383           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46384 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46385         fi
46386         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46387       fi
46388     fi
46389 
46390     # Now join together the path and the arguments once again
46391     if test "x$arguments" != xEOL; then
46392       new_complete="$new_path ${arguments% *}"
46393     else
46394       new_complete="$new_path"
46395     fi
46396 
46397     if test "x$complete" != "x$new_complete"; then
46398       BUILD_NM="$new_complete"
46399       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46400 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46401     fi
46402   fi
46403 
46404 
46405 
46406   # Publish this variable in the help.
46407 
46408 
46409   if [ -z "${BUILD_AR+x}" ]; then
46410     # The variable is not set by user, try to locate tool using the code snippet
46411     for ac_prog in ar gcc-ar
46412 do
46413   # Extract the first word of "$ac_prog", so it can be a program name with args.
46414 set dummy $ac_prog; ac_word=$2
46415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46416 $as_echo_n "checking for $ac_word... " >&6; }
46417 if ${ac_cv_path_BUILD_AR+:} false; then :
46418   $as_echo_n "(cached) " >&6
46419 else
46420   case $BUILD_AR in
46421   [\\/]* | ?:[\\/]*)
46422   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46423   ;;
46424   *)
46425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46426 for as_dir in $PATH
46427 do
46428   IFS=$as_save_IFS
46429   test -z "$as_dir" && as_dir=.
46430     for ac_exec_ext in '' $ac_executable_extensions; do
46431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46432     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46434     break 2
46435   fi
46436 done
46437   done
46438 IFS=$as_save_IFS
46439 
46440   ;;
46441 esac
46442 fi
46443 BUILD_AR=$ac_cv_path_BUILD_AR
46444 if test -n "$BUILD_AR"; then
46445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46446 $as_echo "$BUILD_AR" >&6; }
46447 else
46448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46449 $as_echo "no" >&6; }
46450 fi
46451 
46452 
46453   test -n "$BUILD_AR" && break
46454 done
46455 
46456   else
46457     # The variable is set, but is it from the command line or the environment?
46458 
46459     # Try to remove the string !BUILD_AR! from our list.
46460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46462       # If it failed, the variable was not from the command line. Ignore it,
46463       # but warn the user (except for BASH, which is always set by the calling BASH).
46464       if test "xBUILD_AR" != xBASH; then
46465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46466 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46467       fi
46468       # Try to locate tool using the code snippet
46469       for ac_prog in ar gcc-ar
46470 do
46471   # Extract the first word of "$ac_prog", so it can be a program name with args.
46472 set dummy $ac_prog; ac_word=$2
46473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46474 $as_echo_n "checking for $ac_word... " >&6; }
46475 if ${ac_cv_path_BUILD_AR+:} false; then :
46476   $as_echo_n "(cached) " >&6
46477 else
46478   case $BUILD_AR in
46479   [\\/]* | ?:[\\/]*)
46480   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46481   ;;
46482   *)
46483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46484 for as_dir in $PATH
46485 do
46486   IFS=$as_save_IFS
46487   test -z "$as_dir" && as_dir=.
46488     for ac_exec_ext in '' $ac_executable_extensions; do
46489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46490     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46492     break 2
46493   fi
46494 done
46495   done
46496 IFS=$as_save_IFS
46497 
46498   ;;
46499 esac
46500 fi
46501 BUILD_AR=$ac_cv_path_BUILD_AR
46502 if test -n "$BUILD_AR"; then
46503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46504 $as_echo "$BUILD_AR" >&6; }
46505 else
46506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46507 $as_echo "no" >&6; }
46508 fi
46509 
46510 
46511   test -n "$BUILD_AR" && break
46512 done
46513 
46514     else
46515       # If it succeeded, then it was overridden by the user. We will use it
46516       # for the tool.
46517 
46518       # First remove it from the list of overridden variables, so we can test
46519       # for unknown variables in the end.
46520       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46521 
46522       # Check if we try to supply an empty value
46523       if test "x$BUILD_AR" = x; then
46524         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46525 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46526         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46527 $as_echo_n "checking for BUILD_AR... " >&6; }
46528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46529 $as_echo "disabled" >&6; }
46530       else
46531         # Check if the provided tool contains a complete path.
46532         tool_specified="$BUILD_AR"
46533         tool_basename="${tool_specified##*/}"
46534         if test "x$tool_basename" = "x$tool_specified"; then
46535           # A command without a complete path is provided, search $PATH.
46536           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46537 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46538           # Extract the first word of "$tool_basename", so it can be a program name with args.
46539 set dummy $tool_basename; ac_word=$2
46540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46541 $as_echo_n "checking for $ac_word... " >&6; }
46542 if ${ac_cv_path_BUILD_AR+:} false; then :
46543   $as_echo_n "(cached) " >&6
46544 else
46545   case $BUILD_AR in
46546   [\\/]* | ?:[\\/]*)
46547   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46548   ;;
46549   *)
46550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46551 for as_dir in $PATH
46552 do
46553   IFS=$as_save_IFS
46554   test -z "$as_dir" && as_dir=.
46555     for ac_exec_ext in '' $ac_executable_extensions; do
46556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46557     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46559     break 2
46560   fi
46561 done
46562   done
46563 IFS=$as_save_IFS
46564 
46565   ;;
46566 esac
46567 fi
46568 BUILD_AR=$ac_cv_path_BUILD_AR
46569 if test -n "$BUILD_AR"; then
46570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46571 $as_echo "$BUILD_AR" >&6; }
46572 else
46573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46574 $as_echo "no" >&6; }
46575 fi
46576 
46577 
46578           if test "x$BUILD_AR" = x; then
46579             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46580           fi
46581         else
46582           # Otherwise we believe it is a complete path. Use it as it is.
46583           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46584 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46585           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46586 $as_echo_n "checking for BUILD_AR... " >&6; }
46587           if test ! -x "$tool_specified"; then
46588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46589 $as_echo "not found" >&6; }
46590             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46591           fi
46592           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46593 $as_echo "$tool_specified" >&6; }
46594         fi
46595       fi
46596     fi
46597 
46598   fi
46599 
46600 
46601 
46602   # Only process if variable expands to non-empty
46603 
46604   if test "x$BUILD_AR" != x; then
46605     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46606 
46607   # First separate the path from the arguments. This will split at the first
46608   # space.
46609   complete="$BUILD_AR"
46610   path="${complete%% *}"
46611   tmp="$complete EOL"
46612   arguments="${tmp#* }"
46613 
46614   # Input might be given as Windows format, start by converting to
46615   # unix format.
46616   new_path=`$CYGPATH -u "$path"`
46617 
46618   # Now try to locate executable using which
46619   new_path=`$WHICH "$new_path" 2> /dev/null`
46620   # bat and cmd files are not always considered executable in cygwin causing which
46621   # to not find them
46622   if test "x$new_path" = x \
46623       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46624       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46625     new_path=`$CYGPATH -u "$path"`
46626   fi
46627   if test "x$new_path" = x; then
46628     # Oops. Which didn't find the executable.
46629     # The splitting of arguments from the executable at a space might have been incorrect,
46630     # since paths with space are more likely in Windows. Give it another try with the whole
46631     # argument.
46632     path="$complete"
46633     arguments="EOL"
46634     new_path=`$CYGPATH -u "$path"`
46635     new_path=`$WHICH "$new_path" 2> /dev/null`
46636     # bat and cmd files are not always considered executable in cygwin causing which
46637     # to not find them
46638     if test "x$new_path" = x \
46639         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46640         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46641       new_path=`$CYGPATH -u "$path"`
46642     fi
46643     if test "x$new_path" = x; then
46644       # It's still not found. Now this is an unrecoverable error.
46645       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46646 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46647       has_space=`$ECHO "$complete" | $GREP " "`
46648       if test "x$has_space" != x; then
46649         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46651       fi
46652       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46653     fi
46654   fi
46655 
46656   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46657   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46658   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46659   # "foo.exe" is OK but "foo" is an error.
46660   #
46661   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46662   # It is also a way to make sure we got the proper file name for the real test later on.
46663   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46664   if test "x$test_shortpath" = x; then
46665     # Short path failed, file does not exist as specified.
46666     # Try adding .exe or .cmd
46667     if test -f "${new_path}.exe"; then
46668       input_to_shortpath="${new_path}.exe"
46669     elif test -f "${new_path}.cmd"; then
46670       input_to_shortpath="${new_path}.cmd"
46671     else
46672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46673 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46674       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46675 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46676       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46677     fi
46678   else
46679     input_to_shortpath="$new_path"
46680   fi
46681 
46682   # Call helper function which possibly converts this using DOS-style short mode.
46683   # If so, the updated path is stored in $new_path.
46684   new_path="$input_to_shortpath"
46685 
46686   input_path="$input_to_shortpath"
46687   # Check if we need to convert this using DOS-style short mode. If the path
46688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46689   # take no chances and rewrite it.
46690   # Note: m4 eats our [], so we need to use [ and ] instead.
46691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46692   if test "x$has_forbidden_chars" != x; then
46693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46697       # Going to short mode and back again did indeed matter. Since short mode is
46698       # case insensitive, let's make it lowercase to improve readability.
46699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46700       # Now convert it back to Unix-style (cygpath)
46701       input_path=`$CYGPATH -u "$shortmode_path"`
46702       new_path="$input_path"
46703     fi
46704   fi
46705 
46706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46707   if test "x$test_cygdrive_prefix" = x; then
46708     # As a simple fix, exclude /usr/bin since it's not a real path.
46709     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46711       # a path prefixed by /cygdrive for fixpath to work.
46712       new_path="$CYGWIN_ROOT_PATH$input_path"
46713     fi
46714   fi
46715 
46716   # remove trailing .exe if any
46717   new_path="${new_path/%.exe/}"
46718 
46719     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46720 
46721   # First separate the path from the arguments. This will split at the first
46722   # space.
46723   complete="$BUILD_AR"
46724   path="${complete%% *}"
46725   tmp="$complete EOL"
46726   arguments="${tmp#* }"
46727 
46728   # Input might be given as Windows format, start by converting to
46729   # unix format.
46730   new_path="$path"
46731 
46732   windows_path="$new_path"
46733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46734     unix_path=`$CYGPATH -u "$windows_path"`
46735     new_path="$unix_path"
46736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46738     new_path="$unix_path"
46739   fi
46740 
46741 
46742   # Now try to locate executable using which
46743   new_path=`$WHICH "$new_path" 2> /dev/null`
46744 
46745   if test "x$new_path" = x; then
46746     # Oops. Which didn't find the executable.
46747     # The splitting of arguments from the executable at a space might have been incorrect,
46748     # since paths with space are more likely in Windows. Give it another try with the whole
46749     # argument.
46750     path="$complete"
46751     arguments="EOL"
46752     new_path="$path"
46753 
46754   windows_path="$new_path"
46755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46756     unix_path=`$CYGPATH -u "$windows_path"`
46757     new_path="$unix_path"
46758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46760     new_path="$unix_path"
46761   fi
46762 
46763 
46764     new_path=`$WHICH "$new_path" 2> /dev/null`
46765     # bat and cmd files are not always considered executable in MSYS causing which
46766     # to not find them
46767     if test "x$new_path" = x \
46768         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46769         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46770       new_path="$path"
46771 
46772   windows_path="$new_path"
46773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46774     unix_path=`$CYGPATH -u "$windows_path"`
46775     new_path="$unix_path"
46776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46778     new_path="$unix_path"
46779   fi
46780 
46781     fi
46782 
46783     if test "x$new_path" = x; then
46784       # It's still not found. Now this is an unrecoverable error.
46785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46786 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46787       has_space=`$ECHO "$complete" | $GREP " "`
46788       if test "x$has_space" != x; then
46789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46791       fi
46792       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46793     fi
46794   fi
46795 
46796   # Now new_path has a complete unix path to the binary
46797   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46798     # Keep paths in /bin as-is, but remove trailing .exe if any
46799     new_path="${new_path/%.exe/}"
46800     # Do not save /bin paths to all_fixpath_prefixes!
46801   else
46802     # Not in mixed or Windows style, start by that.
46803     new_path=`cmd //c echo $new_path`
46804 
46805   input_path="$new_path"
46806   # Check if we need to convert this using DOS-style short mode. If the path
46807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46808   # take no chances and rewrite it.
46809   # Note: m4 eats our [], so we need to use [ and ] instead.
46810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46811   if test "x$has_forbidden_chars" != x; then
46812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46814   fi
46815 
46816     # Output is in $new_path
46817 
46818   windows_path="$new_path"
46819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820     unix_path=`$CYGPATH -u "$windows_path"`
46821     new_path="$unix_path"
46822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824     new_path="$unix_path"
46825   fi
46826 
46827     # remove trailing .exe if any
46828     new_path="${new_path/%.exe/}"
46829 
46830     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46831     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46832   fi
46833 
46834     else
46835       # We're on a unix platform. Hooray! :)
46836       # First separate the path from the arguments. This will split at the first
46837       # space.
46838       complete="$BUILD_AR"
46839       path="${complete%% *}"
46840       tmp="$complete EOL"
46841       arguments="${tmp#* }"
46842 
46843       # Cannot rely on the command "which" here since it doesn't always work.
46844       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46845       if test -z "$is_absolute_path"; then
46846         # Path to executable is not absolute. Find it.
46847         IFS_save="$IFS"
46848         IFS=:
46849         for p in $PATH; do
46850           if test -f "$p/$path" && test -x "$p/$path"; then
46851             new_path="$p/$path"
46852             break
46853           fi
46854         done
46855         IFS="$IFS_save"
46856       else
46857         # This is an absolute path, we can use it without further modifications.
46858         new_path="$path"
46859       fi
46860 
46861       if test "x$new_path" = x; then
46862         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46863 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46864         has_space=`$ECHO "$complete" | $GREP " "`
46865         if test "x$has_space" != x; then
46866           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46867 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46868         fi
46869         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46870       fi
46871     fi
46872 
46873     # Now join together the path and the arguments once again
46874     if test "x$arguments" != xEOL; then
46875       new_complete="$new_path ${arguments% *}"
46876     else
46877       new_complete="$new_path"
46878     fi
46879 
46880     if test "x$complete" != "x$new_complete"; then
46881       BUILD_AR="$new_complete"
46882       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46883 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46884     fi
46885   fi
46886 
46887 
46888 
46889   # Publish this variable in the help.
46890 
46891 
46892   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46893     # The variable is not set by user, try to locate tool using the code snippet
46894     for ac_prog in objcopy
46895 do
46896   # Extract the first word of "$ac_prog", so it can be a program name with args.
46897 set dummy $ac_prog; ac_word=$2
46898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46899 $as_echo_n "checking for $ac_word... " >&6; }
46900 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46901   $as_echo_n "(cached) " >&6
46902 else
46903   case $BUILD_OBJCOPY in
46904   [\\/]* | ?:[\\/]*)
46905   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46906   ;;
46907   *)
46908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46909 for as_dir in $PATH
46910 do
46911   IFS=$as_save_IFS
46912   test -z "$as_dir" && as_dir=.
46913     for ac_exec_ext in '' $ac_executable_extensions; do
46914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46915     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46917     break 2
46918   fi
46919 done
46920   done
46921 IFS=$as_save_IFS
46922 
46923   ;;
46924 esac
46925 fi
46926 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46927 if test -n "$BUILD_OBJCOPY"; then
46928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46929 $as_echo "$BUILD_OBJCOPY" >&6; }
46930 else
46931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46932 $as_echo "no" >&6; }
46933 fi
46934 
46935 
46936   test -n "$BUILD_OBJCOPY" && break
46937 done
46938 
46939   else
46940     # The variable is set, but is it from the command line or the environment?
46941 
46942     # Try to remove the string !BUILD_OBJCOPY! from our list.
46943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46945       # If it failed, the variable was not from the command line. Ignore it,
46946       # but warn the user (except for BASH, which is always set by the calling BASH).
46947       if test "xBUILD_OBJCOPY" != xBASH; then
46948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46949 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46950       fi
46951       # Try to locate tool using the code snippet
46952       for ac_prog in objcopy
46953 do
46954   # Extract the first word of "$ac_prog", so it can be a program name with args.
46955 set dummy $ac_prog; ac_word=$2
46956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46957 $as_echo_n "checking for $ac_word... " >&6; }
46958 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46959   $as_echo_n "(cached) " >&6
46960 else
46961   case $BUILD_OBJCOPY in
46962   [\\/]* | ?:[\\/]*)
46963   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46964   ;;
46965   *)
46966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46967 for as_dir in $PATH
46968 do
46969   IFS=$as_save_IFS
46970   test -z "$as_dir" && as_dir=.
46971     for ac_exec_ext in '' $ac_executable_extensions; do
46972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46973     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46975     break 2
46976   fi
46977 done
46978   done
46979 IFS=$as_save_IFS
46980 
46981   ;;
46982 esac
46983 fi
46984 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46985 if test -n "$BUILD_OBJCOPY"; then
46986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46987 $as_echo "$BUILD_OBJCOPY" >&6; }
46988 else
46989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46990 $as_echo "no" >&6; }
46991 fi
46992 
46993 
46994   test -n "$BUILD_OBJCOPY" && break
46995 done
46996 
46997     else
46998       # If it succeeded, then it was overridden by the user. We will use it
46999       # for the tool.
47000 
47001       # First remove it from the list of overridden variables, so we can test
47002       # for unknown variables in the end.
47003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47004 
47005       # Check if we try to supply an empty value
47006       if test "x$BUILD_OBJCOPY" = x; then
47007         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47008 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47010 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47012 $as_echo "disabled" >&6; }
47013       else
47014         # Check if the provided tool contains a complete path.
47015         tool_specified="$BUILD_OBJCOPY"
47016         tool_basename="${tool_specified##*/}"
47017         if test "x$tool_basename" = "x$tool_specified"; then
47018           # A command without a complete path is provided, search $PATH.
47019           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47020 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47021           # Extract the first word of "$tool_basename", so it can be a program name with args.
47022 set dummy $tool_basename; ac_word=$2
47023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47024 $as_echo_n "checking for $ac_word... " >&6; }
47025 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47026   $as_echo_n "(cached) " >&6
47027 else
47028   case $BUILD_OBJCOPY in
47029   [\\/]* | ?:[\\/]*)
47030   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47031   ;;
47032   *)
47033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47034 for as_dir in $PATH
47035 do
47036   IFS=$as_save_IFS
47037   test -z "$as_dir" && as_dir=.
47038     for ac_exec_ext in '' $ac_executable_extensions; do
47039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47040     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47042     break 2
47043   fi
47044 done
47045   done
47046 IFS=$as_save_IFS
47047 
47048   ;;
47049 esac
47050 fi
47051 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47052 if test -n "$BUILD_OBJCOPY"; then
47053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47054 $as_echo "$BUILD_OBJCOPY" >&6; }
47055 else
47056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47057 $as_echo "no" >&6; }
47058 fi
47059 
47060 
47061           if test "x$BUILD_OBJCOPY" = x; then
47062             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47063           fi
47064         else
47065           # Otherwise we believe it is a complete path. Use it as it is.
47066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47067 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47068           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47069 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47070           if test ! -x "$tool_specified"; then
47071             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47072 $as_echo "not found" >&6; }
47073             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47074           fi
47075           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47076 $as_echo "$tool_specified" >&6; }
47077         fi
47078       fi
47079     fi
47080 
47081   fi
47082 
47083 
47084 
47085   # Only process if variable expands to non-empty
47086 
47087   if test "x$BUILD_OBJCOPY" != x; then
47088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47089 
47090   # First separate the path from the arguments. This will split at the first
47091   # space.
47092   complete="$BUILD_OBJCOPY"
47093   path="${complete%% *}"
47094   tmp="$complete EOL"
47095   arguments="${tmp#* }"
47096 
47097   # Input might be given as Windows format, start by converting to
47098   # unix format.
47099   new_path=`$CYGPATH -u "$path"`
47100 
47101   # Now try to locate executable using which
47102   new_path=`$WHICH "$new_path" 2> /dev/null`
47103   # bat and cmd files are not always considered executable in cygwin causing which
47104   # to not find them
47105   if test "x$new_path" = x \
47106       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47107       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47108     new_path=`$CYGPATH -u "$path"`
47109   fi
47110   if test "x$new_path" = x; then
47111     # Oops. Which didn't find the executable.
47112     # The splitting of arguments from the executable at a space might have been incorrect,
47113     # since paths with space are more likely in Windows. Give it another try with the whole
47114     # argument.
47115     path="$complete"
47116     arguments="EOL"
47117     new_path=`$CYGPATH -u "$path"`
47118     new_path=`$WHICH "$new_path" 2> /dev/null`
47119     # bat and cmd files are not always considered executable in cygwin causing which
47120     # to not find them
47121     if test "x$new_path" = x \
47122         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47123         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47124       new_path=`$CYGPATH -u "$path"`
47125     fi
47126     if test "x$new_path" = x; then
47127       # It's still not found. Now this is an unrecoverable error.
47128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47129 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47130       has_space=`$ECHO "$complete" | $GREP " "`
47131       if test "x$has_space" != x; then
47132         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47133 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47134       fi
47135       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47136     fi
47137   fi
47138 
47139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47142   # "foo.exe" is OK but "foo" is an error.
47143   #
47144   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47145   # It is also a way to make sure we got the proper file name for the real test later on.
47146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47147   if test "x$test_shortpath" = x; then
47148     # Short path failed, file does not exist as specified.
47149     # Try adding .exe or .cmd
47150     if test -f "${new_path}.exe"; then
47151       input_to_shortpath="${new_path}.exe"
47152     elif test -f "${new_path}.cmd"; then
47153       input_to_shortpath="${new_path}.cmd"
47154     else
47155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47156 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47157       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47158 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47159       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47160     fi
47161   else
47162     input_to_shortpath="$new_path"
47163   fi
47164 
47165   # Call helper function which possibly converts this using DOS-style short mode.
47166   # If so, the updated path is stored in $new_path.
47167   new_path="$input_to_shortpath"
47168 
47169   input_path="$input_to_shortpath"
47170   # Check if we need to convert this using DOS-style short mode. If the path
47171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47172   # take no chances and rewrite it.
47173   # Note: m4 eats our [], so we need to use [ and ] instead.
47174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47175   if test "x$has_forbidden_chars" != x; then
47176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47177     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47178     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47179     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47180       # Going to short mode and back again did indeed matter. Since short mode is
47181       # case insensitive, let's make it lowercase to improve readability.
47182       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47183       # Now convert it back to Unix-style (cygpath)
47184       input_path=`$CYGPATH -u "$shortmode_path"`
47185       new_path="$input_path"
47186     fi
47187   fi
47188 
47189   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47190   if test "x$test_cygdrive_prefix" = x; then
47191     # As a simple fix, exclude /usr/bin since it's not a real path.
47192     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47193       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47194       # a path prefixed by /cygdrive for fixpath to work.
47195       new_path="$CYGWIN_ROOT_PATH$input_path"
47196     fi
47197   fi
47198 
47199   # remove trailing .exe if any
47200   new_path="${new_path/%.exe/}"
47201 
47202     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47203 
47204   # First separate the path from the arguments. This will split at the first
47205   # space.
47206   complete="$BUILD_OBJCOPY"
47207   path="${complete%% *}"
47208   tmp="$complete EOL"
47209   arguments="${tmp#* }"
47210 
47211   # Input might be given as Windows format, start by converting to
47212   # unix format.
47213   new_path="$path"
47214 
47215   windows_path="$new_path"
47216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47217     unix_path=`$CYGPATH -u "$windows_path"`
47218     new_path="$unix_path"
47219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47221     new_path="$unix_path"
47222   fi
47223 
47224 
47225   # Now try to locate executable using which
47226   new_path=`$WHICH "$new_path" 2> /dev/null`
47227 
47228   if test "x$new_path" = x; then
47229     # Oops. Which didn't find the executable.
47230     # The splitting of arguments from the executable at a space might have been incorrect,
47231     # since paths with space are more likely in Windows. Give it another try with the whole
47232     # argument.
47233     path="$complete"
47234     arguments="EOL"
47235     new_path="$path"
47236 
47237   windows_path="$new_path"
47238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47239     unix_path=`$CYGPATH -u "$windows_path"`
47240     new_path="$unix_path"
47241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47243     new_path="$unix_path"
47244   fi
47245 
47246 
47247     new_path=`$WHICH "$new_path" 2> /dev/null`
47248     # bat and cmd files are not always considered executable in MSYS causing which
47249     # to not find them
47250     if test "x$new_path" = x \
47251         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47252         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47253       new_path="$path"
47254 
47255   windows_path="$new_path"
47256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47257     unix_path=`$CYGPATH -u "$windows_path"`
47258     new_path="$unix_path"
47259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47261     new_path="$unix_path"
47262   fi
47263 
47264     fi
47265 
47266     if test "x$new_path" = x; then
47267       # It's still not found. Now this is an unrecoverable error.
47268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47269 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47270       has_space=`$ECHO "$complete" | $GREP " "`
47271       if test "x$has_space" != x; then
47272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47274       fi
47275       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47276     fi
47277   fi
47278 
47279   # Now new_path has a complete unix path to the binary
47280   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47281     # Keep paths in /bin as-is, but remove trailing .exe if any
47282     new_path="${new_path/%.exe/}"
47283     # Do not save /bin paths to all_fixpath_prefixes!
47284   else
47285     # Not in mixed or Windows style, start by that.
47286     new_path=`cmd //c echo $new_path`
47287 
47288   input_path="$new_path"
47289   # Check if we need to convert this using DOS-style short mode. If the path
47290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47291   # take no chances and rewrite it.
47292   # Note: m4 eats our [], so we need to use [ and ] instead.
47293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47294   if test "x$has_forbidden_chars" != x; then
47295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47296     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47297   fi
47298 
47299     # Output is in $new_path
47300 
47301   windows_path="$new_path"
47302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47303     unix_path=`$CYGPATH -u "$windows_path"`
47304     new_path="$unix_path"
47305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47307     new_path="$unix_path"
47308   fi
47309 
47310     # remove trailing .exe if any
47311     new_path="${new_path/%.exe/}"
47312 
47313     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47314     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47315   fi
47316 
47317     else
47318       # We're on a unix platform. Hooray! :)
47319       # First separate the path from the arguments. This will split at the first
47320       # space.
47321       complete="$BUILD_OBJCOPY"
47322       path="${complete%% *}"
47323       tmp="$complete EOL"
47324       arguments="${tmp#* }"
47325 
47326       # Cannot rely on the command "which" here since it doesn't always work.
47327       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47328       if test -z "$is_absolute_path"; then
47329         # Path to executable is not absolute. Find it.
47330         IFS_save="$IFS"
47331         IFS=:
47332         for p in $PATH; do
47333           if test -f "$p/$path" && test -x "$p/$path"; then
47334             new_path="$p/$path"
47335             break
47336           fi
47337         done
47338         IFS="$IFS_save"
47339       else
47340         # This is an absolute path, we can use it without further modifications.
47341         new_path="$path"
47342       fi
47343 
47344       if test "x$new_path" = x; then
47345         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47346 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47347         has_space=`$ECHO "$complete" | $GREP " "`
47348         if test "x$has_space" != x; then
47349           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47350 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47351         fi
47352         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47353       fi
47354     fi
47355 
47356     # Now join together the path and the arguments once again
47357     if test "x$arguments" != xEOL; then
47358       new_complete="$new_path ${arguments% *}"
47359     else
47360       new_complete="$new_path"
47361     fi
47362 
47363     if test "x$complete" != "x$new_complete"; then
47364       BUILD_OBJCOPY="$new_complete"
47365       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47366 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47367     fi
47368   fi
47369 
47370 
47371 
47372   # Publish this variable in the help.
47373 
47374 
47375   if [ -z "${BUILD_STRIP+x}" ]; then
47376     # The variable is not set by user, try to locate tool using the code snippet
47377     for ac_prog in strip
47378 do
47379   # Extract the first word of "$ac_prog", so it can be a program name with args.
47380 set dummy $ac_prog; ac_word=$2
47381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47382 $as_echo_n "checking for $ac_word... " >&6; }
47383 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47384   $as_echo_n "(cached) " >&6
47385 else
47386   case $BUILD_STRIP in
47387   [\\/]* | ?:[\\/]*)
47388   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47389   ;;
47390   *)
47391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47392 for as_dir in $PATH
47393 do
47394   IFS=$as_save_IFS
47395   test -z "$as_dir" && as_dir=.
47396     for ac_exec_ext in '' $ac_executable_extensions; do
47397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47398     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47400     break 2
47401   fi
47402 done
47403   done
47404 IFS=$as_save_IFS
47405 
47406   ;;
47407 esac
47408 fi
47409 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47410 if test -n "$BUILD_STRIP"; then
47411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47412 $as_echo "$BUILD_STRIP" >&6; }
47413 else
47414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47415 $as_echo "no" >&6; }
47416 fi
47417 
47418 
47419   test -n "$BUILD_STRIP" && break
47420 done
47421 
47422   else
47423     # The variable is set, but is it from the command line or the environment?
47424 
47425     # Try to remove the string !BUILD_STRIP! from our list.
47426     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47427     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47428       # If it failed, the variable was not from the command line. Ignore it,
47429       # but warn the user (except for BASH, which is always set by the calling BASH).
47430       if test "xBUILD_STRIP" != xBASH; then
47431         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47432 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47433       fi
47434       # Try to locate tool using the code snippet
47435       for ac_prog in strip
47436 do
47437   # Extract the first word of "$ac_prog", so it can be a program name with args.
47438 set dummy $ac_prog; ac_word=$2
47439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47440 $as_echo_n "checking for $ac_word... " >&6; }
47441 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47442   $as_echo_n "(cached) " >&6
47443 else
47444   case $BUILD_STRIP in
47445   [\\/]* | ?:[\\/]*)
47446   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47447   ;;
47448   *)
47449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47450 for as_dir in $PATH
47451 do
47452   IFS=$as_save_IFS
47453   test -z "$as_dir" && as_dir=.
47454     for ac_exec_ext in '' $ac_executable_extensions; do
47455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47456     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47458     break 2
47459   fi
47460 done
47461   done
47462 IFS=$as_save_IFS
47463 
47464   ;;
47465 esac
47466 fi
47467 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47468 if test -n "$BUILD_STRIP"; then
47469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47470 $as_echo "$BUILD_STRIP" >&6; }
47471 else
47472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47473 $as_echo "no" >&6; }
47474 fi
47475 
47476 
47477   test -n "$BUILD_STRIP" && break
47478 done
47479 
47480     else
47481       # If it succeeded, then it was overridden by the user. We will use it
47482       # for the tool.
47483 
47484       # First remove it from the list of overridden variables, so we can test
47485       # for unknown variables in the end.
47486       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47487 
47488       # Check if we try to supply an empty value
47489       if test "x$BUILD_STRIP" = x; then
47490         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47491 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47492         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47493 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47495 $as_echo "disabled" >&6; }
47496       else
47497         # Check if the provided tool contains a complete path.
47498         tool_specified="$BUILD_STRIP"
47499         tool_basename="${tool_specified##*/}"
47500         if test "x$tool_basename" = "x$tool_specified"; then
47501           # A command without a complete path is provided, search $PATH.
47502           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47503 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47504           # Extract the first word of "$tool_basename", so it can be a program name with args.
47505 set dummy $tool_basename; ac_word=$2
47506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47507 $as_echo_n "checking for $ac_word... " >&6; }
47508 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47509   $as_echo_n "(cached) " >&6
47510 else
47511   case $BUILD_STRIP in
47512   [\\/]* | ?:[\\/]*)
47513   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47514   ;;
47515   *)
47516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47517 for as_dir in $PATH
47518 do
47519   IFS=$as_save_IFS
47520   test -z "$as_dir" && as_dir=.
47521     for ac_exec_ext in '' $ac_executable_extensions; do
47522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47523     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47525     break 2
47526   fi
47527 done
47528   done
47529 IFS=$as_save_IFS
47530 
47531   ;;
47532 esac
47533 fi
47534 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47535 if test -n "$BUILD_STRIP"; then
47536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47537 $as_echo "$BUILD_STRIP" >&6; }
47538 else
47539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47540 $as_echo "no" >&6; }
47541 fi
47542 
47543 
47544           if test "x$BUILD_STRIP" = x; then
47545             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47546           fi
47547         else
47548           # Otherwise we believe it is a complete path. Use it as it is.
47549           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47550 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47551           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47552 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47553           if test ! -x "$tool_specified"; then
47554             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47555 $as_echo "not found" >&6; }
47556             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47557           fi
47558           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47559 $as_echo "$tool_specified" >&6; }
47560         fi
47561       fi
47562     fi
47563 
47564   fi
47565 
47566 
47567 
47568   # Only process if variable expands to non-empty
47569 
47570   if test "x$BUILD_STRIP" != x; then
47571     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47572 
47573   # First separate the path from the arguments. This will split at the first
47574   # space.
47575   complete="$BUILD_STRIP"
47576   path="${complete%% *}"
47577   tmp="$complete EOL"
47578   arguments="${tmp#* }"
47579 
47580   # Input might be given as Windows format, start by converting to
47581   # unix format.
47582   new_path=`$CYGPATH -u "$path"`
47583 
47584   # Now try to locate executable using which
47585   new_path=`$WHICH "$new_path" 2> /dev/null`
47586   # bat and cmd files are not always considered executable in cygwin causing which
47587   # to not find them
47588   if test "x$new_path" = x \
47589       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47590       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47591     new_path=`$CYGPATH -u "$path"`
47592   fi
47593   if test "x$new_path" = x; then
47594     # Oops. Which didn't find the executable.
47595     # The splitting of arguments from the executable at a space might have been incorrect,
47596     # since paths with space are more likely in Windows. Give it another try with the whole
47597     # argument.
47598     path="$complete"
47599     arguments="EOL"
47600     new_path=`$CYGPATH -u "$path"`
47601     new_path=`$WHICH "$new_path" 2> /dev/null`
47602     # bat and cmd files are not always considered executable in cygwin causing which
47603     # to not find them
47604     if test "x$new_path" = x \
47605         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47606         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47607       new_path=`$CYGPATH -u "$path"`
47608     fi
47609     if test "x$new_path" = x; then
47610       # It's still not found. Now this is an unrecoverable error.
47611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47612 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47613       has_space=`$ECHO "$complete" | $GREP " "`
47614       if test "x$has_space" != x; then
47615         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47616 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47617       fi
47618       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47619     fi
47620   fi
47621 
47622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47625   # "foo.exe" is OK but "foo" is an error.
47626   #
47627   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47628   # It is also a way to make sure we got the proper file name for the real test later on.
47629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47630   if test "x$test_shortpath" = x; then
47631     # Short path failed, file does not exist as specified.
47632     # Try adding .exe or .cmd
47633     if test -f "${new_path}.exe"; then
47634       input_to_shortpath="${new_path}.exe"
47635     elif test -f "${new_path}.cmd"; then
47636       input_to_shortpath="${new_path}.cmd"
47637     else
47638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47639 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47640       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47641 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47642       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47643     fi
47644   else
47645     input_to_shortpath="$new_path"
47646   fi
47647 
47648   # Call helper function which possibly converts this using DOS-style short mode.
47649   # If so, the updated path is stored in $new_path.
47650   new_path="$input_to_shortpath"
47651 
47652   input_path="$input_to_shortpath"
47653   # Check if we need to convert this using DOS-style short mode. If the path
47654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47655   # take no chances and rewrite it.
47656   # Note: m4 eats our [], so we need to use [ and ] instead.
47657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47658   if test "x$has_forbidden_chars" != x; then
47659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47663       # Going to short mode and back again did indeed matter. Since short mode is
47664       # case insensitive, let's make it lowercase to improve readability.
47665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47666       # Now convert it back to Unix-style (cygpath)
47667       input_path=`$CYGPATH -u "$shortmode_path"`
47668       new_path="$input_path"
47669     fi
47670   fi
47671 
47672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47673   if test "x$test_cygdrive_prefix" = x; then
47674     # As a simple fix, exclude /usr/bin since it's not a real path.
47675     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47677       # a path prefixed by /cygdrive for fixpath to work.
47678       new_path="$CYGWIN_ROOT_PATH$input_path"
47679     fi
47680   fi
47681 
47682   # remove trailing .exe if any
47683   new_path="${new_path/%.exe/}"
47684 
47685     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47686 
47687   # First separate the path from the arguments. This will split at the first
47688   # space.
47689   complete="$BUILD_STRIP"
47690   path="${complete%% *}"
47691   tmp="$complete EOL"
47692   arguments="${tmp#* }"
47693 
47694   # Input might be given as Windows format, start by converting to
47695   # unix format.
47696   new_path="$path"
47697 
47698   windows_path="$new_path"
47699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47700     unix_path=`$CYGPATH -u "$windows_path"`
47701     new_path="$unix_path"
47702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47704     new_path="$unix_path"
47705   fi
47706 
47707 
47708   # Now try to locate executable using which
47709   new_path=`$WHICH "$new_path" 2> /dev/null`
47710 
47711   if test "x$new_path" = x; then
47712     # Oops. Which didn't find the executable.
47713     # The splitting of arguments from the executable at a space might have been incorrect,
47714     # since paths with space are more likely in Windows. Give it another try with the whole
47715     # argument.
47716     path="$complete"
47717     arguments="EOL"
47718     new_path="$path"
47719 
47720   windows_path="$new_path"
47721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47722     unix_path=`$CYGPATH -u "$windows_path"`
47723     new_path="$unix_path"
47724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47726     new_path="$unix_path"
47727   fi
47728 
47729 
47730     new_path=`$WHICH "$new_path" 2> /dev/null`
47731     # bat and cmd files are not always considered executable in MSYS causing which
47732     # to not find them
47733     if test "x$new_path" = x \
47734         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47735         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47736       new_path="$path"
47737 
47738   windows_path="$new_path"
47739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47740     unix_path=`$CYGPATH -u "$windows_path"`
47741     new_path="$unix_path"
47742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47744     new_path="$unix_path"
47745   fi
47746 
47747     fi
47748 
47749     if test "x$new_path" = x; then
47750       # It's still not found. Now this is an unrecoverable error.
47751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47752 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47753       has_space=`$ECHO "$complete" | $GREP " "`
47754       if test "x$has_space" != x; then
47755         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47757       fi
47758       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47759     fi
47760   fi
47761 
47762   # Now new_path has a complete unix path to the binary
47763   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47764     # Keep paths in /bin as-is, but remove trailing .exe if any
47765     new_path="${new_path/%.exe/}"
47766     # Do not save /bin paths to all_fixpath_prefixes!
47767   else
47768     # Not in mixed or Windows style, start by that.
47769     new_path=`cmd //c echo $new_path`
47770 
47771   input_path="$new_path"
47772   # Check if we need to convert this using DOS-style short mode. If the path
47773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47774   # take no chances and rewrite it.
47775   # Note: m4 eats our [], so we need to use [ and ] instead.
47776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47777   if test "x$has_forbidden_chars" != x; then
47778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47780   fi
47781 
47782     # Output is in $new_path
47783 
47784   windows_path="$new_path"
47785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47786     unix_path=`$CYGPATH -u "$windows_path"`
47787     new_path="$unix_path"
47788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47790     new_path="$unix_path"
47791   fi
47792 
47793     # remove trailing .exe if any
47794     new_path="${new_path/%.exe/}"
47795 
47796     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47797     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47798   fi
47799 
47800     else
47801       # We're on a unix platform. Hooray! :)
47802       # First separate the path from the arguments. This will split at the first
47803       # space.
47804       complete="$BUILD_STRIP"
47805       path="${complete%% *}"
47806       tmp="$complete EOL"
47807       arguments="${tmp#* }"
47808 
47809       # Cannot rely on the command "which" here since it doesn't always work.
47810       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47811       if test -z "$is_absolute_path"; then
47812         # Path to executable is not absolute. Find it.
47813         IFS_save="$IFS"
47814         IFS=:
47815         for p in $PATH; do
47816           if test -f "$p/$path" && test -x "$p/$path"; then
47817             new_path="$p/$path"
47818             break
47819           fi
47820         done
47821         IFS="$IFS_save"
47822       else
47823         # This is an absolute path, we can use it without further modifications.
47824         new_path="$path"
47825       fi
47826 
47827       if test "x$new_path" = x; then
47828         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47829 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47830         has_space=`$ECHO "$complete" | $GREP " "`
47831         if test "x$has_space" != x; then
47832           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47833 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47834         fi
47835         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47836       fi
47837     fi
47838 
47839     # Now join together the path and the arguments once again
47840     if test "x$arguments" != xEOL; then
47841       new_complete="$new_path ${arguments% *}"
47842     else
47843       new_complete="$new_path"
47844     fi
47845 
47846     if test "x$complete" != "x$new_complete"; then
47847       BUILD_STRIP="$new_complete"
47848       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47849 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47850     fi
47851   fi
47852 
47853     # Assume the C compiler is the assembler
47854     BUILD_AS="$BUILD_CC -c"
47855     # Just like for the target compiler, use the compiler as linker
47856     BUILD_LD="$BUILD_CC"
47857     BUILD_LDCXX="$BUILD_CXX"
47858 
47859     PATH="$OLDPATH"
47860 
47861 
47862   COMPILER=$BUILD_CC
47863   COMPILER_NAME=BuildC
47864 
47865   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47866     # cc -V output typically looks like
47867     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47868     # or
47869     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47870     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47871     # Check that this is likely to be the Solaris Studio cc.
47872     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47873     if test $? -ne 0; then
47874       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47875       { $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
47876 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47877       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47878 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47879       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47880 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47881       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47882     fi
47883     # Remove usage instructions (if present), and
47884     # collapse compiler output into a single line
47885     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47886         $SED -e 's/ *[Uu]sage:.*//'`
47887     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47888         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47889   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47890     # xlc -qversion output typically looks like
47891     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47892     #     Version: 11.01.0000.0015
47893     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47894     # Check that this is likely to be the IBM XL C compiler.
47895     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47896     if test $? -ne 0; then
47897       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47898       { $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
47899 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47900       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47901 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47902       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47903 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47904       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47905     fi
47906     # Collapse compiler output into a single line
47907     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47908     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47909         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47910   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47911     # There is no specific version flag, but all output starts with a version string.
47912     # First line typically looks something like:
47913     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47914     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47915     # Check that this is likely to be Microsoft CL.EXE.
47916     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47917     if test $? -ne 0; then
47918       { $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
47919 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47920       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47921 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47922       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47923     fi
47924     # Collapse compiler output into a single line
47925     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47926     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47927         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47928   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47929     # gcc --version output typically looks like
47930     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47931     #     Copyright (C) 2013 Free Software Foundation, Inc.
47932     #     This is free software; see the source for copying conditions.  There is NO
47933     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47934     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47935     # Check that this is likely to be GCC.
47936     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47937     if test $? -ne 0; then
47938       { $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
47939 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47940       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47941 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47942       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47943     fi
47944     # Remove Copyright and legalese from version string, and
47945     # collapse into a single line
47946     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947         $SED -e 's/ *Copyright .*//'`
47948     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47949         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47950   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47951     # clang --version output typically looks like
47952     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47953     #    clang version 3.3 (tags/RELEASE_33/final)
47954     # or
47955     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47956     #    Target: x86_64-pc-linux-gnu
47957     #    Thread model: posix
47958     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47959     # Check that this is likely to be clang
47960     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47961     if test $? -ne 0; then
47962       { $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
47963 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47964       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47965 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47966       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47967     fi
47968     # Collapse compiler output into a single line
47969     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47970     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47971         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47972   else
47973       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47974   fi
47975   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47976   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47977   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47978   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47979 
47980   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47981 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47982 
47983 
47984   COMPILER=$BUILD_CXX
47985   COMPILER_NAME=BuildC++
47986 
47987   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47988     # cc -V output typically looks like
47989     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47990     # or
47991     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47992     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47993     # Check that this is likely to be the Solaris Studio cc.
47994     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47995     if test $? -ne 0; then
47996       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47997       { $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
47998 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47999       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48000 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48001       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48002 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48003       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48004     fi
48005     # Remove usage instructions (if present), and
48006     # collapse compiler output into a single line
48007     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48008         $SED -e 's/ *[Uu]sage:.*//'`
48009     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48010         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48011   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48012     # xlc -qversion output typically looks like
48013     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48014     #     Version: 11.01.0000.0015
48015     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48016     # Check that this is likely to be the IBM XL C compiler.
48017     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48018     if test $? -ne 0; then
48019       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48020       { $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
48021 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48022       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48023 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48024       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48025 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48026       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48027     fi
48028     # Collapse compiler output into a single line
48029     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48030     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48031         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48032   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48033     # There is no specific version flag, but all output starts with a version string.
48034     # First line typically looks something like:
48035     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48036     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48037     # Check that this is likely to be Microsoft CL.EXE.
48038     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48039     if test $? -ne 0; then
48040       { $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
48041 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48042       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48043 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48044       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48045     fi
48046     # Collapse compiler output into a single line
48047     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48048     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48049         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48050   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48051     # gcc --version output typically looks like
48052     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48053     #     Copyright (C) 2013 Free Software Foundation, Inc.
48054     #     This is free software; see the source for copying conditions.  There is NO
48055     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48056     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48057     # Check that this is likely to be GCC.
48058     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48059     if test $? -ne 0; then
48060       { $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
48061 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48062       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48063 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48064       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48065     fi
48066     # Remove Copyright and legalese from version string, and
48067     # collapse into a single line
48068     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48069         $SED -e 's/ *Copyright .*//'`
48070     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48071         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48072   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48073     # clang --version output typically looks like
48074     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48075     #    clang version 3.3 (tags/RELEASE_33/final)
48076     # or
48077     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48078     #    Target: x86_64-pc-linux-gnu
48079     #    Thread model: posix
48080     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48081     # Check that this is likely to be clang
48082     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48083     if test $? -ne 0; then
48084       { $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
48085 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48086       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48087 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48088       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48089     fi
48090     # Collapse compiler output into a single line
48091     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48092     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48093         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48094   else
48095       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48096   fi
48097   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48098   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48099   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48100   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48101 
48102   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48103 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48104 
48105 
48106   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48107     { $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
48108 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48109     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48110 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48111   fi
48112 
48113   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48114   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48115     { $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
48116 $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;}
48117   fi
48118 
48119   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48120     { $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
48121 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48122   fi
48123 
48124   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48125 
48126   else
48127     # If we are not cross compiling, use the normal target compilers for
48128     # building the build platform executables.
48129     BUILD_CC="$CC"
48130     BUILD_CXX="$CXX"
48131     BUILD_LD="$LD"
48132     BUILD_LDCXX="$LDCXX"
48133     BUILD_NM="$NM"
48134     BUILD_AS="$AS"
48135     BUILD_OBJCOPY="$OBJCOPY"
48136     BUILD_STRIP="$STRIP"
48137     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48138     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48139     BUILD_AR="$AR"
48140 
48141 
48142   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48143     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48144 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48145     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48146 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48147   fi
48148 
48149   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48150   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48151     { $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
48152 $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;}
48153   fi
48154 
48155   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48156     { $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
48157 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48158   fi
48159 
48160   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48161 
48162   fi
48163 
48164 
48165 
48166 
48167 
48168 
48169 
48170 
48171 
48172 
48173 
48174 
48175 
48176 
48177   # The package path is used only on macosx?
48178   # FIXME: clean this up, and/or move it elsewhere.
48179   PACKAGE_PATH=/opt/local
48180 
48181 
48182   # Check for extra potential brokenness.
48183   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48184     # On Windows, double-check that we got the right compiler.
48185     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48186     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48187     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48188       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48189         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
48190       fi
48191     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48192       if test "x$COMPILER_CPU_TEST" != "xx64"; then
48193         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48194       fi
48195     fi
48196   fi
48197 
48198   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48199     # If this is a --hash-style=gnu system, use --hash-style=both, why?
48200     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48201     # This is later checked when setting flags.
48202 
48203     # "-Og" suppported for GCC 4.8 and later
48204     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48205 
48206 
48207 
48208 
48209 
48210 
48211 
48212 
48213 
48214 
48215 
48216 
48217 
48218 
48219 
48220 
48221 
48222 
48223 
48224 
48225 
48226 
48227 
48228 
48229 
48230 
48231 
48232 
48233 
48234 
48235 
48236 
48237 
48238 
48239 
48240 
48241 
48242 
48243 
48244 
48245 
48246 
48247 
48248 
48249 
48250 
48251 
48252     # Execute function body
48253 
48254 
48255 
48256 
48257 
48258 
48259 
48260 
48261 
48262 
48263 
48264 
48265 
48266 
48267 
48268 
48269 
48270 
48271 
48272 
48273 
48274 
48275 
48276 
48277 
48278 
48279 
48280 
48281 
48282 
48283 
48284 
48285 
48286 
48287 
48288 
48289 
48290 
48291 
48292 
48293 
48294 
48295 
48296 
48297 
48298 
48299 
48300 
48301     # Execute function body
48302 
48303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48304 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48305   supports=yes
48306 
48307   saved_cflags="$CFLAGS"
48308   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48309   ac_ext=c
48310 ac_cpp='$CPP $CPPFLAGS'
48311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48314 
48315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48316 /* end confdefs.h.  */
48317 int i;
48318 _ACEOF
48319 if ac_fn_c_try_compile "$LINENO"; then :
48320 
48321 else
48322   supports=no
48323 fi
48324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48325   ac_ext=cpp
48326 ac_cpp='$CXXCPP $CPPFLAGS'
48327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48330 
48331   CFLAGS="$saved_cflags"
48332 
48333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48334 $as_echo "$supports" >&6; }
48335   if test "x$supports" = "xyes" ; then
48336     :
48337     C_COMP_SUPPORTS="yes"
48338   else
48339     :
48340     C_COMP_SUPPORTS="no"
48341   fi
48342 
48343 
48344 
48345 
48346 
48347 
48348 
48349 
48350 
48351 
48352 
48353 
48354 
48355 
48356 
48357 
48358 
48359 
48360 
48361 
48362 
48363 
48364 
48365 
48366 
48367 
48368 
48369 
48370 
48371 
48372 
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     # Execute function body
48402 
48403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48404 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48405   supports=yes
48406 
48407   saved_cxxflags="$CXXFLAGS"
48408   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48409   ac_ext=cpp
48410 ac_cpp='$CXXCPP $CPPFLAGS'
48411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48414 
48415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416 /* end confdefs.h.  */
48417 int i;
48418 _ACEOF
48419 if ac_fn_cxx_try_compile "$LINENO"; then :
48420 
48421 else
48422   supports=no
48423 fi
48424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48425   ac_ext=cpp
48426 ac_cpp='$CXXCPP $CPPFLAGS'
48427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48430 
48431   CXXFLAGS="$saved_cxxflags"
48432 
48433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48434 $as_echo "$supports" >&6; }
48435   if test "x$supports" = "xyes" ; then
48436     :
48437     CXX_COMP_SUPPORTS="yes"
48438   else
48439     :
48440     CXX_COMP_SUPPORTS="no"
48441   fi
48442 
48443 
48444 
48445 
48446 
48447 
48448 
48449 
48450 
48451 
48452 
48453 
48454 
48455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48456 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48457   supports=no
48458   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48459 
48460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48461 $as_echo "$supports" >&6; }
48462   if test "x$supports" = "xyes" ; then
48463     :
48464     HAS_CFLAG_OPTIMIZE_DEBUG=true
48465   else
48466     :
48467     HAS_CFLAG_OPTIMIZE_DEBUG=false
48468   fi
48469 
48470 
48471 
48472 
48473 
48474 
48475 
48476     # "-z relro" supported in GNU binutils 2.17 and later
48477     LINKER_RELRO_FLAG="-Wl,-z,relro"
48478 
48479 
48480 
48481 
48482 
48483 
48484 
48485 
48486 
48487 
48488 
48489 
48490 
48491 
48492 
48493 
48494 
48495 
48496 
48497 
48498 
48499 
48500 
48501 
48502 
48503 
48504 
48505 
48506 
48507 
48508 
48509 
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525     # Execute function body
48526 
48527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48528 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48529   supports=yes
48530 
48531   saved_ldflags="$LDFLAGS"
48532   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48533   ac_ext=c
48534 ac_cpp='$CPP $CPPFLAGS'
48535 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48536 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48537 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48538 
48539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48540 /* end confdefs.h.  */
48541 
48542 int
48543 main ()
48544 {
48545 
48546   ;
48547   return 0;
48548 }
48549 _ACEOF
48550 if ac_fn_c_try_link "$LINENO"; then :
48551 
48552 else
48553   supports=no
48554 fi
48555 rm -f core conftest.err conftest.$ac_objext \
48556     conftest$ac_exeext conftest.$ac_ext
48557   ac_ext=cpp
48558 ac_cpp='$CXXCPP $CPPFLAGS'
48559 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48560 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48561 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48562 
48563   LDFLAGS="$saved_ldflags"
48564 
48565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48566 $as_echo "$supports" >&6; }
48567   if test "x$supports" = "xyes" ; then
48568     :
48569     HAS_LINKER_RELRO=true
48570   else
48571     :
48572     HAS_LINKER_RELRO=false
48573   fi
48574 
48575 
48576 
48577 
48578 
48579 
48580 
48581 
48582 
48583 
48584 
48585 
48586 
48587     # "-z now" supported in GNU binutils 2.11 and later
48588     LINKER_NOW_FLAG="-Wl,-z,now"
48589 
48590 
48591 
48592 
48593 
48594 
48595 
48596 
48597 
48598 
48599 
48600 
48601 
48602 
48603 
48604 
48605 
48606 
48607 
48608 
48609 
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636     # Execute function body
48637 
48638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48639 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48640   supports=yes
48641 
48642   saved_ldflags="$LDFLAGS"
48643   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48644   ac_ext=c
48645 ac_cpp='$CPP $CPPFLAGS'
48646 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48647 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48648 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48649 
48650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48651 /* end confdefs.h.  */
48652 
48653 int
48654 main ()
48655 {
48656 
48657   ;
48658   return 0;
48659 }
48660 _ACEOF
48661 if ac_fn_c_try_link "$LINENO"; then :
48662 
48663 else
48664   supports=no
48665 fi
48666 rm -f core conftest.err conftest.$ac_objext \
48667     conftest$ac_exeext conftest.$ac_ext
48668   ac_ext=cpp
48669 ac_cpp='$CXXCPP $CPPFLAGS'
48670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48671 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48673 
48674   LDFLAGS="$saved_ldflags"
48675 
48676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48677 $as_echo "$supports" >&6; }
48678   if test "x$supports" = "xyes" ; then
48679     :
48680     HAS_LINKER_NOW=true
48681   else
48682     :
48683     HAS_LINKER_NOW=false
48684   fi
48685 
48686 
48687 
48688 
48689 
48690 
48691 
48692 
48693 
48694 
48695 
48696 
48697   fi
48698 
48699   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48700   # in executable.'
48701   USING_BROKEN_SUSE_LD=no
48702   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48704 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48705     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48706     $ECHO "int main() { }" > main.c
48707     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48708       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48709 $as_echo "no" >&6; }
48710       USING_BROKEN_SUSE_LD=no
48711     else
48712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48713 $as_echo "yes" >&6; }
48714       USING_BROKEN_SUSE_LD=yes
48715     fi
48716     $RM version-script.map main.c a.out
48717   fi
48718 
48719 
48720   # Setup hotspot lecagy names for toolchains
48721   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48722   if test "x$TOOLCHAIN_TYPE" = xclang; then
48723     HOTSPOT_TOOLCHAIN_TYPE=gcc
48724   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48725     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48726   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48727     HOTSPOT_TOOLCHAIN_TYPE=visCPP
48728   fi
48729 
48730 
48731 
48732 # Setup the JTReg Regression Test Harness.
48733 
48734 
48735 # Check whether --with-jtreg was given.
48736 if test "${with_jtreg+set}" = set; then :
48737   withval=$with_jtreg;
48738 fi
48739 
48740 
48741   if test "x$with_jtreg" = xno; then
48742     # jtreg disabled
48743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48744 $as_echo_n "checking for jtreg test harness... " >&6; }
48745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48746 $as_echo "no, disabled" >&6; }
48747   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48748     # An explicit path is specified, use it.
48749     JT_HOME="$with_jtreg"
48750 
48751   # Only process if variable expands to non-empty
48752 
48753   if test "x$JT_HOME" != x; then
48754     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48755 
48756   # Input might be given as Windows format, start by converting to
48757   # unix format.
48758   path="$JT_HOME"
48759   new_path=`$CYGPATH -u "$path"`
48760 
48761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48764   # "foo.exe" is OK but "foo" is an error.
48765   #
48766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48767   # It is also a way to make sure we got the proper file name for the real test later on.
48768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48769   if test "x$test_shortpath" = x; then
48770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48771 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48772     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48773   fi
48774 
48775   # Call helper function which possibly converts this using DOS-style short mode.
48776   # If so, the updated path is stored in $new_path.
48777 
48778   input_path="$new_path"
48779   # Check if we need to convert this using DOS-style short mode. If the path
48780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48781   # take no chances and rewrite it.
48782   # Note: m4 eats our [], so we need to use [ and ] instead.
48783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48784   if test "x$has_forbidden_chars" != x; then
48785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48789       # Going to short mode and back again did indeed matter. Since short mode is
48790       # case insensitive, let's make it lowercase to improve readability.
48791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48792       # Now convert it back to Unix-style (cygpath)
48793       input_path=`$CYGPATH -u "$shortmode_path"`
48794       new_path="$input_path"
48795     fi
48796   fi
48797 
48798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48799   if test "x$test_cygdrive_prefix" = x; then
48800     # As a simple fix, exclude /usr/bin since it's not a real path.
48801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48803       # a path prefixed by /cygdrive for fixpath to work.
48804       new_path="$CYGWIN_ROOT_PATH$input_path"
48805     fi
48806   fi
48807 
48808 
48809   if test "x$path" != "x$new_path"; then
48810     JT_HOME="$new_path"
48811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48812 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48813   fi
48814 
48815     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48816 
48817   path="$JT_HOME"
48818   has_colon=`$ECHO $path | $GREP ^.:`
48819   new_path="$path"
48820   if test "x$has_colon" = x; then
48821     # Not in mixed or Windows style, start by that.
48822     new_path=`cmd //c echo $path`
48823   fi
48824 
48825 
48826   input_path="$new_path"
48827   # Check if we need to convert this using DOS-style short mode. If the path
48828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48829   # take no chances and rewrite it.
48830   # Note: m4 eats our [], so we need to use [ and ] instead.
48831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48832   if test "x$has_forbidden_chars" != x; then
48833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48835   fi
48836 
48837 
48838   windows_path="$new_path"
48839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48840     unix_path=`$CYGPATH -u "$windows_path"`
48841     new_path="$unix_path"
48842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48844     new_path="$unix_path"
48845   fi
48846 
48847   if test "x$path" != "x$new_path"; then
48848     JT_HOME="$new_path"
48849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48850 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48851   fi
48852 
48853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48855 
48856     else
48857       # We're on a unix platform. Hooray! :)
48858       path="$JT_HOME"
48859       has_space=`$ECHO "$path" | $GREP " "`
48860       if test "x$has_space" != x; then
48861         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48862 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48863         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48864       fi
48865 
48866       # Use eval to expand a potential ~
48867       eval path="$path"
48868       if test ! -f "$path" && test ! -d "$path"; then
48869         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48870       fi
48871 
48872       if test -d "$path"; then
48873         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48874       else
48875         dir="`$DIRNAME "$path"`"
48876         base="`$BASENAME "$path"`"
48877         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48878       fi
48879     fi
48880   fi
48881 
48882     if test ! -d "$JT_HOME"; then
48883       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48884     fi
48885 
48886     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48887       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48888     fi
48889 
48890     JTREGEXE="$JT_HOME/bin/jtreg"
48891     if test ! -x "$JTREGEXE"; then
48892       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48893     fi
48894 
48895     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48896 $as_echo_n "checking for jtreg test harness... " >&6; }
48897     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48898 $as_echo "$JT_HOME" >&6; }
48899   else
48900     # Try to locate jtreg
48901     if test "x$JT_HOME" != x; then
48902       # JT_HOME set in environment, use it
48903       if test ! -d "$JT_HOME"; then
48904         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48905 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48906         JT_HOME=
48907       else
48908         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48909           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48910 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48911           JT_HOME=
48912         elif test ! -x "$JT_HOME/bin/jtreg"; then
48913           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48914 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48915           JT_HOME=
48916         else
48917           JTREGEXE="$JT_HOME/bin/jtreg"
48918           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48919 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48920         fi
48921       fi
48922     fi
48923 
48924     if test "x$JT_HOME" = x; then
48925       # JT_HOME is not set in environment, or was deemed invalid.
48926       # Try to find jtreg on path
48927 
48928 
48929   # Publish this variable in the help.
48930 
48931 
48932   if [ -z "${JTREGEXE+x}" ]; then
48933     # The variable is not set by user, try to locate tool using the code snippet
48934     for ac_prog in jtreg
48935 do
48936   # Extract the first word of "$ac_prog", so it can be a program name with args.
48937 set dummy $ac_prog; ac_word=$2
48938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48939 $as_echo_n "checking for $ac_word... " >&6; }
48940 if ${ac_cv_path_JTREGEXE+:} false; then :
48941   $as_echo_n "(cached) " >&6
48942 else
48943   case $JTREGEXE in
48944   [\\/]* | ?:[\\/]*)
48945   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48946   ;;
48947   *)
48948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48949 for as_dir in $PATH
48950 do
48951   IFS=$as_save_IFS
48952   test -z "$as_dir" && as_dir=.
48953     for ac_exec_ext in '' $ac_executable_extensions; do
48954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48955     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48957     break 2
48958   fi
48959 done
48960   done
48961 IFS=$as_save_IFS
48962 
48963   ;;
48964 esac
48965 fi
48966 JTREGEXE=$ac_cv_path_JTREGEXE
48967 if test -n "$JTREGEXE"; then
48968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48969 $as_echo "$JTREGEXE" >&6; }
48970 else
48971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48972 $as_echo "no" >&6; }
48973 fi
48974 
48975 
48976   test -n "$JTREGEXE" && break
48977 done
48978 
48979   else
48980     # The variable is set, but is it from the command line or the environment?
48981 
48982     # Try to remove the string !JTREGEXE! from our list.
48983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48985       # If it failed, the variable was not from the command line. Ignore it,
48986       # but warn the user (except for BASH, which is always set by the calling BASH).
48987       if test "xJTREGEXE" != xBASH; then
48988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48989 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48990       fi
48991       # Try to locate tool using the code snippet
48992       for ac_prog in jtreg
48993 do
48994   # Extract the first word of "$ac_prog", so it can be a program name with args.
48995 set dummy $ac_prog; ac_word=$2
48996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48997 $as_echo_n "checking for $ac_word... " >&6; }
48998 if ${ac_cv_path_JTREGEXE+:} false; then :
48999   $as_echo_n "(cached) " >&6
49000 else
49001   case $JTREGEXE in
49002   [\\/]* | ?:[\\/]*)
49003   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49004   ;;
49005   *)
49006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49007 for as_dir in $PATH
49008 do
49009   IFS=$as_save_IFS
49010   test -z "$as_dir" && as_dir=.
49011     for ac_exec_ext in '' $ac_executable_extensions; do
49012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49013     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49015     break 2
49016   fi
49017 done
49018   done
49019 IFS=$as_save_IFS
49020 
49021   ;;
49022 esac
49023 fi
49024 JTREGEXE=$ac_cv_path_JTREGEXE
49025 if test -n "$JTREGEXE"; then
49026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49027 $as_echo "$JTREGEXE" >&6; }
49028 else
49029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49030 $as_echo "no" >&6; }
49031 fi
49032 
49033 
49034   test -n "$JTREGEXE" && break
49035 done
49036 
49037     else
49038       # If it succeeded, then it was overridden by the user. We will use it
49039       # for the tool.
49040 
49041       # First remove it from the list of overridden variables, so we can test
49042       # for unknown variables in the end.
49043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49044 
49045       # Check if we try to supply an empty value
49046       if test "x$JTREGEXE" = x; then
49047         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49048 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49049         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49050 $as_echo_n "checking for JTREGEXE... " >&6; }
49051         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49052 $as_echo "disabled" >&6; }
49053       else
49054         # Check if the provided tool contains a complete path.
49055         tool_specified="$JTREGEXE"
49056         tool_basename="${tool_specified##*/}"
49057         if test "x$tool_basename" = "x$tool_specified"; then
49058           # A command without a complete path is provided, search $PATH.
49059           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49060 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49061           # Extract the first word of "$tool_basename", so it can be a program name with args.
49062 set dummy $tool_basename; ac_word=$2
49063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49064 $as_echo_n "checking for $ac_word... " >&6; }
49065 if ${ac_cv_path_JTREGEXE+:} false; then :
49066   $as_echo_n "(cached) " >&6
49067 else
49068   case $JTREGEXE in
49069   [\\/]* | ?:[\\/]*)
49070   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49071   ;;
49072   *)
49073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49074 for as_dir in $PATH
49075 do
49076   IFS=$as_save_IFS
49077   test -z "$as_dir" && as_dir=.
49078     for ac_exec_ext in '' $ac_executable_extensions; do
49079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49080     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49082     break 2
49083   fi
49084 done
49085   done
49086 IFS=$as_save_IFS
49087 
49088   ;;
49089 esac
49090 fi
49091 JTREGEXE=$ac_cv_path_JTREGEXE
49092 if test -n "$JTREGEXE"; then
49093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49094 $as_echo "$JTREGEXE" >&6; }
49095 else
49096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49097 $as_echo "no" >&6; }
49098 fi
49099 
49100 
49101           if test "x$JTREGEXE" = x; then
49102             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49103           fi
49104         else
49105           # Otherwise we believe it is a complete path. Use it as it is.
49106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49107 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49108           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49109 $as_echo_n "checking for JTREGEXE... " >&6; }
49110           if test ! -x "$tool_specified"; then
49111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49112 $as_echo "not found" >&6; }
49113             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49114           fi
49115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49116 $as_echo "$tool_specified" >&6; }
49117         fi
49118       fi
49119     fi
49120 
49121   fi
49122 
49123 
49124       if test "x$JTREGEXE" != x; then
49125         # That's good, now try to derive JT_HOME
49126         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49127         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49128           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49129 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49130           JT_HOME=
49131           JTREGEXE=
49132         else
49133           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49134 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49135         fi
49136       fi
49137     fi
49138 
49139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49140 $as_echo_n "checking for jtreg test harness... " >&6; }
49141     if test "x$JT_HOME" != x; then
49142       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49143 $as_echo "$JT_HOME" >&6; }
49144     else
49145       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49146 $as_echo "no, not found" >&6; }
49147 
49148       if test "x$with_jtreg" = xyes; then
49149         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49150       fi
49151     fi
49152   fi
49153 
49154 
49155   # Only process if variable expands to non-empty
49156 
49157   if test "x$JTREGEXE" != x; then
49158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49159 
49160   # First separate the path from the arguments. This will split at the first
49161   # space.
49162   complete="$JTREGEXE"
49163   path="${complete%% *}"
49164   tmp="$complete EOL"
49165   arguments="${tmp#* }"
49166 
49167   # Input might be given as Windows format, start by converting to
49168   # unix format.
49169   new_path=`$CYGPATH -u "$path"`
49170 
49171   # Now try to locate executable using which
49172   new_path=`$WHICH "$new_path" 2> /dev/null`
49173   # bat and cmd files are not always considered executable in cygwin causing which
49174   # to not find them
49175   if test "x$new_path" = x \
49176       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49177       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49178     new_path=`$CYGPATH -u "$path"`
49179   fi
49180   if test "x$new_path" = x; then
49181     # Oops. Which didn't find the executable.
49182     # The splitting of arguments from the executable at a space might have been incorrect,
49183     # since paths with space are more likely in Windows. Give it another try with the whole
49184     # argument.
49185     path="$complete"
49186     arguments="EOL"
49187     new_path=`$CYGPATH -u "$path"`
49188     new_path=`$WHICH "$new_path" 2> /dev/null`
49189     # bat and cmd files are not always considered executable in cygwin causing which
49190     # to not find them
49191     if test "x$new_path" = x \
49192         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49193         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49194       new_path=`$CYGPATH -u "$path"`
49195     fi
49196     if test "x$new_path" = x; then
49197       # It's still not found. Now this is an unrecoverable error.
49198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49199 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49200       has_space=`$ECHO "$complete" | $GREP " "`
49201       if test "x$has_space" != x; then
49202         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49204       fi
49205       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49206     fi
49207   fi
49208 
49209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49212   # "foo.exe" is OK but "foo" is an error.
49213   #
49214   # This test is therefore slightly more accurate than "test -f" to check for file presence.
49215   # It is also a way to make sure we got the proper file name for the real test later on.
49216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49217   if test "x$test_shortpath" = x; then
49218     # Short path failed, file does not exist as specified.
49219     # Try adding .exe or .cmd
49220     if test -f "${new_path}.exe"; then
49221       input_to_shortpath="${new_path}.exe"
49222     elif test -f "${new_path}.cmd"; then
49223       input_to_shortpath="${new_path}.cmd"
49224     else
49225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49226 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49227       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49228 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49229       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49230     fi
49231   else
49232     input_to_shortpath="$new_path"
49233   fi
49234 
49235   # Call helper function which possibly converts this using DOS-style short mode.
49236   # If so, the updated path is stored in $new_path.
49237   new_path="$input_to_shortpath"
49238 
49239   input_path="$input_to_shortpath"
49240   # Check if we need to convert this using DOS-style short mode. If the path
49241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49242   # take no chances and rewrite it.
49243   # Note: m4 eats our [], so we need to use [ and ] instead.
49244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49245   if test "x$has_forbidden_chars" != x; then
49246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49250       # Going to short mode and back again did indeed matter. Since short mode is
49251       # case insensitive, let's make it lowercase to improve readability.
49252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49253       # Now convert it back to Unix-style (cygpath)
49254       input_path=`$CYGPATH -u "$shortmode_path"`
49255       new_path="$input_path"
49256     fi
49257   fi
49258 
49259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49260   if test "x$test_cygdrive_prefix" = x; then
49261     # As a simple fix, exclude /usr/bin since it's not a real path.
49262     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49264       # a path prefixed by /cygdrive for fixpath to work.
49265       new_path="$CYGWIN_ROOT_PATH$input_path"
49266     fi
49267   fi
49268 
49269   # remove trailing .exe if any
49270   new_path="${new_path/%.exe/}"
49271 
49272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49273 
49274   # First separate the path from the arguments. This will split at the first
49275   # space.
49276   complete="$JTREGEXE"
49277   path="${complete%% *}"
49278   tmp="$complete EOL"
49279   arguments="${tmp#* }"
49280 
49281   # Input might be given as Windows format, start by converting to
49282   # unix format.
49283   new_path="$path"
49284 
49285   windows_path="$new_path"
49286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49287     unix_path=`$CYGPATH -u "$windows_path"`
49288     new_path="$unix_path"
49289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49291     new_path="$unix_path"
49292   fi
49293 
49294 
49295   # Now try to locate executable using which
49296   new_path=`$WHICH "$new_path" 2> /dev/null`
49297 
49298   if test "x$new_path" = x; then
49299     # Oops. Which didn't find the executable.
49300     # The splitting of arguments from the executable at a space might have been incorrect,
49301     # since paths with space are more likely in Windows. Give it another try with the whole
49302     # argument.
49303     path="$complete"
49304     arguments="EOL"
49305     new_path="$path"
49306 
49307   windows_path="$new_path"
49308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49309     unix_path=`$CYGPATH -u "$windows_path"`
49310     new_path="$unix_path"
49311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49313     new_path="$unix_path"
49314   fi
49315 
49316 
49317     new_path=`$WHICH "$new_path" 2> /dev/null`
49318     # bat and cmd files are not always considered executable in MSYS causing which
49319     # to not find them
49320     if test "x$new_path" = x \
49321         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49322         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49323       new_path="$path"
49324 
49325   windows_path="$new_path"
49326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49327     unix_path=`$CYGPATH -u "$windows_path"`
49328     new_path="$unix_path"
49329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49331     new_path="$unix_path"
49332   fi
49333 
49334     fi
49335 
49336     if test "x$new_path" = x; then
49337       # It's still not found. Now this is an unrecoverable error.
49338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49339 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49340       has_space=`$ECHO "$complete" | $GREP " "`
49341       if test "x$has_space" != x; then
49342         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49343 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49344       fi
49345       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49346     fi
49347   fi
49348 
49349   # Now new_path has a complete unix path to the binary
49350   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49351     # Keep paths in /bin as-is, but remove trailing .exe if any
49352     new_path="${new_path/%.exe/}"
49353     # Do not save /bin paths to all_fixpath_prefixes!
49354   else
49355     # Not in mixed or Windows style, start by that.
49356     new_path=`cmd //c echo $new_path`
49357 
49358   input_path="$new_path"
49359   # Check if we need to convert this using DOS-style short mode. If the path
49360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49361   # take no chances and rewrite it.
49362   # Note: m4 eats our [], so we need to use [ and ] instead.
49363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49364   if test "x$has_forbidden_chars" != x; then
49365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49367   fi
49368 
49369     # Output is in $new_path
49370 
49371   windows_path="$new_path"
49372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49373     unix_path=`$CYGPATH -u "$windows_path"`
49374     new_path="$unix_path"
49375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49377     new_path="$unix_path"
49378   fi
49379 
49380     # remove trailing .exe if any
49381     new_path="${new_path/%.exe/}"
49382 
49383     # Save the first 10 bytes of this path to the storage, so fixpath can work.
49384     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49385   fi
49386 
49387     else
49388       # We're on a unix platform. Hooray! :)
49389       # First separate the path from the arguments. This will split at the first
49390       # space.
49391       complete="$JTREGEXE"
49392       path="${complete%% *}"
49393       tmp="$complete EOL"
49394       arguments="${tmp#* }"
49395 
49396       # Cannot rely on the command "which" here since it doesn't always work.
49397       is_absolute_path=`$ECHO "$path" | $GREP ^/`
49398       if test -z "$is_absolute_path"; then
49399         # Path to executable is not absolute. Find it.
49400         IFS_save="$IFS"
49401         IFS=:
49402         for p in $PATH; do
49403           if test -f "$p/$path" && test -x "$p/$path"; then
49404             new_path="$p/$path"
49405             break
49406           fi
49407         done
49408         IFS="$IFS_save"
49409       else
49410         # This is an absolute path, we can use it without further modifications.
49411         new_path="$path"
49412       fi
49413 
49414       if test "x$new_path" = x; then
49415         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49416 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49417         has_space=`$ECHO "$complete" | $GREP " "`
49418         if test "x$has_space" != x; then
49419           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49420 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49421         fi
49422         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49423       fi
49424     fi
49425 
49426     # Now join together the path and the arguments once again
49427     if test "x$arguments" != xEOL; then
49428       new_complete="$new_path ${arguments% *}"
49429     else
49430       new_complete="$new_path"
49431     fi
49432 
49433     if test "x$complete" != "x$new_complete"; then
49434       JTREGEXE="$new_complete"
49435       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49436 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49437     fi
49438   fi
49439 
49440 
49441   # Only process if variable expands to non-empty
49442 
49443   if test "x$JT_HOME" != x; then
49444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49445 
49446   # Input might be given as Windows format, start by converting to
49447   # unix format.
49448   path="$JT_HOME"
49449   new_path=`$CYGPATH -u "$path"`
49450 
49451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49454   # "foo.exe" is OK but "foo" is an error.
49455   #
49456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49457   # It is also a way to make sure we got the proper file name for the real test later on.
49458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49459   if test "x$test_shortpath" = x; then
49460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49461 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49462     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49463   fi
49464 
49465   # Call helper function which possibly converts this using DOS-style short mode.
49466   # If so, the updated path is stored in $new_path.
49467 
49468   input_path="$new_path"
49469   # Check if we need to convert this using DOS-style short mode. If the path
49470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49471   # take no chances and rewrite it.
49472   # Note: m4 eats our [], so we need to use [ and ] instead.
49473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49474   if test "x$has_forbidden_chars" != x; then
49475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49479       # Going to short mode and back again did indeed matter. Since short mode is
49480       # case insensitive, let's make it lowercase to improve readability.
49481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49482       # Now convert it back to Unix-style (cygpath)
49483       input_path=`$CYGPATH -u "$shortmode_path"`
49484       new_path="$input_path"
49485     fi
49486   fi
49487 
49488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49489   if test "x$test_cygdrive_prefix" = x; then
49490     # As a simple fix, exclude /usr/bin since it's not a real path.
49491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49493       # a path prefixed by /cygdrive for fixpath to work.
49494       new_path="$CYGWIN_ROOT_PATH$input_path"
49495     fi
49496   fi
49497 
49498 
49499   if test "x$path" != "x$new_path"; then
49500     JT_HOME="$new_path"
49501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49502 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49503   fi
49504 
49505     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49506 
49507   path="$JT_HOME"
49508   has_colon=`$ECHO $path | $GREP ^.:`
49509   new_path="$path"
49510   if test "x$has_colon" = x; then
49511     # Not in mixed or Windows style, start by that.
49512     new_path=`cmd //c echo $path`
49513   fi
49514 
49515 
49516   input_path="$new_path"
49517   # Check if we need to convert this using DOS-style short mode. If the path
49518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49519   # take no chances and rewrite it.
49520   # Note: m4 eats our [], so we need to use [ and ] instead.
49521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49522   if test "x$has_forbidden_chars" != x; then
49523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49525   fi
49526 
49527 
49528   windows_path="$new_path"
49529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49530     unix_path=`$CYGPATH -u "$windows_path"`
49531     new_path="$unix_path"
49532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49534     new_path="$unix_path"
49535   fi
49536 
49537   if test "x$path" != "x$new_path"; then
49538     JT_HOME="$new_path"
49539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49540 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49541   fi
49542 
49543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49545 
49546     else
49547       # We're on a unix platform. Hooray! :)
49548       path="$JT_HOME"
49549       has_space=`$ECHO "$path" | $GREP " "`
49550       if test "x$has_space" != x; then
49551         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49552 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49553         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49554       fi
49555 
49556       # Use eval to expand a potential ~
49557       eval path="$path"
49558       if test ! -f "$path" && test ! -d "$path"; then
49559         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49560       fi
49561 
49562       if test -d "$path"; then
49563         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49564       else
49565         dir="`$DIRNAME "$path"`"
49566         base="`$BASENAME "$path"`"
49567         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49568       fi
49569     fi
49570   fi
49571 
49572 
49573 
49574 
49575 
49576 # Setup Jib dependency tool
49577 
49578 
49579 # Check whether --with-jib was given.
49580 if test "${with_jib+set}" = set; then :
49581   withval=$with_jib;
49582 fi
49583 
49584 
49585   if test "x$with_jib" = xno || test "x$with_jib" = x; then
49586     # jib disabled
49587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49588 $as_echo_n "checking for jib... " >&6; }
49589     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49590 $as_echo "no" >&6; }
49591   elif test "x$with_jib" = xyes; then
49592     as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49593   else
49594     JIB_HOME="${with_jib}"
49595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49596 $as_echo_n "checking for jib... " >&6; }
49597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49598 $as_echo "${JIB_HOME}" >&6; }
49599     if test ! -d "${JIB_HOME}"; then
49600       as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49601     fi
49602     JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49603     if test ! -f "${JIB_JAR}"; then
49604       as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49605     fi
49606   fi
49607 
49608 
49609 
49610 
49611 
49612   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49613   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49614   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49615   #                              commands produced by the link step (currently AIX only)
49616   if test "x$TOOLCHAIN_TYPE" = xxlc; then
49617     COMPILER_TARGET_BITS_FLAG="-q"
49618     COMPILER_COMMAND_FILE_FLAG="-f"
49619     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49620   else
49621     COMPILER_TARGET_BITS_FLAG="-m"
49622     COMPILER_COMMAND_FILE_FLAG="@"
49623     COMPILER_BINDCMD_FILE_FLAG=""
49624 
49625     # The solstudio linker does not support @-files.
49626     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49627       COMPILER_COMMAND_FILE_FLAG=
49628     fi
49629 
49630     # Check if @file is supported by gcc
49631     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49632       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49633 $as_echo_n "checking if @file is supported by gcc... " >&6; }
49634       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49635       $ECHO "" "--version" > command.file
49636       if $CXX @command.file 2>&5 >&5; then
49637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49638 $as_echo "yes" >&6; }
49639         COMPILER_COMMAND_FILE_FLAG="@"
49640       else
49641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49642 $as_echo "no" >&6; }
49643         COMPILER_COMMAND_FILE_FLAG=
49644       fi
49645       $RM command.file
49646     fi
49647   fi
49648 
49649 
49650 
49651 
49652   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49653   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49654     ARFLAGS="-r"
49655   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49656     ARFLAGS="-X64"
49657   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49658     # lib.exe is used as AR to create static libraries.
49659     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49660   else
49661     ARFLAGS=""
49662   fi
49663 
49664 
49665   ## Setup strip.
49666   # FIXME: should this really be per platform, or should it be per toolchain type?
49667   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49668   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49669   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49670     STRIPFLAGS="-g"
49671   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49672     STRIPFLAGS="-x"
49673   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49674     STRIPFLAGS="-S"
49675   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49676     STRIPFLAGS="-X32_64"
49677   fi
49678 
49679 
49680 
49681   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49682     CC_OUT_OPTION=-Fo
49683     EXE_OUT_OPTION=-out:
49684     LD_OUT_OPTION=-out:
49685     AR_OUT_OPTION=-out:
49686   else
49687     # The option used to specify the target .o,.a or .so file.
49688     # When compiling, how to specify the to be created object file.
49689     CC_OUT_OPTION='-o$(SPACE)'
49690     # When linking, how to specify the to be created executable.
49691     EXE_OUT_OPTION='-o$(SPACE)'
49692     # When linking, how to specify the to be created dynamically linkable library.
49693     LD_OUT_OPTION='-o$(SPACE)'
49694     # When archiving, how to specify the to be create static archive for object files.
49695     AR_OUT_OPTION='rcs$(SPACE)'
49696   fi
49697 
49698 
49699 
49700 
49701 
49702   # On Windows, we need to set RC flags.
49703   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49704     RC_FLAGS="-nologo -l0x409"
49705     JVM_RCFLAGS="-nologo"
49706     if test "x$DEBUG_LEVEL" = xrelease; then
49707       RC_FLAGS="$RC_FLAGS -DNDEBUG"
49708       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49709     fi
49710 
49711     # The version variables used to create RC_FLAGS may be overridden
49712     # in a custom configure script, or possibly the command line.
49713     # Let those variables be expanded at make time in spec.gmk.
49714     # The \$ are escaped to the shell, and the $(...) variables
49715     # are evaluated by make.
49716     RC_FLAGS="$RC_FLAGS \
49717         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49718         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49719         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49720         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49721         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49722         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49723         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49724 
49725     JVM_RCFLAGS="$JVM_RCFLAGS \
49726         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49727         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49728         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49729         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49730         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49731         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49732         -D\"HS_FNAME=jvm.dll\" \
49733         -D\"HS_INTERNAL_NAME=jvm\""
49734   fi
49735 
49736 
49737 
49738   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49739     # silence copyright notice and other headers.
49740     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49741   fi
49742 
49743 
49744 # Now we can test some aspects on the target using configure macros.
49745 
49746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49747 $as_echo_n "checking for ANSI C header files... " >&6; }
49748 if ${ac_cv_header_stdc+:} false; then :
49749   $as_echo_n "(cached) " >&6
49750 else
49751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49752 /* end confdefs.h.  */
49753 #include <stdlib.h>
49754 #include <stdarg.h>
49755 #include <string.h>
49756 #include <float.h>
49757 
49758 int
49759 main ()
49760 {
49761 
49762   ;
49763   return 0;
49764 }
49765 _ACEOF
49766 if ac_fn_cxx_try_compile "$LINENO"; then :
49767   ac_cv_header_stdc=yes
49768 else
49769   ac_cv_header_stdc=no
49770 fi
49771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49772 
49773 if test $ac_cv_header_stdc = yes; then
49774   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49776 /* end confdefs.h.  */
49777 #include <string.h>
49778 
49779 _ACEOF
49780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49781   $EGREP "memchr" >/dev/null 2>&1; then :
49782 
49783 else
49784   ac_cv_header_stdc=no
49785 fi
49786 rm -f conftest*
49787 
49788 fi
49789 
49790 if test $ac_cv_header_stdc = yes; then
49791   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49793 /* end confdefs.h.  */
49794 #include <stdlib.h>
49795 
49796 _ACEOF
49797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49798   $EGREP "free" >/dev/null 2>&1; then :
49799 
49800 else
49801   ac_cv_header_stdc=no
49802 fi
49803 rm -f conftest*
49804 
49805 fi
49806 
49807 if test $ac_cv_header_stdc = yes; then
49808   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49809   if test "$cross_compiling" = yes; then :
49810   :
49811 else
49812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49813 /* end confdefs.h.  */
49814 #include <ctype.h>
49815 #include <stdlib.h>
49816 #if ((' ' & 0x0FF) == 0x020)
49817 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49818 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49819 #else
49820 # define ISLOWER(c) \
49821                    (('a' <= (c) && (c) <= 'i') \
49822                      || ('j' <= (c) && (c) <= 'r') \
49823                      || ('s' <= (c) && (c) <= 'z'))
49824 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49825 #endif
49826 
49827 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49828 int
49829 main ()
49830 {
49831   int i;
49832   for (i = 0; i < 256; i++)
49833     if (XOR (islower (i), ISLOWER (i))
49834         || toupper (i) != TOUPPER (i))
49835       return 2;
49836   return 0;
49837 }
49838 _ACEOF
49839 if ac_fn_cxx_try_run "$LINENO"; then :
49840 
49841 else
49842   ac_cv_header_stdc=no
49843 fi
49844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49845   conftest.$ac_objext conftest.beam conftest.$ac_ext
49846 fi
49847 
49848 fi
49849 fi
49850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49851 $as_echo "$ac_cv_header_stdc" >&6; }
49852 if test $ac_cv_header_stdc = yes; then
49853 
49854 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49855 
49856 fi
49857 
49858 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
49859 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49860                   inttypes.h stdint.h unistd.h
49861 do :
49862   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49863 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49864 "
49865 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49866   cat >>confdefs.h <<_ACEOF
49867 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49868 _ACEOF
49869 
49870 fi
49871 
49872 done
49873 
49874 
49875 
49876   ###############################################################################
49877   #
49878   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49879   # (The JVM can use 32 or 64 bit Java pointers but that decision
49880   # is made at runtime.)
49881   #
49882 
49883   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49884     # Always specify -m flag on Solaris
49885     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49886 
49887   # When we add flags to the "official" CFLAGS etc, we need to
49888   # keep track of these additions in ADDED_CFLAGS etc. These
49889   # will later be checked to make sure only controlled additions
49890   # have been made to CFLAGS etc.
49891   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49892   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49893   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49894 
49895   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49896   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49897   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49898 
49899   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49900   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49901   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49902 
49903   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49904   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49905   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49906 
49907   elif test "x$COMPILE_TYPE" = xreduced; then
49908     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49909       # Specify -m if running reduced on unix platforms
49910 
49911   # When we add flags to the "official" CFLAGS etc, we need to
49912   # keep track of these additions in ADDED_CFLAGS etc. These
49913   # will later be checked to make sure only controlled additions
49914   # have been made to CFLAGS etc.
49915   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49916   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49917   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49918 
49919   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49920   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49921   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49922 
49923   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49924   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49925   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49926 
49927   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49928   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49929   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49930 
49931     fi
49932   fi
49933   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49934     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49935     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49936     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49937   fi
49938 
49939   # Make compilation sanity check
49940   for ac_header in stdio.h
49941 do :
49942   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49943 if test "x$ac_cv_header_stdio_h" = xyes; then :
49944   cat >>confdefs.h <<_ACEOF
49945 #define HAVE_STDIO_H 1
49946 _ACEOF
49947 
49948 else
49949 
49950     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49951 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49952     if test "x$COMPILE_TYPE" = xreduced; then
49953 
49954   # Print a helpful message on how to acquire the necessary build dependency.
49955   # reduced is the help tag: freetype, cups, alsa etc
49956   MISSING_DEPENDENCY=reduced
49957 
49958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49959     cygwin_help $MISSING_DEPENDENCY
49960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49961     msys_help $MISSING_DEPENDENCY
49962   else
49963     PKGHANDLER_COMMAND=
49964 
49965     case $PKGHANDLER in
49966       apt-get)
49967         apt_help     $MISSING_DEPENDENCY ;;
49968       yum)
49969         yum_help     $MISSING_DEPENDENCY ;;
49970       brew)
49971         brew_help    $MISSING_DEPENDENCY ;;
49972       port)
49973         port_help    $MISSING_DEPENDENCY ;;
49974       pkgutil)
49975         pkgutil_help $MISSING_DEPENDENCY ;;
49976       pkgadd)
49977         pkgadd_help  $MISSING_DEPENDENCY ;;
49978     esac
49979 
49980     if test "x$PKGHANDLER_COMMAND" != x; then
49981       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49982     fi
49983   fi
49984 
49985       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49986 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49987     elif test "x$COMPILE_TYPE" = xcross; then
49988       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49989 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49990     fi
49991     as_fn_error $? "Cannot continue." "$LINENO" 5
49992 
49993 fi
49994 
49995 done
49996 
49997 
49998   # The cast to long int works around a bug in the HP C Compiler
49999 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50000 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50001 # This bug is HP SR number 8606223364.
50002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50003 $as_echo_n "checking size of int *... " >&6; }
50004 if ${ac_cv_sizeof_int_p+:} false; then :
50005   $as_echo_n "(cached) " >&6
50006 else
50007   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50008 
50009 else
50010   if test "$ac_cv_type_int_p" = yes; then
50011      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50012 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50013 as_fn_error 77 "cannot compute sizeof (int *)
50014 See \`config.log' for more details" "$LINENO" 5; }
50015    else
50016      ac_cv_sizeof_int_p=0
50017    fi
50018 fi
50019 
50020 fi
50021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50022 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50023 
50024 
50025 
50026 cat >>confdefs.h <<_ACEOF
50027 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50028 _ACEOF
50029 
50030 
50031 
50032   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50033   if test "x$ac_cv_sizeof_int_p" = x; then
50034     # The test failed, lets stick to the assumed value.
50035     { $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
50036 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50037   else
50038     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50039 
50040     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50041       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50042       # Let's try to implicitely set the compilers target architecture and retry the test
50043       { $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
50044 $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;}
50045       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50046 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50047 
50048   # When we add flags to the "official" CFLAGS etc, we need to
50049   # keep track of these additions in ADDED_CFLAGS etc. These
50050   # will later be checked to make sure only controlled additions
50051   # have been made to CFLAGS etc.
50052   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50053   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50054   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50055 
50056   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50057   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50058   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50059 
50060   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50061   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50062   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50063 
50064   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50065   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50066   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50067 
50068 
50069       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50070       unset ac_cv_sizeof_int_p
50071       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50072       cat >>confdefs.h <<_ACEOF
50073 #undef SIZEOF_INT_P
50074 _ACEOF
50075 
50076       # The cast to long int works around a bug in the HP C Compiler
50077 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50078 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50079 # This bug is HP SR number 8606223364.
50080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50081 $as_echo_n "checking size of int *... " >&6; }
50082 if ${ac_cv_sizeof_int_p+:} false; then :
50083   $as_echo_n "(cached) " >&6
50084 else
50085   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50086 
50087 else
50088   if test "$ac_cv_type_int_p" = yes; then
50089      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50091 as_fn_error 77 "cannot compute sizeof (int *)
50092 See \`config.log' for more details" "$LINENO" 5; }
50093    else
50094      ac_cv_sizeof_int_p=0
50095    fi
50096 fi
50097 
50098 fi
50099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50100 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50101 
50102 
50103 
50104 cat >>confdefs.h <<_ACEOF
50105 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50106 _ACEOF
50107 
50108 
50109 
50110       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50111 
50112       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50113         { $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
50114 $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;}
50115         if test "x$COMPILE_TYPE" = xreduced; then
50116 
50117   # Print a helpful message on how to acquire the necessary build dependency.
50118   # reduced is the help tag: freetype, cups, alsa etc
50119   MISSING_DEPENDENCY=reduced
50120 
50121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50122     cygwin_help $MISSING_DEPENDENCY
50123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50124     msys_help $MISSING_DEPENDENCY
50125   else
50126     PKGHANDLER_COMMAND=
50127 
50128     case $PKGHANDLER in
50129       apt-get)
50130         apt_help     $MISSING_DEPENDENCY ;;
50131       yum)
50132         yum_help     $MISSING_DEPENDENCY ;;
50133       brew)
50134         brew_help    $MISSING_DEPENDENCY ;;
50135       port)
50136         port_help    $MISSING_DEPENDENCY ;;
50137       pkgutil)
50138         pkgutil_help $MISSING_DEPENDENCY ;;
50139       pkgadd)
50140         pkgadd_help  $MISSING_DEPENDENCY ;;
50141     esac
50142 
50143     if test "x$PKGHANDLER_COMMAND" != x; then
50144       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50145     fi
50146   fi
50147 
50148           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50149 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50150         elif test "x$COMPILE_TYPE" = xcross; then
50151           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50152 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50153         fi
50154         as_fn_error $? "Cannot continue." "$LINENO" 5
50155       fi
50156     fi
50157   fi
50158 
50159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50160 $as_echo_n "checking for target address size... " >&6; }
50161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50162 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50163 
50164 
50165   ###############################################################################
50166   #
50167   # Is the target little of big endian?
50168   #
50169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50170 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50171 if ${ac_cv_c_bigendian+:} false; then :
50172   $as_echo_n "(cached) " >&6
50173 else
50174   ac_cv_c_bigendian=unknown
50175     # See if we're dealing with a universal compiler.
50176     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50177 /* end confdefs.h.  */
50178 #ifndef __APPLE_CC__
50179                not a universal capable compiler
50180              #endif
50181              typedef int dummy;
50182 
50183 _ACEOF
50184 if ac_fn_cxx_try_compile "$LINENO"; then :
50185 
50186         # Check for potential -arch flags.  It is not universal unless
50187         # there are at least two -arch flags with different values.
50188         ac_arch=
50189         ac_prev=
50190         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50191          if test -n "$ac_prev"; then
50192            case $ac_word in
50193              i?86 | x86_64 | ppc | ppc64)
50194                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50195                  ac_arch=$ac_word
50196                else
50197                  ac_cv_c_bigendian=universal
50198                  break
50199                fi
50200                ;;
50201            esac
50202            ac_prev=
50203          elif test "x$ac_word" = "x-arch"; then
50204            ac_prev=arch
50205          fi
50206        done
50207 fi
50208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50209     if test $ac_cv_c_bigendian = unknown; then
50210       # See if sys/param.h defines the BYTE_ORDER macro.
50211       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50212 /* end confdefs.h.  */
50213 #include <sys/types.h>
50214              #include <sys/param.h>
50215 
50216 int
50217 main ()
50218 {
50219 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50220                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50221                      && LITTLE_ENDIAN)
50222               bogus endian macros
50223              #endif
50224 
50225   ;
50226   return 0;
50227 }
50228 _ACEOF
50229 if ac_fn_cxx_try_compile "$LINENO"; then :
50230   # It does; now see whether it defined to BIG_ENDIAN or not.
50231          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50232 /* end confdefs.h.  */
50233 #include <sys/types.h>
50234                 #include <sys/param.h>
50235 
50236 int
50237 main ()
50238 {
50239 #if BYTE_ORDER != BIG_ENDIAN
50240                  not big endian
50241                 #endif
50242 
50243   ;
50244   return 0;
50245 }
50246 _ACEOF
50247 if ac_fn_cxx_try_compile "$LINENO"; then :
50248   ac_cv_c_bigendian=yes
50249 else
50250   ac_cv_c_bigendian=no
50251 fi
50252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50253 fi
50254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50255     fi
50256     if test $ac_cv_c_bigendian = unknown; then
50257       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50258       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50259 /* end confdefs.h.  */
50260 #include <limits.h>
50261 
50262 int
50263 main ()
50264 {
50265 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50266               bogus endian macros
50267              #endif
50268 
50269   ;
50270   return 0;
50271 }
50272 _ACEOF
50273 if ac_fn_cxx_try_compile "$LINENO"; then :
50274   # It does; now see whether it defined to _BIG_ENDIAN or not.
50275          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50276 /* end confdefs.h.  */
50277 #include <limits.h>
50278 
50279 int
50280 main ()
50281 {
50282 #ifndef _BIG_ENDIAN
50283                  not big endian
50284                 #endif
50285 
50286   ;
50287   return 0;
50288 }
50289 _ACEOF
50290 if ac_fn_cxx_try_compile "$LINENO"; then :
50291   ac_cv_c_bigendian=yes
50292 else
50293   ac_cv_c_bigendian=no
50294 fi
50295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50296 fi
50297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50298     fi
50299     if test $ac_cv_c_bigendian = unknown; then
50300       # Compile a test program.
50301       if test "$cross_compiling" = yes; then :
50302   # Try to guess by grepping values from an object file.
50303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50304 /* end confdefs.h.  */
50305 short int ascii_mm[] =
50306                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50307                 short int ascii_ii[] =
50308                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50309                 int use_ascii (int i) {
50310                   return ascii_mm[i] + ascii_ii[i];
50311                 }
50312                 short int ebcdic_ii[] =
50313                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50314                 short int ebcdic_mm[] =
50315                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50316                 int use_ebcdic (int i) {
50317                   return ebcdic_mm[i] + ebcdic_ii[i];
50318                 }
50319                 extern int foo;
50320 
50321 int
50322 main ()
50323 {
50324 return use_ascii (foo) == use_ebcdic (foo);
50325   ;
50326   return 0;
50327 }
50328 _ACEOF
50329 if ac_fn_cxx_try_compile "$LINENO"; then :
50330   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50331               ac_cv_c_bigendian=yes
50332             fi
50333             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50334               if test "$ac_cv_c_bigendian" = unknown; then
50335                 ac_cv_c_bigendian=no
50336               else
50337                 # finding both strings is unlikely to happen, but who knows?
50338                 ac_cv_c_bigendian=unknown
50339               fi
50340             fi
50341 fi
50342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50343 else
50344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50345 /* end confdefs.h.  */
50346 $ac_includes_default
50347 int
50348 main ()
50349 {
50350 
50351              /* Are we little or big endian?  From Harbison&Steele.  */
50352              union
50353              {
50354                long int l;
50355                char c[sizeof (long int)];
50356              } u;
50357              u.l = 1;
50358              return u.c[sizeof (long int) - 1] == 1;
50359 
50360   ;
50361   return 0;
50362 }
50363 _ACEOF
50364 if ac_fn_cxx_try_run "$LINENO"; then :
50365   ac_cv_c_bigendian=no
50366 else
50367   ac_cv_c_bigendian=yes
50368 fi
50369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50370   conftest.$ac_objext conftest.beam conftest.$ac_ext
50371 fi
50372 
50373     fi
50374 fi
50375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50376 $as_echo "$ac_cv_c_bigendian" >&6; }
50377  case $ac_cv_c_bigendian in #(
50378    yes)
50379      ENDIAN="big";; #(
50380    no)
50381      ENDIAN="little" ;; #(
50382    universal)
50383      ENDIAN="universal_endianness"
50384      ;; #(
50385    *)
50386      ENDIAN="unknown" ;;
50387  esac
50388 
50389 
50390   if test "x$ENDIAN" = xuniversal_endianness; then
50391     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50392   fi
50393   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50394     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
50395   fi
50396 
50397 
50398 # Configure flags for the tools
50399 
50400   ###############################################################################
50401   #
50402   # How to compile shared libraries.
50403   #
50404 
50405   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50406     PICFLAG="-fPIC"
50407     C_FLAG_REORDER=''
50408     CXX_FLAG_REORDER=''
50409 
50410     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50411       # Linking is different on MacOSX
50412       if test "x$STATIC_BUILD" = xtrue; then
50413         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50414       else
50415         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50416         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50417       fi
50418       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50419       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50420       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50421       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50422     else
50423       # Default works for linux, might work on other platforms as well.
50424       SHARED_LIBRARY_FLAGS='-shared'
50425       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50426       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50427       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50428       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50429     fi
50430   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50431     C_FLAG_REORDER=''
50432     CXX_FLAG_REORDER=''
50433 
50434     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50435       # Linking is different on MacOSX
50436       PICFLAG=''
50437       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50438       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50439       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50440       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50441       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50442 
50443       if test "x$STATIC_BUILD" = xfalse; then
50444         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50445       fi
50446     else
50447       # Default works for linux, might work on other platforms as well.
50448       PICFLAG='-fPIC'
50449       SHARED_LIBRARY_FLAGS='-shared'
50450       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50451       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50452       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50453 
50454       # arm specific settings
50455       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50456         # '-Wl,-z,origin' isn't used on arm.
50457         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50458       else
50459         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50460       fi
50461 
50462     fi
50463   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50464     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50465       PICFLAG="-xcode=pic32"
50466     else
50467       PICFLAG="-KPIC"
50468     fi
50469     C_FLAG_REORDER='-xF'
50470     CXX_FLAG_REORDER='-xF'
50471     SHARED_LIBRARY_FLAGS="-G"
50472     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50473     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50474     SET_SHARED_LIBRARY_NAME='-h $1'
50475     SET_SHARED_LIBRARY_MAPFILE='-M$1'
50476   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50477     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50478     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50479     # will have to patch this single instruction with a call to some out-of-order code which
50480     # does the load from the TOC. This is of course slow. But in that case we also would have
50481     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50482     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50483     # can be patched directly by the linker and does not require a jump to out-of-order code.
50484     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50485     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50486     # loads for accessing a global variable). But there are rumors that this may be seen as a
50487     # 'performance feature' because of improved code locality of the symbols used in a
50488     # compilation unit.
50489     PICFLAG="-qpic"
50490     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50491     C_FLAG_REORDER=''
50492     CXX_FLAG_REORDER=''
50493     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50494     SET_EXECUTABLE_ORIGIN=""
50495     SET_SHARED_LIBRARY_ORIGIN=''
50496     SET_SHARED_LIBRARY_NAME=''
50497     SET_SHARED_LIBRARY_MAPFILE=''
50498   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50499     PICFLAG=""
50500     C_FLAG_REORDER=''
50501     CXX_FLAG_REORDER=''
50502     SHARED_LIBRARY_FLAGS="-dll"
50503     SET_EXECUTABLE_ORIGIN=''
50504     SET_SHARED_LIBRARY_ORIGIN=''
50505     SET_SHARED_LIBRARY_NAME=''
50506     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50507   fi
50508 
50509 
50510 
50511 
50512 
50513 
50514 
50515 
50516 
50517   # The (cross) compiler is now configured, we can now test capabilities
50518   # of the target platform.
50519 
50520 
50521 
50522   ###############################################################################
50523   #
50524   # Setup the opt flags for different compilers
50525   # and different operating systems.
50526   #
50527 
50528   # FIXME: this was indirectly the old default, but just inherited.
50529   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50530   #   C_FLAG_DEPS="-MMD -MF"
50531   # fi
50532 
50533   # Generate make dependency files
50534   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50535     C_FLAG_DEPS="-MMD -MF"
50536   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50537     C_FLAG_DEPS="-MMD -MF"
50538   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50539     C_FLAG_DEPS="-xMMD -xMF"
50540   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50541     C_FLAG_DEPS="-qmakedep=gcc -MF"
50542   fi
50543   CXX_FLAG_DEPS="$C_FLAG_DEPS"
50544 
50545 
50546 
50547   # Debug symbols
50548   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50549     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50550       # reduce from default "-g2" option to save space
50551       CFLAGS_DEBUG_SYMBOLS="-g1"
50552       CXXFLAGS_DEBUG_SYMBOLS="-g1"
50553     else
50554       CFLAGS_DEBUG_SYMBOLS="-g"
50555       CXXFLAGS_DEBUG_SYMBOLS="-g"
50556     fi
50557   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50558     CFLAGS_DEBUG_SYMBOLS="-g"
50559     CXXFLAGS_DEBUG_SYMBOLS="-g"
50560   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50561     CFLAGS_DEBUG_SYMBOLS="-g -xs"
50562     # -g0 enables debug symbols without disabling inlining.
50563     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50564   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50565     CFLAGS_DEBUG_SYMBOLS="-g"
50566     CXXFLAGS_DEBUG_SYMBOLS="-g"
50567   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50568     CFLAGS_DEBUG_SYMBOLS="-Zi"
50569     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50570   fi
50571 
50572 
50573 
50574   # Debug symbols for JVM_CFLAGS
50575   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50576     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50577     if test "x$DEBUG_LEVEL" = xslowdebug; then
50578       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50579     else
50580       # -g0 does not disable inlining, which -g does.
50581       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50582     fi
50583   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50584     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50585   else
50586     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50587   fi
50588 
50589 
50590   # bounds, memory and behavior checking options
50591   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50592     case $DEBUG_LEVEL in
50593     release )
50594       # no adjustment
50595       ;;
50596     fastdebug )
50597       # no adjustment
50598       ;;
50599     slowdebug )
50600       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50601       # get's added conditionally on whether we produce debug symbols or not.
50602       # This is most likely not really correct.
50603 
50604       # Add runtime stack smashing and undefined behavior checks.
50605       # Not all versions of gcc support -fstack-protector
50606       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50607 
50608 
50609 
50610 
50611 
50612 
50613 
50614 
50615 
50616 
50617 
50618 
50619 
50620 
50621 
50622 
50623 
50624 
50625 
50626 
50627 
50628 
50629 
50630 
50631 
50632 
50633 
50634 
50635 
50636 
50637 
50638 
50639 
50640 
50641 
50642 
50643 
50644 
50645 
50646 
50647 
50648 
50649     # Execute function body
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 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698     # Execute function body
50699 
50700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50701 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50702   supports=yes
50703 
50704   saved_cflags="$CFLAGS"
50705   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50706   ac_ext=c
50707 ac_cpp='$CPP $CPPFLAGS'
50708 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50709 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50710 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50711 
50712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50713 /* end confdefs.h.  */
50714 int i;
50715 _ACEOF
50716 if ac_fn_c_try_compile "$LINENO"; then :
50717 
50718 else
50719   supports=no
50720 fi
50721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50722   ac_ext=cpp
50723 ac_cpp='$CXXCPP $CPPFLAGS'
50724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50727 
50728   CFLAGS="$saved_cflags"
50729 
50730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50731 $as_echo "$supports" >&6; }
50732   if test "x$supports" = "xyes" ; then
50733     :
50734     C_COMP_SUPPORTS="yes"
50735   else
50736     :
50737     C_COMP_SUPPORTS="no"
50738   fi
50739 
50740 
50741 
50742 
50743 
50744 
50745 
50746 
50747 
50748 
50749 
50750 
50751 
50752 
50753 
50754 
50755 
50756 
50757 
50758 
50759 
50760 
50761 
50762 
50763 
50764 
50765 
50766 
50767 
50768 
50769 
50770 
50771 
50772 
50773 
50774 
50775 
50776 
50777 
50778 
50779 
50780 
50781 
50782 
50783 
50784 
50785 
50786 
50787 
50788 
50789 
50790 
50791 
50792 
50793 
50794 
50795 
50796 
50797 
50798     # Execute function body
50799 
50800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50801 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50802   supports=yes
50803 
50804   saved_cxxflags="$CXXFLAGS"
50805   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50806   ac_ext=cpp
50807 ac_cpp='$CXXCPP $CPPFLAGS'
50808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50811 
50812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50813 /* end confdefs.h.  */
50814 int i;
50815 _ACEOF
50816 if ac_fn_cxx_try_compile "$LINENO"; then :
50817 
50818 else
50819   supports=no
50820 fi
50821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50822   ac_ext=cpp
50823 ac_cpp='$CXXCPP $CPPFLAGS'
50824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50827 
50828   CXXFLAGS="$saved_cxxflags"
50829 
50830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50831 $as_echo "$supports" >&6; }
50832   if test "x$supports" = "xyes" ; then
50833     :
50834     CXX_COMP_SUPPORTS="yes"
50835   else
50836     :
50837     CXX_COMP_SUPPORTS="no"
50838   fi
50839 
50840 
50841 
50842 
50843 
50844 
50845 
50846 
50847 
50848 
50849 
50850 
50851 
50852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50853 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50854   supports=no
50855   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50856 
50857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50858 $as_echo "$supports" >&6; }
50859   if test "x$supports" = "xyes" ; then
50860     :
50861 
50862   else
50863     :
50864     STACK_PROTECTOR_CFLAG=""
50865   fi
50866 
50867 
50868 
50869 
50870 
50871 
50872 
50873       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50874       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50875       if test "x$STACK_PROTECTOR_CFLAG" != x; then
50876         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50877       fi
50878       ;;
50879     esac
50880   fi
50881 
50882   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50883     if test "x$DEBUG_LEVEL" != xrelease; then
50884       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50885         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50886       fi
50887     fi
50888   fi
50889 
50890   # Optimization levels
50891   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50892     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50893 
50894     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50895       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50896       C_O_FLAG_HIGHEST_JVM="-xO4"
50897       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50898       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50899       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50900       C_O_FLAG_DEBUG="-xregs=no%frameptr"
50901       C_O_FLAG_DEBUG_JVM=""
50902       C_O_FLAG_NONE="-xregs=no%frameptr"
50903       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50904       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50905       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50906       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50907       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50908       CXX_O_FLAG_DEBUG_JVM=""
50909       CXX_O_FLAG_NONE="-xregs=no%frameptr"
50910       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50911         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50912         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50913       fi
50914     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50915       C_O_FLAG_HIGHEST_JVM="-xO4"
50916       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50917       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50918       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50919       C_O_FLAG_DEBUG=""
50920       C_O_FLAG_DEBUG_JVM=""
50921       C_O_FLAG_NONE=""
50922       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50923       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50924       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50925       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50926       CXX_O_FLAG_DEBUG=""
50927       CXX_O_FLAG_DEBUG_JVM=""
50928       CXX_O_FLAG_NONE=""
50929     fi
50930   else
50931     # The remaining toolchains share opt flags between CC and CXX;
50932     # setup for C and duplicate afterwards.
50933     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50934       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50935         # On MacOSX we optimize for size, something
50936         # we should do for all platforms?
50937         C_O_FLAG_HIGHEST_JVM="-Os"
50938         C_O_FLAG_HIGHEST="-Os"
50939         C_O_FLAG_HI="-Os"
50940         C_O_FLAG_NORM="-Os"
50941         C_O_FLAG_SIZE="-Os"
50942       else
50943         C_O_FLAG_HIGHEST_JVM="-O3"
50944         C_O_FLAG_HIGHEST="-O3"
50945         C_O_FLAG_HI="-O3"
50946         C_O_FLAG_NORM="-O2"
50947         C_O_FLAG_SIZE="-Os"
50948       fi
50949       C_O_FLAG_DEBUG="-O0"
50950       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50951         C_O_FLAG_DEBUG_JVM=""
50952       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50953         C_O_FLAG_DEBUG_JVM="-O0"
50954       fi
50955       C_O_FLAG_NONE="-O0"
50956     elif test "x$TOOLCHAIN_TYPE" = xclang; then
50957       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50958         # On MacOSX we optimize for size, something
50959         # we should do for all platforms?
50960         C_O_FLAG_HIGHEST_JVM="-Os"
50961         C_O_FLAG_HIGHEST="-Os"
50962         C_O_FLAG_HI="-Os"
50963         C_O_FLAG_NORM="-Os"
50964         C_O_FLAG_SIZE="-Os"
50965       else
50966         C_O_FLAG_HIGHEST_JVM="-O3"
50967         C_O_FLAG_HIGHEST="-O3"
50968         C_O_FLAG_HI="-O3"
50969         C_O_FLAG_NORM="-O2"
50970         C_O_FLAG_SIZE="-Os"
50971       fi
50972       C_O_FLAG_DEBUG="-O0"
50973       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50974         C_O_FLAG_DEBUG_JVM=""
50975       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50976         C_O_FLAG_DEBUG_JVM="-O0"
50977       fi
50978       C_O_FLAG_NONE="-O0"
50979     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50980       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50981       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50982       C_O_FLAG_HI="-O3 -qinline -qinlglue"
50983       C_O_FLAG_NORM="-O2"
50984       C_O_FLAG_DEBUG="-qnoopt"
50985       # FIXME: Value below not verified.
50986       C_O_FLAG_DEBUG_JVM=""
50987       C_O_FLAG_NONE="-qnoopt"
50988     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50989       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50990       C_O_FLAG_HIGHEST="-O2"
50991       C_O_FLAG_HI="-O1"
50992       C_O_FLAG_NORM="-O1"
50993       C_O_FLAG_DEBUG="-Od"
50994       C_O_FLAG_DEBUG_JVM=""
50995       C_O_FLAG_NONE="-Od"
50996       C_O_FLAG_SIZE="-Os"
50997     fi
50998     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50999     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51000     CXX_O_FLAG_HI="$C_O_FLAG_HI"
51001     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51002     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51003     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51004     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51005     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51006   fi
51007 
51008   # Adjust optimization flags according to debug level.
51009   case $DEBUG_LEVEL in
51010     release )
51011       # no adjustment
51012       ;;
51013     fastdebug )
51014       # Not quite so much optimization
51015       C_O_FLAG_HI="$C_O_FLAG_NORM"
51016       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51017       ;;
51018     slowdebug )
51019       # Disable optimization
51020       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51021       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51022       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51023       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51024       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51025       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51026       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51027       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51028       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51029       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51030       ;;
51031   esac
51032 
51033 
51034 
51035 
51036 
51037 
51038 
51039 
51040 
51041 
51042 
51043 
51044 
51045 
51046 
51047 
51048 
51049 
51050 
51051 
51052 # Check whether --with-abi-profile was given.
51053 if test "${with_abi_profile+set}" = set; then :
51054   withval=$with_abi_profile;
51055 fi
51056 
51057 
51058   if test "x$with_abi_profile" != x; then
51059     if test "x$OPENJDK_TARGET_CPU" != xarm && \
51060         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51061       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51062     fi
51063 
51064     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51065     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51066 $as_echo_n "checking for ABI profle... " >&6; }
51067     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51068 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51069 
51070     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51071       ARM_FLOAT_TYPE=vfp-sflt
51072       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51073     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51074       ARM_FLOAT_TYPE=vfp-hflt
51075       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51076     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51077       ARM_FLOAT_TYPE=sflt
51078       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51079     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51080       ARM_FLOAT_TYPE=vfp-sflt
51081       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51082     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51083       ARM_FLOAT_TYPE=vfp-hflt
51084       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51085     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51086       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51087       ARM_FLOAT_TYPE=
51088       ARM_ARCH_TYPE_FLAGS=
51089     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51090       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51091       ARM_FLOAT_TYPE=
51092       ARM_ARCH_TYPE_FLAGS=
51093     else
51094       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51095     fi
51096 
51097     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51098       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51099     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51100       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51101     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51102       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51103     fi
51104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51105 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51107 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51108 
51109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51110 $as_echo_n "checking for arch type flags... " >&6; }
51111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51112 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51113 
51114     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51115     # autoconf target triplet.
51116      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51117     # Sanity check that it is a known ABI.
51118     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51119         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51120         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51121           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51122 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51123     fi
51124     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51125 $as_echo_n "checking for ABI property name... " >&6; }
51126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51127 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51128 
51129 
51130     # Pass these on to the open part of configure as if they were set using
51131     # --with-extra-c[xx]flags.
51132     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51133     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51134     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51135     # FIXME: This should not really be set using extra_cflags.
51136     if test "x$OPENJDK_TARGET_CPU" = xarm; then
51137         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51138         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51139     fi
51140     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51141     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51142     # And pass the architecture flags to the linker as well
51143     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51144   fi
51145 
51146   # When building with an abi profile, the name of that profile is appended on the
51147   # bundle platform, which is used in bundle names.
51148   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51149     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51150   fi
51151 
51152 
51153   # Optional POSIX functionality needed by the JVM
51154   #
51155   # Check if clock_gettime is available and in which library. This indicates
51156   # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51157   # don't let it update LIBS.
51158   save_LIBS="$LIBS"
51159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51160 $as_echo_n "checking for library containing clock_gettime... " >&6; }
51161 if ${ac_cv_search_clock_gettime+:} false; then :
51162   $as_echo_n "(cached) " >&6
51163 else
51164   ac_func_search_save_LIBS=$LIBS
51165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51166 /* end confdefs.h.  */
51167 
51168 /* Override any GCC internal prototype to avoid an error.
51169    Use char because int might match the return type of a GCC
51170    builtin and then its argument prototype would still apply.  */
51171 #ifdef __cplusplus
51172 extern "C"
51173 #endif
51174 char clock_gettime ();
51175 int
51176 main ()
51177 {
51178 return clock_gettime ();
51179   ;
51180   return 0;
51181 }
51182 _ACEOF
51183 for ac_lib in '' rt; do
51184   if test -z "$ac_lib"; then
51185     ac_res="none required"
51186   else
51187     ac_res=-l$ac_lib
51188     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51189   fi
51190   if ac_fn_cxx_try_link "$LINENO"; then :
51191   ac_cv_search_clock_gettime=$ac_res
51192 fi
51193 rm -f core conftest.err conftest.$ac_objext \
51194     conftest$ac_exeext
51195   if ${ac_cv_search_clock_gettime+:} false; then :
51196   break
51197 fi
51198 done
51199 if ${ac_cv_search_clock_gettime+:} false; then :
51200 
51201 else
51202   ac_cv_search_clock_gettime=no
51203 fi
51204 rm conftest.$ac_ext
51205 LIBS=$ac_func_search_save_LIBS
51206 fi
51207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51208 $as_echo "$ac_cv_search_clock_gettime" >&6; }
51209 ac_res=$ac_cv_search_clock_gettime
51210 if test "$ac_res" != no; then :
51211   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51212   HAS_CLOCK_GETTIME=true
51213 fi
51214 
51215   if test "x$LIBS" = "x-lrt "; then
51216     CLOCK_GETTIME_IN_LIBRT=true
51217   fi
51218   LIBS="$save_LIBS"
51219 
51220 
51221   # Special extras...
51222   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51223     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51224       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51225       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51226     fi
51227     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51228     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51229   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51230     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51231     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51232   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51233     CXXSTD_CXXFLAG="-std=gnu++98"
51234 
51235 
51236 
51237 
51238 
51239 
51240 
51241 
51242 
51243 
51244 
51245 
51246 
51247 
51248 
51249 
51250 
51251 
51252 
51253 
51254 
51255 
51256 
51257 
51258 
51259 
51260 
51261 
51262 
51263 
51264 
51265 
51266 
51267 
51268 
51269 
51270 
51271 
51272 
51273 
51274 
51275 
51276     # Execute function body
51277 
51278   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51279 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51280   supports=yes
51281 
51282   saved_cxxflags="$CXXFLAGS"
51283   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51284   ac_ext=cpp
51285 ac_cpp='$CXXCPP $CPPFLAGS'
51286 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51287 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51288 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51289 
51290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51291 /* end confdefs.h.  */
51292 int i;
51293 _ACEOF
51294 if ac_fn_cxx_try_compile "$LINENO"; then :
51295 
51296 else
51297   supports=no
51298 fi
51299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51300   ac_ext=cpp
51301 ac_cpp='$CXXCPP $CPPFLAGS'
51302 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51303 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51304 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51305 
51306   CXXFLAGS="$saved_cxxflags"
51307 
51308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51309 $as_echo "$supports" >&6; }
51310   if test "x$supports" = "xyes" ; then
51311     :
51312 
51313   else
51314     :
51315     CXXSTD_CXXFLAG=""
51316   fi
51317 
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325 
51326 
51327 
51328 
51329     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51330     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51331 
51332   fi
51333   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51334     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51335     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51336   fi
51337 
51338   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51339   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51340   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51341 
51342   ###############################################################################
51343   #
51344   # Now setup the CFLAGS and LDFLAGS for the JDK build.
51345   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51346   #
51347 
51348   # Setup compiler/platform specific flags into
51349   #    CFLAGS_JDK    - C Compiler flags
51350   #    CXXFLAGS_JDK  - C++ Compiler flags
51351   #    COMMON_CCXXFLAGS_JDK - common to C and C++
51352   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51353     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51354     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51355     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51356     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51357       # Force compatibility with i586 on 32 bit intel platforms.
51358       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51359       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51360     fi
51361     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51362         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51363     case $OPENJDK_TARGET_CPU_ARCH in
51364       arm )
51365         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51366         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51367         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51368         ;;
51369       ppc )
51370         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51371         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51372         ;;
51373       s390 )
51374         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51375         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51376         ;;
51377       * )
51378         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51379         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51380         ;;
51381     esac
51382 
51383 
51384 
51385 
51386 
51387 
51388 
51389 
51390 
51391 
51392 
51393 
51394 
51395 
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403 
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433 
51434 
51435 
51436     # Execute function body
51437 
51438   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51439   REFERENCE_VERSION=6
51440 
51441   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51442     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51443   fi
51444 
51445   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51446     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51447   fi
51448 
51449   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51450   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51451 
51452   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51453     :
51454 
51455   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51456   # runs afoul of the more aggressive versions of these optimisations.
51457   # Notably, value range propagation now assumes that the this pointer of C++
51458   # member functions is non-null.
51459   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51460         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51461         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51462 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51463   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51464   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51465 
51466   else
51467     :
51468 
51469   fi
51470 
51471 
51472 
51473 
51474 
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51485     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51486 
51487     # Restrict the debug information created by Clang to avoid
51488     # too big object files and speed the build up a little bit
51489     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51490     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51491     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51492       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51493         # Force compatibility with i586 on 32 bit intel platforms.
51494         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51495         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51496       fi
51497       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51498       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51499           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51500       case $OPENJDK_TARGET_CPU_ARCH in
51501         ppc )
51502           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51503           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51504           ;;
51505         * )
51506           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51507           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51508           ;;
51509       esac
51510     fi
51511   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51512     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51513     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51514     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51515       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51516     fi
51517 
51518     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51519     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51520   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51521     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51522     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51523     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51524   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51525     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51526         -MD -Zc:wchar_t- -W3 -wd4800 \
51527         -DWIN32_LEAN_AND_MEAN \
51528         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51529         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51530         -DWIN32 -DIAL"
51531     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51532       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51533     else
51534       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51535     fi
51536     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51537     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51538     # studio.
51539     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51540       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51541       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51542       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51543     fi
51544   fi
51545 
51546   ###############################################################################
51547 
51548   # Adjust flags according to debug level.
51549   case $DEBUG_LEVEL in
51550     fastdebug | slowdebug )
51551       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51552       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51553       ;;
51554     release )
51555       ;;
51556     * )
51557       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51558       ;;
51559   esac
51560 
51561   # Set some common defines. These works for all compilers, but assume
51562   # -D is universally accepted.
51563 
51564   # Setup endianness
51565   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51566     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51567     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51568     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51569     #   Note: -Dmacro         is the same as    #define macro 1
51570     #         -Dmacro=        is the same as    #define macro
51571     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51572       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51573     else
51574       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51575     fi
51576   else
51577     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51578     # are defined in the system?
51579     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51580       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51581     else
51582       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51583     fi
51584   fi
51585 
51586   # Always enable optional macros for VM.
51587   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51588   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51589   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51590 
51591   # Setup target OS define. Use OS target name but in upper case.
51592   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51593   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51594 
51595   # Setup target CPU
51596   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51597       $OPENJDK_TARGET_ADD_LP64 \
51598       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51599 
51600   # Setup debug/release defines
51601   if test "x$DEBUG_LEVEL" = xrelease; then
51602     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51603     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51604       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51605     fi
51606   else
51607     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51608   fi
51609 
51610   # Optional POSIX functionality needed by the VM
51611 
51612   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51613     JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51614     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51615       JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51616     fi
51617   fi
51618 
51619 
51620   # Set some additional per-OS defines.
51621   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51622     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51623     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51624         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51625   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51626     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51627     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51628         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51629   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51630     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51631     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51632     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51633     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51634         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51635         -fno-omit-frame-pointer"
51636   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51637     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51638     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51639         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51640         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51641     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51642     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51643     # so for slowdebug we build with '-qpic=large -bbigtoc'.
51644     if test "x$DEBUG_LEVEL" = xslowdebug; then
51645       JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51646     fi
51647   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51648     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51649   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51650     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51651     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51652   fi
51653 
51654   # Set some additional per-CPU defines.
51655   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51656     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51657   elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51658     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51659   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51660     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51661       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51662       # fixes `relocation truncated to fit' error for gcc 4.1.
51663       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51664       # Use ppc64 instructions, but schedule for power5
51665       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51666     elif test "x$OPENJDK_TARGET_OS" = xaix; then
51667       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51668     fi
51669   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51670     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51671       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51672       # Little endian machine uses ELFv2 ABI.
51673       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51674       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51675       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51676     fi
51677   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51678     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51679       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51680     fi
51681   fi
51682 
51683   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51684     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51685   fi
51686 
51687   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51688     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51689       # Solaris does not have _LP64=1 in the old build.
51690       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51691       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51692     fi
51693   fi
51694 
51695   # Set JVM_CFLAGS warning handling
51696   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51697     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51698         -Wunused-value -Woverloaded-virtual"
51699 
51700     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716 
51717 
51718 
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726 
51727 
51728 
51729 
51730 
51731 
51732 
51733 
51734 
51735 
51736 
51737 
51738 
51739 
51740 
51741 
51742 
51743 
51744 
51745 
51746 
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755     # Execute function body
51756 
51757   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51758   REFERENCE_VERSION=4.8
51759 
51760   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51761     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51762   fi
51763 
51764   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51765     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51766   fi
51767 
51768   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51769   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51770 
51771   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51772     :
51773 
51774             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51775             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51776 
51777 
51778   else
51779     :
51780 
51781   fi
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796     fi
51797     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51798       # Non-zero builds have stricter warnings
51799       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51800     else
51801       if test "x$TOOLCHAIN_TYPE" = xclang; then
51802         # Some versions of llvm do not like -Wundef
51803         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51804       fi
51805     fi
51806   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51807     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51808         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51809   fi
51810 
51811   # Additional macosx handling
51812   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51813     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51814     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51815     # JDK can be built and makes the linked binaries compatible even if built on
51816     # a newer version of the OS.
51817     MACOSX_VERSION_MIN=10.7.0
51818 
51819 
51820     # Setting --with-macosx-version-max=<version> makes it an error to build or
51821     # link to macosx APIs that are newer than the given OS version. The expected
51822     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51823 
51824 # Check whether --with-macosx-version-max was given.
51825 if test "${with_macosx_version_max+set}" = set; then :
51826   withval=$with_macosx_version_max;
51827           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51828               MACOSX_VERSION_MAX=$with_macosx_version_max
51829           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51830               MACOSX_VERSION_MAX=$with_macosx_version_max
51831           elif test "x$with_macosx_version_max" = "xno"; then
51832               # Use build system default
51833               MACOSX_VERSION_MAX=
51834           else
51835               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51836           fi
51837 
51838 else
51839   MACOSX_VERSION_MAX=
51840 
51841 fi
51842 
51843 
51844 
51845     # Let the flags variables get resolved in make for easier override on make
51846     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51847     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51848         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51849         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51850     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51851     JVM_CFLAGS="$JVM_CFLAGS \
51852         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51853         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51854 
51855     if test -n "$MACOSX_VERSION_MAX"; then
51856         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51857             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51858         JVM_CFLAGS="$JVM_CFLAGS \
51859             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51860     fi
51861   fi
51862 
51863   # Setup some hard coded includes
51864   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51865       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51866       -I${TOPDIR}/src/java.base/share/native/include \
51867       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51868       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51869       -I${TOPDIR}/src/java.base/share/native/libjava \
51870       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51871 
51872   # The shared libraries are compiled using the picflag.
51873   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51874       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51875   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51876       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51877 
51878   # Executable flags
51879   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51880   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51881 
51882 
51883 
51884 
51885 
51886 
51887   # Setup LDFLAGS et al.
51888   #
51889 
51890   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51891     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51892     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51893     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51894     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51895       LDFLAGS_SAFESH="-safeseh"
51896       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51897       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51898       # NOTE: Old build added -machine. Probably not needed.
51899       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51900     else
51901       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51902     fi
51903   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51904       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51905       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51906         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51907         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51908     fi
51909   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51910     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51911     # We have previously set HAS_GNU_HASH if this is the case
51912     if test -n "$HAS_GNU_HASH"; then
51913       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51914       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51915       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51916     fi
51917       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51918         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51919     fi
51920     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51921       # And since we now know that the linker is gnu, then add -z defs, to forbid
51922       # undefined symbols in object files.
51923       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51924       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51925       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51926       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51927       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51928       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51929         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51930       fi
51931       case $DEBUG_LEVEL in
51932         release )
51933           # tell linker to optimize libraries.
51934           # Should this be supplied to the OSS linker as well?
51935           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51936           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51937           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51938           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51939             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51940           fi
51941           ;;
51942         slowdebug )
51943           # Hotspot always let the linker optimize
51944           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51945           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51946             # do relocations at load
51947             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51948             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51949             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51950           fi
51951           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51952             # mark relocations read only
51953             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51954             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51955             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51956           fi
51957           ;;
51958         fastdebug )
51959           # Hotspot always let the linker optimize
51960           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51961           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51962             # mark relocations read only
51963             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51964             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51965             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51966           fi
51967           ;;
51968         * )
51969           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51970           ;;
51971         esac
51972     fi
51973   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51974     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51975     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51976     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51977     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51978     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51979     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51980       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51981     fi
51982   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51983     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51984     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51985     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51986     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51987     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51988     # so for slowdebug we build with '-qpic=large -bbigtoc'.
51989     if test "x$DEBUG_LEVEL" = xslowdebug; then
51990       JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
51991     fi
51992   fi
51993 
51994   # Customize LDFLAGS for executables
51995 
51996   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51997 
51998   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51999     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52000       LDFLAGS_STACK_SIZE=1048576
52001     else
52002       LDFLAGS_STACK_SIZE=327680
52003     fi
52004     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52005   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52006     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52007   fi
52008 
52009   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52010 
52011   # Customize LDFLAGS for libs
52012   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52013 
52014   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52015   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
52016   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52017     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52018         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
52019     JDKLIB_LIBS=""
52020   else
52021     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52022         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52023 
52024     if test "xTARGET" = "xTARGET"; then
52025       # On some platforms (mac) the linker warns about non existing -L dirs.
52026       # For any of the variants server, client or minimal, the dir matches the
52027       # variant name. The "main" variant should be used for linking. For the
52028       # rest, the dir is just server.
52029       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52030           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52031         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52032             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52033       else
52034         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52035             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52036       fi
52037     elif test "xTARGET" = "xBUILD"; then
52038       # When building a buildjdk, it's always only the server variant
52039       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52040           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52041     fi
52042 
52043     JDKLIB_LIBS="-ljava -ljvm"
52044     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52045       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52046     fi
52047 
52048   fi
52049 
52050 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52051 
52052   # Set JVM_LIBS (per os)
52053   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52054     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52055   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52056     # FIXME: This hard-coded path is not really proper.
52057     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52058       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52059     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52060       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52061     fi
52062     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52063         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52064   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52065     JVM_LIBS="$JVM_LIBS -lm"
52066   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52067     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52068   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52069     JVM_LIBS="$JVM_LIBS -lm"
52070   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52071     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52072         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52073         wsock32.lib winmm.lib version.lib psapi.lib"
52074     fi
52075 
52076   # Set JVM_ASFLAGS
52077   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52078     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52079       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52080     fi
52081   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52082     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52083   fi
52084 
52085   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102   # Special extras...
52103   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52104     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52105       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52106       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52107     fi
52108     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52109     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52110   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52111     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52112     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52113   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52114     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52115 
52116 
52117 
52118 
52119 
52120 
52121 
52122 
52123 
52124 
52125 
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146 
52147 
52148 
52149 
52150 
52151 
52152 
52153 
52154 
52155 
52156 
52157     # Execute function body
52158 
52159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52160 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52161   supports=yes
52162 
52163   saved_cxxflags="$CXXFLAGS"
52164   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52165   ac_ext=cpp
52166 ac_cpp='$CXXCPP $CPPFLAGS'
52167 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52168 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52169 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52170 
52171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52172 /* end confdefs.h.  */
52173 int i;
52174 _ACEOF
52175 if ac_fn_cxx_try_compile "$LINENO"; then :
52176 
52177 else
52178   supports=no
52179 fi
52180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52181   ac_ext=cpp
52182 ac_cpp='$CXXCPP $CPPFLAGS'
52183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52184 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52186 
52187   CXXFLAGS="$saved_cxxflags"
52188 
52189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52190 $as_echo "$supports" >&6; }
52191   if test "x$supports" = "xyes" ; then
52192     :
52193 
52194   else
52195     :
52196     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52197   fi
52198 
52199 
52200 
52201 
52202 
52203 
52204 
52205 
52206 
52207 
52208 
52209 
52210     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52211     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52212 
52213   fi
52214   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52215     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52216     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52217   fi
52218 
52219   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52220   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52221   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52222 
52223   ###############################################################################
52224   #
52225   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52226   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52227   #
52228 
52229   # Setup compiler/platform specific flags into
52230   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52231   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52232   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52233   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52234     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52235     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52236     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52237     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52238       # Force compatibility with i586 on 32 bit intel platforms.
52239       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52240       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52241     fi
52242     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52243         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52244     case $OPENJDK_BUILD_CPU_ARCH in
52245       arm )
52246         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52247         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52248         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52249         ;;
52250       ppc )
52251         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52252         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52253         ;;
52254       s390 )
52255         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52256         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52257         ;;
52258       * )
52259         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52260         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52261         ;;
52262     esac
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280 
52281 
52282 
52283 
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296 
52297 
52298 
52299 
52300 
52301 
52302 
52303 
52304 
52305 
52306 
52307 
52308 
52309 
52310 
52311 
52312 
52313 
52314 
52315 
52316 
52317     # Execute function body
52318 
52319   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52320   REFERENCE_VERSION=6
52321 
52322   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52323     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52324   fi
52325 
52326   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52327     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52328   fi
52329 
52330   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52331   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52332 
52333   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52334     :
52335 
52336   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52337   # runs afoul of the more aggressive versions of these optimisations.
52338   # Notably, value range propagation now assumes that the this pointer of C++
52339   # member functions is non-null.
52340   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52341         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52342         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52343 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52344   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52345   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52346 
52347   else
52348     :
52349 
52350   fi
52351 
52352 
52353 
52354 
52355 
52356 
52357 
52358 
52359 
52360 
52361 
52362 
52363 
52364 
52365   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52366     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52367 
52368     # Restrict the debug information created by Clang to avoid
52369     # too big object files and speed the build up a little bit
52370     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52371     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52372     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52373       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52374         # Force compatibility with i586 on 32 bit intel platforms.
52375         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52376         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52377       fi
52378       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52379       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52380           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52381       case $OPENJDK_BUILD_CPU_ARCH in
52382         ppc )
52383           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52384           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52385           ;;
52386         * )
52387           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52388           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52389           ;;
52390       esac
52391     fi
52392   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52393     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52394     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52395     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52396       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52397     fi
52398 
52399     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52400     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52401   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52402     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52403     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52404     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52405   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52406     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52407         -MD -Zc:wchar_t- -W3 -wd4800 \
52408         -DWIN32_LEAN_AND_MEAN \
52409         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52410         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52411         -DWIN32 -DIAL"
52412     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52413       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52414     else
52415       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52416     fi
52417     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52418     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52419     # studio.
52420     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52421       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52422       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52423       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52424     fi
52425   fi
52426 
52427   ###############################################################################
52428 
52429   # Adjust flags according to debug level.
52430   case $DEBUG_LEVEL in
52431     fastdebug | slowdebug )
52432       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52433       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52434       ;;
52435     release )
52436       ;;
52437     * )
52438       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52439       ;;
52440   esac
52441 
52442   # Set some common defines. These works for all compilers, but assume
52443   # -D is universally accepted.
52444 
52445   # Setup endianness
52446   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52447     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52448     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52449     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52450     #   Note: -Dmacro         is the same as    #define macro 1
52451     #         -Dmacro=        is the same as    #define macro
52452     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52453       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52454     else
52455       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52456     fi
52457   else
52458     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52459     # are defined in the system?
52460     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52461       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52462     else
52463       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52464     fi
52465   fi
52466 
52467   # Always enable optional macros for VM.
52468   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52469   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52470   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52471 
52472   # Setup target OS define. Use OS target name but in upper case.
52473   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52474   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52475 
52476   # Setup target CPU
52477   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52478       $OPENJDK_BUILD_ADD_LP64 \
52479       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52480 
52481   # Setup debug/release defines
52482   if test "x$DEBUG_LEVEL" = xrelease; then
52483     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52484     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52485       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52486     fi
52487   else
52488     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52489   fi
52490 
52491   # Optional POSIX functionality needed by the VM
52492 
52493   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52494     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52495     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52496       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52497     fi
52498   fi
52499 
52500 
52501   # Set some additional per-OS defines.
52502   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52503     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52504     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52505         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52506   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52507     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52508     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52509         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52510   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52511     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52512     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52513     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52514     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52515         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52516         -fno-omit-frame-pointer"
52517   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52518     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52519     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52520         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52521         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52522     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52523     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52524     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52525     if test "x$DEBUG_LEVEL" = xslowdebug; then
52526       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52527     fi
52528   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52529     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52530   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52531     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52532     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52533   fi
52534 
52535   # Set some additional per-CPU defines.
52536   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52537     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52538   elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52539     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52540   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52541     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52542       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52543       # fixes `relocation truncated to fit' error for gcc 4.1.
52544       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52545       # Use ppc64 instructions, but schedule for power5
52546       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52547     elif test "x$OPENJDK_BUILD_OS" = xaix; then
52548       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52549     fi
52550   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52551     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52552       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52553       # Little endian machine uses ELFv2 ABI.
52554       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52555       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52556       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52557     fi
52558   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52559     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52560       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52561     fi
52562   fi
52563 
52564   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52565     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52566   fi
52567 
52568   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52569     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52570       # Solaris does not have _LP64=1 in the old build.
52571       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52572       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52573     fi
52574   fi
52575 
52576   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52577   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52578     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52579         -Wunused-value -Woverloaded-virtual"
52580 
52581     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52582 
52583 
52584 
52585 
52586 
52587 
52588 
52589 
52590 
52591 
52592 
52593 
52594 
52595 
52596 
52597 
52598 
52599 
52600 
52601 
52602 
52603 
52604 
52605 
52606 
52607 
52608 
52609 
52610 
52611 
52612 
52613 
52614 
52615 
52616 
52617 
52618 
52619 
52620 
52621 
52622 
52623 
52624 
52625 
52626 
52627 
52628 
52629 
52630 
52631 
52632 
52633 
52634 
52635 
52636     # Execute function body
52637 
52638   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52639   REFERENCE_VERSION=4.8
52640 
52641   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52642     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52643   fi
52644 
52645   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52646     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52647   fi
52648 
52649   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52650   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52651 
52652   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52653     :
52654 
52655             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52656             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52657 
52658 
52659   else
52660     :
52661 
52662   fi
52663 
52664 
52665 
52666 
52667 
52668 
52669 
52670 
52671 
52672 
52673 
52674 
52675 
52676 
52677     fi
52678     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52679       # Non-zero builds have stricter warnings
52680       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52681     else
52682       if test "x$TOOLCHAIN_TYPE" = xclang; then
52683         # Some versions of llvm do not like -Wundef
52684         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52685       fi
52686     fi
52687   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52688     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52689         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52690   fi
52691 
52692   # Additional macosx handling
52693   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52694     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52695     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52696     # JDK can be built and makes the linked binaries compatible even if built on
52697     # a newer version of the OS.
52698     MACOSX_VERSION_MIN=10.7.0
52699 
52700 
52701     # Setting --with-macosx-version-max=<version> makes it an error to build or
52702     # link to macosx APIs that are newer than the given OS version. The expected
52703     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52704 
52705 # Check whether --with-macosx-version-max was given.
52706 if test "${with_macosx_version_max+set}" = set; then :
52707   withval=$with_macosx_version_max;
52708           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52709               MACOSX_VERSION_MAX=$with_macosx_version_max
52710           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52711               MACOSX_VERSION_MAX=$with_macosx_version_max
52712           elif test "x$with_macosx_version_max" = "xno"; then
52713               # Use build system default
52714               MACOSX_VERSION_MAX=
52715           else
52716               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52717           fi
52718 
52719 else
52720   MACOSX_VERSION_MAX=
52721 
52722 fi
52723 
52724 
52725 
52726     # Let the flags variables get resolved in make for easier override on make
52727     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52728     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52729         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52730         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52731     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52732     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52733         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52734         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52735 
52736     if test -n "$MACOSX_VERSION_MAX"; then
52737         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52738             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52739         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52740             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52741     fi
52742   fi
52743 
52744   # Setup some hard coded includes
52745   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52746       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52747       -I${TOPDIR}/src/java.base/share/native/include \
52748       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52749       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52750       -I${TOPDIR}/src/java.base/share/native/libjava \
52751       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52752 
52753   # The shared libraries are compiled using the picflag.
52754   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52755       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52756   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52757       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52758 
52759   # Executable flags
52760   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52761   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52762 
52763 
52764 
52765 
52766 
52767 
52768   # Setup LDFLAGS et al.
52769   #
52770 
52771   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52772     LDFLAGS_MICROSOFT="-nologo -opt:ref"
52773     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52774     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52775     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52776       LDFLAGS_SAFESH="-safeseh"
52777       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52778       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52779       # NOTE: Old build added -machine. Probably not needed.
52780       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52781     else
52782       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52783     fi
52784   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52785       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52786       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52787         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52788         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52789     fi
52790   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52791     # If this is a --hash-style=gnu system, use --hash-style=both, why?
52792     # We have previously set HAS_GNU_HASH if this is the case
52793     if test -n "$HAS_GNU_HASH"; then
52794       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52795       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52796       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52797     fi
52798       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52799         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52800     fi
52801     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52802       # And since we now know that the linker is gnu, then add -z defs, to forbid
52803       # undefined symbols in object files.
52804       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52805       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52806       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52807       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52808       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52809       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52810         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52811       fi
52812       case $DEBUG_LEVEL in
52813         release )
52814           # tell linker to optimize libraries.
52815           # Should this be supplied to the OSS linker as well?
52816           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52817           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52818           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52819           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52820             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52821           fi
52822           ;;
52823         slowdebug )
52824           # Hotspot always let the linker optimize
52825           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52826           if test "x$HAS_LINKER_NOW" = "xtrue"; then
52827             # do relocations at load
52828             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52829             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52830             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52831           fi
52832           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52833             # mark relocations read only
52834             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52835             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52836             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52837           fi
52838           ;;
52839         fastdebug )
52840           # Hotspot always let the linker optimize
52841           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52842           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52843             # mark relocations read only
52844             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52845             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52846             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52847           fi
52848           ;;
52849         * )
52850           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52851           ;;
52852         esac
52853     fi
52854   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52855     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52856     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52857     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52858     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52859     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52860     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52861       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52862     fi
52863   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52864     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52865     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52866     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52867     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52868     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52869     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52870     if test "x$DEBUG_LEVEL" = xslowdebug; then
52871       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52872     fi
52873   fi
52874 
52875   # Customize LDFLAGS for executables
52876 
52877   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52878 
52879   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52880     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52881       LDFLAGS_STACK_SIZE=1048576
52882     else
52883       LDFLAGS_STACK_SIZE=327680
52884     fi
52885     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52886   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52887     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52888   fi
52889 
52890   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52891 
52892   # Customize LDFLAGS for libs
52893   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52894 
52895   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52896   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
52897   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52898     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52899         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
52900     OPENJDK_BUILD_JDKLIB_LIBS=""
52901   else
52902     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52903         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52904 
52905     if test "xBUILD" = "xTARGET"; then
52906       # On some platforms (mac) the linker warns about non existing -L dirs.
52907       # For any of the variants server, client or minimal, the dir matches the
52908       # variant name. The "main" variant should be used for linking. For the
52909       # rest, the dir is just server.
52910       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52911           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52912         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52913             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52914       else
52915         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52916             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52917       fi
52918     elif test "xBUILD" = "xBUILD"; then
52919       # When building a buildjdk, it's always only the server variant
52920       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52921           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52922     fi
52923 
52924     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52925     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52926       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52927     fi
52928 
52929   fi
52930 
52931 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52932 
52933   # Set OPENJDK_BUILD_JVM_LIBS (per os)
52934   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52935     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52936   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52937     # FIXME: This hard-coded path is not really proper.
52938     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52939       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52940     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52941       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52942     fi
52943     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52944         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52945   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52946     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52947   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52948     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52949   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52950     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52951   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52952     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52953         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52954         wsock32.lib winmm.lib version.lib psapi.lib"
52955     fi
52956 
52957   # Set OPENJDK_BUILD_JVM_ASFLAGS
52958   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52959     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52960       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52961     fi
52962   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52963     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52964   fi
52965 
52966   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52967 
52968 
52969 
52970 
52971 
52972 
52973 
52974 
52975 
52976 
52977 
52978 
52979 
52980 
52981 
52982 
52983   # Tests are only ever compiled for TARGET
52984   # Flags for compiling test libraries
52985   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52986   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52987 
52988   # Flags for compiling test executables
52989   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52990   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52991 
52992 
52993 
52994 
52995 
52996 
52997   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52998   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52999 
53000 
53001 
53002 
53003 
53004 
53005   # Check that the compiler supports -mX (or -qX on AIX) flags
53006   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53007 
53008 
53009 
53010 
53011 
53012 
53013 
53014 
53015 
53016 
53017 
53018 
53019 
53020 
53021 
53022 
53023 
53024 
53025 
53026 
53027 
53028 
53029 
53030 
53031 
53032 
53033 
53034 
53035 
53036 
53037 
53038 
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048 
53049 
53050 
53051 
53052 
53053 
53054     # Execute function body
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 
53087 
53088 
53089 
53090 
53091 
53092 
53093 
53094 
53095 
53096 
53097 
53098 
53099 
53100 
53101 
53102 
53103     # Execute function body
53104 
53105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53106 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53107   supports=yes
53108 
53109   saved_cflags="$CFLAGS"
53110   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53111   ac_ext=c
53112 ac_cpp='$CPP $CPPFLAGS'
53113 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53114 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53115 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53116 
53117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53118 /* end confdefs.h.  */
53119 int i;
53120 _ACEOF
53121 if ac_fn_c_try_compile "$LINENO"; then :
53122 
53123 else
53124   supports=no
53125 fi
53126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53127   ac_ext=cpp
53128 ac_cpp='$CXXCPP $CPPFLAGS'
53129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53132 
53133   CFLAGS="$saved_cflags"
53134 
53135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53136 $as_echo "$supports" >&6; }
53137   if test "x$supports" = "xyes" ; then
53138     :
53139     C_COMP_SUPPORTS="yes"
53140   else
53141     :
53142     C_COMP_SUPPORTS="no"
53143   fi
53144 
53145 
53146 
53147 
53148 
53149 
53150 
53151 
53152 
53153 
53154 
53155 
53156 
53157 
53158 
53159 
53160 
53161 
53162 
53163 
53164 
53165 
53166 
53167 
53168 
53169 
53170 
53171 
53172 
53173 
53174 
53175 
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     # Execute function body
53204 
53205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53206 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53207   supports=yes
53208 
53209   saved_cxxflags="$CXXFLAGS"
53210   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53211   ac_ext=cpp
53212 ac_cpp='$CXXCPP $CPPFLAGS'
53213 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53214 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53215 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53216 
53217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53218 /* end confdefs.h.  */
53219 int i;
53220 _ACEOF
53221 if ac_fn_cxx_try_compile "$LINENO"; then :
53222 
53223 else
53224   supports=no
53225 fi
53226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53227   ac_ext=cpp
53228 ac_cpp='$CXXCPP $CPPFLAGS'
53229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53232 
53233   CXXFLAGS="$saved_cxxflags"
53234 
53235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53236 $as_echo "$supports" >&6; }
53237   if test "x$supports" = "xyes" ; then
53238     :
53239     CXX_COMP_SUPPORTS="yes"
53240   else
53241     :
53242     CXX_COMP_SUPPORTS="no"
53243   fi
53244 
53245 
53246 
53247 
53248 
53249 
53250 
53251 
53252 
53253 
53254 
53255 
53256 
53257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53258 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53259   supports=no
53260   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53261 
53262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53263 $as_echo "$supports" >&6; }
53264   if test "x$supports" = "xyes" ; then
53265     :
53266     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53267   else
53268     :
53269     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53270   fi
53271 
53272 
53273 
53274 
53275 
53276 
53277 
53278 
53279   # Check whether --enable-warnings-as-errors was given.
53280 if test "${enable_warnings_as_errors+set}" = set; then :
53281   enableval=$enable_warnings_as_errors;
53282 fi
53283 
53284 
53285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53286 $as_echo_n "checking if native warnings are errors... " >&6; }
53287   if test "x$enable_warnings_as_errors" = "xyes"; then
53288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53289 $as_echo "yes (explicitly set)" >&6; }
53290     WARNINGS_AS_ERRORS=true
53291   elif test "x$enable_warnings_as_errors" = "xno"; then
53292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53293 $as_echo "no" >&6; }
53294     WARNINGS_AS_ERRORS=false
53295   elif test "x$enable_warnings_as_errors" = "x"; then
53296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53297 $as_echo "yes (default)" >&6; }
53298     WARNINGS_AS_ERRORS=true
53299   else
53300     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53301   fi
53302 
53303 
53304 
53305   case "${TOOLCHAIN_TYPE}" in
53306     microsoft)
53307       DISABLE_WARNING_PREFIX="-wd"
53308       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53309       ;;
53310     solstudio)
53311       DISABLE_WARNING_PREFIX="-erroff="
53312       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53313       ;;
53314     gcc)
53315       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53316 
53317 
53318 
53319 
53320 
53321 
53322 
53323 
53324 
53325 
53326 
53327 
53328 
53329 
53330 
53331 
53332 
53333 
53334 
53335 
53336 
53337 
53338 
53339 
53340 
53341 
53342 
53343 
53344 
53345 
53346 
53347 
53348 
53349 
53350 
53351 
53352 
53353 
53354 
53355 
53356 
53357 
53358 
53359 
53360 
53361 
53362 
53363     # Execute function body
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 
53396 
53397 
53398 
53399 
53400 
53401 
53402 
53403 
53404 
53405 
53406 
53407 
53408 
53409 
53410 
53411 
53412     # Execute function body
53413 
53414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53415 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53416   supports=yes
53417 
53418   saved_cflags="$CFLAGS"
53419   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53420   ac_ext=c
53421 ac_cpp='$CPP $CPPFLAGS'
53422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53425 
53426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53427 /* end confdefs.h.  */
53428 int i;
53429 _ACEOF
53430 if ac_fn_c_try_compile "$LINENO"; then :
53431 
53432 else
53433   supports=no
53434 fi
53435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53436   ac_ext=cpp
53437 ac_cpp='$CXXCPP $CPPFLAGS'
53438 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53439 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53440 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53441 
53442   CFLAGS="$saved_cflags"
53443 
53444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53445 $as_echo "$supports" >&6; }
53446   if test "x$supports" = "xyes" ; then
53447     :
53448     C_COMP_SUPPORTS="yes"
53449   else
53450     :
53451     C_COMP_SUPPORTS="no"
53452   fi
53453 
53454 
53455 
53456 
53457 
53458 
53459 
53460 
53461 
53462 
53463 
53464 
53465 
53466 
53467 
53468 
53469 
53470 
53471 
53472 
53473 
53474 
53475 
53476 
53477 
53478 
53479 
53480 
53481 
53482 
53483 
53484 
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     # Execute function body
53513 
53514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53515 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53516   supports=yes
53517 
53518   saved_cxxflags="$CXXFLAGS"
53519   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53520   ac_ext=cpp
53521 ac_cpp='$CXXCPP $CPPFLAGS'
53522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53525 
53526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53527 /* end confdefs.h.  */
53528 int i;
53529 _ACEOF
53530 if ac_fn_cxx_try_compile "$LINENO"; then :
53531 
53532 else
53533   supports=no
53534 fi
53535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53536   ac_ext=cpp
53537 ac_cpp='$CXXCPP $CPPFLAGS'
53538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53541 
53542   CXXFLAGS="$saved_cxxflags"
53543 
53544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53545 $as_echo "$supports" >&6; }
53546   if test "x$supports" = "xyes" ; then
53547     :
53548     CXX_COMP_SUPPORTS="yes"
53549   else
53550     :
53551     CXX_COMP_SUPPORTS="no"
53552   fi
53553 
53554 
53555 
53556 
53557 
53558 
53559 
53560 
53561 
53562 
53563 
53564 
53565 
53566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53567 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53568   supports=no
53569   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53570 
53571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53572 $as_echo "$supports" >&6; }
53573   if test "x$supports" = "xyes" ; then
53574     :
53575     GCC_CAN_DISABLE_WARNINGS=true
53576   else
53577     :
53578     GCC_CAN_DISABLE_WARNINGS=false
53579 
53580   fi
53581 
53582 
53583 
53584 
53585 
53586 
53587       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53588         DISABLE_WARNING_PREFIX="-Wno-"
53589       else
53590         DISABLE_WARNING_PREFIX=
53591       fi
53592       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53593       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53594       # CFLAGS since any target specific flags will likely not work with the
53595       # build compiler
53596       CC_OLD="$CC"
53597       CXX_OLD="$CXX"
53598       CC="$BUILD_CC"
53599       CXX="$BUILD_CXX"
53600       CFLAGS_OLD="$CFLAGS"
53601       CFLAGS=""
53602 
53603 
53604 
53605 
53606 
53607 
53608 
53609 
53610 
53611 
53612 
53613 
53614 
53615 
53616 
53617 
53618 
53619 
53620 
53621 
53622 
53623 
53624 
53625 
53626 
53627 
53628 
53629 
53630 
53631 
53632 
53633 
53634 
53635 
53636 
53637 
53638 
53639 
53640 
53641 
53642 
53643 
53644 
53645 
53646 
53647 
53648 
53649     # Execute function body
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 
53682 
53683 
53684 
53685 
53686 
53687 
53688 
53689 
53690 
53691 
53692 
53693 
53694 
53695 
53696 
53697 
53698     # Execute function body
53699 
53700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53701 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53702   supports=yes
53703 
53704   saved_cflags="$CFLAGS"
53705   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53706   ac_ext=c
53707 ac_cpp='$CPP $CPPFLAGS'
53708 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53709 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53710 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53711 
53712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53713 /* end confdefs.h.  */
53714 int i;
53715 _ACEOF
53716 if ac_fn_c_try_compile "$LINENO"; then :
53717 
53718 else
53719   supports=no
53720 fi
53721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53722   ac_ext=cpp
53723 ac_cpp='$CXXCPP $CPPFLAGS'
53724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53727 
53728   CFLAGS="$saved_cflags"
53729 
53730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53731 $as_echo "$supports" >&6; }
53732   if test "x$supports" = "xyes" ; then
53733     :
53734     C_COMP_SUPPORTS="yes"
53735   else
53736     :
53737     C_COMP_SUPPORTS="no"
53738   fi
53739 
53740 
53741 
53742 
53743 
53744 
53745 
53746 
53747 
53748 
53749 
53750 
53751 
53752 
53753 
53754 
53755 
53756 
53757 
53758 
53759 
53760 
53761 
53762 
53763 
53764 
53765 
53766 
53767 
53768 
53769 
53770 
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     # Execute function body
53799 
53800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53801 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53802   supports=yes
53803 
53804   saved_cxxflags="$CXXFLAGS"
53805   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53806   ac_ext=cpp
53807 ac_cpp='$CXXCPP $CPPFLAGS'
53808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53811 
53812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53813 /* end confdefs.h.  */
53814 int i;
53815 _ACEOF
53816 if ac_fn_cxx_try_compile "$LINENO"; then :
53817 
53818 else
53819   supports=no
53820 fi
53821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53822   ac_ext=cpp
53823 ac_cpp='$CXXCPP $CPPFLAGS'
53824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53827 
53828   CXXFLAGS="$saved_cxxflags"
53829 
53830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53831 $as_echo "$supports" >&6; }
53832   if test "x$supports" = "xyes" ; then
53833     :
53834     CXX_COMP_SUPPORTS="yes"
53835   else
53836     :
53837     CXX_COMP_SUPPORTS="no"
53838   fi
53839 
53840 
53841 
53842 
53843 
53844 
53845 
53846 
53847 
53848 
53849 
53850 
53851 
53852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53853 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53854   supports=no
53855   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53856 
53857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53858 $as_echo "$supports" >&6; }
53859   if test "x$supports" = "xyes" ; then
53860     :
53861     BUILD_CC_CAN_DISABLE_WARNINGS=true
53862   else
53863     :
53864     BUILD_CC_CAN_DISABLE_WARNINGS=false
53865 
53866   fi
53867 
53868 
53869 
53870 
53871 
53872 
53873       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53874         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53875       else
53876         BUILD_CC_DISABLE_WARNING_PREFIX=
53877       fi
53878       CC="$CC_OLD"
53879       CXX="$CXX_OLD"
53880       CFLAGS="$CFLAGS_OLD"
53881       ;;
53882     clang)
53883       DISABLE_WARNING_PREFIX="-Wno-"
53884       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53885       ;;
53886     xlc)
53887       DISABLE_WARNING_PREFIX="-qsuppress="
53888       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53889       ;;
53890   esac
53891 
53892 
53893 
53894 
53895 
53896 # Setup debug symbols (need objcopy from the toolchain for that)
53897 
53898   #
53899   # NATIVE_DEBUG_SYMBOLS
53900   # This must be done after the toolchain is setup, since we're looking at objcopy.
53901   #
53902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53903 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
53904 
53905 # Check whether --with-native-debug-symbols was given.
53906 if test "${with_native_debug_symbols+set}" = set; then :
53907   withval=$with_native_debug_symbols;
53908         if test "x$OPENJDK_TARGET_OS" = xaix; then
53909           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53910             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53911           fi
53912         fi
53913 
53914 else
53915 
53916         if test "x$OPENJDK_TARGET_OS" = xaix; then
53917           # AIX doesn't support 'zipped' so use 'internal' as default
53918           with_native_debug_symbols="internal"
53919         else
53920           if test "x$STATIC_BUILD" = xtrue; then
53921             with_native_debug_symbols="none"
53922           else
53923             with_native_debug_symbols="zipped"
53924           fi
53925         fi
53926 
53927 fi
53928 
53929   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53931 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53932 
53933   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53934 
53935     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53936       if test "x$OBJCOPY" = x; then
53937         # enabling of enable-debug-symbols and can't find objcopy
53938         # this is an error
53939         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53940       fi
53941     fi
53942 
53943     COMPILE_WITH_DEBUG_SYMBOLS=true
53944     COPY_DEBUG_SYMBOLS=true
53945     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53946   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53947     COMPILE_WITH_DEBUG_SYMBOLS=false
53948     COPY_DEBUG_SYMBOLS=false
53949     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53950   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53951     COMPILE_WITH_DEBUG_SYMBOLS=true
53952     COPY_DEBUG_SYMBOLS=false
53953     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53954   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53955 
53956     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53957       if test "x$OBJCOPY" = x; then
53958         # enabling of enable-debug-symbols and can't find objcopy
53959         # this is an error
53960         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53961       fi
53962     fi
53963 
53964     COMPILE_WITH_DEBUG_SYMBOLS=true
53965     COPY_DEBUG_SYMBOLS=true
53966     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53967   else
53968     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53969   fi
53970 
53971   # --enable-debug-symbols is deprecated.
53972   # Please use --with-native-debug-symbols=[internal,external,zipped] .
53973 
53974   # Check whether --enable-debug-symbols was given.
53975 if test "${enable_debug_symbols+set}" = set; then :
53976   enableval=$enable_debug_symbols;
53977 fi
53978 
53979   if test "x$enable_debug_symbols" != x; then
53980     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53981 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53982 
53983     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53984       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53985 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53986     fi
53987 
53988   fi
53989 
53990 
53991   # --enable-zip-debug-info is deprecated.
53992   # Please use --with-native-debug-symbols=zipped .
53993 
53994   # Check whether --enable-zip-debug-info was given.
53995 if test "${enable_zip_debug_info+set}" = set; then :
53996   enableval=$enable_zip_debug_info;
53997 fi
53998 
53999   if test "x$enable_zip_debug_info" != x; then
54000     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54001 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54002 
54003     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54004       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54005 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54006     fi
54007 
54008   fi
54009 
54010 
54011 
54012 
54013 
54014 
54015 
54016   # Check whether --enable-native-coverage was given.
54017 if test "${enable_native_coverage+set}" = set; then :
54018   enableval=$enable_native_coverage;
54019 fi
54020 
54021   GCOV_ENABLED="false"
54022   if test "x$enable_native_coverage" = "xyes"; then
54023     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54024       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54025 $as_echo_n "checking if native coverage is enabled... " >&6; }
54026       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54027 $as_echo "yes" >&6; }
54028       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54029       GCOV_LDFLAGS="-fprofile-arcs"
54030       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54031       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54032       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54033       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54034       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54035       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54036       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54037       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54038       GCOV_ENABLED="true"
54039     else
54040       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54041     fi
54042   elif test "x$enable_native_coverage" = "xno"; then
54043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54044 $as_echo_n "checking if native coverage is enabled... " >&6; }
54045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54046 $as_echo "no" >&6; }
54047   elif test "x$enable_native_coverage" != "x"; then
54048     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54049   fi
54050 
54051 
54052 
54053 
54054 # Need toolchain to setup dtrace
54055 
54056   # Test for dtrace dependencies
54057   # Check whether --enable-dtrace was given.
54058 if test "${enable_dtrace+set}" = set; then :
54059   enableval=$enable_dtrace;
54060 fi
54061 
54062 
54063   DTRACE_DEP_MISSING=false
54064 
54065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54066 $as_echo_n "checking for dtrace tool... " >&6; }
54067   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54069 $as_echo "$DTRACE" >&6; }
54070   else
54071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54072 $as_echo "not found, cannot build dtrace" >&6; }
54073     DTRACE_DEP_MISSING=true
54074   fi
54075 
54076   for ac_header in sys/sdt.h
54077 do :
54078   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54079 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54080   cat >>confdefs.h <<_ACEOF
54081 #define HAVE_SYS_SDT_H 1
54082 _ACEOF
54083  DTRACE_HEADERS_OK=yes
54084 else
54085   DTRACE_HEADERS_OK=no
54086 fi
54087 
54088 done
54089 
54090   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54091     DTRACE_DEP_MISSING=true
54092   fi
54093 
54094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54095 $as_echo_n "checking if dtrace should be built... " >&6; }
54096   if test "x$enable_dtrace" = "xyes"; then
54097     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54098       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54099 $as_echo "no, missing dependencies" >&6; }
54100 
54101   # Print a helpful message on how to acquire the necessary build dependency.
54102   # dtrace is the help tag: freetype, cups, alsa etc
54103   MISSING_DEPENDENCY=dtrace
54104 
54105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54106     cygwin_help $MISSING_DEPENDENCY
54107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54108     msys_help $MISSING_DEPENDENCY
54109   else
54110     PKGHANDLER_COMMAND=
54111 
54112     case $PKGHANDLER in
54113       apt-get)
54114         apt_help     $MISSING_DEPENDENCY ;;
54115       yum)
54116         yum_help     $MISSING_DEPENDENCY ;;
54117       brew)
54118         brew_help    $MISSING_DEPENDENCY ;;
54119       port)
54120         port_help    $MISSING_DEPENDENCY ;;
54121       pkgutil)
54122         pkgutil_help $MISSING_DEPENDENCY ;;
54123       pkgadd)
54124         pkgadd_help  $MISSING_DEPENDENCY ;;
54125     esac
54126 
54127     if test "x$PKGHANDLER_COMMAND" != x; then
54128       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54129     fi
54130   fi
54131 
54132       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54133     else
54134       INCLUDE_DTRACE=true
54135       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54136 $as_echo "yes, forced" >&6; }
54137     fi
54138   elif test "x$enable_dtrace" = "xno"; then
54139     INCLUDE_DTRACE=false
54140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54141 $as_echo "no, forced" >&6; }
54142   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54143     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54144       INCLUDE_DTRACE=false
54145       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54146 $as_echo "no, missing dependencies" >&6; }
54147     else
54148       INCLUDE_DTRACE=true
54149       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54150 $as_echo "yes, dependencies present" >&6; }
54151     fi
54152   else
54153     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54154   fi
54155 
54156 
54157   # Check whether --enable-aot was given.
54158 if test "${enable_aot+set}" = set; then :
54159   enableval=$enable_aot;
54160 fi
54161 
54162 
54163   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54164     ENABLE_AOT="true"
54165   elif test "x$enable_aot" = "xyes"; then
54166     ENABLE_AOT="true"
54167   elif test "x$enable_aot" = "xno"; then
54168     ENABLE_AOT="false"
54169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54170 $as_echo_n "checking if aot should be enabled... " >&6; }
54171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54172 $as_echo "no, forced" >&6; }
54173   else
54174     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54175   fi
54176 
54177   if test "x$ENABLE_AOT" = "xtrue"; then
54178     # Only enable AOT on X64 platforms.
54179     if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54180       if test -e "${TOPDIR}/src/jdk.aot"; then
54181         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
54182           ENABLE_AOT="true"
54183         else
54184           ENABLE_AOT="false"
54185           if test "x$enable_aot" = "xyes"; then
54186             as_fn_error $? "Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54187           fi
54188         fi
54189       else
54190         ENABLE_AOT="false"
54191         if test "x$enable_aot" = "xyes"; then
54192           as_fn_error $? "Cannot build AOT without src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54193         fi
54194       fi
54195     else
54196       ENABLE_AOT="false"
54197       if test "x$enable_aot" = "xyes"; then
54198         as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54199       fi
54200     fi
54201   fi
54202 
54203 
54204 
54205 
54206   # Check whether --enable-cds was given.
54207 if test "${enable_cds+set}" = set; then :
54208   enableval=$enable_cds;
54209 fi
54210 
54211 
54212   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
54213     ENABLE_CDS="true"
54214   elif test "x$enable_cds" = "xno"; then
54215     ENABLE_CDS="false"
54216   else
54217     as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
54218   fi
54219 
54220 
54221 
54222 
54223   # Check whether --enable-hotspot-gtest was given.
54224 if test "${enable_hotspot_gtest+set}" = set; then :
54225   enableval=$enable_hotspot_gtest;
54226 fi
54227 
54228 
54229   if test -e "${TOPDIR}/test/hotspot/gtest"; then
54230     GTEST_DIR_EXISTS="true"
54231   else
54232     GTEST_DIR_EXISTS="false"
54233   fi
54234 
54235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54236 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54237   if test "x$enable_hotspot_gtest" = "xyes"; then
54238     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54239       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54240 $as_echo "yes, forced" >&6; }
54241       BUILD_GTEST="true"
54242     else
54243       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54244     fi
54245   elif test "x$enable_hotspot_gtest" = "xno"; then
54246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54247 $as_echo "no, forced" >&6; }
54248     BUILD_GTEST="false"
54249   elif test "x$enable_hotspot_gtest" = "x"; then
54250     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54251       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54252 $as_echo "yes" >&6; }
54253       BUILD_GTEST="true"
54254     else
54255       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54256 $as_echo "no" >&6; }
54257       BUILD_GTEST="false"
54258     fi
54259   else
54260     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54261   fi
54262 
54263 
54264 
54265 
54266 ###############################################################################
54267 #
54268 # Check dependencies for external and internal libraries.
54269 #
54270 ###############################################################################
54271 
54272 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54273 
54274   # When using cygwin or msys, we need a wrapper binary that renames
54275   # /cygdrive/c/ arguments into c:/ arguments and peeks into
54276   # @files and rewrites these too! This wrapper binary is
54277   # called fixpath.
54278   FIXPATH=
54279   if test "x$OPENJDK_BUILD_OS" = xwindows; then
54280     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54281 $as_echo_n "checking if fixpath can be created... " >&6; }
54282     FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
54283     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54284     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54285     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54286       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54287       FIXPATH="$FIXPATH_BIN -c"
54288     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54289       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54290       # @ was chosen as separator to minimize risk of other tools messing around with it
54291       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54292           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54293       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54294       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54295     fi
54296     FIXPATH_SRC_W="$FIXPATH_SRC"
54297     FIXPATH_BIN_W="$FIXPATH_BIN"
54298 
54299   unix_path="$FIXPATH_SRC_W"
54300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54301     windows_path=`$CYGPATH -m "$unix_path"`
54302     FIXPATH_SRC_W="$windows_path"
54303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54304     windows_path=`cmd //c echo $unix_path`
54305     FIXPATH_SRC_W="$windows_path"
54306   fi
54307 
54308 
54309   unix_path="$FIXPATH_BIN_W"
54310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54311     windows_path=`$CYGPATH -m "$unix_path"`
54312     FIXPATH_BIN_W="$windows_path"
54313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54314     windows_path=`cmd //c echo $unix_path`
54315     FIXPATH_BIN_W="$windows_path"
54316   fi
54317 
54318     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54319     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54320     cd $FIXPATH_DIR
54321     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54322     cd $CURDIR
54323 
54324     if test ! -x $FIXPATH_BIN; then
54325       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54326 $as_echo "no" >&6; }
54327       cat $FIXPATH_DIR/fixpath1.log
54328       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54329     fi
54330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54331 $as_echo "yes" >&6; }
54332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54333 $as_echo_n "checking if fixpath.exe works... " >&6; }
54334     cd $FIXPATH_DIR
54335     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54336         > $FIXPATH_DIR/fixpath2.log 2>&1
54337     cd $CURDIR
54338     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54339       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54340 $as_echo "no" >&6; }
54341       cat $FIXPATH_DIR/fixpath2.log
54342       as_fn_error $? "fixpath did not work!" "$LINENO" 5
54343     fi
54344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54345 $as_echo "yes" >&6; }
54346 
54347     FIXPATH_DETACH_FLAG="--detach"
54348   fi
54349 
54350 
54351 
54352 
54353 
54354 
54355   # Check if X11 is needed
54356   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54357     # No X11 support on windows or macosx
54358     NEEDS_LIB_X11=false
54359   else
54360     # All other instances need X11, even if building headless only, libawt still
54361     # needs X11 headers.
54362     NEEDS_LIB_X11=true
54363   fi
54364 
54365   # Check if cups is needed
54366   if test "x$OPENJDK_TARGET_OS" = xwindows; then
54367     # Windows have a separate print system
54368     NEEDS_LIB_CUPS=false
54369   else
54370     NEEDS_LIB_CUPS=true
54371   fi
54372 
54373   # A custom hook may have set this already
54374   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54375     NEEDS_LIB_FREETYPE=true
54376   fi
54377 
54378   # Check if alsa is needed
54379   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54380     NEEDS_LIB_ALSA=true
54381   else
54382     NEEDS_LIB_ALSA=false
54383   fi
54384 
54385   # Check if ffi is needed
54386   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54387     NEEDS_LIB_FFI=true
54388   else
54389     NEEDS_LIB_FFI=false
54390   fi
54391 
54392 
54393   # statically link libstdc++ before C++ ABI is stablized on Linux unless
54394   # dynamic build is configured on command line.
54395 
54396 # Check whether --with-stdc++lib was given.
54397 if test "${with_stdc__lib+set}" = set; then :
54398   withval=$with_stdc__lib;
54399         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54400                 && test "x$with_stdc__lib" != xdefault; then
54401           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54402         fi
54403 
54404 else
54405   with_stdc__lib=default
54406 
54407 fi
54408 
54409 
54410   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54411     # Test if stdc++ can be linked statically.
54412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54413 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54414     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54415     ac_ext=cpp
54416 ac_cpp='$CXXCPP $CPPFLAGS'
54417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54420 
54421     OLD_LIBS="$LIBS"
54422     LIBS="$STATIC_STDCXX_FLAGS"
54423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54424 /* end confdefs.h.  */
54425 
54426 int
54427 main ()
54428 {
54429 return 0;
54430   ;
54431   return 0;
54432 }
54433 _ACEOF
54434 if ac_fn_cxx_try_link "$LINENO"; then :
54435   has_static_libstdcxx=yes
54436 else
54437   has_static_libstdcxx=no
54438 fi
54439 rm -f core conftest.err conftest.$ac_objext \
54440     conftest$ac_exeext conftest.$ac_ext
54441     LIBS="$OLD_LIBS"
54442     ac_ext=cpp
54443 ac_cpp='$CXXCPP $CPPFLAGS'
54444 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54445 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54446 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54447 
54448     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54449 $as_echo "$has_static_libstdcxx" >&6; }
54450 
54451     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54452       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54453     fi
54454 
54455     # If dynamic was requested, it's available since it would fail above otherwise.
54456     # If dynamic wasn't requested, go with static unless it isn't available.
54457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54458 $as_echo_n "checking how to link with libstdc++... " >&6; }
54459     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54460         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54462 $as_echo "dynamic" >&6; }
54463     else
54464       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54465       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54466       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54467       # just use the same setting as for the TARGET toolchain.
54468       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54469       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54470 $as_echo "static" >&6; }
54471     fi
54472   fi
54473 
54474   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54475   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54476     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54477   fi
54478 
54479 
54480 
54481   # Setup Windows runtime dlls
54482   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54483 
54484 
54485 # Check whether --with-msvcr-dll was given.
54486 if test "${with_msvcr_dll+set}" = set; then :
54487   withval=$with_msvcr_dll;
54488 fi
54489 
54490 
54491   if test "x$with_msvcr_dll" != x; then
54492     # If given explicitly by user, do not probe. If not present, fail directly.
54493 
54494   DLL_NAME="$MSVCR_NAME"
54495   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54496   METHOD="--with-msvcr-dll"
54497   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54498     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54499 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54500 
54501     # Need to check if the found msvcr is correct architecture
54502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54503 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54504     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54505     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54506       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54507       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54508       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54509         CORRECT_MSVCR_ARCH="PE32 executable"
54510       else
54511         CORRECT_MSVCR_ARCH="PE32+ executable"
54512       fi
54513     else
54514       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54515         CORRECT_MSVCR_ARCH=386
54516       else
54517         CORRECT_MSVCR_ARCH=x86-64
54518       fi
54519     fi
54520     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54521       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54522 $as_echo "ok" >&6; }
54523       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54524 
54525   # Only process if variable expands to non-empty
54526 
54527   if test "x$MSVC_DLL" != x; then
54528     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54529 
54530   # Input might be given as Windows format, start by converting to
54531   # unix format.
54532   path="$MSVC_DLL"
54533   new_path=`$CYGPATH -u "$path"`
54534 
54535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54538   # "foo.exe" is OK but "foo" is an error.
54539   #
54540   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54541   # It is also a way to make sure we got the proper file name for the real test later on.
54542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54543   if test "x$test_shortpath" = x; then
54544     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54545 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54546     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54547   fi
54548 
54549   # Call helper function which possibly converts this using DOS-style short mode.
54550   # If so, the updated path is stored in $new_path.
54551 
54552   input_path="$new_path"
54553   # Check if we need to convert this using DOS-style short mode. If the path
54554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54555   # take no chances and rewrite it.
54556   # Note: m4 eats our [], so we need to use [ and ] instead.
54557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54558   if test "x$has_forbidden_chars" != x; then
54559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54563       # Going to short mode and back again did indeed matter. Since short mode is
54564       # case insensitive, let's make it lowercase to improve readability.
54565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54566       # Now convert it back to Unix-style (cygpath)
54567       input_path=`$CYGPATH -u "$shortmode_path"`
54568       new_path="$input_path"
54569     fi
54570   fi
54571 
54572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54573   if test "x$test_cygdrive_prefix" = x; then
54574     # As a simple fix, exclude /usr/bin since it's not a real path.
54575     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54577       # a path prefixed by /cygdrive for fixpath to work.
54578       new_path="$CYGWIN_ROOT_PATH$input_path"
54579     fi
54580   fi
54581 
54582 
54583   if test "x$path" != "x$new_path"; then
54584     MSVC_DLL="$new_path"
54585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54586 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54587   fi
54588 
54589     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590 
54591   path="$MSVC_DLL"
54592   has_colon=`$ECHO $path | $GREP ^.:`
54593   new_path="$path"
54594   if test "x$has_colon" = x; then
54595     # Not in mixed or Windows style, start by that.
54596     new_path=`cmd //c echo $path`
54597   fi
54598 
54599 
54600   input_path="$new_path"
54601   # Check if we need to convert this using DOS-style short mode. If the path
54602   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54603   # take no chances and rewrite it.
54604   # Note: m4 eats our [], so we need to use [ and ] instead.
54605   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54606   if test "x$has_forbidden_chars" != x; then
54607     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54608     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54609   fi
54610 
54611 
54612   windows_path="$new_path"
54613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54614     unix_path=`$CYGPATH -u "$windows_path"`
54615     new_path="$unix_path"
54616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54618     new_path="$unix_path"
54619   fi
54620 
54621   if test "x$path" != "x$new_path"; then
54622     MSVC_DLL="$new_path"
54623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54624 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54625   fi
54626 
54627   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54628   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54629 
54630     else
54631       # We're on a unix platform. Hooray! :)
54632       path="$MSVC_DLL"
54633       has_space=`$ECHO "$path" | $GREP " "`
54634       if test "x$has_space" != x; then
54635         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54636 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54637         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54638       fi
54639 
54640       # Use eval to expand a potential ~
54641       eval path="$path"
54642       if test ! -f "$path" && test ! -d "$path"; then
54643         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54644       fi
54645 
54646       if test -d "$path"; then
54647         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54648       else
54649         dir="`$DIRNAME "$path"`"
54650         base="`$BASENAME "$path"`"
54651         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54652       fi
54653     fi
54654   fi
54655 
54656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54657 $as_echo_n "checking for $DLL_NAME... " >&6; }
54658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54659 $as_echo "$MSVC_DLL" >&6; }
54660     else
54661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54662 $as_echo "incorrect, ignoring" >&6; }
54663       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54664 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54665     fi
54666   fi
54667 
54668     if test "x$MSVC_DLL" = x; then
54669       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54670     fi
54671     MSVCR_DLL="$MSVC_DLL"
54672   elif test "x$DEVKIT_MSVCR_DLL" != x; then
54673 
54674   DLL_NAME="$MSVCR_NAME"
54675   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54676   METHOD="devkit"
54677   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54678     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54679 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54680 
54681     # Need to check if the found msvcr is correct architecture
54682     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54683 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54684     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54685     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54686       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54687       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54688       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54689         CORRECT_MSVCR_ARCH="PE32 executable"
54690       else
54691         CORRECT_MSVCR_ARCH="PE32+ executable"
54692       fi
54693     else
54694       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54695         CORRECT_MSVCR_ARCH=386
54696       else
54697         CORRECT_MSVCR_ARCH=x86-64
54698       fi
54699     fi
54700     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54701       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54702 $as_echo "ok" >&6; }
54703       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54704 
54705   # Only process if variable expands to non-empty
54706 
54707   if test "x$MSVC_DLL" != x; then
54708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54709 
54710   # Input might be given as Windows format, start by converting to
54711   # unix format.
54712   path="$MSVC_DLL"
54713   new_path=`$CYGPATH -u "$path"`
54714 
54715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54718   # "foo.exe" is OK but "foo" is an error.
54719   #
54720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54721   # It is also a way to make sure we got the proper file name for the real test later on.
54722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54723   if test "x$test_shortpath" = x; then
54724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54725 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54726     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54727   fi
54728 
54729   # Call helper function which possibly converts this using DOS-style short mode.
54730   # If so, the updated path is stored in $new_path.
54731 
54732   input_path="$new_path"
54733   # Check if we need to convert this using DOS-style short mode. If the path
54734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54735   # take no chances and rewrite it.
54736   # Note: m4 eats our [], so we need to use [ and ] instead.
54737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54738   if test "x$has_forbidden_chars" != x; then
54739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54743       # Going to short mode and back again did indeed matter. Since short mode is
54744       # case insensitive, let's make it lowercase to improve readability.
54745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54746       # Now convert it back to Unix-style (cygpath)
54747       input_path=`$CYGPATH -u "$shortmode_path"`
54748       new_path="$input_path"
54749     fi
54750   fi
54751 
54752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54753   if test "x$test_cygdrive_prefix" = x; then
54754     # As a simple fix, exclude /usr/bin since it's not a real path.
54755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54757       # a path prefixed by /cygdrive for fixpath to work.
54758       new_path="$CYGWIN_ROOT_PATH$input_path"
54759     fi
54760   fi
54761 
54762 
54763   if test "x$path" != "x$new_path"; then
54764     MSVC_DLL="$new_path"
54765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54766 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54767   fi
54768 
54769     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54770 
54771   path="$MSVC_DLL"
54772   has_colon=`$ECHO $path | $GREP ^.:`
54773   new_path="$path"
54774   if test "x$has_colon" = x; then
54775     # Not in mixed or Windows style, start by that.
54776     new_path=`cmd //c echo $path`
54777   fi
54778 
54779 
54780   input_path="$new_path"
54781   # Check if we need to convert this using DOS-style short mode. If the path
54782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54783   # take no chances and rewrite it.
54784   # Note: m4 eats our [], so we need to use [ and ] instead.
54785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54786   if test "x$has_forbidden_chars" != x; then
54787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54789   fi
54790 
54791 
54792   windows_path="$new_path"
54793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54794     unix_path=`$CYGPATH -u "$windows_path"`
54795     new_path="$unix_path"
54796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54798     new_path="$unix_path"
54799   fi
54800 
54801   if test "x$path" != "x$new_path"; then
54802     MSVC_DLL="$new_path"
54803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54804 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54805   fi
54806 
54807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54809 
54810     else
54811       # We're on a unix platform. Hooray! :)
54812       path="$MSVC_DLL"
54813       has_space=`$ECHO "$path" | $GREP " "`
54814       if test "x$has_space" != x; then
54815         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54816 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54817         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54818       fi
54819 
54820       # Use eval to expand a potential ~
54821       eval path="$path"
54822       if test ! -f "$path" && test ! -d "$path"; then
54823         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54824       fi
54825 
54826       if test -d "$path"; then
54827         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54828       else
54829         dir="`$DIRNAME "$path"`"
54830         base="`$BASENAME "$path"`"
54831         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54832       fi
54833     fi
54834   fi
54835 
54836       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54837 $as_echo_n "checking for $DLL_NAME... " >&6; }
54838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54839 $as_echo "$MSVC_DLL" >&6; }
54840     else
54841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54842 $as_echo "incorrect, ignoring" >&6; }
54843       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54844 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54845     fi
54846   fi
54847 
54848     if test "x$MSVC_DLL" = x; then
54849       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54850     fi
54851     MSVCR_DLL="$MSVC_DLL"
54852   else
54853 
54854   DLL_NAME="${MSVCR_NAME}"
54855   MSVC_DLL=
54856 
54857   if test "x$MSVC_DLL" = x; then
54858     # Probe: Using well-known location from Visual Studio 10.0
54859     if test "x$VCINSTALLDIR" != x; then
54860       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54861 
54862   windows_path="$CYGWIN_VC_INSTALL_DIR"
54863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54864     unix_path=`$CYGPATH -u "$windows_path"`
54865     CYGWIN_VC_INSTALL_DIR="$unix_path"
54866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54868     CYGWIN_VC_INSTALL_DIR="$unix_path"
54869   fi
54870 
54871       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54872         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54873       else
54874         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54875       fi
54876       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54877 
54878   DLL_NAME="$DLL_NAME"
54879   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54880   METHOD="well-known location in VCINSTALLDIR"
54881   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54882     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54883 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54884 
54885     # Need to check if the found msvcr is correct architecture
54886     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54887 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54888     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54890       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54891       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54892       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54893         CORRECT_MSVCR_ARCH="PE32 executable"
54894       else
54895         CORRECT_MSVCR_ARCH="PE32+ executable"
54896       fi
54897     else
54898       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54899         CORRECT_MSVCR_ARCH=386
54900       else
54901         CORRECT_MSVCR_ARCH=x86-64
54902       fi
54903     fi
54904     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54905       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54906 $as_echo "ok" >&6; }
54907       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54908 
54909   # Only process if variable expands to non-empty
54910 
54911   if test "x$MSVC_DLL" != x; then
54912     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54913 
54914   # Input might be given as Windows format, start by converting to
54915   # unix format.
54916   path="$MSVC_DLL"
54917   new_path=`$CYGPATH -u "$path"`
54918 
54919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54922   # "foo.exe" is OK but "foo" is an error.
54923   #
54924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54925   # It is also a way to make sure we got the proper file name for the real test later on.
54926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54927   if test "x$test_shortpath" = x; then
54928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54929 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54930     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54931   fi
54932 
54933   # Call helper function which possibly converts this using DOS-style short mode.
54934   # If so, the updated path is stored in $new_path.
54935 
54936   input_path="$new_path"
54937   # Check if we need to convert this using DOS-style short mode. If the path
54938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54939   # take no chances and rewrite it.
54940   # Note: m4 eats our [], so we need to use [ and ] instead.
54941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54942   if test "x$has_forbidden_chars" != x; then
54943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54947       # Going to short mode and back again did indeed matter. Since short mode is
54948       # case insensitive, let's make it lowercase to improve readability.
54949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54950       # Now convert it back to Unix-style (cygpath)
54951       input_path=`$CYGPATH -u "$shortmode_path"`
54952       new_path="$input_path"
54953     fi
54954   fi
54955 
54956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54957   if test "x$test_cygdrive_prefix" = x; then
54958     # As a simple fix, exclude /usr/bin since it's not a real path.
54959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54961       # a path prefixed by /cygdrive for fixpath to work.
54962       new_path="$CYGWIN_ROOT_PATH$input_path"
54963     fi
54964   fi
54965 
54966 
54967   if test "x$path" != "x$new_path"; then
54968     MSVC_DLL="$new_path"
54969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54970 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54971   fi
54972 
54973     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974 
54975   path="$MSVC_DLL"
54976   has_colon=`$ECHO $path | $GREP ^.:`
54977   new_path="$path"
54978   if test "x$has_colon" = x; then
54979     # Not in mixed or Windows style, start by that.
54980     new_path=`cmd //c echo $path`
54981   fi
54982 
54983 
54984   input_path="$new_path"
54985   # Check if we need to convert this using DOS-style short mode. If the path
54986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54987   # take no chances and rewrite it.
54988   # Note: m4 eats our [], so we need to use [ and ] instead.
54989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54990   if test "x$has_forbidden_chars" != x; then
54991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54993   fi
54994 
54995 
54996   windows_path="$new_path"
54997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54998     unix_path=`$CYGPATH -u "$windows_path"`
54999     new_path="$unix_path"
55000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55002     new_path="$unix_path"
55003   fi
55004 
55005   if test "x$path" != "x$new_path"; then
55006     MSVC_DLL="$new_path"
55007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55008 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55009   fi
55010 
55011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55013 
55014     else
55015       # We're on a unix platform. Hooray! :)
55016       path="$MSVC_DLL"
55017       has_space=`$ECHO "$path" | $GREP " "`
55018       if test "x$has_space" != x; then
55019         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55020 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55021         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55022       fi
55023 
55024       # Use eval to expand a potential ~
55025       eval path="$path"
55026       if test ! -f "$path" && test ! -d "$path"; then
55027         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55028       fi
55029 
55030       if test -d "$path"; then
55031         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55032       else
55033         dir="`$DIRNAME "$path"`"
55034         base="`$BASENAME "$path"`"
55035         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55036       fi
55037     fi
55038   fi
55039 
55040       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55041 $as_echo_n "checking for $DLL_NAME... " >&6; }
55042       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55043 $as_echo "$MSVC_DLL" >&6; }
55044     else
55045       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55046 $as_echo "incorrect, ignoring" >&6; }
55047       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55048 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55049     fi
55050   fi
55051 
55052     fi
55053   fi
55054 
55055   if test "x$MSVC_DLL" = x; then
55056     # Probe: Check in the Boot JDK directory.
55057     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55058 
55059   DLL_NAME="$DLL_NAME"
55060   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55061   METHOD="well-known location in Boot JDK"
55062   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55063     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55064 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55065 
55066     # Need to check if the found msvcr is correct architecture
55067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55068 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55069     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55070     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55071       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55072       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55073       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55074         CORRECT_MSVCR_ARCH="PE32 executable"
55075       else
55076         CORRECT_MSVCR_ARCH="PE32+ executable"
55077       fi
55078     else
55079       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55080         CORRECT_MSVCR_ARCH=386
55081       else
55082         CORRECT_MSVCR_ARCH=x86-64
55083       fi
55084     fi
55085     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55086       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55087 $as_echo "ok" >&6; }
55088       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55089 
55090   # Only process if variable expands to non-empty
55091 
55092   if test "x$MSVC_DLL" != x; then
55093     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55094 
55095   # Input might be given as Windows format, start by converting to
55096   # unix format.
55097   path="$MSVC_DLL"
55098   new_path=`$CYGPATH -u "$path"`
55099 
55100   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55101   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55102   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55103   # "foo.exe" is OK but "foo" is an error.
55104   #
55105   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55106   # It is also a way to make sure we got the proper file name for the real test later on.
55107   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55108   if test "x$test_shortpath" = x; then
55109     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55110 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55111     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55112   fi
55113 
55114   # Call helper function which possibly converts this using DOS-style short mode.
55115   # If so, the updated path is stored in $new_path.
55116 
55117   input_path="$new_path"
55118   # Check if we need to convert this using DOS-style short mode. If the path
55119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55120   # take no chances and rewrite it.
55121   # Note: m4 eats our [], so we need to use [ and ] instead.
55122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55123   if test "x$has_forbidden_chars" != x; then
55124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55128       # Going to short mode and back again did indeed matter. Since short mode is
55129       # case insensitive, let's make it lowercase to improve readability.
55130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55131       # Now convert it back to Unix-style (cygpath)
55132       input_path=`$CYGPATH -u "$shortmode_path"`
55133       new_path="$input_path"
55134     fi
55135   fi
55136 
55137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55138   if test "x$test_cygdrive_prefix" = x; then
55139     # As a simple fix, exclude /usr/bin since it's not a real path.
55140     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55142       # a path prefixed by /cygdrive for fixpath to work.
55143       new_path="$CYGWIN_ROOT_PATH$input_path"
55144     fi
55145   fi
55146 
55147 
55148   if test "x$path" != "x$new_path"; then
55149     MSVC_DLL="$new_path"
55150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55151 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55152   fi
55153 
55154     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55155 
55156   path="$MSVC_DLL"
55157   has_colon=`$ECHO $path | $GREP ^.:`
55158   new_path="$path"
55159   if test "x$has_colon" = x; then
55160     # Not in mixed or Windows style, start by that.
55161     new_path=`cmd //c echo $path`
55162   fi
55163 
55164 
55165   input_path="$new_path"
55166   # Check if we need to convert this using DOS-style short mode. If the path
55167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55168   # take no chances and rewrite it.
55169   # Note: m4 eats our [], so we need to use [ and ] instead.
55170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55171   if test "x$has_forbidden_chars" != x; then
55172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55173     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55174   fi
55175 
55176 
55177   windows_path="$new_path"
55178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55179     unix_path=`$CYGPATH -u "$windows_path"`
55180     new_path="$unix_path"
55181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55183     new_path="$unix_path"
55184   fi
55185 
55186   if test "x$path" != "x$new_path"; then
55187     MSVC_DLL="$new_path"
55188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55189 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55190   fi
55191 
55192   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55193   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55194 
55195     else
55196       # We're on a unix platform. Hooray! :)
55197       path="$MSVC_DLL"
55198       has_space=`$ECHO "$path" | $GREP " "`
55199       if test "x$has_space" != x; then
55200         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55201 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55202         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55203       fi
55204 
55205       # Use eval to expand a potential ~
55206       eval path="$path"
55207       if test ! -f "$path" && test ! -d "$path"; then
55208         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55209       fi
55210 
55211       if test -d "$path"; then
55212         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55213       else
55214         dir="`$DIRNAME "$path"`"
55215         base="`$BASENAME "$path"`"
55216         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55217       fi
55218     fi
55219   fi
55220 
55221       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55222 $as_echo_n "checking for $DLL_NAME... " >&6; }
55223       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55224 $as_echo "$MSVC_DLL" >&6; }
55225     else
55226       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55227 $as_echo "incorrect, ignoring" >&6; }
55228       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55229 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55230     fi
55231   fi
55232 
55233   fi
55234 
55235   if test "x$MSVC_DLL" = x; then
55236     # Probe: Look in the Windows system32 directory
55237     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55238 
55239   windows_path="$CYGWIN_SYSTEMROOT"
55240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55241     unix_path=`$CYGPATH -u "$windows_path"`
55242     CYGWIN_SYSTEMROOT="$unix_path"
55243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55245     CYGWIN_SYSTEMROOT="$unix_path"
55246   fi
55247 
55248     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55249 
55250   DLL_NAME="$DLL_NAME"
55251   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55252   METHOD="well-known location in SYSTEMROOT"
55253   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55254     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55255 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55256 
55257     # Need to check if the found msvcr is correct architecture
55258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55259 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55260     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55261     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55262       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55263       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55264       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55265         CORRECT_MSVCR_ARCH="PE32 executable"
55266       else
55267         CORRECT_MSVCR_ARCH="PE32+ executable"
55268       fi
55269     else
55270       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55271         CORRECT_MSVCR_ARCH=386
55272       else
55273         CORRECT_MSVCR_ARCH=x86-64
55274       fi
55275     fi
55276     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55277       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55278 $as_echo "ok" >&6; }
55279       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55280 
55281   # Only process if variable expands to non-empty
55282 
55283   if test "x$MSVC_DLL" != x; then
55284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55285 
55286   # Input might be given as Windows format, start by converting to
55287   # unix format.
55288   path="$MSVC_DLL"
55289   new_path=`$CYGPATH -u "$path"`
55290 
55291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55294   # "foo.exe" is OK but "foo" is an error.
55295   #
55296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55297   # It is also a way to make sure we got the proper file name for the real test later on.
55298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55299   if test "x$test_shortpath" = x; then
55300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55301 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55302     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55303   fi
55304 
55305   # Call helper function which possibly converts this using DOS-style short mode.
55306   # If so, the updated path is stored in $new_path.
55307 
55308   input_path="$new_path"
55309   # Check if we need to convert this using DOS-style short mode. If the path
55310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55311   # take no chances and rewrite it.
55312   # Note: m4 eats our [], so we need to use [ and ] instead.
55313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55314   if test "x$has_forbidden_chars" != x; then
55315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55319       # Going to short mode and back again did indeed matter. Since short mode is
55320       # case insensitive, let's make it lowercase to improve readability.
55321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55322       # Now convert it back to Unix-style (cygpath)
55323       input_path=`$CYGPATH -u "$shortmode_path"`
55324       new_path="$input_path"
55325     fi
55326   fi
55327 
55328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55329   if test "x$test_cygdrive_prefix" = x; then
55330     # As a simple fix, exclude /usr/bin since it's not a real path.
55331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55333       # a path prefixed by /cygdrive for fixpath to work.
55334       new_path="$CYGWIN_ROOT_PATH$input_path"
55335     fi
55336   fi
55337 
55338 
55339   if test "x$path" != "x$new_path"; then
55340     MSVC_DLL="$new_path"
55341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55342 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55343   fi
55344 
55345     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55346 
55347   path="$MSVC_DLL"
55348   has_colon=`$ECHO $path | $GREP ^.:`
55349   new_path="$path"
55350   if test "x$has_colon" = x; then
55351     # Not in mixed or Windows style, start by that.
55352     new_path=`cmd //c echo $path`
55353   fi
55354 
55355 
55356   input_path="$new_path"
55357   # Check if we need to convert this using DOS-style short mode. If the path
55358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55359   # take no chances and rewrite it.
55360   # Note: m4 eats our [], so we need to use [ and ] instead.
55361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55362   if test "x$has_forbidden_chars" != x; then
55363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55365   fi
55366 
55367 
55368   windows_path="$new_path"
55369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55370     unix_path=`$CYGPATH -u "$windows_path"`
55371     new_path="$unix_path"
55372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55374     new_path="$unix_path"
55375   fi
55376 
55377   if test "x$path" != "x$new_path"; then
55378     MSVC_DLL="$new_path"
55379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55380 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55381   fi
55382 
55383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55385 
55386     else
55387       # We're on a unix platform. Hooray! :)
55388       path="$MSVC_DLL"
55389       has_space=`$ECHO "$path" | $GREP " "`
55390       if test "x$has_space" != x; then
55391         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55392 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55393         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55394       fi
55395 
55396       # Use eval to expand a potential ~
55397       eval path="$path"
55398       if test ! -f "$path" && test ! -d "$path"; then
55399         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55400       fi
55401 
55402       if test -d "$path"; then
55403         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55404       else
55405         dir="`$DIRNAME "$path"`"
55406         base="`$BASENAME "$path"`"
55407         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55408       fi
55409     fi
55410   fi
55411 
55412       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55413 $as_echo_n "checking for $DLL_NAME... " >&6; }
55414       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55415 $as_echo "$MSVC_DLL" >&6; }
55416     else
55417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55418 $as_echo "incorrect, ignoring" >&6; }
55419       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55420 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55421     fi
55422   fi
55423 
55424   fi
55425 
55426   if test "x$MSVC_DLL" = x; then
55427     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55428     if test "x$VS100COMNTOOLS" != x; then
55429       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55430 
55431   windows_path="$CYGWIN_VS_TOOLS_DIR"
55432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55433     unix_path=`$CYGPATH -u "$windows_path"`
55434     CYGWIN_VS_TOOLS_DIR="$unix_path"
55435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55437     CYGWIN_VS_TOOLS_DIR="$unix_path"
55438   fi
55439 
55440       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55441         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55442             | $GREP -i /x64/ | $HEAD --lines 1`
55443       else
55444         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55445             | $GREP -i /x86/ | $HEAD --lines 1`
55446       fi
55447 
55448   DLL_NAME="$DLL_NAME"
55449   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55450   METHOD="search of VS100COMNTOOLS"
55451   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55452     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55453 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55454 
55455     # Need to check if the found msvcr is correct architecture
55456     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55457 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55458     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55459     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55460       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55461       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55462       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55463         CORRECT_MSVCR_ARCH="PE32 executable"
55464       else
55465         CORRECT_MSVCR_ARCH="PE32+ executable"
55466       fi
55467     else
55468       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55469         CORRECT_MSVCR_ARCH=386
55470       else
55471         CORRECT_MSVCR_ARCH=x86-64
55472       fi
55473     fi
55474     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55476 $as_echo "ok" >&6; }
55477       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55478 
55479   # Only process if variable expands to non-empty
55480 
55481   if test "x$MSVC_DLL" != x; then
55482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55483 
55484   # Input might be given as Windows format, start by converting to
55485   # unix format.
55486   path="$MSVC_DLL"
55487   new_path=`$CYGPATH -u "$path"`
55488 
55489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55492   # "foo.exe" is OK but "foo" is an error.
55493   #
55494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55495   # It is also a way to make sure we got the proper file name for the real test later on.
55496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55497   if test "x$test_shortpath" = x; then
55498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55499 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55500     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55501   fi
55502 
55503   # Call helper function which possibly converts this using DOS-style short mode.
55504   # If so, the updated path is stored in $new_path.
55505 
55506   input_path="$new_path"
55507   # Check if we need to convert this using DOS-style short mode. If the path
55508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55509   # take no chances and rewrite it.
55510   # Note: m4 eats our [], so we need to use [ and ] instead.
55511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55512   if test "x$has_forbidden_chars" != x; then
55513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55517       # Going to short mode and back again did indeed matter. Since short mode is
55518       # case insensitive, let's make it lowercase to improve readability.
55519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55520       # Now convert it back to Unix-style (cygpath)
55521       input_path=`$CYGPATH -u "$shortmode_path"`
55522       new_path="$input_path"
55523     fi
55524   fi
55525 
55526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55527   if test "x$test_cygdrive_prefix" = x; then
55528     # As a simple fix, exclude /usr/bin since it's not a real path.
55529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55531       # a path prefixed by /cygdrive for fixpath to work.
55532       new_path="$CYGWIN_ROOT_PATH$input_path"
55533     fi
55534   fi
55535 
55536 
55537   if test "x$path" != "x$new_path"; then
55538     MSVC_DLL="$new_path"
55539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55540 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55541   fi
55542 
55543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55544 
55545   path="$MSVC_DLL"
55546   has_colon=`$ECHO $path | $GREP ^.:`
55547   new_path="$path"
55548   if test "x$has_colon" = x; then
55549     # Not in mixed or Windows style, start by that.
55550     new_path=`cmd //c echo $path`
55551   fi
55552 
55553 
55554   input_path="$new_path"
55555   # Check if we need to convert this using DOS-style short mode. If the path
55556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55557   # take no chances and rewrite it.
55558   # Note: m4 eats our [], so we need to use [ and ] instead.
55559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55560   if test "x$has_forbidden_chars" != x; then
55561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55563   fi
55564 
55565 
55566   windows_path="$new_path"
55567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55568     unix_path=`$CYGPATH -u "$windows_path"`
55569     new_path="$unix_path"
55570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55572     new_path="$unix_path"
55573   fi
55574 
55575   if test "x$path" != "x$new_path"; then
55576     MSVC_DLL="$new_path"
55577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55578 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55579   fi
55580 
55581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55583 
55584     else
55585       # We're on a unix platform. Hooray! :)
55586       path="$MSVC_DLL"
55587       has_space=`$ECHO "$path" | $GREP " "`
55588       if test "x$has_space" != x; then
55589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55590 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55592       fi
55593 
55594       # Use eval to expand a potential ~
55595       eval path="$path"
55596       if test ! -f "$path" && test ! -d "$path"; then
55597         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55598       fi
55599 
55600       if test -d "$path"; then
55601         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55602       else
55603         dir="`$DIRNAME "$path"`"
55604         base="`$BASENAME "$path"`"
55605         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55606       fi
55607     fi
55608   fi
55609 
55610       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55611 $as_echo_n "checking for $DLL_NAME... " >&6; }
55612       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55613 $as_echo "$MSVC_DLL" >&6; }
55614     else
55615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55616 $as_echo "incorrect, ignoring" >&6; }
55617       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55618 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55619     fi
55620   fi
55621 
55622     fi
55623   fi
55624 
55625   if test "x$MSVC_DLL" = x; then
55626     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55627     # (This was the original behaviour; kept since it might turn something up)
55628     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55629       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55630         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55631             | $GREP x64 | $HEAD --lines 1`
55632       else
55633         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55634             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55635         if test "x$POSSIBLE_MSVC_DLL" = x; then
55636           # We're grasping at straws now...
55637           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55638               | $HEAD --lines 1`
55639         fi
55640       fi
55641 
55642 
55643   DLL_NAME="$DLL_NAME"
55644   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55645   METHOD="search of VCINSTALLDIR"
55646   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55647     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55648 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55649 
55650     # Need to check if the found msvcr is correct architecture
55651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55652 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55653     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55654     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55655       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55656       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55657       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55658         CORRECT_MSVCR_ARCH="PE32 executable"
55659       else
55660         CORRECT_MSVCR_ARCH="PE32+ executable"
55661       fi
55662     else
55663       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55664         CORRECT_MSVCR_ARCH=386
55665       else
55666         CORRECT_MSVCR_ARCH=x86-64
55667       fi
55668     fi
55669     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55671 $as_echo "ok" >&6; }
55672       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55673 
55674   # Only process if variable expands to non-empty
55675 
55676   if test "x$MSVC_DLL" != x; then
55677     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55678 
55679   # Input might be given as Windows format, start by converting to
55680   # unix format.
55681   path="$MSVC_DLL"
55682   new_path=`$CYGPATH -u "$path"`
55683 
55684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55687   # "foo.exe" is OK but "foo" is an error.
55688   #
55689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55690   # It is also a way to make sure we got the proper file name for the real test later on.
55691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55692   if test "x$test_shortpath" = x; then
55693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55694 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55695     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55696   fi
55697 
55698   # Call helper function which possibly converts this using DOS-style short mode.
55699   # If so, the updated path is stored in $new_path.
55700 
55701   input_path="$new_path"
55702   # Check if we need to convert this using DOS-style short mode. If the path
55703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55704   # take no chances and rewrite it.
55705   # Note: m4 eats our [], so we need to use [ and ] instead.
55706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55707   if test "x$has_forbidden_chars" != x; then
55708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55712       # Going to short mode and back again did indeed matter. Since short mode is
55713       # case insensitive, let's make it lowercase to improve readability.
55714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55715       # Now convert it back to Unix-style (cygpath)
55716       input_path=`$CYGPATH -u "$shortmode_path"`
55717       new_path="$input_path"
55718     fi
55719   fi
55720 
55721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55722   if test "x$test_cygdrive_prefix" = x; then
55723     # As a simple fix, exclude /usr/bin since it's not a real path.
55724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55726       # a path prefixed by /cygdrive for fixpath to work.
55727       new_path="$CYGWIN_ROOT_PATH$input_path"
55728     fi
55729   fi
55730 
55731 
55732   if test "x$path" != "x$new_path"; then
55733     MSVC_DLL="$new_path"
55734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55735 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55736   fi
55737 
55738     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55739 
55740   path="$MSVC_DLL"
55741   has_colon=`$ECHO $path | $GREP ^.:`
55742   new_path="$path"
55743   if test "x$has_colon" = x; then
55744     # Not in mixed or Windows style, start by that.
55745     new_path=`cmd //c echo $path`
55746   fi
55747 
55748 
55749   input_path="$new_path"
55750   # Check if we need to convert this using DOS-style short mode. If the path
55751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55752   # take no chances and rewrite it.
55753   # Note: m4 eats our [], so we need to use [ and ] instead.
55754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55755   if test "x$has_forbidden_chars" != x; then
55756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55758   fi
55759 
55760 
55761   windows_path="$new_path"
55762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55763     unix_path=`$CYGPATH -u "$windows_path"`
55764     new_path="$unix_path"
55765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55767     new_path="$unix_path"
55768   fi
55769 
55770   if test "x$path" != "x$new_path"; then
55771     MSVC_DLL="$new_path"
55772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55773 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55774   fi
55775 
55776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55778 
55779     else
55780       # We're on a unix platform. Hooray! :)
55781       path="$MSVC_DLL"
55782       has_space=`$ECHO "$path" | $GREP " "`
55783       if test "x$has_space" != x; then
55784         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55785 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55786         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55787       fi
55788 
55789       # Use eval to expand a potential ~
55790       eval path="$path"
55791       if test ! -f "$path" && test ! -d "$path"; then
55792         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55793       fi
55794 
55795       if test -d "$path"; then
55796         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55797       else
55798         dir="`$DIRNAME "$path"`"
55799         base="`$BASENAME "$path"`"
55800         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55801       fi
55802     fi
55803   fi
55804 
55805       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55806 $as_echo_n "checking for $DLL_NAME... " >&6; }
55807       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55808 $as_echo "$MSVC_DLL" >&6; }
55809     else
55810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55811 $as_echo "incorrect, ignoring" >&6; }
55812       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55813 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55814     fi
55815   fi
55816 
55817     fi
55818   fi
55819 
55820   if test "x$MSVC_DLL" = x; then
55821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55822 $as_echo_n "checking for $DLL_NAME... " >&6; }
55823     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55824 $as_echo "no" >&6; }
55825     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55826   fi
55827 
55828     MSVCR_DLL="$MSVC_DLL"
55829   fi
55830 
55831 
55832 
55833 # Check whether --with-msvcp-dll was given.
55834 if test "${with_msvcp_dll+set}" = set; then :
55835   withval=$with_msvcp_dll;
55836 fi
55837 
55838 
55839   if test "x$MSVCP_NAME" != "x"; then
55840     if test "x$with_msvcp_dll" != x; then
55841       # If given explicitly by user, do not probe. If not present, fail directly.
55842 
55843   DLL_NAME="$MSVCP_NAME"
55844   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55845   METHOD="--with-msvcp-dll"
55846   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55847     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55848 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55849 
55850     # Need to check if the found msvcr is correct architecture
55851     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55852 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55853     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55855       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55856       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55857       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55858         CORRECT_MSVCR_ARCH="PE32 executable"
55859       else
55860         CORRECT_MSVCR_ARCH="PE32+ executable"
55861       fi
55862     else
55863       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55864         CORRECT_MSVCR_ARCH=386
55865       else
55866         CORRECT_MSVCR_ARCH=x86-64
55867       fi
55868     fi
55869     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55870       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55871 $as_echo "ok" >&6; }
55872       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55873 
55874   # Only process if variable expands to non-empty
55875 
55876   if test "x$MSVC_DLL" != x; then
55877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55878 
55879   # Input might be given as Windows format, start by converting to
55880   # unix format.
55881   path="$MSVC_DLL"
55882   new_path=`$CYGPATH -u "$path"`
55883 
55884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55887   # "foo.exe" is OK but "foo" is an error.
55888   #
55889   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55890   # It is also a way to make sure we got the proper file name for the real test later on.
55891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55892   if test "x$test_shortpath" = x; then
55893     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55894 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55895     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55896   fi
55897 
55898   # Call helper function which possibly converts this using DOS-style short mode.
55899   # If so, the updated path is stored in $new_path.
55900 
55901   input_path="$new_path"
55902   # Check if we need to convert this using DOS-style short mode. If the path
55903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55904   # take no chances and rewrite it.
55905   # Note: m4 eats our [], so we need to use [ and ] instead.
55906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55907   if test "x$has_forbidden_chars" != x; then
55908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55912       # Going to short mode and back again did indeed matter. Since short mode is
55913       # case insensitive, let's make it lowercase to improve readability.
55914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55915       # Now convert it back to Unix-style (cygpath)
55916       input_path=`$CYGPATH -u "$shortmode_path"`
55917       new_path="$input_path"
55918     fi
55919   fi
55920 
55921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55922   if test "x$test_cygdrive_prefix" = x; then
55923     # As a simple fix, exclude /usr/bin since it's not a real path.
55924     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55926       # a path prefixed by /cygdrive for fixpath to work.
55927       new_path="$CYGWIN_ROOT_PATH$input_path"
55928     fi
55929   fi
55930 
55931 
55932   if test "x$path" != "x$new_path"; then
55933     MSVC_DLL="$new_path"
55934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55935 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55936   fi
55937 
55938     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55939 
55940   path="$MSVC_DLL"
55941   has_colon=`$ECHO $path | $GREP ^.:`
55942   new_path="$path"
55943   if test "x$has_colon" = x; then
55944     # Not in mixed or Windows style, start by that.
55945     new_path=`cmd //c echo $path`
55946   fi
55947 
55948 
55949   input_path="$new_path"
55950   # Check if we need to convert this using DOS-style short mode. If the path
55951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55952   # take no chances and rewrite it.
55953   # Note: m4 eats our [], so we need to use [ and ] instead.
55954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55955   if test "x$has_forbidden_chars" != x; then
55956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55958   fi
55959 
55960 
55961   windows_path="$new_path"
55962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55963     unix_path=`$CYGPATH -u "$windows_path"`
55964     new_path="$unix_path"
55965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55967     new_path="$unix_path"
55968   fi
55969 
55970   if test "x$path" != "x$new_path"; then
55971     MSVC_DLL="$new_path"
55972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55973 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55974   fi
55975 
55976   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55977   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55978 
55979     else
55980       # We're on a unix platform. Hooray! :)
55981       path="$MSVC_DLL"
55982       has_space=`$ECHO "$path" | $GREP " "`
55983       if test "x$has_space" != x; then
55984         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55985 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55986         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55987       fi
55988 
55989       # Use eval to expand a potential ~
55990       eval path="$path"
55991       if test ! -f "$path" && test ! -d "$path"; then
55992         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55993       fi
55994 
55995       if test -d "$path"; then
55996         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55997       else
55998         dir="`$DIRNAME "$path"`"
55999         base="`$BASENAME "$path"`"
56000         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56001       fi
56002     fi
56003   fi
56004 
56005       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56006 $as_echo_n "checking for $DLL_NAME... " >&6; }
56007       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56008 $as_echo "$MSVC_DLL" >&6; }
56009     else
56010       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56011 $as_echo "incorrect, ignoring" >&6; }
56012       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56013 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56014     fi
56015   fi
56016 
56017       if test "x$MSVC_DLL" = x; then
56018         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56019       fi
56020       MSVCP_DLL="$MSVC_DLL"
56021     elif test "x$DEVKIT_MSVCP_DLL" != x; then
56022 
56023   DLL_NAME="$MSVCP_NAME"
56024   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56025   METHOD="devkit"
56026   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56027     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56028 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56029 
56030     # Need to check if the found msvcr is correct architecture
56031     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56032 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56033     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56034     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56035       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56036       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56037       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56038         CORRECT_MSVCR_ARCH="PE32 executable"
56039       else
56040         CORRECT_MSVCR_ARCH="PE32+ executable"
56041       fi
56042     else
56043       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56044         CORRECT_MSVCR_ARCH=386
56045       else
56046         CORRECT_MSVCR_ARCH=x86-64
56047       fi
56048     fi
56049     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56050       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56051 $as_echo "ok" >&6; }
56052       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56053 
56054   # Only process if variable expands to non-empty
56055 
56056   if test "x$MSVC_DLL" != x; then
56057     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56058 
56059   # Input might be given as Windows format, start by converting to
56060   # unix format.
56061   path="$MSVC_DLL"
56062   new_path=`$CYGPATH -u "$path"`
56063 
56064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56067   # "foo.exe" is OK but "foo" is an error.
56068   #
56069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56070   # It is also a way to make sure we got the proper file name for the real test later on.
56071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56072   if test "x$test_shortpath" = x; then
56073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56074 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56075     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56076   fi
56077 
56078   # Call helper function which possibly converts this using DOS-style short mode.
56079   # If so, the updated path is stored in $new_path.
56080 
56081   input_path="$new_path"
56082   # Check if we need to convert this using DOS-style short mode. If the path
56083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56084   # take no chances and rewrite it.
56085   # Note: m4 eats our [], so we need to use [ and ] instead.
56086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56087   if test "x$has_forbidden_chars" != x; then
56088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56092       # Going to short mode and back again did indeed matter. Since short mode is
56093       # case insensitive, let's make it lowercase to improve readability.
56094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56095       # Now convert it back to Unix-style (cygpath)
56096       input_path=`$CYGPATH -u "$shortmode_path"`
56097       new_path="$input_path"
56098     fi
56099   fi
56100 
56101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56102   if test "x$test_cygdrive_prefix" = x; then
56103     # As a simple fix, exclude /usr/bin since it's not a real path.
56104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56106       # a path prefixed by /cygdrive for fixpath to work.
56107       new_path="$CYGWIN_ROOT_PATH$input_path"
56108     fi
56109   fi
56110 
56111 
56112   if test "x$path" != "x$new_path"; then
56113     MSVC_DLL="$new_path"
56114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56115 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56116   fi
56117 
56118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56119 
56120   path="$MSVC_DLL"
56121   has_colon=`$ECHO $path | $GREP ^.:`
56122   new_path="$path"
56123   if test "x$has_colon" = x; then
56124     # Not in mixed or Windows style, start by that.
56125     new_path=`cmd //c echo $path`
56126   fi
56127 
56128 
56129   input_path="$new_path"
56130   # Check if we need to convert this using DOS-style short mode. If the path
56131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56132   # take no chances and rewrite it.
56133   # Note: m4 eats our [], so we need to use [ and ] instead.
56134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56135   if test "x$has_forbidden_chars" != x; then
56136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56138   fi
56139 
56140 
56141   windows_path="$new_path"
56142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56143     unix_path=`$CYGPATH -u "$windows_path"`
56144     new_path="$unix_path"
56145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56147     new_path="$unix_path"
56148   fi
56149 
56150   if test "x$path" != "x$new_path"; then
56151     MSVC_DLL="$new_path"
56152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56153 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56154   fi
56155 
56156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56158 
56159     else
56160       # We're on a unix platform. Hooray! :)
56161       path="$MSVC_DLL"
56162       has_space=`$ECHO "$path" | $GREP " "`
56163       if test "x$has_space" != x; then
56164         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56165 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56166         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56167       fi
56168 
56169       # Use eval to expand a potential ~
56170       eval path="$path"
56171       if test ! -f "$path" && test ! -d "$path"; then
56172         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56173       fi
56174 
56175       if test -d "$path"; then
56176         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56177       else
56178         dir="`$DIRNAME "$path"`"
56179         base="`$BASENAME "$path"`"
56180         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56181       fi
56182     fi
56183   fi
56184 
56185       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56186 $as_echo_n "checking for $DLL_NAME... " >&6; }
56187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56188 $as_echo "$MSVC_DLL" >&6; }
56189     else
56190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56191 $as_echo "incorrect, ignoring" >&6; }
56192       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56193 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56194     fi
56195   fi
56196 
56197       if test "x$MSVC_DLL" = x; then
56198         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56199       fi
56200       MSVCP_DLL="$MSVC_DLL"
56201     else
56202 
56203   DLL_NAME="${MSVCP_NAME}"
56204   MSVC_DLL=
56205 
56206   if test "x$MSVC_DLL" = x; then
56207     # Probe: Using well-known location from Visual Studio 10.0
56208     if test "x$VCINSTALLDIR" != x; then
56209       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56210 
56211   windows_path="$CYGWIN_VC_INSTALL_DIR"
56212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56213     unix_path=`$CYGPATH -u "$windows_path"`
56214     CYGWIN_VC_INSTALL_DIR="$unix_path"
56215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56217     CYGWIN_VC_INSTALL_DIR="$unix_path"
56218   fi
56219 
56220       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56221         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56222       else
56223         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56224       fi
56225       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56226 
56227   DLL_NAME="$DLL_NAME"
56228   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56229   METHOD="well-known location in VCINSTALLDIR"
56230   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56231     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56232 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56233 
56234     # Need to check if the found msvcr is correct architecture
56235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56236 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56237     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56239       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56240       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56241       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56242         CORRECT_MSVCR_ARCH="PE32 executable"
56243       else
56244         CORRECT_MSVCR_ARCH="PE32+ executable"
56245       fi
56246     else
56247       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56248         CORRECT_MSVCR_ARCH=386
56249       else
56250         CORRECT_MSVCR_ARCH=x86-64
56251       fi
56252     fi
56253     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56254       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56255 $as_echo "ok" >&6; }
56256       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56257 
56258   # Only process if variable expands to non-empty
56259 
56260   if test "x$MSVC_DLL" != x; then
56261     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56262 
56263   # Input might be given as Windows format, start by converting to
56264   # unix format.
56265   path="$MSVC_DLL"
56266   new_path=`$CYGPATH -u "$path"`
56267 
56268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56271   # "foo.exe" is OK but "foo" is an error.
56272   #
56273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56274   # It is also a way to make sure we got the proper file name for the real test later on.
56275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56276   if test "x$test_shortpath" = x; then
56277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56278 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56279     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56280   fi
56281 
56282   # Call helper function which possibly converts this using DOS-style short mode.
56283   # If so, the updated path is stored in $new_path.
56284 
56285   input_path="$new_path"
56286   # Check if we need to convert this using DOS-style short mode. If the path
56287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56288   # take no chances and rewrite it.
56289   # Note: m4 eats our [], so we need to use [ and ] instead.
56290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56291   if test "x$has_forbidden_chars" != x; then
56292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56296       # Going to short mode and back again did indeed matter. Since short mode is
56297       # case insensitive, let's make it lowercase to improve readability.
56298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56299       # Now convert it back to Unix-style (cygpath)
56300       input_path=`$CYGPATH -u "$shortmode_path"`
56301       new_path="$input_path"
56302     fi
56303   fi
56304 
56305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56306   if test "x$test_cygdrive_prefix" = x; then
56307     # As a simple fix, exclude /usr/bin since it's not a real path.
56308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56310       # a path prefixed by /cygdrive for fixpath to work.
56311       new_path="$CYGWIN_ROOT_PATH$input_path"
56312     fi
56313   fi
56314 
56315 
56316   if test "x$path" != "x$new_path"; then
56317     MSVC_DLL="$new_path"
56318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56319 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56320   fi
56321 
56322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56323 
56324   path="$MSVC_DLL"
56325   has_colon=`$ECHO $path | $GREP ^.:`
56326   new_path="$path"
56327   if test "x$has_colon" = x; then
56328     # Not in mixed or Windows style, start by that.
56329     new_path=`cmd //c echo $path`
56330   fi
56331 
56332 
56333   input_path="$new_path"
56334   # Check if we need to convert this using DOS-style short mode. If the path
56335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56336   # take no chances and rewrite it.
56337   # Note: m4 eats our [], so we need to use [ and ] instead.
56338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56339   if test "x$has_forbidden_chars" != x; then
56340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56342   fi
56343 
56344 
56345   windows_path="$new_path"
56346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56347     unix_path=`$CYGPATH -u "$windows_path"`
56348     new_path="$unix_path"
56349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56351     new_path="$unix_path"
56352   fi
56353 
56354   if test "x$path" != "x$new_path"; then
56355     MSVC_DLL="$new_path"
56356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56357 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56358   fi
56359 
56360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56362 
56363     else
56364       # We're on a unix platform. Hooray! :)
56365       path="$MSVC_DLL"
56366       has_space=`$ECHO "$path" | $GREP " "`
56367       if test "x$has_space" != x; then
56368         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56369 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56370         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56371       fi
56372 
56373       # Use eval to expand a potential ~
56374       eval path="$path"
56375       if test ! -f "$path" && test ! -d "$path"; then
56376         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56377       fi
56378 
56379       if test -d "$path"; then
56380         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56381       else
56382         dir="`$DIRNAME "$path"`"
56383         base="`$BASENAME "$path"`"
56384         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56385       fi
56386     fi
56387   fi
56388 
56389       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56390 $as_echo_n "checking for $DLL_NAME... " >&6; }
56391       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56392 $as_echo "$MSVC_DLL" >&6; }
56393     else
56394       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56395 $as_echo "incorrect, ignoring" >&6; }
56396       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56397 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56398     fi
56399   fi
56400 
56401     fi
56402   fi
56403 
56404   if test "x$MSVC_DLL" = x; then
56405     # Probe: Check in the Boot JDK directory.
56406     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56407 
56408   DLL_NAME="$DLL_NAME"
56409   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56410   METHOD="well-known location in Boot JDK"
56411   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56412     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56413 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56414 
56415     # Need to check if the found msvcr is correct architecture
56416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56417 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56418     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56419     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56420       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56421       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56422       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56423         CORRECT_MSVCR_ARCH="PE32 executable"
56424       else
56425         CORRECT_MSVCR_ARCH="PE32+ executable"
56426       fi
56427     else
56428       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56429         CORRECT_MSVCR_ARCH=386
56430       else
56431         CORRECT_MSVCR_ARCH=x86-64
56432       fi
56433     fi
56434     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56435       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56436 $as_echo "ok" >&6; }
56437       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56438 
56439   # Only process if variable expands to non-empty
56440 
56441   if test "x$MSVC_DLL" != x; then
56442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56443 
56444   # Input might be given as Windows format, start by converting to
56445   # unix format.
56446   path="$MSVC_DLL"
56447   new_path=`$CYGPATH -u "$path"`
56448 
56449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56452   # "foo.exe" is OK but "foo" is an error.
56453   #
56454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56455   # It is also a way to make sure we got the proper file name for the real test later on.
56456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56457   if test "x$test_shortpath" = x; then
56458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56459 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56460     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56461   fi
56462 
56463   # Call helper function which possibly converts this using DOS-style short mode.
56464   # If so, the updated path is stored in $new_path.
56465 
56466   input_path="$new_path"
56467   # Check if we need to convert this using DOS-style short mode. If the path
56468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56469   # take no chances and rewrite it.
56470   # Note: m4 eats our [], so we need to use [ and ] instead.
56471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56472   if test "x$has_forbidden_chars" != x; then
56473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56477       # Going to short mode and back again did indeed matter. Since short mode is
56478       # case insensitive, let's make it lowercase to improve readability.
56479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56480       # Now convert it back to Unix-style (cygpath)
56481       input_path=`$CYGPATH -u "$shortmode_path"`
56482       new_path="$input_path"
56483     fi
56484   fi
56485 
56486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56487   if test "x$test_cygdrive_prefix" = x; then
56488     # As a simple fix, exclude /usr/bin since it's not a real path.
56489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56491       # a path prefixed by /cygdrive for fixpath to work.
56492       new_path="$CYGWIN_ROOT_PATH$input_path"
56493     fi
56494   fi
56495 
56496 
56497   if test "x$path" != "x$new_path"; then
56498     MSVC_DLL="$new_path"
56499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56500 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56501   fi
56502 
56503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56504 
56505   path="$MSVC_DLL"
56506   has_colon=`$ECHO $path | $GREP ^.:`
56507   new_path="$path"
56508   if test "x$has_colon" = x; then
56509     # Not in mixed or Windows style, start by that.
56510     new_path=`cmd //c echo $path`
56511   fi
56512 
56513 
56514   input_path="$new_path"
56515   # Check if we need to convert this using DOS-style short mode. If the path
56516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56517   # take no chances and rewrite it.
56518   # Note: m4 eats our [], so we need to use [ and ] instead.
56519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56520   if test "x$has_forbidden_chars" != x; then
56521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56523   fi
56524 
56525 
56526   windows_path="$new_path"
56527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56528     unix_path=`$CYGPATH -u "$windows_path"`
56529     new_path="$unix_path"
56530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56532     new_path="$unix_path"
56533   fi
56534 
56535   if test "x$path" != "x$new_path"; then
56536     MSVC_DLL="$new_path"
56537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56538 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56539   fi
56540 
56541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56543 
56544     else
56545       # We're on a unix platform. Hooray! :)
56546       path="$MSVC_DLL"
56547       has_space=`$ECHO "$path" | $GREP " "`
56548       if test "x$has_space" != x; then
56549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56550 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56551         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56552       fi
56553 
56554       # Use eval to expand a potential ~
56555       eval path="$path"
56556       if test ! -f "$path" && test ! -d "$path"; then
56557         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56558       fi
56559 
56560       if test -d "$path"; then
56561         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56562       else
56563         dir="`$DIRNAME "$path"`"
56564         base="`$BASENAME "$path"`"
56565         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56566       fi
56567     fi
56568   fi
56569 
56570       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56571 $as_echo_n "checking for $DLL_NAME... " >&6; }
56572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56573 $as_echo "$MSVC_DLL" >&6; }
56574     else
56575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56576 $as_echo "incorrect, ignoring" >&6; }
56577       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56578 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56579     fi
56580   fi
56581 
56582   fi
56583 
56584   if test "x$MSVC_DLL" = x; then
56585     # Probe: Look in the Windows system32 directory
56586     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56587 
56588   windows_path="$CYGWIN_SYSTEMROOT"
56589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56590     unix_path=`$CYGPATH -u "$windows_path"`
56591     CYGWIN_SYSTEMROOT="$unix_path"
56592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56594     CYGWIN_SYSTEMROOT="$unix_path"
56595   fi
56596 
56597     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56598 
56599   DLL_NAME="$DLL_NAME"
56600   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56601   METHOD="well-known location in SYSTEMROOT"
56602   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56603     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56604 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56605 
56606     # Need to check if the found msvcr is correct architecture
56607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56608 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56609     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56610     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56611       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56612       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56613       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56614         CORRECT_MSVCR_ARCH="PE32 executable"
56615       else
56616         CORRECT_MSVCR_ARCH="PE32+ executable"
56617       fi
56618     else
56619       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56620         CORRECT_MSVCR_ARCH=386
56621       else
56622         CORRECT_MSVCR_ARCH=x86-64
56623       fi
56624     fi
56625     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56626       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56627 $as_echo "ok" >&6; }
56628       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56629 
56630   # Only process if variable expands to non-empty
56631 
56632   if test "x$MSVC_DLL" != x; then
56633     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56634 
56635   # Input might be given as Windows format, start by converting to
56636   # unix format.
56637   path="$MSVC_DLL"
56638   new_path=`$CYGPATH -u "$path"`
56639 
56640   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56641   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56642   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56643   # "foo.exe" is OK but "foo" is an error.
56644   #
56645   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56646   # It is also a way to make sure we got the proper file name for the real test later on.
56647   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56648   if test "x$test_shortpath" = x; then
56649     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56650 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56651     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56652   fi
56653 
56654   # Call helper function which possibly converts this using DOS-style short mode.
56655   # If so, the updated path is stored in $new_path.
56656 
56657   input_path="$new_path"
56658   # Check if we need to convert this using DOS-style short mode. If the path
56659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56660   # take no chances and rewrite it.
56661   # Note: m4 eats our [], so we need to use [ and ] instead.
56662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56663   if test "x$has_forbidden_chars" != x; then
56664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56665     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56666     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56667     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56668       # Going to short mode and back again did indeed matter. Since short mode is
56669       # case insensitive, let's make it lowercase to improve readability.
56670       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56671       # Now convert it back to Unix-style (cygpath)
56672       input_path=`$CYGPATH -u "$shortmode_path"`
56673       new_path="$input_path"
56674     fi
56675   fi
56676 
56677   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56678   if test "x$test_cygdrive_prefix" = x; then
56679     # As a simple fix, exclude /usr/bin since it's not a real path.
56680     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56681       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56682       # a path prefixed by /cygdrive for fixpath to work.
56683       new_path="$CYGWIN_ROOT_PATH$input_path"
56684     fi
56685   fi
56686 
56687 
56688   if test "x$path" != "x$new_path"; then
56689     MSVC_DLL="$new_path"
56690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56691 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56692   fi
56693 
56694     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56695 
56696   path="$MSVC_DLL"
56697   has_colon=`$ECHO $path | $GREP ^.:`
56698   new_path="$path"
56699   if test "x$has_colon" = x; then
56700     # Not in mixed or Windows style, start by that.
56701     new_path=`cmd //c echo $path`
56702   fi
56703 
56704 
56705   input_path="$new_path"
56706   # Check if we need to convert this using DOS-style short mode. If the path
56707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56708   # take no chances and rewrite it.
56709   # Note: m4 eats our [], so we need to use [ and ] instead.
56710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56711   if test "x$has_forbidden_chars" != x; then
56712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56714   fi
56715 
56716 
56717   windows_path="$new_path"
56718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56719     unix_path=`$CYGPATH -u "$windows_path"`
56720     new_path="$unix_path"
56721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56723     new_path="$unix_path"
56724   fi
56725 
56726   if test "x$path" != "x$new_path"; then
56727     MSVC_DLL="$new_path"
56728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56729 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56730   fi
56731 
56732   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56733   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56734 
56735     else
56736       # We're on a unix platform. Hooray! :)
56737       path="$MSVC_DLL"
56738       has_space=`$ECHO "$path" | $GREP " "`
56739       if test "x$has_space" != x; then
56740         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56741 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56742         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56743       fi
56744 
56745       # Use eval to expand a potential ~
56746       eval path="$path"
56747       if test ! -f "$path" && test ! -d "$path"; then
56748         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56749       fi
56750 
56751       if test -d "$path"; then
56752         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56753       else
56754         dir="`$DIRNAME "$path"`"
56755         base="`$BASENAME "$path"`"
56756         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56757       fi
56758     fi
56759   fi
56760 
56761       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56762 $as_echo_n "checking for $DLL_NAME... " >&6; }
56763       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56764 $as_echo "$MSVC_DLL" >&6; }
56765     else
56766       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56767 $as_echo "incorrect, ignoring" >&6; }
56768       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56769 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56770     fi
56771   fi
56772 
56773   fi
56774 
56775   if test "x$MSVC_DLL" = x; then
56776     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56777     if test "x$VS100COMNTOOLS" != x; then
56778       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56779 
56780   windows_path="$CYGWIN_VS_TOOLS_DIR"
56781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56782     unix_path=`$CYGPATH -u "$windows_path"`
56783     CYGWIN_VS_TOOLS_DIR="$unix_path"
56784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56786     CYGWIN_VS_TOOLS_DIR="$unix_path"
56787   fi
56788 
56789       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56790         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56791             | $GREP -i /x64/ | $HEAD --lines 1`
56792       else
56793         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56794             | $GREP -i /x86/ | $HEAD --lines 1`
56795       fi
56796 
56797   DLL_NAME="$DLL_NAME"
56798   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56799   METHOD="search of VS100COMNTOOLS"
56800   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56801     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56802 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56803 
56804     # Need to check if the found msvcr is correct architecture
56805     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56806 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56807     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56808     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56809       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56810       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56811       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56812         CORRECT_MSVCR_ARCH="PE32 executable"
56813       else
56814         CORRECT_MSVCR_ARCH="PE32+ executable"
56815       fi
56816     else
56817       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56818         CORRECT_MSVCR_ARCH=386
56819       else
56820         CORRECT_MSVCR_ARCH=x86-64
56821       fi
56822     fi
56823     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56824       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56825 $as_echo "ok" >&6; }
56826       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56827 
56828   # Only process if variable expands to non-empty
56829 
56830   if test "x$MSVC_DLL" != x; then
56831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56832 
56833   # Input might be given as Windows format, start by converting to
56834   # unix format.
56835   path="$MSVC_DLL"
56836   new_path=`$CYGPATH -u "$path"`
56837 
56838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56841   # "foo.exe" is OK but "foo" is an error.
56842   #
56843   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56844   # It is also a way to make sure we got the proper file name for the real test later on.
56845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56846   if test "x$test_shortpath" = x; then
56847     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56848 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56849     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56850   fi
56851 
56852   # Call helper function which possibly converts this using DOS-style short mode.
56853   # If so, the updated path is stored in $new_path.
56854 
56855   input_path="$new_path"
56856   # Check if we need to convert this using DOS-style short mode. If the path
56857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56858   # take no chances and rewrite it.
56859   # Note: m4 eats our [], so we need to use [ and ] instead.
56860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56861   if test "x$has_forbidden_chars" != x; then
56862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56863     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56864     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56865     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56866       # Going to short mode and back again did indeed matter. Since short mode is
56867       # case insensitive, let's make it lowercase to improve readability.
56868       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56869       # Now convert it back to Unix-style (cygpath)
56870       input_path=`$CYGPATH -u "$shortmode_path"`
56871       new_path="$input_path"
56872     fi
56873   fi
56874 
56875   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56876   if test "x$test_cygdrive_prefix" = x; then
56877     # As a simple fix, exclude /usr/bin since it's not a real path.
56878     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56879       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56880       # a path prefixed by /cygdrive for fixpath to work.
56881       new_path="$CYGWIN_ROOT_PATH$input_path"
56882     fi
56883   fi
56884 
56885 
56886   if test "x$path" != "x$new_path"; then
56887     MSVC_DLL="$new_path"
56888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56889 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56890   fi
56891 
56892     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56893 
56894   path="$MSVC_DLL"
56895   has_colon=`$ECHO $path | $GREP ^.:`
56896   new_path="$path"
56897   if test "x$has_colon" = x; then
56898     # Not in mixed or Windows style, start by that.
56899     new_path=`cmd //c echo $path`
56900   fi
56901 
56902 
56903   input_path="$new_path"
56904   # Check if we need to convert this using DOS-style short mode. If the path
56905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56906   # take no chances and rewrite it.
56907   # Note: m4 eats our [], so we need to use [ and ] instead.
56908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56909   if test "x$has_forbidden_chars" != x; then
56910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56912   fi
56913 
56914 
56915   windows_path="$new_path"
56916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56917     unix_path=`$CYGPATH -u "$windows_path"`
56918     new_path="$unix_path"
56919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56921     new_path="$unix_path"
56922   fi
56923 
56924   if test "x$path" != "x$new_path"; then
56925     MSVC_DLL="$new_path"
56926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56927 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56928   fi
56929 
56930   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56931   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56932 
56933     else
56934       # We're on a unix platform. Hooray! :)
56935       path="$MSVC_DLL"
56936       has_space=`$ECHO "$path" | $GREP " "`
56937       if test "x$has_space" != x; then
56938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56939 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56940         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56941       fi
56942 
56943       # Use eval to expand a potential ~
56944       eval path="$path"
56945       if test ! -f "$path" && test ! -d "$path"; then
56946         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56947       fi
56948 
56949       if test -d "$path"; then
56950         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56951       else
56952         dir="`$DIRNAME "$path"`"
56953         base="`$BASENAME "$path"`"
56954         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56955       fi
56956     fi
56957   fi
56958 
56959       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56960 $as_echo_n "checking for $DLL_NAME... " >&6; }
56961       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56962 $as_echo "$MSVC_DLL" >&6; }
56963     else
56964       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56965 $as_echo "incorrect, ignoring" >&6; }
56966       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56967 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56968     fi
56969   fi
56970 
56971     fi
56972   fi
56973 
56974   if test "x$MSVC_DLL" = x; then
56975     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56976     # (This was the original behaviour; kept since it might turn something up)
56977     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56978       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56979         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56980             | $GREP x64 | $HEAD --lines 1`
56981       else
56982         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56983             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56984         if test "x$POSSIBLE_MSVC_DLL" = x; then
56985           # We're grasping at straws now...
56986           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56987               | $HEAD --lines 1`
56988         fi
56989       fi
56990 
56991 
56992   DLL_NAME="$DLL_NAME"
56993   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56994   METHOD="search of VCINSTALLDIR"
56995   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56996     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56997 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56998 
56999     # Need to check if the found msvcr is correct architecture
57000     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57001 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57002     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57004       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57005       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57006       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57007         CORRECT_MSVCR_ARCH="PE32 executable"
57008       else
57009         CORRECT_MSVCR_ARCH="PE32+ executable"
57010       fi
57011     else
57012       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57013         CORRECT_MSVCR_ARCH=386
57014       else
57015         CORRECT_MSVCR_ARCH=x86-64
57016       fi
57017     fi
57018     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57019       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57020 $as_echo "ok" >&6; }
57021       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57022 
57023   # Only process if variable expands to non-empty
57024 
57025   if test "x$MSVC_DLL" != x; then
57026     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57027 
57028   # Input might be given as Windows format, start by converting to
57029   # unix format.
57030   path="$MSVC_DLL"
57031   new_path=`$CYGPATH -u "$path"`
57032 
57033   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57034   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57035   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57036   # "foo.exe" is OK but "foo" is an error.
57037   #
57038   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57039   # It is also a way to make sure we got the proper file name for the real test later on.
57040   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57041   if test "x$test_shortpath" = x; then
57042     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57043 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57044     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57045   fi
57046 
57047   # Call helper function which possibly converts this using DOS-style short mode.
57048   # If so, the updated path is stored in $new_path.
57049 
57050   input_path="$new_path"
57051   # Check if we need to convert this using DOS-style short mode. If the path
57052   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57053   # take no chances and rewrite it.
57054   # Note: m4 eats our [], so we need to use [ and ] instead.
57055   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57056   if test "x$has_forbidden_chars" != x; then
57057     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57058     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57059     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57060     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57061       # Going to short mode and back again did indeed matter. Since short mode is
57062       # case insensitive, let's make it lowercase to improve readability.
57063       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57064       # Now convert it back to Unix-style (cygpath)
57065       input_path=`$CYGPATH -u "$shortmode_path"`
57066       new_path="$input_path"
57067     fi
57068   fi
57069 
57070   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57071   if test "x$test_cygdrive_prefix" = x; then
57072     # As a simple fix, exclude /usr/bin since it's not a real path.
57073     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57074       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57075       # a path prefixed by /cygdrive for fixpath to work.
57076       new_path="$CYGWIN_ROOT_PATH$input_path"
57077     fi
57078   fi
57079 
57080 
57081   if test "x$path" != "x$new_path"; then
57082     MSVC_DLL="$new_path"
57083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57084 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57085   fi
57086 
57087     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57088 
57089   path="$MSVC_DLL"
57090   has_colon=`$ECHO $path | $GREP ^.:`
57091   new_path="$path"
57092   if test "x$has_colon" = x; then
57093     # Not in mixed or Windows style, start by that.
57094     new_path=`cmd //c echo $path`
57095   fi
57096 
57097 
57098   input_path="$new_path"
57099   # Check if we need to convert this using DOS-style short mode. If the path
57100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57101   # take no chances and rewrite it.
57102   # Note: m4 eats our [], so we need to use [ and ] instead.
57103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57104   if test "x$has_forbidden_chars" != x; then
57105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57106     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57107   fi
57108 
57109 
57110   windows_path="$new_path"
57111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57112     unix_path=`$CYGPATH -u "$windows_path"`
57113     new_path="$unix_path"
57114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57116     new_path="$unix_path"
57117   fi
57118 
57119   if test "x$path" != "x$new_path"; then
57120     MSVC_DLL="$new_path"
57121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57122 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57123   fi
57124 
57125   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57126   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57127 
57128     else
57129       # We're on a unix platform. Hooray! :)
57130       path="$MSVC_DLL"
57131       has_space=`$ECHO "$path" | $GREP " "`
57132       if test "x$has_space" != x; then
57133         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57134 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57135         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57136       fi
57137 
57138       # Use eval to expand a potential ~
57139       eval path="$path"
57140       if test ! -f "$path" && test ! -d "$path"; then
57141         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57142       fi
57143 
57144       if test -d "$path"; then
57145         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57146       else
57147         dir="`$DIRNAME "$path"`"
57148         base="`$BASENAME "$path"`"
57149         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57150       fi
57151     fi
57152   fi
57153 
57154       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57155 $as_echo_n "checking for $DLL_NAME... " >&6; }
57156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57157 $as_echo "$MSVC_DLL" >&6; }
57158     else
57159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57160 $as_echo "incorrect, ignoring" >&6; }
57161       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57162 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57163     fi
57164   fi
57165 
57166     fi
57167   fi
57168 
57169   if test "x$MSVC_DLL" = x; then
57170     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57171 $as_echo_n "checking for $DLL_NAME... " >&6; }
57172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57173 $as_echo "no" >&6; }
57174     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57175   fi
57176 
57177       MSVCP_DLL="$MSVC_DLL"
57178     fi
57179 
57180   fi
57181 
57182   fi
57183 
57184 
57185   if test "x$NEEDS_LIB_X11" = xfalse; then
57186     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57187       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57188 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57189     fi
57190     X_CFLAGS=
57191     X_LIBS=
57192   else
57193 
57194     if test "x${with_x}" = xno; then
57195       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57196     fi
57197 
57198     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57199       # The user has specified a X11 base directory. Use it for includes and
57200       # libraries, unless explicitly overridden.
57201       if test "x$x_includes" = xNONE; then
57202         x_includes="${with_x}/include"
57203       fi
57204       if test "x$x_libraries" = xNONE; then
57205         x_libraries="${with_x}/lib"
57206       fi
57207     else
57208       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57209       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57210       # --x-libraries for the sysroot, if that seems to be correct.
57211       if test "x$SYSROOT" != "x"; then
57212         if test "x$x_includes" = xNONE; then
57213           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57214             x_includes="$SYSROOT/usr/X11R6/include"
57215           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57216             x_includes="$SYSROOT/usr/include"
57217           fi
57218         fi
57219         if test "x$x_libraries" = xNONE; then
57220           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57221             x_libraries="$SYSROOT/usr/X11R6/lib"
57222           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57223             x_libraries="$SYSROOT/usr/lib64"
57224           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57225             x_libraries="$SYSROOT/usr/lib"
57226           fi
57227         fi
57228       fi
57229     fi
57230 
57231     # Now let autoconf do it's magic
57232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57233 $as_echo_n "checking for X... " >&6; }
57234 
57235 
57236 # Check whether --with-x was given.
57237 if test "${with_x+set}" = set; then :
57238   withval=$with_x;
57239 fi
57240 
57241 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57242 if test "x$with_x" = xno; then
57243   # The user explicitly disabled X.
57244   have_x=disabled
57245 else
57246   case $x_includes,$x_libraries in #(
57247     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57248     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57249   $as_echo_n "(cached) " >&6
57250 else
57251   # One or both of the vars are not set, and there is no cached value.
57252 ac_x_includes=no ac_x_libraries=no
57253 rm -f -r conftest.dir
57254 if mkdir conftest.dir; then
57255   cd conftest.dir
57256   cat >Imakefile <<'_ACEOF'
57257 incroot:
57258         @echo incroot='${INCROOT}'
57259 usrlibdir:
57260         @echo usrlibdir='${USRLIBDIR}'
57261 libdir:
57262         @echo libdir='${LIBDIR}'
57263 _ACEOF
57264   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57265     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57266     for ac_var in incroot usrlibdir libdir; do
57267       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57268     done
57269     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57270     for ac_extension in a so sl dylib la dll; do
57271       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57272          test -f "$ac_im_libdir/libX11.$ac_extension"; then
57273         ac_im_usrlibdir=$ac_im_libdir; break
57274       fi
57275     done
57276     # Screen out bogus values from the imake configuration.  They are
57277     # bogus both because they are the default anyway, and because
57278     # using them would break gcc on systems where it needs fixed includes.
57279     case $ac_im_incroot in
57280         /usr/include) ac_x_includes= ;;
57281         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57282     esac
57283     case $ac_im_usrlibdir in
57284         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
57285         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57286     esac
57287   fi
57288   cd ..
57289   rm -f -r conftest.dir
57290 fi
57291 
57292 # Standard set of common directories for X headers.
57293 # Check X11 before X11Rn because it is often a symlink to the current release.
57294 ac_x_header_dirs='
57295 /usr/X11/include
57296 /usr/X11R7/include
57297 /usr/X11R6/include
57298 /usr/X11R5/include
57299 /usr/X11R4/include
57300 
57301 /usr/include/X11
57302 /usr/include/X11R7
57303 /usr/include/X11R6
57304 /usr/include/X11R5
57305 /usr/include/X11R4
57306 
57307 /usr/local/X11/include
57308 /usr/local/X11R7/include
57309 /usr/local/X11R6/include
57310 /usr/local/X11R5/include
57311 /usr/local/X11R4/include
57312 
57313 /usr/local/include/X11
57314 /usr/local/include/X11R7
57315 /usr/local/include/X11R6
57316 /usr/local/include/X11R5
57317 /usr/local/include/X11R4
57318 
57319 /usr/X386/include
57320 /usr/x386/include
57321 /usr/XFree86/include/X11
57322 
57323 /usr/include
57324 /usr/local/include
57325 /usr/unsupported/include
57326 /usr/athena/include
57327 /usr/local/x11r5/include
57328 /usr/lpp/Xamples/include
57329 
57330 /usr/openwin/include
57331 /usr/openwin/share/include'
57332 
57333 if test "$ac_x_includes" = no; then
57334   # Guess where to find include files, by looking for Xlib.h.
57335   # First, try using that file with no special directory specified.
57336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57337 /* end confdefs.h.  */
57338 #include <X11/Xlib.h>
57339 _ACEOF
57340 if ac_fn_cxx_try_cpp "$LINENO"; then :
57341   # We can compile using X headers with no special include directory.
57342 ac_x_includes=
57343 else
57344   for ac_dir in $ac_x_header_dirs; do
57345   if test -r "$ac_dir/X11/Xlib.h"; then
57346     ac_x_includes=$ac_dir
57347     break
57348   fi
57349 done
57350 fi
57351 rm -f conftest.err conftest.i conftest.$ac_ext
57352 fi # $ac_x_includes = no
57353 
57354 if test "$ac_x_libraries" = no; then
57355   # Check for the libraries.
57356   # See if we find them without any special options.
57357   # Don't add to $LIBS permanently.
57358   ac_save_LIBS=$LIBS
57359   LIBS="-lX11 $LIBS"
57360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57361 /* end confdefs.h.  */
57362 #include <X11/Xlib.h>
57363 int
57364 main ()
57365 {
57366 XrmInitialize ()
57367   ;
57368   return 0;
57369 }
57370 _ACEOF
57371 if ac_fn_cxx_try_link "$LINENO"; then :
57372   LIBS=$ac_save_LIBS
57373 # We can link X programs with no special library path.
57374 ac_x_libraries=
57375 else
57376   LIBS=$ac_save_LIBS
57377 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57378 do
57379   # Don't even attempt the hair of trying to link an X program!
57380   for ac_extension in a so sl dylib la dll; do
57381     if test -r "$ac_dir/libX11.$ac_extension"; then
57382       ac_x_libraries=$ac_dir
57383       break 2
57384     fi
57385   done
57386 done
57387 fi
57388 rm -f core conftest.err conftest.$ac_objext \
57389     conftest$ac_exeext conftest.$ac_ext
57390 fi # $ac_x_libraries = no
57391 
57392 case $ac_x_includes,$ac_x_libraries in #(
57393   no,* | *,no | *\'*)
57394     # Didn't find X, or a directory has "'" in its name.
57395     ac_cv_have_x="have_x=no";; #(
57396   *)
57397     # Record where we found X for the cache.
57398     ac_cv_have_x="have_x=yes\
57399         ac_x_includes='$ac_x_includes'\
57400         ac_x_libraries='$ac_x_libraries'"
57401 esac
57402 fi
57403 ;; #(
57404     *) have_x=yes;;
57405   esac
57406   eval "$ac_cv_have_x"
57407 fi # $with_x != no
57408 
57409 if test "$have_x" != yes; then
57410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57411 $as_echo "$have_x" >&6; }
57412   no_x=yes
57413 else
57414   # If each of the values was on the command line, it overrides each guess.
57415   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57416   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57417   # Update the cache value to reflect the command line values.
57418   ac_cv_have_x="have_x=yes\
57419         ac_x_includes='$x_includes'\
57420         ac_x_libraries='$x_libraries'"
57421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57422 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57423 fi
57424 
57425     if test "$no_x" = yes; then
57426   # Not all programs may use this symbol, but it does not hurt to define it.
57427 
57428 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57429 
57430   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57431 else
57432   if test -n "$x_includes"; then
57433     X_CFLAGS="$X_CFLAGS -I$x_includes"
57434   fi
57435 
57436   # It would also be nice to do this for all -L options, not just this one.
57437   if test -n "$x_libraries"; then
57438     X_LIBS="$X_LIBS -L$x_libraries"
57439     # For Solaris; some versions of Sun CC require a space after -R and
57440     # others require no space.  Words are not sufficient . . . .
57441     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57442 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
57443     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57444     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57445     ac_cxx_werror_flag=yes
57446     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57447 /* end confdefs.h.  */
57448 
57449 int
57450 main ()
57451 {
57452 
57453   ;
57454   return 0;
57455 }
57456 _ACEOF
57457 if ac_fn_cxx_try_link "$LINENO"; then :
57458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57459 $as_echo "no" >&6; }
57460        X_LIBS="$X_LIBS -R$x_libraries"
57461 else
57462   LIBS="$ac_xsave_LIBS -R $x_libraries"
57463        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57464 /* end confdefs.h.  */
57465 
57466 int
57467 main ()
57468 {
57469 
57470   ;
57471   return 0;
57472 }
57473 _ACEOF
57474 if ac_fn_cxx_try_link "$LINENO"; then :
57475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57476 $as_echo "yes" >&6; }
57477           X_LIBS="$X_LIBS -R $x_libraries"
57478 else
57479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57480 $as_echo "neither works" >&6; }
57481 fi
57482 rm -f core conftest.err conftest.$ac_objext \
57483     conftest$ac_exeext conftest.$ac_ext
57484 fi
57485 rm -f core conftest.err conftest.$ac_objext \
57486     conftest$ac_exeext conftest.$ac_ext
57487     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57488     LIBS=$ac_xsave_LIBS
57489   fi
57490 
57491   # Check for system-dependent libraries X programs must link with.
57492   # Do this before checking for the system-independent R6 libraries
57493   # (-lICE), since we may need -lsocket or whatever for X linking.
57494 
57495   if test "$ISC" = yes; then
57496     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57497   else
57498     # Martyn Johnson says this is needed for Ultrix, if the X
57499     # libraries were built with DECnet support.  And Karl Berry says
57500     # the Alpha needs dnet_stub (dnet does not exist).
57501     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57502     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57503 /* end confdefs.h.  */
57504 
57505 /* Override any GCC internal prototype to avoid an error.
57506    Use char because int might match the return type of a GCC
57507    builtin and then its argument prototype would still apply.  */
57508 #ifdef __cplusplus
57509 extern "C"
57510 #endif
57511 char XOpenDisplay ();
57512 int
57513 main ()
57514 {
57515 return XOpenDisplay ();
57516   ;
57517   return 0;
57518 }
57519 _ACEOF
57520 if ac_fn_cxx_try_link "$LINENO"; then :
57521 
57522 else
57523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57524 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57525 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57526   $as_echo_n "(cached) " >&6
57527 else
57528   ac_check_lib_save_LIBS=$LIBS
57529 LIBS="-ldnet  $LIBS"
57530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57531 /* end confdefs.h.  */
57532 
57533 /* Override any GCC internal prototype to avoid an error.
57534    Use char because int might match the return type of a GCC
57535    builtin and then its argument prototype would still apply.  */
57536 #ifdef __cplusplus
57537 extern "C"
57538 #endif
57539 char dnet_ntoa ();
57540 int
57541 main ()
57542 {
57543 return dnet_ntoa ();
57544   ;
57545   return 0;
57546 }
57547 _ACEOF
57548 if ac_fn_cxx_try_link "$LINENO"; then :
57549   ac_cv_lib_dnet_dnet_ntoa=yes
57550 else
57551   ac_cv_lib_dnet_dnet_ntoa=no
57552 fi
57553 rm -f core conftest.err conftest.$ac_objext \
57554     conftest$ac_exeext conftest.$ac_ext
57555 LIBS=$ac_check_lib_save_LIBS
57556 fi
57557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57558 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57559 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57560   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57561 fi
57562 
57563     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57564       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57565 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57566 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57567   $as_echo_n "(cached) " >&6
57568 else
57569   ac_check_lib_save_LIBS=$LIBS
57570 LIBS="-ldnet_stub  $LIBS"
57571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57572 /* end confdefs.h.  */
57573 
57574 /* Override any GCC internal prototype to avoid an error.
57575    Use char because int might match the return type of a GCC
57576    builtin and then its argument prototype would still apply.  */
57577 #ifdef __cplusplus
57578 extern "C"
57579 #endif
57580 char dnet_ntoa ();
57581 int
57582 main ()
57583 {
57584 return dnet_ntoa ();
57585   ;
57586   return 0;
57587 }
57588 _ACEOF
57589 if ac_fn_cxx_try_link "$LINENO"; then :
57590   ac_cv_lib_dnet_stub_dnet_ntoa=yes
57591 else
57592   ac_cv_lib_dnet_stub_dnet_ntoa=no
57593 fi
57594 rm -f core conftest.err conftest.$ac_objext \
57595     conftest$ac_exeext conftest.$ac_ext
57596 LIBS=$ac_check_lib_save_LIBS
57597 fi
57598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57599 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57600 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57601   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57602 fi
57603 
57604     fi
57605 fi
57606 rm -f core conftest.err conftest.$ac_objext \
57607     conftest$ac_exeext conftest.$ac_ext
57608     LIBS="$ac_xsave_LIBS"
57609 
57610     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57611     # to get the SysV transport functions.
57612     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57613     # needs -lnsl.
57614     # The nsl library prevents programs from opening the X display
57615     # on Irix 5.2, according to T.E. Dickey.
57616     # The functions gethostbyname, getservbyname, and inet_addr are
57617     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57618     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57619 if test "x$ac_cv_func_gethostbyname" = xyes; then :
57620 
57621 fi
57622 
57623     if test $ac_cv_func_gethostbyname = no; then
57624       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57625 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57626 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57627   $as_echo_n "(cached) " >&6
57628 else
57629   ac_check_lib_save_LIBS=$LIBS
57630 LIBS="-lnsl  $LIBS"
57631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57632 /* end confdefs.h.  */
57633 
57634 /* Override any GCC internal prototype to avoid an error.
57635    Use char because int might match the return type of a GCC
57636    builtin and then its argument prototype would still apply.  */
57637 #ifdef __cplusplus
57638 extern "C"
57639 #endif
57640 char gethostbyname ();
57641 int
57642 main ()
57643 {
57644 return gethostbyname ();
57645   ;
57646   return 0;
57647 }
57648 _ACEOF
57649 if ac_fn_cxx_try_link "$LINENO"; then :
57650   ac_cv_lib_nsl_gethostbyname=yes
57651 else
57652   ac_cv_lib_nsl_gethostbyname=no
57653 fi
57654 rm -f core conftest.err conftest.$ac_objext \
57655     conftest$ac_exeext conftest.$ac_ext
57656 LIBS=$ac_check_lib_save_LIBS
57657 fi
57658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57659 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57660 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57661   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57662 fi
57663 
57664       if test $ac_cv_lib_nsl_gethostbyname = no; then
57665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57666 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57667 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57668   $as_echo_n "(cached) " >&6
57669 else
57670   ac_check_lib_save_LIBS=$LIBS
57671 LIBS="-lbsd  $LIBS"
57672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57673 /* end confdefs.h.  */
57674 
57675 /* Override any GCC internal prototype to avoid an error.
57676    Use char because int might match the return type of a GCC
57677    builtin and then its argument prototype would still apply.  */
57678 #ifdef __cplusplus
57679 extern "C"
57680 #endif
57681 char gethostbyname ();
57682 int
57683 main ()
57684 {
57685 return gethostbyname ();
57686   ;
57687   return 0;
57688 }
57689 _ACEOF
57690 if ac_fn_cxx_try_link "$LINENO"; then :
57691   ac_cv_lib_bsd_gethostbyname=yes
57692 else
57693   ac_cv_lib_bsd_gethostbyname=no
57694 fi
57695 rm -f core conftest.err conftest.$ac_objext \
57696     conftest$ac_exeext conftest.$ac_ext
57697 LIBS=$ac_check_lib_save_LIBS
57698 fi
57699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57700 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57701 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57702   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57703 fi
57704 
57705       fi
57706     fi
57707 
57708     # lieder@skyler.mavd.honeywell.com says without -lsocket,
57709     # socket/setsockopt and other routines are undefined under SCO ODT
57710     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57711     # on later versions), says Simon Leinen: it contains gethostby*
57712     # variants that don't use the name server (or something).  -lsocket
57713     # must be given before -lnsl if both are needed.  We assume that
57714     # if connect needs -lnsl, so does gethostbyname.
57715     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57716 if test "x$ac_cv_func_connect" = xyes; then :
57717 
57718 fi
57719 
57720     if test $ac_cv_func_connect = no; then
57721       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57722 $as_echo_n "checking for connect in -lsocket... " >&6; }
57723 if ${ac_cv_lib_socket_connect+:} false; then :
57724   $as_echo_n "(cached) " >&6
57725 else
57726   ac_check_lib_save_LIBS=$LIBS
57727 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57729 /* end confdefs.h.  */
57730 
57731 /* Override any GCC internal prototype to avoid an error.
57732    Use char because int might match the return type of a GCC
57733    builtin and then its argument prototype would still apply.  */
57734 #ifdef __cplusplus
57735 extern "C"
57736 #endif
57737 char connect ();
57738 int
57739 main ()
57740 {
57741 return connect ();
57742   ;
57743   return 0;
57744 }
57745 _ACEOF
57746 if ac_fn_cxx_try_link "$LINENO"; then :
57747   ac_cv_lib_socket_connect=yes
57748 else
57749   ac_cv_lib_socket_connect=no
57750 fi
57751 rm -f core conftest.err conftest.$ac_objext \
57752     conftest$ac_exeext conftest.$ac_ext
57753 LIBS=$ac_check_lib_save_LIBS
57754 fi
57755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57756 $as_echo "$ac_cv_lib_socket_connect" >&6; }
57757 if test "x$ac_cv_lib_socket_connect" = xyes; then :
57758   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57759 fi
57760 
57761     fi
57762 
57763     # Guillermo Gomez says -lposix is necessary on A/UX.
57764     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57765 if test "x$ac_cv_func_remove" = xyes; then :
57766 
57767 fi
57768 
57769     if test $ac_cv_func_remove = no; then
57770       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57771 $as_echo_n "checking for remove in -lposix... " >&6; }
57772 if ${ac_cv_lib_posix_remove+:} false; then :
57773   $as_echo_n "(cached) " >&6
57774 else
57775   ac_check_lib_save_LIBS=$LIBS
57776 LIBS="-lposix  $LIBS"
57777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57778 /* end confdefs.h.  */
57779 
57780 /* Override any GCC internal prototype to avoid an error.
57781    Use char because int might match the return type of a GCC
57782    builtin and then its argument prototype would still apply.  */
57783 #ifdef __cplusplus
57784 extern "C"
57785 #endif
57786 char remove ();
57787 int
57788 main ()
57789 {
57790 return remove ();
57791   ;
57792   return 0;
57793 }
57794 _ACEOF
57795 if ac_fn_cxx_try_link "$LINENO"; then :
57796   ac_cv_lib_posix_remove=yes
57797 else
57798   ac_cv_lib_posix_remove=no
57799 fi
57800 rm -f core conftest.err conftest.$ac_objext \
57801     conftest$ac_exeext conftest.$ac_ext
57802 LIBS=$ac_check_lib_save_LIBS
57803 fi
57804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57805 $as_echo "$ac_cv_lib_posix_remove" >&6; }
57806 if test "x$ac_cv_lib_posix_remove" = xyes; then :
57807   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57808 fi
57809 
57810     fi
57811 
57812     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57813     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57814 if test "x$ac_cv_func_shmat" = xyes; then :
57815 
57816 fi
57817 
57818     if test $ac_cv_func_shmat = no; then
57819       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57820 $as_echo_n "checking for shmat in -lipc... " >&6; }
57821 if ${ac_cv_lib_ipc_shmat+:} false; then :
57822   $as_echo_n "(cached) " >&6
57823 else
57824   ac_check_lib_save_LIBS=$LIBS
57825 LIBS="-lipc  $LIBS"
57826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57827 /* end confdefs.h.  */
57828 
57829 /* Override any GCC internal prototype to avoid an error.
57830    Use char because int might match the return type of a GCC
57831    builtin and then its argument prototype would still apply.  */
57832 #ifdef __cplusplus
57833 extern "C"
57834 #endif
57835 char shmat ();
57836 int
57837 main ()
57838 {
57839 return shmat ();
57840   ;
57841   return 0;
57842 }
57843 _ACEOF
57844 if ac_fn_cxx_try_link "$LINENO"; then :
57845   ac_cv_lib_ipc_shmat=yes
57846 else
57847   ac_cv_lib_ipc_shmat=no
57848 fi
57849 rm -f core conftest.err conftest.$ac_objext \
57850     conftest$ac_exeext conftest.$ac_ext
57851 LIBS=$ac_check_lib_save_LIBS
57852 fi
57853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57854 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57855 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57856   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57857 fi
57858 
57859     fi
57860   fi
57861 
57862   # Check for libraries that X11R6 Xt/Xaw programs need.
57863   ac_save_LDFLAGS=$LDFLAGS
57864   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57865   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57866   # check for ICE first), but we must link in the order -lSM -lICE or
57867   # we get undefined symbols.  So assume we have SM if we have ICE.
57868   # These have to be linked with before -lX11, unlike the other
57869   # libraries we check for below, so use a different variable.
57870   # John Interrante, Karl Berry
57871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57872 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57873 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57874   $as_echo_n "(cached) " >&6
57875 else
57876   ac_check_lib_save_LIBS=$LIBS
57877 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57879 /* end confdefs.h.  */
57880 
57881 /* Override any GCC internal prototype to avoid an error.
57882    Use char because int might match the return type of a GCC
57883    builtin and then its argument prototype would still apply.  */
57884 #ifdef __cplusplus
57885 extern "C"
57886 #endif
57887 char IceConnectionNumber ();
57888 int
57889 main ()
57890 {
57891 return IceConnectionNumber ();
57892   ;
57893   return 0;
57894 }
57895 _ACEOF
57896 if ac_fn_cxx_try_link "$LINENO"; then :
57897   ac_cv_lib_ICE_IceConnectionNumber=yes
57898 else
57899   ac_cv_lib_ICE_IceConnectionNumber=no
57900 fi
57901 rm -f core conftest.err conftest.$ac_objext \
57902     conftest$ac_exeext conftest.$ac_ext
57903 LIBS=$ac_check_lib_save_LIBS
57904 fi
57905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57906 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57907 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57908   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57909 fi
57910 
57911   LDFLAGS=$ac_save_LDFLAGS
57912 
57913 fi
57914 
57915 
57916     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57917     # this doesn't make sense so we remove it.
57918     if test "x$COMPILE_TYPE" = xcross; then
57919       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57920     fi
57921 
57922     if test "x$no_x" = xyes; then
57923 
57924   # Print a helpful message on how to acquire the necessary build dependency.
57925   # x11 is the help tag: freetype, cups, alsa etc
57926   MISSING_DEPENDENCY=x11
57927 
57928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57929     cygwin_help $MISSING_DEPENDENCY
57930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57931     msys_help $MISSING_DEPENDENCY
57932   else
57933     PKGHANDLER_COMMAND=
57934 
57935     case $PKGHANDLER in
57936       apt-get)
57937         apt_help     $MISSING_DEPENDENCY ;;
57938       yum)
57939         yum_help     $MISSING_DEPENDENCY ;;
57940       brew)
57941         brew_help    $MISSING_DEPENDENCY ;;
57942       port)
57943         port_help    $MISSING_DEPENDENCY ;;
57944       pkgutil)
57945         pkgutil_help $MISSING_DEPENDENCY ;;
57946       pkgadd)
57947         pkgadd_help  $MISSING_DEPENDENCY ;;
57948     esac
57949 
57950     if test "x$PKGHANDLER_COMMAND" != x; then
57951       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57952     fi
57953   fi
57954 
57955       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57956     fi
57957 
57958     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57959       OPENWIN_HOME="/usr/openwin"
57960       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57961       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57962           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57963     fi
57964 
57965     ac_ext=c
57966 ac_cpp='$CPP $CPPFLAGS'
57967 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57968 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
57970 
57971     OLD_CFLAGS="$CFLAGS"
57972     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57973 
57974     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57975     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57976 do :
57977   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57978 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57979           # include <X11/Xlib.h>
57980           # include <X11/Xutil.h>
57981 
57982 
57983 "
57984 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57985   cat >>confdefs.h <<_ACEOF
57986 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57987 _ACEOF
57988  X11_HEADERS_OK=yes
57989 else
57990   X11_HEADERS_OK=no; break
57991 fi
57992 
57993 done
57994 
57995 
57996     if test "x$X11_HEADERS_OK" = xno; then
57997 
57998   # Print a helpful message on how to acquire the necessary build dependency.
57999   # x11 is the help tag: freetype, cups, alsa etc
58000   MISSING_DEPENDENCY=x11
58001 
58002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58003     cygwin_help $MISSING_DEPENDENCY
58004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58005     msys_help $MISSING_DEPENDENCY
58006   else
58007     PKGHANDLER_COMMAND=
58008 
58009     case $PKGHANDLER in
58010       apt-get)
58011         apt_help     $MISSING_DEPENDENCY ;;
58012       yum)
58013         yum_help     $MISSING_DEPENDENCY ;;
58014       brew)
58015         brew_help    $MISSING_DEPENDENCY ;;
58016       port)
58017         port_help    $MISSING_DEPENDENCY ;;
58018       pkgutil)
58019         pkgutil_help $MISSING_DEPENDENCY ;;
58020       pkgadd)
58021         pkgadd_help  $MISSING_DEPENDENCY ;;
58022     esac
58023 
58024     if test "x$PKGHANDLER_COMMAND" != x; then
58025       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58026     fi
58027   fi
58028 
58029       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58030     fi
58031 
58032     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58033     # defined in libawt_xawt.
58034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58035 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58036     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58037 /* end confdefs.h.  */
58038 #include <X11/extensions/Xrender.h>
58039 int
58040 main ()
58041 {
58042 XLinearGradient x;
58043   ;
58044   return 0;
58045 }
58046 _ACEOF
58047 if ac_fn_c_try_compile "$LINENO"; then :
58048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58049 $as_echo "yes" >&6; }
58050 else
58051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58052 $as_echo "no" >&6; }
58053          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58054 fi
58055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58056 
58057     CFLAGS="$OLD_CFLAGS"
58058     ac_ext=cpp
58059 ac_cpp='$CXXCPP $CPPFLAGS'
58060 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58061 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58062 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58063 
58064   fi # NEEDS_LIB_X11
58065 
58066 
58067 
58068 
58069 
58070 
58071 # Check whether --with-cups was given.
58072 if test "${with_cups+set}" = set; then :
58073   withval=$with_cups;
58074 fi
58075 
58076 
58077 # Check whether --with-cups-include was given.
58078 if test "${with_cups_include+set}" = set; then :
58079   withval=$with_cups_include;
58080 fi
58081 
58082 
58083   if test "x$NEEDS_LIB_CUPS" = xfalse; then
58084     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58085         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58086       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58087 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58088     fi
58089     CUPS_CFLAGS=
58090   else
58091     CUPS_FOUND=no
58092 
58093     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58094       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58095     fi
58096 
58097     if test "x${with_cups}" != x; then
58098       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58099 $as_echo_n "checking for cups headers... " >&6; }
58100       if test -s "${with_cups}/include/cups/cups.h"; then
58101         CUPS_CFLAGS="-I${with_cups}/include"
58102         CUPS_FOUND=yes
58103         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58104 $as_echo "$CUPS_FOUND" >&6; }
58105       else
58106         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58107       fi
58108     fi
58109     if test "x${with_cups_include}" != x; then
58110       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58111 $as_echo_n "checking for cups headers... " >&6; }
58112       if test -s "${with_cups_include}/cups/cups.h"; then
58113         CUPS_CFLAGS="-I${with_cups_include}"
58114         CUPS_FOUND=yes
58115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58116 $as_echo "$CUPS_FOUND" >&6; }
58117       else
58118         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58119       fi
58120     fi
58121     if test "x$CUPS_FOUND" = xno; then
58122       # Are the cups headers installed in the default /usr/include location?
58123       for ac_header in cups/cups.h cups/ppd.h
58124 do :
58125   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58126 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58127 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58128   cat >>confdefs.h <<_ACEOF
58129 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58130 _ACEOF
58131 
58132           CUPS_FOUND=yes
58133           CUPS_CFLAGS=
58134           DEFAULT_CUPS=yes
58135 
58136 fi
58137 
58138 done
58139 
58140     fi
58141     if test "x$CUPS_FOUND" = xno; then
58142 
58143   # Print a helpful message on how to acquire the necessary build dependency.
58144   # cups is the help tag: freetype, cups, alsa etc
58145   MISSING_DEPENDENCY=cups
58146 
58147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58148     cygwin_help $MISSING_DEPENDENCY
58149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58150     msys_help $MISSING_DEPENDENCY
58151   else
58152     PKGHANDLER_COMMAND=
58153 
58154     case $PKGHANDLER in
58155       apt-get)
58156         apt_help     $MISSING_DEPENDENCY ;;
58157       yum)
58158         yum_help     $MISSING_DEPENDENCY ;;
58159       brew)
58160         brew_help    $MISSING_DEPENDENCY ;;
58161       port)
58162         port_help    $MISSING_DEPENDENCY ;;
58163       pkgutil)
58164         pkgutil_help $MISSING_DEPENDENCY ;;
58165       pkgadd)
58166         pkgadd_help  $MISSING_DEPENDENCY ;;
58167     esac
58168 
58169     if test "x$PKGHANDLER_COMMAND" != x; then
58170       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58171     fi
58172   fi
58173 
58174       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58175     fi
58176   fi
58177 
58178 
58179 
58180 
58181 
58182 # Check whether --with-freetype was given.
58183 if test "${with_freetype+set}" = set; then :
58184   withval=$with_freetype;
58185 fi
58186 
58187 
58188 # Check whether --with-freetype-include was given.
58189 if test "${with_freetype_include+set}" = set; then :
58190   withval=$with_freetype_include;
58191 fi
58192 
58193 
58194 # Check whether --with-freetype-lib was given.
58195 if test "${with_freetype_lib+set}" = set; then :
58196   withval=$with_freetype_lib;
58197 fi
58198 
58199 
58200 # Check whether --with-freetype-src was given.
58201 if test "${with_freetype_src+set}" = set; then :
58202   withval=$with_freetype_src;
58203 fi
58204 
58205   # Check whether --enable-freetype-bundling was given.
58206 if test "${enable_freetype_bundling+set}" = set; then :
58207   enableval=$enable_freetype_bundling;
58208 fi
58209 
58210 
58211 # Check whether --with-freetype-license was given.
58212 if test "${with_freetype_license+set}" = set; then :
58213   withval=$with_freetype_license;
58214 fi
58215 
58216 
58217   # Need to specify explicitly since it needs to be overridden on some versions of macosx
58218   FREETYPE_BASE_NAME=freetype
58219   FREETYPE_CFLAGS=
58220   FREETYPE_LIBS=
58221   FREETYPE_BUNDLE_LIB_PATH=
58222 
58223   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58224     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58225         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58226         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58227         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58228       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58229 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58230     fi
58231     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58232       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58233 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58234     fi
58235   else
58236     # freetype is needed to build; go get it!
58237 
58238     BUNDLE_FREETYPE="$enable_freetype_bundling"
58239 
58240     if  test "x$with_freetype_src" != x; then
58241       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58242         # Try to build freetype if --with-freetype-src was given on Windows
58243 
58244   FREETYPE_SRC_PATH="$with_freetype_src"
58245   BUILD_FREETYPE=yes
58246 
58247   # Check if the freetype sources are acessible..
58248   if ! test -d $FREETYPE_SRC_PATH; then
58249     { $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
58250 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58251     BUILD_FREETYPE=no
58252   fi
58253   # ..and contain a vc2010 project file
58254   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58255   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58256     { $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
58257 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58258     BUILD_FREETYPE=no
58259   fi
58260   # Now check if configure found a version of 'msbuild.exe'
58261   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58262     { $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
58263 $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;}
58264     BUILD_FREETYPE=no
58265   fi
58266 
58267   # Ready to go..
58268   if test "x$BUILD_FREETYPE" = xyes; then
58269     # msbuild requires trailing slashes for output directories
58270     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58271     freetype_lib_path_unix="$freetype_lib_path"
58272     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58273 
58274   unix_path="$vcxproj_path"
58275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58276     windows_path=`$CYGPATH -m "$unix_path"`
58277     vcxproj_path="$windows_path"
58278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58279     windows_path=`cmd //c echo $unix_path`
58280     vcxproj_path="$windows_path"
58281   fi
58282 
58283 
58284   unix_path="$freetype_lib_path"
58285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58286     windows_path=`$CYGPATH -m "$unix_path"`
58287     freetype_lib_path="$windows_path"
58288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58289     windows_path=`cmd //c echo $unix_path`
58290     freetype_lib_path="$windows_path"
58291   fi
58292 
58293 
58294   unix_path="$freetype_obj_path"
58295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58296     windows_path=`$CYGPATH -m "$unix_path"`
58297     freetype_obj_path="$windows_path"
58298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58299     windows_path=`cmd //c echo $unix_path`
58300     freetype_obj_path="$windows_path"
58301   fi
58302 
58303     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58304       freetype_platform=x64
58305     else
58306       freetype_platform=win32
58307     fi
58308 
58309     # The original freetype project file is for VS 2010 (i.e. 'v100'),
58310     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58311     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58312     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58313     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58314 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58315 
58316     # First we try to build the freetype.dll
58317     $ECHO -e "@echo off\n"\
58318         "$MSBUILD $vcxproj_path "\
58319         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58320         "/p:Configuration=\"Release Multithreaded\" "\
58321         "/p:Platform=$freetype_platform "\
58322         "/p:ConfigurationType=DynamicLibrary "\
58323         "/p:TargetName=freetype "\
58324         "/p:OutDir=\"$freetype_lib_path\" "\
58325         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58326     cmd /c freetype.bat
58327 
58328     if test -s "$freetype_lib_path_unix/freetype.dll"; then
58329       # If that succeeds we also build freetype.lib
58330       $ECHO -e "@echo off\n"\
58331           "$MSBUILD $vcxproj_path "\
58332           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58333           "/p:Configuration=\"Release Multithreaded\" "\
58334           "/p:Platform=$freetype_platform "\
58335           "/p:ConfigurationType=StaticLibrary "\
58336           "/p:TargetName=freetype "\
58337           "/p:OutDir=\"$freetype_lib_path\" "\
58338           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58339       cmd /c freetype.bat
58340 
58341       if test -s "$freetype_lib_path_unix/freetype.lib"; then
58342         # Once we build both, lib and dll, set freetype lib and include path appropriately
58343         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58344         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58345         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58346 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58347       else
58348         BUILD_FREETYPE=no
58349       fi
58350     else
58351       BUILD_FREETYPE=no
58352     fi
58353   fi
58354 
58355         if test "x$BUILD_FREETYPE" = xyes; then
58356           # Okay, we built it. Check that it works.
58357 
58358   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58359   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58360   METHOD="--with-freetype-src"
58361 
58362   # Let's start with an optimistic view of the world :-)
58363   FOUND_FREETYPE=yes
58364 
58365   # First look for the canonical freetype main include file ft2build.h.
58366   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58367     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58368     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58369     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58370       # Fail.
58371       FOUND_FREETYPE=no
58372     fi
58373   fi
58374 
58375   if test "x$FOUND_FREETYPE" = xyes; then
58376     # Include file found, let's continue the sanity check.
58377     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58378 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58379 
58380     # Reset to default value
58381     FREETYPE_BASE_NAME=freetype
58382     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58383     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58384       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58385           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58386         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58387         # for the .6 version explicitly.
58388         FREETYPE_BASE_NAME=freetype.6
58389         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58390         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58391 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58392       else
58393         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58394 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58395         FOUND_FREETYPE=no
58396       fi
58397     else
58398       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58399         # On Windows, we will need both .lib and .dll file.
58400         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58401           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58402 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58403           FOUND_FREETYPE=no
58404         fi
58405       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58406           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58407         # Found lib in isa dir, use that instead.
58408         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58409         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58410 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58411       fi
58412     fi
58413   fi
58414 
58415   if test "x$FOUND_FREETYPE" = xyes; then
58416 
58417   # Only process if variable expands to non-empty
58418 
58419   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58421 
58422   # Input might be given as Windows format, start by converting to
58423   # unix format.
58424   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58425   new_path=`$CYGPATH -u "$path"`
58426 
58427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58430   # "foo.exe" is OK but "foo" is an error.
58431   #
58432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58433   # It is also a way to make sure we got the proper file name for the real test later on.
58434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58435   if test "x$test_shortpath" = x; then
58436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58437 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58438     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58439   fi
58440 
58441   # Call helper function which possibly converts this using DOS-style short mode.
58442   # If so, the updated path is stored in $new_path.
58443 
58444   input_path="$new_path"
58445   # Check if we need to convert this using DOS-style short mode. If the path
58446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58447   # take no chances and rewrite it.
58448   # Note: m4 eats our [], so we need to use [ and ] instead.
58449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58450   if test "x$has_forbidden_chars" != x; then
58451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58455       # Going to short mode and back again did indeed matter. Since short mode is
58456       # case insensitive, let's make it lowercase to improve readability.
58457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58458       # Now convert it back to Unix-style (cygpath)
58459       input_path=`$CYGPATH -u "$shortmode_path"`
58460       new_path="$input_path"
58461     fi
58462   fi
58463 
58464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58465   if test "x$test_cygdrive_prefix" = x; then
58466     # As a simple fix, exclude /usr/bin since it's not a real path.
58467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58469       # a path prefixed by /cygdrive for fixpath to work.
58470       new_path="$CYGWIN_ROOT_PATH$input_path"
58471     fi
58472   fi
58473 
58474 
58475   if test "x$path" != "x$new_path"; then
58476     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58478 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58479   fi
58480 
58481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58482 
58483   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58484   has_colon=`$ECHO $path | $GREP ^.:`
58485   new_path="$path"
58486   if test "x$has_colon" = x; then
58487     # Not in mixed or Windows style, start by that.
58488     new_path=`cmd //c echo $path`
58489   fi
58490 
58491 
58492   input_path="$new_path"
58493   # Check if we need to convert this using DOS-style short mode. If the path
58494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58495   # take no chances and rewrite it.
58496   # Note: m4 eats our [], so we need to use [ and ] instead.
58497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58498   if test "x$has_forbidden_chars" != x; then
58499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58501   fi
58502 
58503 
58504   windows_path="$new_path"
58505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58506     unix_path=`$CYGPATH -u "$windows_path"`
58507     new_path="$unix_path"
58508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58510     new_path="$unix_path"
58511   fi
58512 
58513   if test "x$path" != "x$new_path"; then
58514     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58516 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58517   fi
58518 
58519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58521 
58522     else
58523       # We're on a unix platform. Hooray! :)
58524       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58525       has_space=`$ECHO "$path" | $GREP " "`
58526       if test "x$has_space" != x; then
58527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58528 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58529         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58530       fi
58531 
58532       # Use eval to expand a potential ~
58533       eval path="$path"
58534       if test ! -f "$path" && test ! -d "$path"; then
58535         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58536       fi
58537 
58538       if test -d "$path"; then
58539         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58540       else
58541         dir="`$DIRNAME "$path"`"
58542         base="`$BASENAME "$path"`"
58543         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58544       fi
58545     fi
58546   fi
58547 
58548 
58549   # Only process if variable expands to non-empty
58550 
58551   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58552     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58553 
58554   # Input might be given as Windows format, start by converting to
58555   # unix format.
58556   path="$POTENTIAL_FREETYPE_LIB_PATH"
58557   new_path=`$CYGPATH -u "$path"`
58558 
58559   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58560   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58561   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58562   # "foo.exe" is OK but "foo" is an error.
58563   #
58564   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58565   # It is also a way to make sure we got the proper file name for the real test later on.
58566   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58567   if test "x$test_shortpath" = x; then
58568     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58569 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58570     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58571   fi
58572 
58573   # Call helper function which possibly converts this using DOS-style short mode.
58574   # If so, the updated path is stored in $new_path.
58575 
58576   input_path="$new_path"
58577   # Check if we need to convert this using DOS-style short mode. If the path
58578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58579   # take no chances and rewrite it.
58580   # Note: m4 eats our [], so we need to use [ and ] instead.
58581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58582   if test "x$has_forbidden_chars" != x; then
58583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58584     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58585     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58586     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58587       # Going to short mode and back again did indeed matter. Since short mode is
58588       # case insensitive, let's make it lowercase to improve readability.
58589       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58590       # Now convert it back to Unix-style (cygpath)
58591       input_path=`$CYGPATH -u "$shortmode_path"`
58592       new_path="$input_path"
58593     fi
58594   fi
58595 
58596   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58597   if test "x$test_cygdrive_prefix" = x; then
58598     # As a simple fix, exclude /usr/bin since it's not a real path.
58599     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58600       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58601       # a path prefixed by /cygdrive for fixpath to work.
58602       new_path="$CYGWIN_ROOT_PATH$input_path"
58603     fi
58604   fi
58605 
58606 
58607   if test "x$path" != "x$new_path"; then
58608     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58609     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58610 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58611   fi
58612 
58613     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58614 
58615   path="$POTENTIAL_FREETYPE_LIB_PATH"
58616   has_colon=`$ECHO $path | $GREP ^.:`
58617   new_path="$path"
58618   if test "x$has_colon" = x; then
58619     # Not in mixed or Windows style, start by that.
58620     new_path=`cmd //c echo $path`
58621   fi
58622 
58623 
58624   input_path="$new_path"
58625   # Check if we need to convert this using DOS-style short mode. If the path
58626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58627   # take no chances and rewrite it.
58628   # Note: m4 eats our [], so we need to use [ and ] instead.
58629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58630   if test "x$has_forbidden_chars" != x; then
58631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58632     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58633   fi
58634 
58635 
58636   windows_path="$new_path"
58637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58638     unix_path=`$CYGPATH -u "$windows_path"`
58639     new_path="$unix_path"
58640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58642     new_path="$unix_path"
58643   fi
58644 
58645   if test "x$path" != "x$new_path"; then
58646     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58648 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58649   fi
58650 
58651   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58652   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58653 
58654     else
58655       # We're on a unix platform. Hooray! :)
58656       path="$POTENTIAL_FREETYPE_LIB_PATH"
58657       has_space=`$ECHO "$path" | $GREP " "`
58658       if test "x$has_space" != x; then
58659         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58660 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58661         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58662       fi
58663 
58664       # Use eval to expand a potential ~
58665       eval path="$path"
58666       if test ! -f "$path" && test ! -d "$path"; then
58667         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58668       fi
58669 
58670       if test -d "$path"; then
58671         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58672       else
58673         dir="`$DIRNAME "$path"`"
58674         base="`$BASENAME "$path"`"
58675         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58676       fi
58677     fi
58678   fi
58679 
58680 
58681     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58682     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58683 $as_echo_n "checking for freetype includes... " >&6; }
58684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58685 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58686     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58688 $as_echo_n "checking for freetype libraries... " >&6; }
58689     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58690 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58691   fi
58692 
58693           if test "x$FOUND_FREETYPE" != xyes; then
58694             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58695           fi
58696         else
58697           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58698 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58699           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58700         fi
58701       else
58702         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58703 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58704       fi
58705     fi
58706 
58707     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58708       # User has specified settings
58709 
58710       if test "x$BUNDLE_FREETYPE" = x; then
58711         # If not specified, default is to bundle freetype
58712         BUNDLE_FREETYPE=yes
58713       fi
58714 
58715       if test "x$with_freetype" != x; then
58716         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58717         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58718       fi
58719 
58720       # Allow --with-freetype-lib and --with-freetype-include to override
58721       if test "x$with_freetype_include" != x; then
58722         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58723       fi
58724       if test "x$with_freetype_lib" != x; then
58725         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58726       fi
58727 
58728       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58729         # Okay, we got it. Check that it works.
58730 
58731   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58732   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58733   METHOD="--with-freetype"
58734 
58735   # Let's start with an optimistic view of the world :-)
58736   FOUND_FREETYPE=yes
58737 
58738   # First look for the canonical freetype main include file ft2build.h.
58739   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58740     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58741     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58742     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58743       # Fail.
58744       FOUND_FREETYPE=no
58745     fi
58746   fi
58747 
58748   if test "x$FOUND_FREETYPE" = xyes; then
58749     # Include file found, let's continue the sanity check.
58750     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58751 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58752 
58753     # Reset to default value
58754     FREETYPE_BASE_NAME=freetype
58755     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58756     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58757       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58758           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58759         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58760         # for the .6 version explicitly.
58761         FREETYPE_BASE_NAME=freetype.6
58762         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58763         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58764 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58765       else
58766         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58767 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58768         FOUND_FREETYPE=no
58769       fi
58770     else
58771       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58772         # On Windows, we will need both .lib and .dll file.
58773         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58774           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58775 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58776           FOUND_FREETYPE=no
58777         fi
58778       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58779           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58780         # Found lib in isa dir, use that instead.
58781         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58782         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58783 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58784       fi
58785     fi
58786   fi
58787 
58788   if test "x$FOUND_FREETYPE" = xyes; then
58789 
58790   # Only process if variable expands to non-empty
58791 
58792   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58794 
58795   # Input might be given as Windows format, start by converting to
58796   # unix format.
58797   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58798   new_path=`$CYGPATH -u "$path"`
58799 
58800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58803   # "foo.exe" is OK but "foo" is an error.
58804   #
58805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58806   # It is also a way to make sure we got the proper file name for the real test later on.
58807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58808   if test "x$test_shortpath" = x; then
58809     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58810 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58811     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58812   fi
58813 
58814   # Call helper function which possibly converts this using DOS-style short mode.
58815   # If so, the updated path is stored in $new_path.
58816 
58817   input_path="$new_path"
58818   # Check if we need to convert this using DOS-style short mode. If the path
58819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58820   # take no chances and rewrite it.
58821   # Note: m4 eats our [], so we need to use [ and ] instead.
58822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58823   if test "x$has_forbidden_chars" != x; then
58824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58828       # Going to short mode and back again did indeed matter. Since short mode is
58829       # case insensitive, let's make it lowercase to improve readability.
58830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58831       # Now convert it back to Unix-style (cygpath)
58832       input_path=`$CYGPATH -u "$shortmode_path"`
58833       new_path="$input_path"
58834     fi
58835   fi
58836 
58837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58838   if test "x$test_cygdrive_prefix" = x; then
58839     # As a simple fix, exclude /usr/bin since it's not a real path.
58840     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58842       # a path prefixed by /cygdrive for fixpath to work.
58843       new_path="$CYGWIN_ROOT_PATH$input_path"
58844     fi
58845   fi
58846 
58847 
58848   if test "x$path" != "x$new_path"; then
58849     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58851 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58852   fi
58853 
58854     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58855 
58856   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58857   has_colon=`$ECHO $path | $GREP ^.:`
58858   new_path="$path"
58859   if test "x$has_colon" = x; then
58860     # Not in mixed or Windows style, start by that.
58861     new_path=`cmd //c echo $path`
58862   fi
58863 
58864 
58865   input_path="$new_path"
58866   # Check if we need to convert this using DOS-style short mode. If the path
58867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58868   # take no chances and rewrite it.
58869   # Note: m4 eats our [], so we need to use [ and ] instead.
58870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58871   if test "x$has_forbidden_chars" != x; then
58872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58873     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58874   fi
58875 
58876 
58877   windows_path="$new_path"
58878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58879     unix_path=`$CYGPATH -u "$windows_path"`
58880     new_path="$unix_path"
58881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58883     new_path="$unix_path"
58884   fi
58885 
58886   if test "x$path" != "x$new_path"; then
58887     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58889 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58890   fi
58891 
58892   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58893   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58894 
58895     else
58896       # We're on a unix platform. Hooray! :)
58897       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58898       has_space=`$ECHO "$path" | $GREP " "`
58899       if test "x$has_space" != x; then
58900         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58901 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58902         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58903       fi
58904 
58905       # Use eval to expand a potential ~
58906       eval path="$path"
58907       if test ! -f "$path" && test ! -d "$path"; then
58908         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58909       fi
58910 
58911       if test -d "$path"; then
58912         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58913       else
58914         dir="`$DIRNAME "$path"`"
58915         base="`$BASENAME "$path"`"
58916         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58917       fi
58918     fi
58919   fi
58920 
58921 
58922   # Only process if variable expands to non-empty
58923 
58924   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58926 
58927   # Input might be given as Windows format, start by converting to
58928   # unix format.
58929   path="$POTENTIAL_FREETYPE_LIB_PATH"
58930   new_path=`$CYGPATH -u "$path"`
58931 
58932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58935   # "foo.exe" is OK but "foo" is an error.
58936   #
58937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58938   # It is also a way to make sure we got the proper file name for the real test later on.
58939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58940   if test "x$test_shortpath" = x; then
58941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58943     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58944   fi
58945 
58946   # Call helper function which possibly converts this using DOS-style short mode.
58947   # If so, the updated path is stored in $new_path.
58948 
58949   input_path="$new_path"
58950   # Check if we need to convert this using DOS-style short mode. If the path
58951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58952   # take no chances and rewrite it.
58953   # Note: m4 eats our [], so we need to use [ and ] instead.
58954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58955   if test "x$has_forbidden_chars" != x; then
58956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58960       # Going to short mode and back again did indeed matter. Since short mode is
58961       # case insensitive, let's make it lowercase to improve readability.
58962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58963       # Now convert it back to Unix-style (cygpath)
58964       input_path=`$CYGPATH -u "$shortmode_path"`
58965       new_path="$input_path"
58966     fi
58967   fi
58968 
58969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58970   if test "x$test_cygdrive_prefix" = x; then
58971     # As a simple fix, exclude /usr/bin since it's not a real path.
58972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58974       # a path prefixed by /cygdrive for fixpath to work.
58975       new_path="$CYGWIN_ROOT_PATH$input_path"
58976     fi
58977   fi
58978 
58979 
58980   if test "x$path" != "x$new_path"; then
58981     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58983 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58984   fi
58985 
58986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58987 
58988   path="$POTENTIAL_FREETYPE_LIB_PATH"
58989   has_colon=`$ECHO $path | $GREP ^.:`
58990   new_path="$path"
58991   if test "x$has_colon" = x; then
58992     # Not in mixed or Windows style, start by that.
58993     new_path=`cmd //c echo $path`
58994   fi
58995 
58996 
58997   input_path="$new_path"
58998   # Check if we need to convert this using DOS-style short mode. If the path
58999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59000   # take no chances and rewrite it.
59001   # Note: m4 eats our [], so we need to use [ and ] instead.
59002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59003   if test "x$has_forbidden_chars" != x; then
59004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59006   fi
59007 
59008 
59009   windows_path="$new_path"
59010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59011     unix_path=`$CYGPATH -u "$windows_path"`
59012     new_path="$unix_path"
59013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59015     new_path="$unix_path"
59016   fi
59017 
59018   if test "x$path" != "x$new_path"; then
59019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59022   fi
59023 
59024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59026 
59027     else
59028       # We're on a unix platform. Hooray! :)
59029       path="$POTENTIAL_FREETYPE_LIB_PATH"
59030       has_space=`$ECHO "$path" | $GREP " "`
59031       if test "x$has_space" != x; then
59032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59035       fi
59036 
59037       # Use eval to expand a potential ~
59038       eval path="$path"
59039       if test ! -f "$path" && test ! -d "$path"; then
59040         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59041       fi
59042 
59043       if test -d "$path"; then
59044         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59045       else
59046         dir="`$DIRNAME "$path"`"
59047         base="`$BASENAME "$path"`"
59048         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59049       fi
59050     fi
59051   fi
59052 
59053 
59054     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59056 $as_echo_n "checking for freetype includes... " >&6; }
59057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59058 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59059     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59061 $as_echo_n "checking for freetype libraries... " >&6; }
59062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59063 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59064   fi
59065 
59066         if test "x$FOUND_FREETYPE" != xyes; then
59067           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59068         fi
59069       else
59070         # User specified only one of lib or include. This is an error.
59071         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59072           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59073 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59074           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59075         else
59076           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59077 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59078           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59079         fi
59080       fi
59081     else
59082       # User did not specify settings, but we need freetype. Try to locate it.
59083 
59084       if test "x$BUNDLE_FREETYPE" = x; then
59085         # If not specified, default is to bundle freetype only on windows
59086         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59087           BUNDLE_FREETYPE=yes
59088         else
59089           BUNDLE_FREETYPE=no
59090         fi
59091       fi
59092 
59093       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59094       if test "x$SYSROOT" = x; then
59095         if test "x$FOUND_FREETYPE" != xyes; then
59096           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59097           if test "x$PKG_CONFIG" != x; then
59098 
59099 pkg_failed=no
59100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59101 $as_echo_n "checking for FREETYPE... " >&6; }
59102 
59103 if test -n "$FREETYPE_CFLAGS"; then
59104     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59105  elif test -n "$PKG_CONFIG"; then
59106     if test -n "$PKG_CONFIG" && \
59107     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59108   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59109   ac_status=$?
59110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59111   test $ac_status = 0; }; then
59112   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59113 else
59114   pkg_failed=yes
59115 fi
59116  else
59117     pkg_failed=untried
59118 fi
59119 if test -n "$FREETYPE_LIBS"; then
59120     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59121  elif test -n "$PKG_CONFIG"; then
59122     if test -n "$PKG_CONFIG" && \
59123     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59124   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59125   ac_status=$?
59126   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59127   test $ac_status = 0; }; then
59128   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59129 else
59130   pkg_failed=yes
59131 fi
59132  else
59133     pkg_failed=untried
59134 fi
59135 
59136 
59137 
59138 if test $pkg_failed = yes; then
59139 
59140 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59141         _pkg_short_errors_supported=yes
59142 else
59143         _pkg_short_errors_supported=no
59144 fi
59145         if test $_pkg_short_errors_supported = yes; then
59146                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59147         else
59148                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59149         fi
59150         # Put the nasty error message in config.log where it belongs
59151         echo "$FREETYPE_PKG_ERRORS" >&5
59152 
59153         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59154 $as_echo "no" >&6; }
59155                 FOUND_FREETYPE=no
59156 elif test $pkg_failed = untried; then
59157         FOUND_FREETYPE=no
59158 else
59159         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59160         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59161         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59162 $as_echo "yes" >&6; }
59163         FOUND_FREETYPE=yes
59164 fi
59165             if test "x$FOUND_FREETYPE" = xyes; then
59166               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59167               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59168               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59169               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59170                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59171               fi
59172               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59173               if test "x$BUNDLE_FREETYPE" = xyes; then
59174                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59175 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59176                 FOUND_FREETYPE=no
59177               else
59178                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59179 $as_echo_n "checking for freetype... " >&6; }
59180                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59181 $as_echo "yes (using pkg-config)" >&6; }
59182               fi
59183             fi
59184           fi
59185         fi
59186       fi
59187 
59188       if test "x$FOUND_FREETYPE" != xyes; then
59189         # Check in well-known locations
59190         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59191           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59192 
59193   windows_path="$FREETYPE_BASE_DIR"
59194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59195     unix_path=`$CYGPATH -u "$windows_path"`
59196     FREETYPE_BASE_DIR="$unix_path"
59197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59199     FREETYPE_BASE_DIR="$unix_path"
59200   fi
59201 
59202 
59203   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59204   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59205   METHOD="well-known location"
59206 
59207   # Let's start with an optimistic view of the world :-)
59208   FOUND_FREETYPE=yes
59209 
59210   # First look for the canonical freetype main include file ft2build.h.
59211   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59212     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59213     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59214     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59215       # Fail.
59216       FOUND_FREETYPE=no
59217     fi
59218   fi
59219 
59220   if test "x$FOUND_FREETYPE" = xyes; then
59221     # Include file found, let's continue the sanity check.
59222     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59223 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59224 
59225     # Reset to default value
59226     FREETYPE_BASE_NAME=freetype
59227     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59228     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59229       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59230           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59231         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59232         # for the .6 version explicitly.
59233         FREETYPE_BASE_NAME=freetype.6
59234         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59235         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59236 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59237       else
59238         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59239 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59240         FOUND_FREETYPE=no
59241       fi
59242     else
59243       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59244         # On Windows, we will need both .lib and .dll file.
59245         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59246           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59247 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59248           FOUND_FREETYPE=no
59249         fi
59250       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59251           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59252         # Found lib in isa dir, use that instead.
59253         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59254         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59255 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59256       fi
59257     fi
59258   fi
59259 
59260   if test "x$FOUND_FREETYPE" = xyes; then
59261 
59262   # Only process if variable expands to non-empty
59263 
59264   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59265     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59266 
59267   # Input might be given as Windows format, start by converting to
59268   # unix format.
59269   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59270   new_path=`$CYGPATH -u "$path"`
59271 
59272   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59273   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59274   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59275   # "foo.exe" is OK but "foo" is an error.
59276   #
59277   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59278   # It is also a way to make sure we got the proper file name for the real test later on.
59279   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59280   if test "x$test_shortpath" = x; then
59281     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59282 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59283     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59284   fi
59285 
59286   # Call helper function which possibly converts this using DOS-style short mode.
59287   # If so, the updated path is stored in $new_path.
59288 
59289   input_path="$new_path"
59290   # Check if we need to convert this using DOS-style short mode. If the path
59291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59292   # take no chances and rewrite it.
59293   # Note: m4 eats our [], so we need to use [ and ] instead.
59294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59295   if test "x$has_forbidden_chars" != x; then
59296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59300       # Going to short mode and back again did indeed matter. Since short mode is
59301       # case insensitive, let's make it lowercase to improve readability.
59302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59303       # Now convert it back to Unix-style (cygpath)
59304       input_path=`$CYGPATH -u "$shortmode_path"`
59305       new_path="$input_path"
59306     fi
59307   fi
59308 
59309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59310   if test "x$test_cygdrive_prefix" = x; then
59311     # As a simple fix, exclude /usr/bin since it's not a real path.
59312     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59314       # a path prefixed by /cygdrive for fixpath to work.
59315       new_path="$CYGWIN_ROOT_PATH$input_path"
59316     fi
59317   fi
59318 
59319 
59320   if test "x$path" != "x$new_path"; then
59321     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59323 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59324   fi
59325 
59326     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59327 
59328   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59329   has_colon=`$ECHO $path | $GREP ^.:`
59330   new_path="$path"
59331   if test "x$has_colon" = x; then
59332     # Not in mixed or Windows style, start by that.
59333     new_path=`cmd //c echo $path`
59334   fi
59335 
59336 
59337   input_path="$new_path"
59338   # Check if we need to convert this using DOS-style short mode. If the path
59339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59340   # take no chances and rewrite it.
59341   # Note: m4 eats our [], so we need to use [ and ] instead.
59342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59343   if test "x$has_forbidden_chars" != x; then
59344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59346   fi
59347 
59348 
59349   windows_path="$new_path"
59350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59351     unix_path=`$CYGPATH -u "$windows_path"`
59352     new_path="$unix_path"
59353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59355     new_path="$unix_path"
59356   fi
59357 
59358   if test "x$path" != "x$new_path"; then
59359     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59361 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59362   fi
59363 
59364   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59365   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59366 
59367     else
59368       # We're on a unix platform. Hooray! :)
59369       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59370       has_space=`$ECHO "$path" | $GREP " "`
59371       if test "x$has_space" != x; then
59372         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59373 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59374         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59375       fi
59376 
59377       # Use eval to expand a potential ~
59378       eval path="$path"
59379       if test ! -f "$path" && test ! -d "$path"; then
59380         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59381       fi
59382 
59383       if test -d "$path"; then
59384         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59385       else
59386         dir="`$DIRNAME "$path"`"
59387         base="`$BASENAME "$path"`"
59388         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59389       fi
59390     fi
59391   fi
59392 
59393 
59394   # Only process if variable expands to non-empty
59395 
59396   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59397     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59398 
59399   # Input might be given as Windows format, start by converting to
59400   # unix format.
59401   path="$POTENTIAL_FREETYPE_LIB_PATH"
59402   new_path=`$CYGPATH -u "$path"`
59403 
59404   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59405   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59406   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59407   # "foo.exe" is OK but "foo" is an error.
59408   #
59409   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59410   # It is also a way to make sure we got the proper file name for the real test later on.
59411   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59412   if test "x$test_shortpath" = x; then
59413     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59414 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59415     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59416   fi
59417 
59418   # Call helper function which possibly converts this using DOS-style short mode.
59419   # If so, the updated path is stored in $new_path.
59420 
59421   input_path="$new_path"
59422   # Check if we need to convert this using DOS-style short mode. If the path
59423   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59424   # take no chances and rewrite it.
59425   # Note: m4 eats our [], so we need to use [ and ] instead.
59426   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59427   if test "x$has_forbidden_chars" != x; then
59428     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59429     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59430     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59431     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59432       # Going to short mode and back again did indeed matter. Since short mode is
59433       # case insensitive, let's make it lowercase to improve readability.
59434       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59435       # Now convert it back to Unix-style (cygpath)
59436       input_path=`$CYGPATH -u "$shortmode_path"`
59437       new_path="$input_path"
59438     fi
59439   fi
59440 
59441   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59442   if test "x$test_cygdrive_prefix" = x; then
59443     # As a simple fix, exclude /usr/bin since it's not a real path.
59444     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59445       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59446       # a path prefixed by /cygdrive for fixpath to work.
59447       new_path="$CYGWIN_ROOT_PATH$input_path"
59448     fi
59449   fi
59450 
59451 
59452   if test "x$path" != "x$new_path"; then
59453     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59454     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59455 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59456   fi
59457 
59458     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59459 
59460   path="$POTENTIAL_FREETYPE_LIB_PATH"
59461   has_colon=`$ECHO $path | $GREP ^.:`
59462   new_path="$path"
59463   if test "x$has_colon" = x; then
59464     # Not in mixed or Windows style, start by that.
59465     new_path=`cmd //c echo $path`
59466   fi
59467 
59468 
59469   input_path="$new_path"
59470   # Check if we need to convert this using DOS-style short mode. If the path
59471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59472   # take no chances and rewrite it.
59473   # Note: m4 eats our [], so we need to use [ and ] instead.
59474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59475   if test "x$has_forbidden_chars" != x; then
59476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59477     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59478   fi
59479 
59480 
59481   windows_path="$new_path"
59482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59483     unix_path=`$CYGPATH -u "$windows_path"`
59484     new_path="$unix_path"
59485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59487     new_path="$unix_path"
59488   fi
59489 
59490   if test "x$path" != "x$new_path"; then
59491     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59493 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59494   fi
59495 
59496   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59497   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59498 
59499     else
59500       # We're on a unix platform. Hooray! :)
59501       path="$POTENTIAL_FREETYPE_LIB_PATH"
59502       has_space=`$ECHO "$path" | $GREP " "`
59503       if test "x$has_space" != x; then
59504         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59505 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59506         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59507       fi
59508 
59509       # Use eval to expand a potential ~
59510       eval path="$path"
59511       if test ! -f "$path" && test ! -d "$path"; then
59512         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59513       fi
59514 
59515       if test -d "$path"; then
59516         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59517       else
59518         dir="`$DIRNAME "$path"`"
59519         base="`$BASENAME "$path"`"
59520         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59521       fi
59522     fi
59523   fi
59524 
59525 
59526     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59527     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59528 $as_echo_n "checking for freetype includes... " >&6; }
59529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59530 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59531     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59533 $as_echo_n "checking for freetype libraries... " >&6; }
59534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59535 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59536   fi
59537 
59538           if test "x$FOUND_FREETYPE" != xyes; then
59539             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59540 
59541   windows_path="$FREETYPE_BASE_DIR"
59542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59543     unix_path=`$CYGPATH -u "$windows_path"`
59544     FREETYPE_BASE_DIR="$unix_path"
59545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59547     FREETYPE_BASE_DIR="$unix_path"
59548   fi
59549 
59550 
59551   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59552   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59553   METHOD="well-known location"
59554 
59555   # Let's start with an optimistic view of the world :-)
59556   FOUND_FREETYPE=yes
59557 
59558   # First look for the canonical freetype main include file ft2build.h.
59559   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59560     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59561     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59562     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59563       # Fail.
59564       FOUND_FREETYPE=no
59565     fi
59566   fi
59567 
59568   if test "x$FOUND_FREETYPE" = xyes; then
59569     # Include file found, let's continue the sanity check.
59570     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59571 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59572 
59573     # Reset to default value
59574     FREETYPE_BASE_NAME=freetype
59575     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59576     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59577       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59578           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59579         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59580         # for the .6 version explicitly.
59581         FREETYPE_BASE_NAME=freetype.6
59582         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59583         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59584 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59585       else
59586         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59587 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59588         FOUND_FREETYPE=no
59589       fi
59590     else
59591       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59592         # On Windows, we will need both .lib and .dll file.
59593         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59594           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59595 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59596           FOUND_FREETYPE=no
59597         fi
59598       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59599           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59600         # Found lib in isa dir, use that instead.
59601         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59602         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59603 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59604       fi
59605     fi
59606   fi
59607 
59608   if test "x$FOUND_FREETYPE" = xyes; then
59609 
59610   # Only process if variable expands to non-empty
59611 
59612   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59613     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59614 
59615   # Input might be given as Windows format, start by converting to
59616   # unix format.
59617   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59618   new_path=`$CYGPATH -u "$path"`
59619 
59620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59623   # "foo.exe" is OK but "foo" is an error.
59624   #
59625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59626   # It is also a way to make sure we got the proper file name for the real test later on.
59627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59628   if test "x$test_shortpath" = x; then
59629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59631     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59632   fi
59633 
59634   # Call helper function which possibly converts this using DOS-style short mode.
59635   # If so, the updated path is stored in $new_path.
59636 
59637   input_path="$new_path"
59638   # Check if we need to convert this using DOS-style short mode. If the path
59639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59640   # take no chances and rewrite it.
59641   # Note: m4 eats our [], so we need to use [ and ] instead.
59642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59643   if test "x$has_forbidden_chars" != x; then
59644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59648       # Going to short mode and back again did indeed matter. Since short mode is
59649       # case insensitive, let's make it lowercase to improve readability.
59650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59651       # Now convert it back to Unix-style (cygpath)
59652       input_path=`$CYGPATH -u "$shortmode_path"`
59653       new_path="$input_path"
59654     fi
59655   fi
59656 
59657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59658   if test "x$test_cygdrive_prefix" = x; then
59659     # As a simple fix, exclude /usr/bin since it's not a real path.
59660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59662       # a path prefixed by /cygdrive for fixpath to work.
59663       new_path="$CYGWIN_ROOT_PATH$input_path"
59664     fi
59665   fi
59666 
59667 
59668   if test "x$path" != "x$new_path"; then
59669     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59671 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59672   fi
59673 
59674     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59675 
59676   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59677   has_colon=`$ECHO $path | $GREP ^.:`
59678   new_path="$path"
59679   if test "x$has_colon" = x; then
59680     # Not in mixed or Windows style, start by that.
59681     new_path=`cmd //c echo $path`
59682   fi
59683 
59684 
59685   input_path="$new_path"
59686   # Check if we need to convert this using DOS-style short mode. If the path
59687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59688   # take no chances and rewrite it.
59689   # Note: m4 eats our [], so we need to use [ and ] instead.
59690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59691   if test "x$has_forbidden_chars" != x; then
59692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59694   fi
59695 
59696 
59697   windows_path="$new_path"
59698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59699     unix_path=`$CYGPATH -u "$windows_path"`
59700     new_path="$unix_path"
59701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59703     new_path="$unix_path"
59704   fi
59705 
59706   if test "x$path" != "x$new_path"; then
59707     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59710   fi
59711 
59712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59714 
59715     else
59716       # We're on a unix platform. Hooray! :)
59717       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59718       has_space=`$ECHO "$path" | $GREP " "`
59719       if test "x$has_space" != x; then
59720         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59722         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59723       fi
59724 
59725       # Use eval to expand a potential ~
59726       eval path="$path"
59727       if test ! -f "$path" && test ! -d "$path"; then
59728         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59729       fi
59730 
59731       if test -d "$path"; then
59732         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59733       else
59734         dir="`$DIRNAME "$path"`"
59735         base="`$BASENAME "$path"`"
59736         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59737       fi
59738     fi
59739   fi
59740 
59741 
59742   # Only process if variable expands to non-empty
59743 
59744   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59745     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59746 
59747   # Input might be given as Windows format, start by converting to
59748   # unix format.
59749   path="$POTENTIAL_FREETYPE_LIB_PATH"
59750   new_path=`$CYGPATH -u "$path"`
59751 
59752   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59753   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59754   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59755   # "foo.exe" is OK but "foo" is an error.
59756   #
59757   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59758   # It is also a way to make sure we got the proper file name for the real test later on.
59759   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59760   if test "x$test_shortpath" = x; then
59761     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59762 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59763     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59764   fi
59765 
59766   # Call helper function which possibly converts this using DOS-style short mode.
59767   # If so, the updated path is stored in $new_path.
59768 
59769   input_path="$new_path"
59770   # Check if we need to convert this using DOS-style short mode. If the path
59771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59772   # take no chances and rewrite it.
59773   # Note: m4 eats our [], so we need to use [ and ] instead.
59774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59775   if test "x$has_forbidden_chars" != x; then
59776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59780       # Going to short mode and back again did indeed matter. Since short mode is
59781       # case insensitive, let's make it lowercase to improve readability.
59782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59783       # Now convert it back to Unix-style (cygpath)
59784       input_path=`$CYGPATH -u "$shortmode_path"`
59785       new_path="$input_path"
59786     fi
59787   fi
59788 
59789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59790   if test "x$test_cygdrive_prefix" = x; then
59791     # As a simple fix, exclude /usr/bin since it's not a real path.
59792     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59794       # a path prefixed by /cygdrive for fixpath to work.
59795       new_path="$CYGWIN_ROOT_PATH$input_path"
59796     fi
59797   fi
59798 
59799 
59800   if test "x$path" != "x$new_path"; then
59801     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59803 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59804   fi
59805 
59806     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59807 
59808   path="$POTENTIAL_FREETYPE_LIB_PATH"
59809   has_colon=`$ECHO $path | $GREP ^.:`
59810   new_path="$path"
59811   if test "x$has_colon" = x; then
59812     # Not in mixed or Windows style, start by that.
59813     new_path=`cmd //c echo $path`
59814   fi
59815 
59816 
59817   input_path="$new_path"
59818   # Check if we need to convert this using DOS-style short mode. If the path
59819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59820   # take no chances and rewrite it.
59821   # Note: m4 eats our [], so we need to use [ and ] instead.
59822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59823   if test "x$has_forbidden_chars" != x; then
59824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59825     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59826   fi
59827 
59828 
59829   windows_path="$new_path"
59830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59831     unix_path=`$CYGPATH -u "$windows_path"`
59832     new_path="$unix_path"
59833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59835     new_path="$unix_path"
59836   fi
59837 
59838   if test "x$path" != "x$new_path"; then
59839     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59841 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59842   fi
59843 
59844   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59845   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59846 
59847     else
59848       # We're on a unix platform. Hooray! :)
59849       path="$POTENTIAL_FREETYPE_LIB_PATH"
59850       has_space=`$ECHO "$path" | $GREP " "`
59851       if test "x$has_space" != x; then
59852         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59853 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59854         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59855       fi
59856 
59857       # Use eval to expand a potential ~
59858       eval path="$path"
59859       if test ! -f "$path" && test ! -d "$path"; then
59860         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59861       fi
59862 
59863       if test -d "$path"; then
59864         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59865       else
59866         dir="`$DIRNAME "$path"`"
59867         base="`$BASENAME "$path"`"
59868         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59869       fi
59870     fi
59871   fi
59872 
59873 
59874     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59876 $as_echo_n "checking for freetype includes... " >&6; }
59877     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59878 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59879     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59881 $as_echo_n "checking for freetype libraries... " >&6; }
59882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59883 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59884   fi
59885 
59886           fi
59887           if test "x$FOUND_FREETYPE" != xyes; then
59888             FREETYPE_BASE_DIR="$HOME/freetype"
59889 
59890   windows_path="$FREETYPE_BASE_DIR"
59891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59892     unix_path=`$CYGPATH -u "$windows_path"`
59893     FREETYPE_BASE_DIR="$unix_path"
59894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59896     FREETYPE_BASE_DIR="$unix_path"
59897   fi
59898 
59899             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59900 
59901   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59902   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59903   METHOD="well-known location"
59904 
59905   # Let's start with an optimistic view of the world :-)
59906   FOUND_FREETYPE=yes
59907 
59908   # First look for the canonical freetype main include file ft2build.h.
59909   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59910     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59911     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59912     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59913       # Fail.
59914       FOUND_FREETYPE=no
59915     fi
59916   fi
59917 
59918   if test "x$FOUND_FREETYPE" = xyes; then
59919     # Include file found, let's continue the sanity check.
59920     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59921 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59922 
59923     # Reset to default value
59924     FREETYPE_BASE_NAME=freetype
59925     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59926     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59927       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59928           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59929         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59930         # for the .6 version explicitly.
59931         FREETYPE_BASE_NAME=freetype.6
59932         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59933         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59934 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59935       else
59936         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59937 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59938         FOUND_FREETYPE=no
59939       fi
59940     else
59941       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59942         # On Windows, we will need both .lib and .dll file.
59943         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59944           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59945 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59946           FOUND_FREETYPE=no
59947         fi
59948       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59949           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59950         # Found lib in isa dir, use that instead.
59951         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59952         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59953 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59954       fi
59955     fi
59956   fi
59957 
59958   if test "x$FOUND_FREETYPE" = xyes; then
59959 
59960   # Only process if variable expands to non-empty
59961 
59962   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59963     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59964 
59965   # Input might be given as Windows format, start by converting to
59966   # unix format.
59967   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59968   new_path=`$CYGPATH -u "$path"`
59969 
59970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59973   # "foo.exe" is OK but "foo" is an error.
59974   #
59975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59976   # It is also a way to make sure we got the proper file name for the real test later on.
59977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59978   if test "x$test_shortpath" = x; then
59979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59980 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59981     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59982   fi
59983 
59984   # Call helper function which possibly converts this using DOS-style short mode.
59985   # If so, the updated path is stored in $new_path.
59986 
59987   input_path="$new_path"
59988   # Check if we need to convert this using DOS-style short mode. If the path
59989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59990   # take no chances and rewrite it.
59991   # Note: m4 eats our [], so we need to use [ and ] instead.
59992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59993   if test "x$has_forbidden_chars" != x; then
59994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59998       # Going to short mode and back again did indeed matter. Since short mode is
59999       # case insensitive, let's make it lowercase to improve readability.
60000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60001       # Now convert it back to Unix-style (cygpath)
60002       input_path=`$CYGPATH -u "$shortmode_path"`
60003       new_path="$input_path"
60004     fi
60005   fi
60006 
60007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60008   if test "x$test_cygdrive_prefix" = x; then
60009     # As a simple fix, exclude /usr/bin since it's not a real path.
60010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60012       # a path prefixed by /cygdrive for fixpath to work.
60013       new_path="$CYGWIN_ROOT_PATH$input_path"
60014     fi
60015   fi
60016 
60017 
60018   if test "x$path" != "x$new_path"; then
60019     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60022   fi
60023 
60024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60025 
60026   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60027   has_colon=`$ECHO $path | $GREP ^.:`
60028   new_path="$path"
60029   if test "x$has_colon" = x; then
60030     # Not in mixed or Windows style, start by that.
60031     new_path=`cmd //c echo $path`
60032   fi
60033 
60034 
60035   input_path="$new_path"
60036   # Check if we need to convert this using DOS-style short mode. If the path
60037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60038   # take no chances and rewrite it.
60039   # Note: m4 eats our [], so we need to use [ and ] instead.
60040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60041   if test "x$has_forbidden_chars" != x; then
60042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60044   fi
60045 
60046 
60047   windows_path="$new_path"
60048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60049     unix_path=`$CYGPATH -u "$windows_path"`
60050     new_path="$unix_path"
60051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60053     new_path="$unix_path"
60054   fi
60055 
60056   if test "x$path" != "x$new_path"; then
60057     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60060   fi
60061 
60062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60064 
60065     else
60066       # We're on a unix platform. Hooray! :)
60067       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60068       has_space=`$ECHO "$path" | $GREP " "`
60069       if test "x$has_space" != x; then
60070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60072         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60073       fi
60074 
60075       # Use eval to expand a potential ~
60076       eval path="$path"
60077       if test ! -f "$path" && test ! -d "$path"; then
60078         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60079       fi
60080 
60081       if test -d "$path"; then
60082         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60083       else
60084         dir="`$DIRNAME "$path"`"
60085         base="`$BASENAME "$path"`"
60086         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60087       fi
60088     fi
60089   fi
60090 
60091 
60092   # Only process if variable expands to non-empty
60093 
60094   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60095     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60096 
60097   # Input might be given as Windows format, start by converting to
60098   # unix format.
60099   path="$POTENTIAL_FREETYPE_LIB_PATH"
60100   new_path=`$CYGPATH -u "$path"`
60101 
60102   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60103   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60104   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60105   # "foo.exe" is OK but "foo" is an error.
60106   #
60107   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60108   # It is also a way to make sure we got the proper file name for the real test later on.
60109   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60110   if test "x$test_shortpath" = x; then
60111     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60112 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60113     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60114   fi
60115 
60116   # Call helper function which possibly converts this using DOS-style short mode.
60117   # If so, the updated path is stored in $new_path.
60118 
60119   input_path="$new_path"
60120   # Check if we need to convert this using DOS-style short mode. If the path
60121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60122   # take no chances and rewrite it.
60123   # Note: m4 eats our [], so we need to use [ and ] instead.
60124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60125   if test "x$has_forbidden_chars" != x; then
60126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60127     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60128     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60129     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60130       # Going to short mode and back again did indeed matter. Since short mode is
60131       # case insensitive, let's make it lowercase to improve readability.
60132       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60133       # Now convert it back to Unix-style (cygpath)
60134       input_path=`$CYGPATH -u "$shortmode_path"`
60135       new_path="$input_path"
60136     fi
60137   fi
60138 
60139   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60140   if test "x$test_cygdrive_prefix" = x; then
60141     # As a simple fix, exclude /usr/bin since it's not a real path.
60142     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60143       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60144       # a path prefixed by /cygdrive for fixpath to work.
60145       new_path="$CYGWIN_ROOT_PATH$input_path"
60146     fi
60147   fi
60148 
60149 
60150   if test "x$path" != "x$new_path"; then
60151     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60153 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60154   fi
60155 
60156     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60157 
60158   path="$POTENTIAL_FREETYPE_LIB_PATH"
60159   has_colon=`$ECHO $path | $GREP ^.:`
60160   new_path="$path"
60161   if test "x$has_colon" = x; then
60162     # Not in mixed or Windows style, start by that.
60163     new_path=`cmd //c echo $path`
60164   fi
60165 
60166 
60167   input_path="$new_path"
60168   # Check if we need to convert this using DOS-style short mode. If the path
60169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60170   # take no chances and rewrite it.
60171   # Note: m4 eats our [], so we need to use [ and ] instead.
60172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60173   if test "x$has_forbidden_chars" != x; then
60174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60175     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60176   fi
60177 
60178 
60179   windows_path="$new_path"
60180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60181     unix_path=`$CYGPATH -u "$windows_path"`
60182     new_path="$unix_path"
60183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60185     new_path="$unix_path"
60186   fi
60187 
60188   if test "x$path" != "x$new_path"; then
60189     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60191 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60192   fi
60193 
60194   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60195   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60196 
60197     else
60198       # We're on a unix platform. Hooray! :)
60199       path="$POTENTIAL_FREETYPE_LIB_PATH"
60200       has_space=`$ECHO "$path" | $GREP " "`
60201       if test "x$has_space" != x; then
60202         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60203 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60204         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60205       fi
60206 
60207       # Use eval to expand a potential ~
60208       eval path="$path"
60209       if test ! -f "$path" && test ! -d "$path"; then
60210         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60211       fi
60212 
60213       if test -d "$path"; then
60214         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60215       else
60216         dir="`$DIRNAME "$path"`"
60217         base="`$BASENAME "$path"`"
60218         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60219       fi
60220     fi
60221   fi
60222 
60223 
60224     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60226 $as_echo_n "checking for freetype includes... " >&6; }
60227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60228 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60229     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60230     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60231 $as_echo_n "checking for freetype libraries... " >&6; }
60232     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60233 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60234   fi
60235 
60236             else
60237 
60238   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60239   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60240   METHOD="well-known location"
60241 
60242   # Let's start with an optimistic view of the world :-)
60243   FOUND_FREETYPE=yes
60244 
60245   # First look for the canonical freetype main include file ft2build.h.
60246   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60247     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60248     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60249     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60250       # Fail.
60251       FOUND_FREETYPE=no
60252     fi
60253   fi
60254 
60255   if test "x$FOUND_FREETYPE" = xyes; then
60256     # Include file found, let's continue the sanity check.
60257     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60258 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60259 
60260     # Reset to default value
60261     FREETYPE_BASE_NAME=freetype
60262     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60263     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60264       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60265           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60266         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60267         # for the .6 version explicitly.
60268         FREETYPE_BASE_NAME=freetype.6
60269         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60270         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60271 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60272       else
60273         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60274 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60275         FOUND_FREETYPE=no
60276       fi
60277     else
60278       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60279         # On Windows, we will need both .lib and .dll file.
60280         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60281           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60282 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60283           FOUND_FREETYPE=no
60284         fi
60285       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60286           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60287         # Found lib in isa dir, use that instead.
60288         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60289         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60290 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60291       fi
60292     fi
60293   fi
60294 
60295   if test "x$FOUND_FREETYPE" = xyes; then
60296 
60297   # Only process if variable expands to non-empty
60298 
60299   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60301 
60302   # Input might be given as Windows format, start by converting to
60303   # unix format.
60304   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60305   new_path=`$CYGPATH -u "$path"`
60306 
60307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60310   # "foo.exe" is OK but "foo" is an error.
60311   #
60312   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60313   # It is also a way to make sure we got the proper file name for the real test later on.
60314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60315   if test "x$test_shortpath" = x; then
60316     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60317 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60318     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60319   fi
60320 
60321   # Call helper function which possibly converts this using DOS-style short mode.
60322   # If so, the updated path is stored in $new_path.
60323 
60324   input_path="$new_path"
60325   # Check if we need to convert this using DOS-style short mode. If the path
60326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60327   # take no chances and rewrite it.
60328   # Note: m4 eats our [], so we need to use [ and ] instead.
60329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60330   if test "x$has_forbidden_chars" != x; then
60331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60335       # Going to short mode and back again did indeed matter. Since short mode is
60336       # case insensitive, let's make it lowercase to improve readability.
60337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60338       # Now convert it back to Unix-style (cygpath)
60339       input_path=`$CYGPATH -u "$shortmode_path"`
60340       new_path="$input_path"
60341     fi
60342   fi
60343 
60344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60345   if test "x$test_cygdrive_prefix" = x; then
60346     # As a simple fix, exclude /usr/bin since it's not a real path.
60347     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60349       # a path prefixed by /cygdrive for fixpath to work.
60350       new_path="$CYGWIN_ROOT_PATH$input_path"
60351     fi
60352   fi
60353 
60354 
60355   if test "x$path" != "x$new_path"; then
60356     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60358 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60359   fi
60360 
60361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60362 
60363   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60364   has_colon=`$ECHO $path | $GREP ^.:`
60365   new_path="$path"
60366   if test "x$has_colon" = x; then
60367     # Not in mixed or Windows style, start by that.
60368     new_path=`cmd //c echo $path`
60369   fi
60370 
60371 
60372   input_path="$new_path"
60373   # Check if we need to convert this using DOS-style short mode. If the path
60374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60375   # take no chances and rewrite it.
60376   # Note: m4 eats our [], so we need to use [ and ] instead.
60377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60378   if test "x$has_forbidden_chars" != x; then
60379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60381   fi
60382 
60383 
60384   windows_path="$new_path"
60385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60386     unix_path=`$CYGPATH -u "$windows_path"`
60387     new_path="$unix_path"
60388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60390     new_path="$unix_path"
60391   fi
60392 
60393   if test "x$path" != "x$new_path"; then
60394     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60396 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60397   fi
60398 
60399   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60400   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60401 
60402     else
60403       # We're on a unix platform. Hooray! :)
60404       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60405       has_space=`$ECHO "$path" | $GREP " "`
60406       if test "x$has_space" != x; then
60407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60408 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60409         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60410       fi
60411 
60412       # Use eval to expand a potential ~
60413       eval path="$path"
60414       if test ! -f "$path" && test ! -d "$path"; then
60415         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60416       fi
60417 
60418       if test -d "$path"; then
60419         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60420       else
60421         dir="`$DIRNAME "$path"`"
60422         base="`$BASENAME "$path"`"
60423         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60424       fi
60425     fi
60426   fi
60427 
60428 
60429   # Only process if variable expands to non-empty
60430 
60431   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60432     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60433 
60434   # Input might be given as Windows format, start by converting to
60435   # unix format.
60436   path="$POTENTIAL_FREETYPE_LIB_PATH"
60437   new_path=`$CYGPATH -u "$path"`
60438 
60439   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60440   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60441   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60442   # "foo.exe" is OK but "foo" is an error.
60443   #
60444   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60445   # It is also a way to make sure we got the proper file name for the real test later on.
60446   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60447   if test "x$test_shortpath" = x; then
60448     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60449 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60450     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60451   fi
60452 
60453   # Call helper function which possibly converts this using DOS-style short mode.
60454   # If so, the updated path is stored in $new_path.
60455 
60456   input_path="$new_path"
60457   # Check if we need to convert this using DOS-style short mode. If the path
60458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60459   # take no chances and rewrite it.
60460   # Note: m4 eats our [], so we need to use [ and ] instead.
60461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60462   if test "x$has_forbidden_chars" != x; then
60463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60464     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60465     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60466     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60467       # Going to short mode and back again did indeed matter. Since short mode is
60468       # case insensitive, let's make it lowercase to improve readability.
60469       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60470       # Now convert it back to Unix-style (cygpath)
60471       input_path=`$CYGPATH -u "$shortmode_path"`
60472       new_path="$input_path"
60473     fi
60474   fi
60475 
60476   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60477   if test "x$test_cygdrive_prefix" = x; then
60478     # As a simple fix, exclude /usr/bin since it's not a real path.
60479     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60480       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60481       # a path prefixed by /cygdrive for fixpath to work.
60482       new_path="$CYGWIN_ROOT_PATH$input_path"
60483     fi
60484   fi
60485 
60486 
60487   if test "x$path" != "x$new_path"; then
60488     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60490 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60491   fi
60492 
60493     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60494 
60495   path="$POTENTIAL_FREETYPE_LIB_PATH"
60496   has_colon=`$ECHO $path | $GREP ^.:`
60497   new_path="$path"
60498   if test "x$has_colon" = x; then
60499     # Not in mixed or Windows style, start by that.
60500     new_path=`cmd //c echo $path`
60501   fi
60502 
60503 
60504   input_path="$new_path"
60505   # Check if we need to convert this using DOS-style short mode. If the path
60506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60507   # take no chances and rewrite it.
60508   # Note: m4 eats our [], so we need to use [ and ] instead.
60509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60510   if test "x$has_forbidden_chars" != x; then
60511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60512     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60513   fi
60514 
60515 
60516   windows_path="$new_path"
60517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60518     unix_path=`$CYGPATH -u "$windows_path"`
60519     new_path="$unix_path"
60520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60522     new_path="$unix_path"
60523   fi
60524 
60525   if test "x$path" != "x$new_path"; then
60526     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60528 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60529   fi
60530 
60531   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60532   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60533 
60534     else
60535       # We're on a unix platform. Hooray! :)
60536       path="$POTENTIAL_FREETYPE_LIB_PATH"
60537       has_space=`$ECHO "$path" | $GREP " "`
60538       if test "x$has_space" != x; then
60539         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60540 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60541         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60542       fi
60543 
60544       # Use eval to expand a potential ~
60545       eval path="$path"
60546       if test ! -f "$path" && test ! -d "$path"; then
60547         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60548       fi
60549 
60550       if test -d "$path"; then
60551         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60552       else
60553         dir="`$DIRNAME "$path"`"
60554         base="`$BASENAME "$path"`"
60555         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60556       fi
60557     fi
60558   fi
60559 
60560 
60561     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60563 $as_echo_n "checking for freetype includes... " >&6; }
60564     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60565 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60566     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60568 $as_echo_n "checking for freetype libraries... " >&6; }
60569     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60570 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60571   fi
60572 
60573             fi
60574             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60575                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60576               # Source is available, as a last resort try to build freetype in default location
60577 
60578   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60579   BUILD_FREETYPE=yes
60580 
60581   # Check if the freetype sources are acessible..
60582   if ! test -d $FREETYPE_SRC_PATH; then
60583     { $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
60584 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60585     BUILD_FREETYPE=no
60586   fi
60587   # ..and contain a vc2010 project file
60588   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60589   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60590     { $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
60591 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60592     BUILD_FREETYPE=no
60593   fi
60594   # Now check if configure found a version of 'msbuild.exe'
60595   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60596     { $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
60597 $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;}
60598     BUILD_FREETYPE=no
60599   fi
60600 
60601   # Ready to go..
60602   if test "x$BUILD_FREETYPE" = xyes; then
60603     # msbuild requires trailing slashes for output directories
60604     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60605     freetype_lib_path_unix="$freetype_lib_path"
60606     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60607 
60608   unix_path="$vcxproj_path"
60609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60610     windows_path=`$CYGPATH -m "$unix_path"`
60611     vcxproj_path="$windows_path"
60612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60613     windows_path=`cmd //c echo $unix_path`
60614     vcxproj_path="$windows_path"
60615   fi
60616 
60617 
60618   unix_path="$freetype_lib_path"
60619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60620     windows_path=`$CYGPATH -m "$unix_path"`
60621     freetype_lib_path="$windows_path"
60622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60623     windows_path=`cmd //c echo $unix_path`
60624     freetype_lib_path="$windows_path"
60625   fi
60626 
60627 
60628   unix_path="$freetype_obj_path"
60629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60630     windows_path=`$CYGPATH -m "$unix_path"`
60631     freetype_obj_path="$windows_path"
60632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60633     windows_path=`cmd //c echo $unix_path`
60634     freetype_obj_path="$windows_path"
60635   fi
60636 
60637     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60638       freetype_platform=x64
60639     else
60640       freetype_platform=win32
60641     fi
60642 
60643     # The original freetype project file is for VS 2010 (i.e. 'v100'),
60644     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60645     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60646     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60647     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60648 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60649 
60650     # First we try to build the freetype.dll
60651     $ECHO -e "@echo off\n"\
60652         "$MSBUILD $vcxproj_path "\
60653         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60654         "/p:Configuration=\"Release Multithreaded\" "\
60655         "/p:Platform=$freetype_platform "\
60656         "/p:ConfigurationType=DynamicLibrary "\
60657         "/p:TargetName=freetype "\
60658         "/p:OutDir=\"$freetype_lib_path\" "\
60659         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60660     cmd /c freetype.bat
60661 
60662     if test -s "$freetype_lib_path_unix/freetype.dll"; then
60663       # If that succeeds we also build freetype.lib
60664       $ECHO -e "@echo off\n"\
60665           "$MSBUILD $vcxproj_path "\
60666           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60667           "/p:Configuration=\"Release Multithreaded\" "\
60668           "/p:Platform=$freetype_platform "\
60669           "/p:ConfigurationType=StaticLibrary "\
60670           "/p:TargetName=freetype "\
60671           "/p:OutDir=\"$freetype_lib_path\" "\
60672           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60673       cmd /c freetype.bat
60674 
60675       if test -s "$freetype_lib_path_unix/freetype.lib"; then
60676         # Once we build both, lib and dll, set freetype lib and include path appropriately
60677         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60678         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60679         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60680 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60681       else
60682         BUILD_FREETYPE=no
60683       fi
60684     else
60685       BUILD_FREETYPE=no
60686     fi
60687   fi
60688 
60689               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60690 
60691   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60692   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60693   METHOD="well-known location"
60694 
60695   # Let's start with an optimistic view of the world :-)
60696   FOUND_FREETYPE=yes
60697 
60698   # First look for the canonical freetype main include file ft2build.h.
60699   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60700     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60701     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60702     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60703       # Fail.
60704       FOUND_FREETYPE=no
60705     fi
60706   fi
60707 
60708   if test "x$FOUND_FREETYPE" = xyes; then
60709     # Include file found, let's continue the sanity check.
60710     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60711 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60712 
60713     # Reset to default value
60714     FREETYPE_BASE_NAME=freetype
60715     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60716     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60717       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60718           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60719         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60720         # for the .6 version explicitly.
60721         FREETYPE_BASE_NAME=freetype.6
60722         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60723         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60724 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60725       else
60726         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60727 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60728         FOUND_FREETYPE=no
60729       fi
60730     else
60731       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60732         # On Windows, we will need both .lib and .dll file.
60733         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60734           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60735 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60736           FOUND_FREETYPE=no
60737         fi
60738       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60739           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60740         # Found lib in isa dir, use that instead.
60741         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60742         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60743 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60744       fi
60745     fi
60746   fi
60747 
60748   if test "x$FOUND_FREETYPE" = xyes; then
60749 
60750   # Only process if variable expands to non-empty
60751 
60752   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60753     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60754 
60755   # Input might be given as Windows format, start by converting to
60756   # unix format.
60757   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60758   new_path=`$CYGPATH -u "$path"`
60759 
60760   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60761   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60762   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60763   # "foo.exe" is OK but "foo" is an error.
60764   #
60765   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60766   # It is also a way to make sure we got the proper file name for the real test later on.
60767   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60768   if test "x$test_shortpath" = x; then
60769     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60770 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60771     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60772   fi
60773 
60774   # Call helper function which possibly converts this using DOS-style short mode.
60775   # If so, the updated path is stored in $new_path.
60776 
60777   input_path="$new_path"
60778   # Check if we need to convert this using DOS-style short mode. If the path
60779   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60780   # take no chances and rewrite it.
60781   # Note: m4 eats our [], so we need to use [ and ] instead.
60782   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60783   if test "x$has_forbidden_chars" != x; then
60784     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60785     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60786     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60787     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60788       # Going to short mode and back again did indeed matter. Since short mode is
60789       # case insensitive, let's make it lowercase to improve readability.
60790       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60791       # Now convert it back to Unix-style (cygpath)
60792       input_path=`$CYGPATH -u "$shortmode_path"`
60793       new_path="$input_path"
60794     fi
60795   fi
60796 
60797   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60798   if test "x$test_cygdrive_prefix" = x; then
60799     # As a simple fix, exclude /usr/bin since it's not a real path.
60800     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60801       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60802       # a path prefixed by /cygdrive for fixpath to work.
60803       new_path="$CYGWIN_ROOT_PATH$input_path"
60804     fi
60805   fi
60806 
60807 
60808   if test "x$path" != "x$new_path"; then
60809     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60810     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60811 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60812   fi
60813 
60814     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60815 
60816   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60817   has_colon=`$ECHO $path | $GREP ^.:`
60818   new_path="$path"
60819   if test "x$has_colon" = x; then
60820     # Not in mixed or Windows style, start by that.
60821     new_path=`cmd //c echo $path`
60822   fi
60823 
60824 
60825   input_path="$new_path"
60826   # Check if we need to convert this using DOS-style short mode. If the path
60827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60828   # take no chances and rewrite it.
60829   # Note: m4 eats our [], so we need to use [ and ] instead.
60830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60831   if test "x$has_forbidden_chars" != x; then
60832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60833     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60834   fi
60835 
60836 
60837   windows_path="$new_path"
60838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60839     unix_path=`$CYGPATH -u "$windows_path"`
60840     new_path="$unix_path"
60841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60843     new_path="$unix_path"
60844   fi
60845 
60846   if test "x$path" != "x$new_path"; then
60847     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60849 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60850   fi
60851 
60852   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60853   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60854 
60855     else
60856       # We're on a unix platform. Hooray! :)
60857       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60858       has_space=`$ECHO "$path" | $GREP " "`
60859       if test "x$has_space" != x; then
60860         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60861 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60862         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60863       fi
60864 
60865       # Use eval to expand a potential ~
60866       eval path="$path"
60867       if test ! -f "$path" && test ! -d "$path"; then
60868         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60869       fi
60870 
60871       if test -d "$path"; then
60872         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60873       else
60874         dir="`$DIRNAME "$path"`"
60875         base="`$BASENAME "$path"`"
60876         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60877       fi
60878     fi
60879   fi
60880 
60881 
60882   # Only process if variable expands to non-empty
60883 
60884   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60885     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60886 
60887   # Input might be given as Windows format, start by converting to
60888   # unix format.
60889   path="$POTENTIAL_FREETYPE_LIB_PATH"
60890   new_path=`$CYGPATH -u "$path"`
60891 
60892   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60893   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60894   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60895   # "foo.exe" is OK but "foo" is an error.
60896   #
60897   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60898   # It is also a way to make sure we got the proper file name for the real test later on.
60899   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60900   if test "x$test_shortpath" = x; then
60901     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60902 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60903     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60904   fi
60905 
60906   # Call helper function which possibly converts this using DOS-style short mode.
60907   # If so, the updated path is stored in $new_path.
60908 
60909   input_path="$new_path"
60910   # Check if we need to convert this using DOS-style short mode. If the path
60911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60912   # take no chances and rewrite it.
60913   # Note: m4 eats our [], so we need to use [ and ] instead.
60914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60915   if test "x$has_forbidden_chars" != x; then
60916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60920       # Going to short mode and back again did indeed matter. Since short mode is
60921       # case insensitive, let's make it lowercase to improve readability.
60922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60923       # Now convert it back to Unix-style (cygpath)
60924       input_path=`$CYGPATH -u "$shortmode_path"`
60925       new_path="$input_path"
60926     fi
60927   fi
60928 
60929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60930   if test "x$test_cygdrive_prefix" = x; then
60931     # As a simple fix, exclude /usr/bin since it's not a real path.
60932     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60934       # a path prefixed by /cygdrive for fixpath to work.
60935       new_path="$CYGWIN_ROOT_PATH$input_path"
60936     fi
60937   fi
60938 
60939 
60940   if test "x$path" != "x$new_path"; then
60941     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60943 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60944   fi
60945 
60946     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60947 
60948   path="$POTENTIAL_FREETYPE_LIB_PATH"
60949   has_colon=`$ECHO $path | $GREP ^.:`
60950   new_path="$path"
60951   if test "x$has_colon" = x; then
60952     # Not in mixed or Windows style, start by that.
60953     new_path=`cmd //c echo $path`
60954   fi
60955 
60956 
60957   input_path="$new_path"
60958   # Check if we need to convert this using DOS-style short mode. If the path
60959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60960   # take no chances and rewrite it.
60961   # Note: m4 eats our [], so we need to use [ and ] instead.
60962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60963   if test "x$has_forbidden_chars" != x; then
60964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60965     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60966   fi
60967 
60968 
60969   windows_path="$new_path"
60970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60971     unix_path=`$CYGPATH -u "$windows_path"`
60972     new_path="$unix_path"
60973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60975     new_path="$unix_path"
60976   fi
60977 
60978   if test "x$path" != "x$new_path"; then
60979     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60980     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60981 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60982   fi
60983 
60984   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60985   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60986 
60987     else
60988       # We're on a unix platform. Hooray! :)
60989       path="$POTENTIAL_FREETYPE_LIB_PATH"
60990       has_space=`$ECHO "$path" | $GREP " "`
60991       if test "x$has_space" != x; then
60992         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60993 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60994         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60995       fi
60996 
60997       # Use eval to expand a potential ~
60998       eval path="$path"
60999       if test ! -f "$path" && test ! -d "$path"; then
61000         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61001       fi
61002 
61003       if test -d "$path"; then
61004         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61005       else
61006         dir="`$DIRNAME "$path"`"
61007         base="`$BASENAME "$path"`"
61008         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61009       fi
61010     fi
61011   fi
61012 
61013 
61014     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61016 $as_echo_n "checking for freetype includes... " >&6; }
61017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61018 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61019     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61021 $as_echo_n "checking for freetype libraries... " >&6; }
61022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61023 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61024   fi
61025 
61026               else
61027 
61028   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61029   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61030   METHOD="well-known location"
61031 
61032   # Let's start with an optimistic view of the world :-)
61033   FOUND_FREETYPE=yes
61034 
61035   # First look for the canonical freetype main include file ft2build.h.
61036   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61037     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61038     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61039     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61040       # Fail.
61041       FOUND_FREETYPE=no
61042     fi
61043   fi
61044 
61045   if test "x$FOUND_FREETYPE" = xyes; then
61046     # Include file found, let's continue the sanity check.
61047     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61048 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61049 
61050     # Reset to default value
61051     FREETYPE_BASE_NAME=freetype
61052     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61053     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61054       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61055           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61056         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61057         # for the .6 version explicitly.
61058         FREETYPE_BASE_NAME=freetype.6
61059         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61060         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61061 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61062       else
61063         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61064 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61065         FOUND_FREETYPE=no
61066       fi
61067     else
61068       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61069         # On Windows, we will need both .lib and .dll file.
61070         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61071           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61072 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61073           FOUND_FREETYPE=no
61074         fi
61075       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61076           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61077         # Found lib in isa dir, use that instead.
61078         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61079         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61080 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61081       fi
61082     fi
61083   fi
61084 
61085   if test "x$FOUND_FREETYPE" = xyes; then
61086 
61087   # Only process if variable expands to non-empty
61088 
61089   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61090     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61091 
61092   # Input might be given as Windows format, start by converting to
61093   # unix format.
61094   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61095   new_path=`$CYGPATH -u "$path"`
61096 
61097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61100   # "foo.exe" is OK but "foo" is an error.
61101   #
61102   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61103   # It is also a way to make sure we got the proper file name for the real test later on.
61104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61105   if test "x$test_shortpath" = x; then
61106     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61107 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61108     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61109   fi
61110 
61111   # Call helper function which possibly converts this using DOS-style short mode.
61112   # If so, the updated path is stored in $new_path.
61113 
61114   input_path="$new_path"
61115   # Check if we need to convert this using DOS-style short mode. If the path
61116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61117   # take no chances and rewrite it.
61118   # Note: m4 eats our [], so we need to use [ and ] instead.
61119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61120   if test "x$has_forbidden_chars" != x; then
61121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61122     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61123     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61124     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61125       # Going to short mode and back again did indeed matter. Since short mode is
61126       # case insensitive, let's make it lowercase to improve readability.
61127       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61128       # Now convert it back to Unix-style (cygpath)
61129       input_path=`$CYGPATH -u "$shortmode_path"`
61130       new_path="$input_path"
61131     fi
61132   fi
61133 
61134   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61135   if test "x$test_cygdrive_prefix" = x; then
61136     # As a simple fix, exclude /usr/bin since it's not a real path.
61137     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61138       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61139       # a path prefixed by /cygdrive for fixpath to work.
61140       new_path="$CYGWIN_ROOT_PATH$input_path"
61141     fi
61142   fi
61143 
61144 
61145   if test "x$path" != "x$new_path"; then
61146     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61148 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61149   fi
61150 
61151     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61152 
61153   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61154   has_colon=`$ECHO $path | $GREP ^.:`
61155   new_path="$path"
61156   if test "x$has_colon" = x; then
61157     # Not in mixed or Windows style, start by that.
61158     new_path=`cmd //c echo $path`
61159   fi
61160 
61161 
61162   input_path="$new_path"
61163   # Check if we need to convert this using DOS-style short mode. If the path
61164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61165   # take no chances and rewrite it.
61166   # Note: m4 eats our [], so we need to use [ and ] instead.
61167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61168   if test "x$has_forbidden_chars" != x; then
61169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61170     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61171   fi
61172 
61173 
61174   windows_path="$new_path"
61175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61176     unix_path=`$CYGPATH -u "$windows_path"`
61177     new_path="$unix_path"
61178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61180     new_path="$unix_path"
61181   fi
61182 
61183   if test "x$path" != "x$new_path"; then
61184     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61186 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61187   fi
61188 
61189   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61190   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61191 
61192     else
61193       # We're on a unix platform. Hooray! :)
61194       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61195       has_space=`$ECHO "$path" | $GREP " "`
61196       if test "x$has_space" != x; then
61197         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61198 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61199         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61200       fi
61201 
61202       # Use eval to expand a potential ~
61203       eval path="$path"
61204       if test ! -f "$path" && test ! -d "$path"; then
61205         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61206       fi
61207 
61208       if test -d "$path"; then
61209         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61210       else
61211         dir="`$DIRNAME "$path"`"
61212         base="`$BASENAME "$path"`"
61213         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61214       fi
61215     fi
61216   fi
61217 
61218 
61219   # Only process if variable expands to non-empty
61220 
61221   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61223 
61224   # Input might be given as Windows format, start by converting to
61225   # unix format.
61226   path="$POTENTIAL_FREETYPE_LIB_PATH"
61227   new_path=`$CYGPATH -u "$path"`
61228 
61229   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61230   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61231   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61232   # "foo.exe" is OK but "foo" is an error.
61233   #
61234   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61235   # It is also a way to make sure we got the proper file name for the real test later on.
61236   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61237   if test "x$test_shortpath" = x; then
61238     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61239 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61240     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61241   fi
61242 
61243   # Call helper function which possibly converts this using DOS-style short mode.
61244   # If so, the updated path is stored in $new_path.
61245 
61246   input_path="$new_path"
61247   # Check if we need to convert this using DOS-style short mode. If the path
61248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61249   # take no chances and rewrite it.
61250   # Note: m4 eats our [], so we need to use [ and ] instead.
61251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61252   if test "x$has_forbidden_chars" != x; then
61253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61257       # Going to short mode and back again did indeed matter. Since short mode is
61258       # case insensitive, let's make it lowercase to improve readability.
61259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61260       # Now convert it back to Unix-style (cygpath)
61261       input_path=`$CYGPATH -u "$shortmode_path"`
61262       new_path="$input_path"
61263     fi
61264   fi
61265 
61266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61267   if test "x$test_cygdrive_prefix" = x; then
61268     # As a simple fix, exclude /usr/bin since it's not a real path.
61269     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61271       # a path prefixed by /cygdrive for fixpath to work.
61272       new_path="$CYGWIN_ROOT_PATH$input_path"
61273     fi
61274   fi
61275 
61276 
61277   if test "x$path" != "x$new_path"; then
61278     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61280 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61281   fi
61282 
61283     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61284 
61285   path="$POTENTIAL_FREETYPE_LIB_PATH"
61286   has_colon=`$ECHO $path | $GREP ^.:`
61287   new_path="$path"
61288   if test "x$has_colon" = x; then
61289     # Not in mixed or Windows style, start by that.
61290     new_path=`cmd //c echo $path`
61291   fi
61292 
61293 
61294   input_path="$new_path"
61295   # Check if we need to convert this using DOS-style short mode. If the path
61296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61297   # take no chances and rewrite it.
61298   # Note: m4 eats our [], so we need to use [ and ] instead.
61299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61300   if test "x$has_forbidden_chars" != x; then
61301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61303   fi
61304 
61305 
61306   windows_path="$new_path"
61307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61308     unix_path=`$CYGPATH -u "$windows_path"`
61309     new_path="$unix_path"
61310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61312     new_path="$unix_path"
61313   fi
61314 
61315   if test "x$path" != "x$new_path"; then
61316     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61318 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61319   fi
61320 
61321   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61322   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61323 
61324     else
61325       # We're on a unix platform. Hooray! :)
61326       path="$POTENTIAL_FREETYPE_LIB_PATH"
61327       has_space=`$ECHO "$path" | $GREP " "`
61328       if test "x$has_space" != x; then
61329         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61330 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61331         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61332       fi
61333 
61334       # Use eval to expand a potential ~
61335       eval path="$path"
61336       if test ! -f "$path" && test ! -d "$path"; then
61337         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61338       fi
61339 
61340       if test -d "$path"; then
61341         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61342       else
61343         dir="`$DIRNAME "$path"`"
61344         base="`$BASENAME "$path"`"
61345         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61346       fi
61347     fi
61348   fi
61349 
61350 
61351     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61353 $as_echo_n "checking for freetype includes... " >&6; }
61354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61355 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61356     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61357     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61358 $as_echo_n "checking for freetype libraries... " >&6; }
61359     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61360 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61361   fi
61362 
61363               fi
61364             fi
61365           fi
61366         else
61367           FREETYPE_BASE_DIR="$SYSROOT/usr"
61368 
61369   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61370   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61371   METHOD="well-known location"
61372 
61373   # Let's start with an optimistic view of the world :-)
61374   FOUND_FREETYPE=yes
61375 
61376   # First look for the canonical freetype main include file ft2build.h.
61377   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61378     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61379     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61380     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61381       # Fail.
61382       FOUND_FREETYPE=no
61383     fi
61384   fi
61385 
61386   if test "x$FOUND_FREETYPE" = xyes; then
61387     # Include file found, let's continue the sanity check.
61388     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61389 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61390 
61391     # Reset to default value
61392     FREETYPE_BASE_NAME=freetype
61393     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61394     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61395       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61396           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61397         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61398         # for the .6 version explicitly.
61399         FREETYPE_BASE_NAME=freetype.6
61400         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61401         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61402 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61403       else
61404         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61405 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61406         FOUND_FREETYPE=no
61407       fi
61408     else
61409       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61410         # On Windows, we will need both .lib and .dll file.
61411         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61412           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61413 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61414           FOUND_FREETYPE=no
61415         fi
61416       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61417           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61418         # Found lib in isa dir, use that instead.
61419         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61420         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61421 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61422       fi
61423     fi
61424   fi
61425 
61426   if test "x$FOUND_FREETYPE" = xyes; then
61427 
61428   # Only process if variable expands to non-empty
61429 
61430   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61431     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61432 
61433   # Input might be given as Windows format, start by converting to
61434   # unix format.
61435   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61436   new_path=`$CYGPATH -u "$path"`
61437 
61438   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61439   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61440   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61441   # "foo.exe" is OK but "foo" is an error.
61442   #
61443   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61444   # It is also a way to make sure we got the proper file name for the real test later on.
61445   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61446   if test "x$test_shortpath" = x; then
61447     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61448 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61449     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61450   fi
61451 
61452   # Call helper function which possibly converts this using DOS-style short mode.
61453   # If so, the updated path is stored in $new_path.
61454 
61455   input_path="$new_path"
61456   # Check if we need to convert this using DOS-style short mode. If the path
61457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61458   # take no chances and rewrite it.
61459   # Note: m4 eats our [], so we need to use [ and ] instead.
61460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61461   if test "x$has_forbidden_chars" != x; then
61462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61463     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61464     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61465     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61466       # Going to short mode and back again did indeed matter. Since short mode is
61467       # case insensitive, let's make it lowercase to improve readability.
61468       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61469       # Now convert it back to Unix-style (cygpath)
61470       input_path=`$CYGPATH -u "$shortmode_path"`
61471       new_path="$input_path"
61472     fi
61473   fi
61474 
61475   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61476   if test "x$test_cygdrive_prefix" = x; then
61477     # As a simple fix, exclude /usr/bin since it's not a real path.
61478     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61479       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61480       # a path prefixed by /cygdrive for fixpath to work.
61481       new_path="$CYGWIN_ROOT_PATH$input_path"
61482     fi
61483   fi
61484 
61485 
61486   if test "x$path" != "x$new_path"; then
61487     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61488     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61489 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61490   fi
61491 
61492     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61493 
61494   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61495   has_colon=`$ECHO $path | $GREP ^.:`
61496   new_path="$path"
61497   if test "x$has_colon" = x; then
61498     # Not in mixed or Windows style, start by that.
61499     new_path=`cmd //c echo $path`
61500   fi
61501 
61502 
61503   input_path="$new_path"
61504   # Check if we need to convert this using DOS-style short mode. If the path
61505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61506   # take no chances and rewrite it.
61507   # Note: m4 eats our [], so we need to use [ and ] instead.
61508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61509   if test "x$has_forbidden_chars" != x; then
61510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61512   fi
61513 
61514 
61515   windows_path="$new_path"
61516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61517     unix_path=`$CYGPATH -u "$windows_path"`
61518     new_path="$unix_path"
61519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61521     new_path="$unix_path"
61522   fi
61523 
61524   if test "x$path" != "x$new_path"; then
61525     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61527 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61528   fi
61529 
61530   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61531   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61532 
61533     else
61534       # We're on a unix platform. Hooray! :)
61535       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61536       has_space=`$ECHO "$path" | $GREP " "`
61537       if test "x$has_space" != x; then
61538         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61539 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61540         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61541       fi
61542 
61543       # Use eval to expand a potential ~
61544       eval path="$path"
61545       if test ! -f "$path" && test ! -d "$path"; then
61546         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61547       fi
61548 
61549       if test -d "$path"; then
61550         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61551       else
61552         dir="`$DIRNAME "$path"`"
61553         base="`$BASENAME "$path"`"
61554         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61555       fi
61556     fi
61557   fi
61558 
61559 
61560   # Only process if variable expands to non-empty
61561 
61562   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61563     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61564 
61565   # Input might be given as Windows format, start by converting to
61566   # unix format.
61567   path="$POTENTIAL_FREETYPE_LIB_PATH"
61568   new_path=`$CYGPATH -u "$path"`
61569 
61570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61573   # "foo.exe" is OK but "foo" is an error.
61574   #
61575   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61576   # It is also a way to make sure we got the proper file name for the real test later on.
61577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61578   if test "x$test_shortpath" = x; then
61579     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61581     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61582   fi
61583 
61584   # Call helper function which possibly converts this using DOS-style short mode.
61585   # If so, the updated path is stored in $new_path.
61586 
61587   input_path="$new_path"
61588   # Check if we need to convert this using DOS-style short mode. If the path
61589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61590   # take no chances and rewrite it.
61591   # Note: m4 eats our [], so we need to use [ and ] instead.
61592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61593   if test "x$has_forbidden_chars" != x; then
61594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61598       # Going to short mode and back again did indeed matter. Since short mode is
61599       # case insensitive, let's make it lowercase to improve readability.
61600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61601       # Now convert it back to Unix-style (cygpath)
61602       input_path=`$CYGPATH -u "$shortmode_path"`
61603       new_path="$input_path"
61604     fi
61605   fi
61606 
61607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61608   if test "x$test_cygdrive_prefix" = x; then
61609     # As a simple fix, exclude /usr/bin since it's not a real path.
61610     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61612       # a path prefixed by /cygdrive for fixpath to work.
61613       new_path="$CYGWIN_ROOT_PATH$input_path"
61614     fi
61615   fi
61616 
61617 
61618   if test "x$path" != "x$new_path"; then
61619     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61621 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61622   fi
61623 
61624     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61625 
61626   path="$POTENTIAL_FREETYPE_LIB_PATH"
61627   has_colon=`$ECHO $path | $GREP ^.:`
61628   new_path="$path"
61629   if test "x$has_colon" = x; then
61630     # Not in mixed or Windows style, start by that.
61631     new_path=`cmd //c echo $path`
61632   fi
61633 
61634 
61635   input_path="$new_path"
61636   # Check if we need to convert this using DOS-style short mode. If the path
61637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61638   # take no chances and rewrite it.
61639   # Note: m4 eats our [], so we need to use [ and ] instead.
61640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61641   if test "x$has_forbidden_chars" != x; then
61642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61644   fi
61645 
61646 
61647   windows_path="$new_path"
61648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61649     unix_path=`$CYGPATH -u "$windows_path"`
61650     new_path="$unix_path"
61651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61653     new_path="$unix_path"
61654   fi
61655 
61656   if test "x$path" != "x$new_path"; then
61657     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61659 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61660   fi
61661 
61662   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61663   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61664 
61665     else
61666       # We're on a unix platform. Hooray! :)
61667       path="$POTENTIAL_FREETYPE_LIB_PATH"
61668       has_space=`$ECHO "$path" | $GREP " "`
61669       if test "x$has_space" != x; then
61670         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61672         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61673       fi
61674 
61675       # Use eval to expand a potential ~
61676       eval path="$path"
61677       if test ! -f "$path" && test ! -d "$path"; then
61678         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61679       fi
61680 
61681       if test -d "$path"; then
61682         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61683       else
61684         dir="`$DIRNAME "$path"`"
61685         base="`$BASENAME "$path"`"
61686         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61687       fi
61688     fi
61689   fi
61690 
61691 
61692     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61694 $as_echo_n "checking for freetype includes... " >&6; }
61695     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61696 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61697     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61699 $as_echo_n "checking for freetype libraries... " >&6; }
61700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61701 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61702   fi
61703 
61704 
61705           if test "x$FOUND_FREETYPE" != xyes; then
61706             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61707 
61708   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61709   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61710   METHOD="well-known location"
61711 
61712   # Let's start with an optimistic view of the world :-)
61713   FOUND_FREETYPE=yes
61714 
61715   # First look for the canonical freetype main include file ft2build.h.
61716   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61717     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61718     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61719     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61720       # Fail.
61721       FOUND_FREETYPE=no
61722     fi
61723   fi
61724 
61725   if test "x$FOUND_FREETYPE" = xyes; then
61726     # Include file found, let's continue the sanity check.
61727     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61728 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61729 
61730     # Reset to default value
61731     FREETYPE_BASE_NAME=freetype
61732     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61733     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61734       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61735           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61736         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61737         # for the .6 version explicitly.
61738         FREETYPE_BASE_NAME=freetype.6
61739         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61740         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61741 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61742       else
61743         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61744 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61745         FOUND_FREETYPE=no
61746       fi
61747     else
61748       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61749         # On Windows, we will need both .lib and .dll file.
61750         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61751           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61752 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61753           FOUND_FREETYPE=no
61754         fi
61755       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61756           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61757         # Found lib in isa dir, use that instead.
61758         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61759         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61760 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61761       fi
61762     fi
61763   fi
61764 
61765   if test "x$FOUND_FREETYPE" = xyes; then
61766 
61767   # Only process if variable expands to non-empty
61768 
61769   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61771 
61772   # Input might be given as Windows format, start by converting to
61773   # unix format.
61774   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61775   new_path=`$CYGPATH -u "$path"`
61776 
61777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61780   # "foo.exe" is OK but "foo" is an error.
61781   #
61782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61783   # It is also a way to make sure we got the proper file name for the real test later on.
61784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61785   if test "x$test_shortpath" = x; then
61786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61787 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61788     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61789   fi
61790 
61791   # Call helper function which possibly converts this using DOS-style short mode.
61792   # If so, the updated path is stored in $new_path.
61793 
61794   input_path="$new_path"
61795   # Check if we need to convert this using DOS-style short mode. If the path
61796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61797   # take no chances and rewrite it.
61798   # Note: m4 eats our [], so we need to use [ and ] instead.
61799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61800   if test "x$has_forbidden_chars" != x; then
61801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61805       # Going to short mode and back again did indeed matter. Since short mode is
61806       # case insensitive, let's make it lowercase to improve readability.
61807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61808       # Now convert it back to Unix-style (cygpath)
61809       input_path=`$CYGPATH -u "$shortmode_path"`
61810       new_path="$input_path"
61811     fi
61812   fi
61813 
61814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61815   if test "x$test_cygdrive_prefix" = x; then
61816     # As a simple fix, exclude /usr/bin since it's not a real path.
61817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61819       # a path prefixed by /cygdrive for fixpath to work.
61820       new_path="$CYGWIN_ROOT_PATH$input_path"
61821     fi
61822   fi
61823 
61824 
61825   if test "x$path" != "x$new_path"; then
61826     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61828 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61829   fi
61830 
61831     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61832 
61833   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61834   has_colon=`$ECHO $path | $GREP ^.:`
61835   new_path="$path"
61836   if test "x$has_colon" = x; then
61837     # Not in mixed or Windows style, start by that.
61838     new_path=`cmd //c echo $path`
61839   fi
61840 
61841 
61842   input_path="$new_path"
61843   # Check if we need to convert this using DOS-style short mode. If the path
61844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61845   # take no chances and rewrite it.
61846   # Note: m4 eats our [], so we need to use [ and ] instead.
61847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61848   if test "x$has_forbidden_chars" != x; then
61849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61851   fi
61852 
61853 
61854   windows_path="$new_path"
61855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61856     unix_path=`$CYGPATH -u "$windows_path"`
61857     new_path="$unix_path"
61858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61860     new_path="$unix_path"
61861   fi
61862 
61863   if test "x$path" != "x$new_path"; then
61864     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61866 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61867   fi
61868 
61869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61871 
61872     else
61873       # We're on a unix platform. Hooray! :)
61874       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61875       has_space=`$ECHO "$path" | $GREP " "`
61876       if test "x$has_space" != x; then
61877         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61878 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61879         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61880       fi
61881 
61882       # Use eval to expand a potential ~
61883       eval path="$path"
61884       if test ! -f "$path" && test ! -d "$path"; then
61885         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61886       fi
61887 
61888       if test -d "$path"; then
61889         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61890       else
61891         dir="`$DIRNAME "$path"`"
61892         base="`$BASENAME "$path"`"
61893         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61894       fi
61895     fi
61896   fi
61897 
61898 
61899   # Only process if variable expands to non-empty
61900 
61901   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61903 
61904   # Input might be given as Windows format, start by converting to
61905   # unix format.
61906   path="$POTENTIAL_FREETYPE_LIB_PATH"
61907   new_path=`$CYGPATH -u "$path"`
61908 
61909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61912   # "foo.exe" is OK but "foo" is an error.
61913   #
61914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61915   # It is also a way to make sure we got the proper file name for the real test later on.
61916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61917   if test "x$test_shortpath" = x; then
61918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61919 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61920     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61921   fi
61922 
61923   # Call helper function which possibly converts this using DOS-style short mode.
61924   # If so, the updated path is stored in $new_path.
61925 
61926   input_path="$new_path"
61927   # Check if we need to convert this using DOS-style short mode. If the path
61928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61929   # take no chances and rewrite it.
61930   # Note: m4 eats our [], so we need to use [ and ] instead.
61931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61932   if test "x$has_forbidden_chars" != x; then
61933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61937       # Going to short mode and back again did indeed matter. Since short mode is
61938       # case insensitive, let's make it lowercase to improve readability.
61939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61940       # Now convert it back to Unix-style (cygpath)
61941       input_path=`$CYGPATH -u "$shortmode_path"`
61942       new_path="$input_path"
61943     fi
61944   fi
61945 
61946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61947   if test "x$test_cygdrive_prefix" = x; then
61948     # As a simple fix, exclude /usr/bin since it's not a real path.
61949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61951       # a path prefixed by /cygdrive for fixpath to work.
61952       new_path="$CYGWIN_ROOT_PATH$input_path"
61953     fi
61954   fi
61955 
61956 
61957   if test "x$path" != "x$new_path"; then
61958     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61960 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61961   fi
61962 
61963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61964 
61965   path="$POTENTIAL_FREETYPE_LIB_PATH"
61966   has_colon=`$ECHO $path | $GREP ^.:`
61967   new_path="$path"
61968   if test "x$has_colon" = x; then
61969     # Not in mixed or Windows style, start by that.
61970     new_path=`cmd //c echo $path`
61971   fi
61972 
61973 
61974   input_path="$new_path"
61975   # Check if we need to convert this using DOS-style short mode. If the path
61976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61977   # take no chances and rewrite it.
61978   # Note: m4 eats our [], so we need to use [ and ] instead.
61979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61980   if test "x$has_forbidden_chars" != x; then
61981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61983   fi
61984 
61985 
61986   windows_path="$new_path"
61987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61988     unix_path=`$CYGPATH -u "$windows_path"`
61989     new_path="$unix_path"
61990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61992     new_path="$unix_path"
61993   fi
61994 
61995   if test "x$path" != "x$new_path"; then
61996     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61998 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61999   fi
62000 
62001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62003 
62004     else
62005       # We're on a unix platform. Hooray! :)
62006       path="$POTENTIAL_FREETYPE_LIB_PATH"
62007       has_space=`$ECHO "$path" | $GREP " "`
62008       if test "x$has_space" != x; then
62009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62010 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62011         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62012       fi
62013 
62014       # Use eval to expand a potential ~
62015       eval path="$path"
62016       if test ! -f "$path" && test ! -d "$path"; then
62017         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62018       fi
62019 
62020       if test -d "$path"; then
62021         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62022       else
62023         dir="`$DIRNAME "$path"`"
62024         base="`$BASENAME "$path"`"
62025         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62026       fi
62027     fi
62028   fi
62029 
62030 
62031     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62032     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62033 $as_echo_n "checking for freetype includes... " >&6; }
62034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62035 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62036     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62038 $as_echo_n "checking for freetype libraries... " >&6; }
62039     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62040 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62041   fi
62042 
62043           fi
62044           if test "x$FOUND_FREETYPE" != xyes; then
62045             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62046 
62047   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62048   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62049   METHOD="well-known location"
62050 
62051   # Let's start with an optimistic view of the world :-)
62052   FOUND_FREETYPE=yes
62053 
62054   # First look for the canonical freetype main include file ft2build.h.
62055   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62056     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62057     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62058     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62059       # Fail.
62060       FOUND_FREETYPE=no
62061     fi
62062   fi
62063 
62064   if test "x$FOUND_FREETYPE" = xyes; then
62065     # Include file found, let's continue the sanity check.
62066     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62067 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62068 
62069     # Reset to default value
62070     FREETYPE_BASE_NAME=freetype
62071     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62072     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62073       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62074           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62075         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62076         # for the .6 version explicitly.
62077         FREETYPE_BASE_NAME=freetype.6
62078         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62079         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62080 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62081       else
62082         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62083 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62084         FOUND_FREETYPE=no
62085       fi
62086     else
62087       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62088         # On Windows, we will need both .lib and .dll file.
62089         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62090           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62091 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62092           FOUND_FREETYPE=no
62093         fi
62094       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62095           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62096         # Found lib in isa dir, use that instead.
62097         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62098         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62099 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62100       fi
62101     fi
62102   fi
62103 
62104   if test "x$FOUND_FREETYPE" = xyes; then
62105 
62106   # Only process if variable expands to non-empty
62107 
62108   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62110 
62111   # Input might be given as Windows format, start by converting to
62112   # unix format.
62113   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62114   new_path=`$CYGPATH -u "$path"`
62115 
62116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62119   # "foo.exe" is OK but "foo" is an error.
62120   #
62121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62122   # It is also a way to make sure we got the proper file name for the real test later on.
62123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62124   if test "x$test_shortpath" = x; then
62125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62126 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62127     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62128   fi
62129 
62130   # Call helper function which possibly converts this using DOS-style short mode.
62131   # If so, the updated path is stored in $new_path.
62132 
62133   input_path="$new_path"
62134   # Check if we need to convert this using DOS-style short mode. If the path
62135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62136   # take no chances and rewrite it.
62137   # Note: m4 eats our [], so we need to use [ and ] instead.
62138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62139   if test "x$has_forbidden_chars" != x; then
62140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62144       # Going to short mode and back again did indeed matter. Since short mode is
62145       # case insensitive, let's make it lowercase to improve readability.
62146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62147       # Now convert it back to Unix-style (cygpath)
62148       input_path=`$CYGPATH -u "$shortmode_path"`
62149       new_path="$input_path"
62150     fi
62151   fi
62152 
62153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62154   if test "x$test_cygdrive_prefix" = x; then
62155     # As a simple fix, exclude /usr/bin since it's not a real path.
62156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62158       # a path prefixed by /cygdrive for fixpath to work.
62159       new_path="$CYGWIN_ROOT_PATH$input_path"
62160     fi
62161   fi
62162 
62163 
62164   if test "x$path" != "x$new_path"; then
62165     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62167 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62168   fi
62169 
62170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62171 
62172   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62173   has_colon=`$ECHO $path | $GREP ^.:`
62174   new_path="$path"
62175   if test "x$has_colon" = x; then
62176     # Not in mixed or Windows style, start by that.
62177     new_path=`cmd //c echo $path`
62178   fi
62179 
62180 
62181   input_path="$new_path"
62182   # Check if we need to convert this using DOS-style short mode. If the path
62183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62184   # take no chances and rewrite it.
62185   # Note: m4 eats our [], so we need to use [ and ] instead.
62186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62187   if test "x$has_forbidden_chars" != x; then
62188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62190   fi
62191 
62192 
62193   windows_path="$new_path"
62194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62195     unix_path=`$CYGPATH -u "$windows_path"`
62196     new_path="$unix_path"
62197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62199     new_path="$unix_path"
62200   fi
62201 
62202   if test "x$path" != "x$new_path"; then
62203     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62205 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62206   fi
62207 
62208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62210 
62211     else
62212       # We're on a unix platform. Hooray! :)
62213       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62214       has_space=`$ECHO "$path" | $GREP " "`
62215       if test "x$has_space" != x; then
62216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62217 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62219       fi
62220 
62221       # Use eval to expand a potential ~
62222       eval path="$path"
62223       if test ! -f "$path" && test ! -d "$path"; then
62224         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62225       fi
62226 
62227       if test -d "$path"; then
62228         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62229       else
62230         dir="`$DIRNAME "$path"`"
62231         base="`$BASENAME "$path"`"
62232         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62233       fi
62234     fi
62235   fi
62236 
62237 
62238   # Only process if variable expands to non-empty
62239 
62240   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62241     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62242 
62243   # Input might be given as Windows format, start by converting to
62244   # unix format.
62245   path="$POTENTIAL_FREETYPE_LIB_PATH"
62246   new_path=`$CYGPATH -u "$path"`
62247 
62248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62251   # "foo.exe" is OK but "foo" is an error.
62252   #
62253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62254   # It is also a way to make sure we got the proper file name for the real test later on.
62255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62256   if test "x$test_shortpath" = x; then
62257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62258 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62259     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62260   fi
62261 
62262   # Call helper function which possibly converts this using DOS-style short mode.
62263   # If so, the updated path is stored in $new_path.
62264 
62265   input_path="$new_path"
62266   # Check if we need to convert this using DOS-style short mode. If the path
62267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62268   # take no chances and rewrite it.
62269   # Note: m4 eats our [], so we need to use [ and ] instead.
62270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62271   if test "x$has_forbidden_chars" != x; then
62272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62276       # Going to short mode and back again did indeed matter. Since short mode is
62277       # case insensitive, let's make it lowercase to improve readability.
62278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62279       # Now convert it back to Unix-style (cygpath)
62280       input_path=`$CYGPATH -u "$shortmode_path"`
62281       new_path="$input_path"
62282     fi
62283   fi
62284 
62285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62286   if test "x$test_cygdrive_prefix" = x; then
62287     # As a simple fix, exclude /usr/bin since it's not a real path.
62288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62290       # a path prefixed by /cygdrive for fixpath to work.
62291       new_path="$CYGWIN_ROOT_PATH$input_path"
62292     fi
62293   fi
62294 
62295 
62296   if test "x$path" != "x$new_path"; then
62297     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62299 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62300   fi
62301 
62302     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62303 
62304   path="$POTENTIAL_FREETYPE_LIB_PATH"
62305   has_colon=`$ECHO $path | $GREP ^.:`
62306   new_path="$path"
62307   if test "x$has_colon" = x; then
62308     # Not in mixed or Windows style, start by that.
62309     new_path=`cmd //c echo $path`
62310   fi
62311 
62312 
62313   input_path="$new_path"
62314   # Check if we need to convert this using DOS-style short mode. If the path
62315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62316   # take no chances and rewrite it.
62317   # Note: m4 eats our [], so we need to use [ and ] instead.
62318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62319   if test "x$has_forbidden_chars" != x; then
62320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62322   fi
62323 
62324 
62325   windows_path="$new_path"
62326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62327     unix_path=`$CYGPATH -u "$windows_path"`
62328     new_path="$unix_path"
62329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62331     new_path="$unix_path"
62332   fi
62333 
62334   if test "x$path" != "x$new_path"; then
62335     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62337 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62338   fi
62339 
62340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62342 
62343     else
62344       # We're on a unix platform. Hooray! :)
62345       path="$POTENTIAL_FREETYPE_LIB_PATH"
62346       has_space=`$ECHO "$path" | $GREP " "`
62347       if test "x$has_space" != x; then
62348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62349 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62350         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62351       fi
62352 
62353       # Use eval to expand a potential ~
62354       eval path="$path"
62355       if test ! -f "$path" && test ! -d "$path"; then
62356         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62357       fi
62358 
62359       if test -d "$path"; then
62360         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62361       else
62362         dir="`$DIRNAME "$path"`"
62363         base="`$BASENAME "$path"`"
62364         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62365       fi
62366     fi
62367   fi
62368 
62369 
62370     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62372 $as_echo_n "checking for freetype includes... " >&6; }
62373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62374 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62375     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62377 $as_echo_n "checking for freetype libraries... " >&6; }
62378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62379 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62380   fi
62381 
62382           fi
62383 
62384           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62385             if test "x$FOUND_FREETYPE" != xyes; then
62386               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62387               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62388 
62389   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62390   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62391   METHOD="well-known location"
62392 
62393   # Let's start with an optimistic view of the world :-)
62394   FOUND_FREETYPE=yes
62395 
62396   # First look for the canonical freetype main include file ft2build.h.
62397   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62398     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62399     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62400     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62401       # Fail.
62402       FOUND_FREETYPE=no
62403     fi
62404   fi
62405 
62406   if test "x$FOUND_FREETYPE" = xyes; then
62407     # Include file found, let's continue the sanity check.
62408     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62409 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62410 
62411     # Reset to default value
62412     FREETYPE_BASE_NAME=freetype
62413     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62414     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62415       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62416           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62417         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62418         # for the .6 version explicitly.
62419         FREETYPE_BASE_NAME=freetype.6
62420         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62421         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62422 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62423       else
62424         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62425 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62426         FOUND_FREETYPE=no
62427       fi
62428     else
62429       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62430         # On Windows, we will need both .lib and .dll file.
62431         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62432           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62433 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62434           FOUND_FREETYPE=no
62435         fi
62436       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62437           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62438         # Found lib in isa dir, use that instead.
62439         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62440         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62441 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62442       fi
62443     fi
62444   fi
62445 
62446   if test "x$FOUND_FREETYPE" = xyes; then
62447 
62448   # Only process if variable expands to non-empty
62449 
62450   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62452 
62453   # Input might be given as Windows format, start by converting to
62454   # unix format.
62455   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62456   new_path=`$CYGPATH -u "$path"`
62457 
62458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62461   # "foo.exe" is OK but "foo" is an error.
62462   #
62463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62464   # It is also a way to make sure we got the proper file name for the real test later on.
62465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62466   if test "x$test_shortpath" = x; then
62467     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62468 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62469     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62470   fi
62471 
62472   # Call helper function which possibly converts this using DOS-style short mode.
62473   # If so, the updated path is stored in $new_path.
62474 
62475   input_path="$new_path"
62476   # Check if we need to convert this using DOS-style short mode. If the path
62477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62478   # take no chances and rewrite it.
62479   # Note: m4 eats our [], so we need to use [ and ] instead.
62480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62481   if test "x$has_forbidden_chars" != x; then
62482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62483     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62484     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62485     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62486       # Going to short mode and back again did indeed matter. Since short mode is
62487       # case insensitive, let's make it lowercase to improve readability.
62488       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62489       # Now convert it back to Unix-style (cygpath)
62490       input_path=`$CYGPATH -u "$shortmode_path"`
62491       new_path="$input_path"
62492     fi
62493   fi
62494 
62495   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62496   if test "x$test_cygdrive_prefix" = x; then
62497     # As a simple fix, exclude /usr/bin since it's not a real path.
62498     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62499       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62500       # a path prefixed by /cygdrive for fixpath to work.
62501       new_path="$CYGWIN_ROOT_PATH$input_path"
62502     fi
62503   fi
62504 
62505 
62506   if test "x$path" != "x$new_path"; then
62507     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62509 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62510   fi
62511 
62512     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62513 
62514   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62515   has_colon=`$ECHO $path | $GREP ^.:`
62516   new_path="$path"
62517   if test "x$has_colon" = x; then
62518     # Not in mixed or Windows style, start by that.
62519     new_path=`cmd //c echo $path`
62520   fi
62521 
62522 
62523   input_path="$new_path"
62524   # Check if we need to convert this using DOS-style short mode. If the path
62525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62526   # take no chances and rewrite it.
62527   # Note: m4 eats our [], so we need to use [ and ] instead.
62528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62529   if test "x$has_forbidden_chars" != x; then
62530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62532   fi
62533 
62534 
62535   windows_path="$new_path"
62536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62537     unix_path=`$CYGPATH -u "$windows_path"`
62538     new_path="$unix_path"
62539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62541     new_path="$unix_path"
62542   fi
62543 
62544   if test "x$path" != "x$new_path"; then
62545     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62547 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62548   fi
62549 
62550   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62551   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62552 
62553     else
62554       # We're on a unix platform. Hooray! :)
62555       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62556       has_space=`$ECHO "$path" | $GREP " "`
62557       if test "x$has_space" != x; then
62558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62559 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62560         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62561       fi
62562 
62563       # Use eval to expand a potential ~
62564       eval path="$path"
62565       if test ! -f "$path" && test ! -d "$path"; then
62566         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62567       fi
62568 
62569       if test -d "$path"; then
62570         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62571       else
62572         dir="`$DIRNAME "$path"`"
62573         base="`$BASENAME "$path"`"
62574         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62575       fi
62576     fi
62577   fi
62578 
62579 
62580   # Only process if variable expands to non-empty
62581 
62582   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62583     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62584 
62585   # Input might be given as Windows format, start by converting to
62586   # unix format.
62587   path="$POTENTIAL_FREETYPE_LIB_PATH"
62588   new_path=`$CYGPATH -u "$path"`
62589 
62590   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62591   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62592   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62593   # "foo.exe" is OK but "foo" is an error.
62594   #
62595   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62596   # It is also a way to make sure we got the proper file name for the real test later on.
62597   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62598   if test "x$test_shortpath" = x; then
62599     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62600 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62601     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62602   fi
62603 
62604   # Call helper function which possibly converts this using DOS-style short mode.
62605   # If so, the updated path is stored in $new_path.
62606 
62607   input_path="$new_path"
62608   # Check if we need to convert this using DOS-style short mode. If the path
62609   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62610   # take no chances and rewrite it.
62611   # Note: m4 eats our [], so we need to use [ and ] instead.
62612   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62613   if test "x$has_forbidden_chars" != x; then
62614     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62615     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62616     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62617     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62618       # Going to short mode and back again did indeed matter. Since short mode is
62619       # case insensitive, let's make it lowercase to improve readability.
62620       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62621       # Now convert it back to Unix-style (cygpath)
62622       input_path=`$CYGPATH -u "$shortmode_path"`
62623       new_path="$input_path"
62624     fi
62625   fi
62626 
62627   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62628   if test "x$test_cygdrive_prefix" = x; then
62629     # As a simple fix, exclude /usr/bin since it's not a real path.
62630     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62631       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62632       # a path prefixed by /cygdrive for fixpath to work.
62633       new_path="$CYGWIN_ROOT_PATH$input_path"
62634     fi
62635   fi
62636 
62637 
62638   if test "x$path" != "x$new_path"; then
62639     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62640     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62641 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62642   fi
62643 
62644     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62645 
62646   path="$POTENTIAL_FREETYPE_LIB_PATH"
62647   has_colon=`$ECHO $path | $GREP ^.:`
62648   new_path="$path"
62649   if test "x$has_colon" = x; then
62650     # Not in mixed or Windows style, start by that.
62651     new_path=`cmd //c echo $path`
62652   fi
62653 
62654 
62655   input_path="$new_path"
62656   # Check if we need to convert this using DOS-style short mode. If the path
62657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62658   # take no chances and rewrite it.
62659   # Note: m4 eats our [], so we need to use [ and ] instead.
62660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62661   if test "x$has_forbidden_chars" != x; then
62662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62663     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62664   fi
62665 
62666 
62667   windows_path="$new_path"
62668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62669     unix_path=`$CYGPATH -u "$windows_path"`
62670     new_path="$unix_path"
62671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62673     new_path="$unix_path"
62674   fi
62675 
62676   if test "x$path" != "x$new_path"; then
62677     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62678     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62679 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62680   fi
62681 
62682   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62683   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62684 
62685     else
62686       # We're on a unix platform. Hooray! :)
62687       path="$POTENTIAL_FREETYPE_LIB_PATH"
62688       has_space=`$ECHO "$path" | $GREP " "`
62689       if test "x$has_space" != x; then
62690         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62691 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62692         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62693       fi
62694 
62695       # Use eval to expand a potential ~
62696       eval path="$path"
62697       if test ! -f "$path" && test ! -d "$path"; then
62698         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62699       fi
62700 
62701       if test -d "$path"; then
62702         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62703       else
62704         dir="`$DIRNAME "$path"`"
62705         base="`$BASENAME "$path"`"
62706         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62707       fi
62708     fi
62709   fi
62710 
62711 
62712     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62714 $as_echo_n "checking for freetype includes... " >&6; }
62715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62716 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62717     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62719 $as_echo_n "checking for freetype libraries... " >&6; }
62720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62721 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62722   fi
62723 
62724             fi
62725           fi
62726 
62727           if test "x$FOUND_FREETYPE" != xyes; then
62728             FREETYPE_BASE_DIR="$SYSROOT/usr"
62729             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62730 
62731   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62732   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62733   METHOD="well-known location"
62734 
62735   # Let's start with an optimistic view of the world :-)
62736   FOUND_FREETYPE=yes
62737 
62738   # First look for the canonical freetype main include file ft2build.h.
62739   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62740     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62741     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62742     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62743       # Fail.
62744       FOUND_FREETYPE=no
62745     fi
62746   fi
62747 
62748   if test "x$FOUND_FREETYPE" = xyes; then
62749     # Include file found, let's continue the sanity check.
62750     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62751 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62752 
62753     # Reset to default value
62754     FREETYPE_BASE_NAME=freetype
62755     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62756     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62757       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62758           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62759         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62760         # for the .6 version explicitly.
62761         FREETYPE_BASE_NAME=freetype.6
62762         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62763         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62764 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62765       else
62766         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62767 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62768         FOUND_FREETYPE=no
62769       fi
62770     else
62771       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62772         # On Windows, we will need both .lib and .dll file.
62773         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62774           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62775 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62776           FOUND_FREETYPE=no
62777         fi
62778       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62779           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62780         # Found lib in isa dir, use that instead.
62781         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62782         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62783 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62784       fi
62785     fi
62786   fi
62787 
62788   if test "x$FOUND_FREETYPE" = xyes; then
62789 
62790   # Only process if variable expands to non-empty
62791 
62792   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62794 
62795   # Input might be given as Windows format, start by converting to
62796   # unix format.
62797   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62798   new_path=`$CYGPATH -u "$path"`
62799 
62800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62803   # "foo.exe" is OK but "foo" is an error.
62804   #
62805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62806   # It is also a way to make sure we got the proper file name for the real test later on.
62807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62808   if test "x$test_shortpath" = x; then
62809     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62810 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62811     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62812   fi
62813 
62814   # Call helper function which possibly converts this using DOS-style short mode.
62815   # If so, the updated path is stored in $new_path.
62816 
62817   input_path="$new_path"
62818   # Check if we need to convert this using DOS-style short mode. If the path
62819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62820   # take no chances and rewrite it.
62821   # Note: m4 eats our [], so we need to use [ and ] instead.
62822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62823   if test "x$has_forbidden_chars" != x; then
62824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62828       # Going to short mode and back again did indeed matter. Since short mode is
62829       # case insensitive, let's make it lowercase to improve readability.
62830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62831       # Now convert it back to Unix-style (cygpath)
62832       input_path=`$CYGPATH -u "$shortmode_path"`
62833       new_path="$input_path"
62834     fi
62835   fi
62836 
62837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62838   if test "x$test_cygdrive_prefix" = x; then
62839     # As a simple fix, exclude /usr/bin since it's not a real path.
62840     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62842       # a path prefixed by /cygdrive for fixpath to work.
62843       new_path="$CYGWIN_ROOT_PATH$input_path"
62844     fi
62845   fi
62846 
62847 
62848   if test "x$path" != "x$new_path"; then
62849     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62851 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62852   fi
62853 
62854     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62855 
62856   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62857   has_colon=`$ECHO $path | $GREP ^.:`
62858   new_path="$path"
62859   if test "x$has_colon" = x; then
62860     # Not in mixed or Windows style, start by that.
62861     new_path=`cmd //c echo $path`
62862   fi
62863 
62864 
62865   input_path="$new_path"
62866   # Check if we need to convert this using DOS-style short mode. If the path
62867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62868   # take no chances and rewrite it.
62869   # Note: m4 eats our [], so we need to use [ and ] instead.
62870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62871   if test "x$has_forbidden_chars" != x; then
62872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62873     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62874   fi
62875 
62876 
62877   windows_path="$new_path"
62878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62879     unix_path=`$CYGPATH -u "$windows_path"`
62880     new_path="$unix_path"
62881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62883     new_path="$unix_path"
62884   fi
62885 
62886   if test "x$path" != "x$new_path"; then
62887     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62889 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62890   fi
62891 
62892   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62893   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62894 
62895     else
62896       # We're on a unix platform. Hooray! :)
62897       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62898       has_space=`$ECHO "$path" | $GREP " "`
62899       if test "x$has_space" != x; then
62900         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62901 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62902         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62903       fi
62904 
62905       # Use eval to expand a potential ~
62906       eval path="$path"
62907       if test ! -f "$path" && test ! -d "$path"; then
62908         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62909       fi
62910 
62911       if test -d "$path"; then
62912         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62913       else
62914         dir="`$DIRNAME "$path"`"
62915         base="`$BASENAME "$path"`"
62916         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62917       fi
62918     fi
62919   fi
62920 
62921 
62922   # Only process if variable expands to non-empty
62923 
62924   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62926 
62927   # Input might be given as Windows format, start by converting to
62928   # unix format.
62929   path="$POTENTIAL_FREETYPE_LIB_PATH"
62930   new_path=`$CYGPATH -u "$path"`
62931 
62932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62935   # "foo.exe" is OK but "foo" is an error.
62936   #
62937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62938   # It is also a way to make sure we got the proper file name for the real test later on.
62939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62940   if test "x$test_shortpath" = x; then
62941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62943     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62944   fi
62945 
62946   # Call helper function which possibly converts this using DOS-style short mode.
62947   # If so, the updated path is stored in $new_path.
62948 
62949   input_path="$new_path"
62950   # Check if we need to convert this using DOS-style short mode. If the path
62951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62952   # take no chances and rewrite it.
62953   # Note: m4 eats our [], so we need to use [ and ] instead.
62954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62955   if test "x$has_forbidden_chars" != x; then
62956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62960       # Going to short mode and back again did indeed matter. Since short mode is
62961       # case insensitive, let's make it lowercase to improve readability.
62962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62963       # Now convert it back to Unix-style (cygpath)
62964       input_path=`$CYGPATH -u "$shortmode_path"`
62965       new_path="$input_path"
62966     fi
62967   fi
62968 
62969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62970   if test "x$test_cygdrive_prefix" = x; then
62971     # As a simple fix, exclude /usr/bin since it's not a real path.
62972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62974       # a path prefixed by /cygdrive for fixpath to work.
62975       new_path="$CYGWIN_ROOT_PATH$input_path"
62976     fi
62977   fi
62978 
62979 
62980   if test "x$path" != "x$new_path"; then
62981     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62983 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62984   fi
62985 
62986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62987 
62988   path="$POTENTIAL_FREETYPE_LIB_PATH"
62989   has_colon=`$ECHO $path | $GREP ^.:`
62990   new_path="$path"
62991   if test "x$has_colon" = x; then
62992     # Not in mixed or Windows style, start by that.
62993     new_path=`cmd //c echo $path`
62994   fi
62995 
62996 
62997   input_path="$new_path"
62998   # Check if we need to convert this using DOS-style short mode. If the path
62999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63000   # take no chances and rewrite it.
63001   # Note: m4 eats our [], so we need to use [ and ] instead.
63002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63003   if test "x$has_forbidden_chars" != x; then
63004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63006   fi
63007 
63008 
63009   windows_path="$new_path"
63010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63011     unix_path=`$CYGPATH -u "$windows_path"`
63012     new_path="$unix_path"
63013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63015     new_path="$unix_path"
63016   fi
63017 
63018   if test "x$path" != "x$new_path"; then
63019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63022   fi
63023 
63024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63026 
63027     else
63028       # We're on a unix platform. Hooray! :)
63029       path="$POTENTIAL_FREETYPE_LIB_PATH"
63030       has_space=`$ECHO "$path" | $GREP " "`
63031       if test "x$has_space" != x; then
63032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63035       fi
63036 
63037       # Use eval to expand a potential ~
63038       eval path="$path"
63039       if test ! -f "$path" && test ! -d "$path"; then
63040         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63041       fi
63042 
63043       if test -d "$path"; then
63044         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63045       else
63046         dir="`$DIRNAME "$path"`"
63047         base="`$BASENAME "$path"`"
63048         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63049       fi
63050     fi
63051   fi
63052 
63053 
63054     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63056 $as_echo_n "checking for freetype includes... " >&6; }
63057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63058 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63059     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63061 $as_echo_n "checking for freetype libraries... " >&6; }
63062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63063 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63064   fi
63065 
63066             else
63067 
63068   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63069   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63070   METHOD="well-known location"
63071 
63072   # Let's start with an optimistic view of the world :-)
63073   FOUND_FREETYPE=yes
63074 
63075   # First look for the canonical freetype main include file ft2build.h.
63076   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63077     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63078     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63079     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63080       # Fail.
63081       FOUND_FREETYPE=no
63082     fi
63083   fi
63084 
63085   if test "x$FOUND_FREETYPE" = xyes; then
63086     # Include file found, let's continue the sanity check.
63087     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63088 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63089 
63090     # Reset to default value
63091     FREETYPE_BASE_NAME=freetype
63092     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63093     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63094       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63095           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63096         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63097         # for the .6 version explicitly.
63098         FREETYPE_BASE_NAME=freetype.6
63099         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63100         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63101 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63102       else
63103         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63104 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63105         FOUND_FREETYPE=no
63106       fi
63107     else
63108       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63109         # On Windows, we will need both .lib and .dll file.
63110         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63111           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63112 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63113           FOUND_FREETYPE=no
63114         fi
63115       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63116           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63117         # Found lib in isa dir, use that instead.
63118         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63119         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63120 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63121       fi
63122     fi
63123   fi
63124 
63125   if test "x$FOUND_FREETYPE" = xyes; then
63126 
63127   # Only process if variable expands to non-empty
63128 
63129   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63130     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63131 
63132   # Input might be given as Windows format, start by converting to
63133   # unix format.
63134   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63135   new_path=`$CYGPATH -u "$path"`
63136 
63137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63140   # "foo.exe" is OK but "foo" is an error.
63141   #
63142   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63143   # It is also a way to make sure we got the proper file name for the real test later on.
63144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63145   if test "x$test_shortpath" = x; then
63146     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63147 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63148     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63149   fi
63150 
63151   # Call helper function which possibly converts this using DOS-style short mode.
63152   # If so, the updated path is stored in $new_path.
63153 
63154   input_path="$new_path"
63155   # Check if we need to convert this using DOS-style short mode. If the path
63156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63157   # take no chances and rewrite it.
63158   # Note: m4 eats our [], so we need to use [ and ] instead.
63159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63160   if test "x$has_forbidden_chars" != x; then
63161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63165       # Going to short mode and back again did indeed matter. Since short mode is
63166       # case insensitive, let's make it lowercase to improve readability.
63167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63168       # Now convert it back to Unix-style (cygpath)
63169       input_path=`$CYGPATH -u "$shortmode_path"`
63170       new_path="$input_path"
63171     fi
63172   fi
63173 
63174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63175   if test "x$test_cygdrive_prefix" = x; then
63176     # As a simple fix, exclude /usr/bin since it's not a real path.
63177     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63179       # a path prefixed by /cygdrive for fixpath to work.
63180       new_path="$CYGWIN_ROOT_PATH$input_path"
63181     fi
63182   fi
63183 
63184 
63185   if test "x$path" != "x$new_path"; then
63186     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63188 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63189   fi
63190 
63191     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63192 
63193   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63194   has_colon=`$ECHO $path | $GREP ^.:`
63195   new_path="$path"
63196   if test "x$has_colon" = x; then
63197     # Not in mixed or Windows style, start by that.
63198     new_path=`cmd //c echo $path`
63199   fi
63200 
63201 
63202   input_path="$new_path"
63203   # Check if we need to convert this using DOS-style short mode. If the path
63204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63205   # take no chances and rewrite it.
63206   # Note: m4 eats our [], so we need to use [ and ] instead.
63207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63208   if test "x$has_forbidden_chars" != x; then
63209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63211   fi
63212 
63213 
63214   windows_path="$new_path"
63215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63216     unix_path=`$CYGPATH -u "$windows_path"`
63217     new_path="$unix_path"
63218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63220     new_path="$unix_path"
63221   fi
63222 
63223   if test "x$path" != "x$new_path"; then
63224     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63227   fi
63228 
63229   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63230   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63231 
63232     else
63233       # We're on a unix platform. Hooray! :)
63234       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63235       has_space=`$ECHO "$path" | $GREP " "`
63236       if test "x$has_space" != x; then
63237         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63238 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63239         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63240       fi
63241 
63242       # Use eval to expand a potential ~
63243       eval path="$path"
63244       if test ! -f "$path" && test ! -d "$path"; then
63245         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63246       fi
63247 
63248       if test -d "$path"; then
63249         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63250       else
63251         dir="`$DIRNAME "$path"`"
63252         base="`$BASENAME "$path"`"
63253         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63254       fi
63255     fi
63256   fi
63257 
63258 
63259   # Only process if variable expands to non-empty
63260 
63261   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63263 
63264   # Input might be given as Windows format, start by converting to
63265   # unix format.
63266   path="$POTENTIAL_FREETYPE_LIB_PATH"
63267   new_path=`$CYGPATH -u "$path"`
63268 
63269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63272   # "foo.exe" is OK but "foo" is an error.
63273   #
63274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63275   # It is also a way to make sure we got the proper file name for the real test later on.
63276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63277   if test "x$test_shortpath" = x; then
63278     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63279 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63280     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63281   fi
63282 
63283   # Call helper function which possibly converts this using DOS-style short mode.
63284   # If so, the updated path is stored in $new_path.
63285 
63286   input_path="$new_path"
63287   # Check if we need to convert this using DOS-style short mode. If the path
63288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63289   # take no chances and rewrite it.
63290   # Note: m4 eats our [], so we need to use [ and ] instead.
63291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63292   if test "x$has_forbidden_chars" != x; then
63293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63297       # Going to short mode and back again did indeed matter. Since short mode is
63298       # case insensitive, let's make it lowercase to improve readability.
63299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63300       # Now convert it back to Unix-style (cygpath)
63301       input_path=`$CYGPATH -u "$shortmode_path"`
63302       new_path="$input_path"
63303     fi
63304   fi
63305 
63306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63307   if test "x$test_cygdrive_prefix" = x; then
63308     # As a simple fix, exclude /usr/bin since it's not a real path.
63309     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63311       # a path prefixed by /cygdrive for fixpath to work.
63312       new_path="$CYGWIN_ROOT_PATH$input_path"
63313     fi
63314   fi
63315 
63316 
63317   if test "x$path" != "x$new_path"; then
63318     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63320 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63321   fi
63322 
63323     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63324 
63325   path="$POTENTIAL_FREETYPE_LIB_PATH"
63326   has_colon=`$ECHO $path | $GREP ^.:`
63327   new_path="$path"
63328   if test "x$has_colon" = x; then
63329     # Not in mixed or Windows style, start by that.
63330     new_path=`cmd //c echo $path`
63331   fi
63332 
63333 
63334   input_path="$new_path"
63335   # Check if we need to convert this using DOS-style short mode. If the path
63336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63337   # take no chances and rewrite it.
63338   # Note: m4 eats our [], so we need to use [ and ] instead.
63339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63340   if test "x$has_forbidden_chars" != x; then
63341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63342     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63343   fi
63344 
63345 
63346   windows_path="$new_path"
63347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63348     unix_path=`$CYGPATH -u "$windows_path"`
63349     new_path="$unix_path"
63350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63352     new_path="$unix_path"
63353   fi
63354 
63355   if test "x$path" != "x$new_path"; then
63356     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63358 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63359   fi
63360 
63361   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63362   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63363 
63364     else
63365       # We're on a unix platform. Hooray! :)
63366       path="$POTENTIAL_FREETYPE_LIB_PATH"
63367       has_space=`$ECHO "$path" | $GREP " "`
63368       if test "x$has_space" != x; then
63369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63370 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63371         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63372       fi
63373 
63374       # Use eval to expand a potential ~
63375       eval path="$path"
63376       if test ! -f "$path" && test ! -d "$path"; then
63377         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63378       fi
63379 
63380       if test -d "$path"; then
63381         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63382       else
63383         dir="`$DIRNAME "$path"`"
63384         base="`$BASENAME "$path"`"
63385         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63386       fi
63387     fi
63388   fi
63389 
63390 
63391     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63393 $as_echo_n "checking for freetype includes... " >&6; }
63394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63395 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63396     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63398 $as_echo_n "checking for freetype libraries... " >&6; }
63399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63400 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63401   fi
63402 
63403               if test "x$FOUND_FREETYPE" != xyes; then
63404 
63405   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63406   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63407   METHOD="well-known location"
63408 
63409   # Let's start with an optimistic view of the world :-)
63410   FOUND_FREETYPE=yes
63411 
63412   # First look for the canonical freetype main include file ft2build.h.
63413   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63414     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63415     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63416     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63417       # Fail.
63418       FOUND_FREETYPE=no
63419     fi
63420   fi
63421 
63422   if test "x$FOUND_FREETYPE" = xyes; then
63423     # Include file found, let's continue the sanity check.
63424     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63425 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63426 
63427     # Reset to default value
63428     FREETYPE_BASE_NAME=freetype
63429     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63430     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63431       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63432           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63433         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63434         # for the .6 version explicitly.
63435         FREETYPE_BASE_NAME=freetype.6
63436         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63437         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63438 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63439       else
63440         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63441 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63442         FOUND_FREETYPE=no
63443       fi
63444     else
63445       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63446         # On Windows, we will need both .lib and .dll file.
63447         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63448           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63449 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63450           FOUND_FREETYPE=no
63451         fi
63452       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63453           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63454         # Found lib in isa dir, use that instead.
63455         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63456         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63457 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63458       fi
63459     fi
63460   fi
63461 
63462   if test "x$FOUND_FREETYPE" = xyes; then
63463 
63464   # Only process if variable expands to non-empty
63465 
63466   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63467     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63468 
63469   # Input might be given as Windows format, start by converting to
63470   # unix format.
63471   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63472   new_path=`$CYGPATH -u "$path"`
63473 
63474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63477   # "foo.exe" is OK but "foo" is an error.
63478   #
63479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63480   # It is also a way to make sure we got the proper file name for the real test later on.
63481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63482   if test "x$test_shortpath" = x; then
63483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63484 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63485     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63486   fi
63487 
63488   # Call helper function which possibly converts this using DOS-style short mode.
63489   # If so, the updated path is stored in $new_path.
63490 
63491   input_path="$new_path"
63492   # Check if we need to convert this using DOS-style short mode. If the path
63493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63494   # take no chances and rewrite it.
63495   # Note: m4 eats our [], so we need to use [ and ] instead.
63496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63497   if test "x$has_forbidden_chars" != x; then
63498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63502       # Going to short mode and back again did indeed matter. Since short mode is
63503       # case insensitive, let's make it lowercase to improve readability.
63504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63505       # Now convert it back to Unix-style (cygpath)
63506       input_path=`$CYGPATH -u "$shortmode_path"`
63507       new_path="$input_path"
63508     fi
63509   fi
63510 
63511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63512   if test "x$test_cygdrive_prefix" = x; then
63513     # As a simple fix, exclude /usr/bin since it's not a real path.
63514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63516       # a path prefixed by /cygdrive for fixpath to work.
63517       new_path="$CYGWIN_ROOT_PATH$input_path"
63518     fi
63519   fi
63520 
63521 
63522   if test "x$path" != "x$new_path"; then
63523     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63525 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63526   fi
63527 
63528     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63529 
63530   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63531   has_colon=`$ECHO $path | $GREP ^.:`
63532   new_path="$path"
63533   if test "x$has_colon" = x; then
63534     # Not in mixed or Windows style, start by that.
63535     new_path=`cmd //c echo $path`
63536   fi
63537 
63538 
63539   input_path="$new_path"
63540   # Check if we need to convert this using DOS-style short mode. If the path
63541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63542   # take no chances and rewrite it.
63543   # Note: m4 eats our [], so we need to use [ and ] instead.
63544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63545   if test "x$has_forbidden_chars" != x; then
63546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63548   fi
63549 
63550 
63551   windows_path="$new_path"
63552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63553     unix_path=`$CYGPATH -u "$windows_path"`
63554     new_path="$unix_path"
63555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63557     new_path="$unix_path"
63558   fi
63559 
63560   if test "x$path" != "x$new_path"; then
63561     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63564   fi
63565 
63566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63568 
63569     else
63570       # We're on a unix platform. Hooray! :)
63571       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63572       has_space=`$ECHO "$path" | $GREP " "`
63573       if test "x$has_space" != x; then
63574         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63575 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63576         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63577       fi
63578 
63579       # Use eval to expand a potential ~
63580       eval path="$path"
63581       if test ! -f "$path" && test ! -d "$path"; then
63582         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63583       fi
63584 
63585       if test -d "$path"; then
63586         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63587       else
63588         dir="`$DIRNAME "$path"`"
63589         base="`$BASENAME "$path"`"
63590         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63591       fi
63592     fi
63593   fi
63594 
63595 
63596   # Only process if variable expands to non-empty
63597 
63598   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63599     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63600 
63601   # Input might be given as Windows format, start by converting to
63602   # unix format.
63603   path="$POTENTIAL_FREETYPE_LIB_PATH"
63604   new_path=`$CYGPATH -u "$path"`
63605 
63606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63609   # "foo.exe" is OK but "foo" is an error.
63610   #
63611   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63612   # It is also a way to make sure we got the proper file name for the real test later on.
63613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63614   if test "x$test_shortpath" = x; then
63615     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63616 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63617     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63618   fi
63619 
63620   # Call helper function which possibly converts this using DOS-style short mode.
63621   # If so, the updated path is stored in $new_path.
63622 
63623   input_path="$new_path"
63624   # Check if we need to convert this using DOS-style short mode. If the path
63625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63626   # take no chances and rewrite it.
63627   # Note: m4 eats our [], so we need to use [ and ] instead.
63628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63629   if test "x$has_forbidden_chars" != x; then
63630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63631     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63632     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63633     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63634       # Going to short mode and back again did indeed matter. Since short mode is
63635       # case insensitive, let's make it lowercase to improve readability.
63636       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63637       # Now convert it back to Unix-style (cygpath)
63638       input_path=`$CYGPATH -u "$shortmode_path"`
63639       new_path="$input_path"
63640     fi
63641   fi
63642 
63643   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63644   if test "x$test_cygdrive_prefix" = x; then
63645     # As a simple fix, exclude /usr/bin since it's not a real path.
63646     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63647       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63648       # a path prefixed by /cygdrive for fixpath to work.
63649       new_path="$CYGWIN_ROOT_PATH$input_path"
63650     fi
63651   fi
63652 
63653 
63654   if test "x$path" != "x$new_path"; then
63655     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63657 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63658   fi
63659 
63660     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63661 
63662   path="$POTENTIAL_FREETYPE_LIB_PATH"
63663   has_colon=`$ECHO $path | $GREP ^.:`
63664   new_path="$path"
63665   if test "x$has_colon" = x; then
63666     # Not in mixed or Windows style, start by that.
63667     new_path=`cmd //c echo $path`
63668   fi
63669 
63670 
63671   input_path="$new_path"
63672   # Check if we need to convert this using DOS-style short mode. If the path
63673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63674   # take no chances and rewrite it.
63675   # Note: m4 eats our [], so we need to use [ and ] instead.
63676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63677   if test "x$has_forbidden_chars" != x; then
63678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63680   fi
63681 
63682 
63683   windows_path="$new_path"
63684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63685     unix_path=`$CYGPATH -u "$windows_path"`
63686     new_path="$unix_path"
63687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63689     new_path="$unix_path"
63690   fi
63691 
63692   if test "x$path" != "x$new_path"; then
63693     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63695 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63696   fi
63697 
63698   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63699   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63700 
63701     else
63702       # We're on a unix platform. Hooray! :)
63703       path="$POTENTIAL_FREETYPE_LIB_PATH"
63704       has_space=`$ECHO "$path" | $GREP " "`
63705       if test "x$has_space" != x; then
63706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63707 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63708         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63709       fi
63710 
63711       # Use eval to expand a potential ~
63712       eval path="$path"
63713       if test ! -f "$path" && test ! -d "$path"; then
63714         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63715       fi
63716 
63717       if test -d "$path"; then
63718         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63719       else
63720         dir="`$DIRNAME "$path"`"
63721         base="`$BASENAME "$path"`"
63722         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63723       fi
63724     fi
63725   fi
63726 
63727 
63728     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63730 $as_echo_n "checking for freetype includes... " >&6; }
63731     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63732 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63733     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63735 $as_echo_n "checking for freetype libraries... " >&6; }
63736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63737 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63738   fi
63739 
63740               fi
63741             fi
63742           fi
63743         fi
63744       fi # end check in well-known locations
63745 
63746       if test "x$FOUND_FREETYPE" != xyes; then
63747 
63748   # Print a helpful message on how to acquire the necessary build dependency.
63749   # freetype is the help tag: freetype, cups, alsa etc
63750   MISSING_DEPENDENCY=freetype
63751 
63752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63753     cygwin_help $MISSING_DEPENDENCY
63754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63755     msys_help $MISSING_DEPENDENCY
63756   else
63757     PKGHANDLER_COMMAND=
63758 
63759     case $PKGHANDLER in
63760       apt-get)
63761         apt_help     $MISSING_DEPENDENCY ;;
63762       yum)
63763         yum_help     $MISSING_DEPENDENCY ;;
63764       brew)
63765         brew_help    $MISSING_DEPENDENCY ;;
63766       port)
63767         port_help    $MISSING_DEPENDENCY ;;
63768       pkgutil)
63769         pkgutil_help $MISSING_DEPENDENCY ;;
63770       pkgadd)
63771         pkgadd_help  $MISSING_DEPENDENCY ;;
63772     esac
63773 
63774     if test "x$PKGHANDLER_COMMAND" != x; then
63775       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63776     fi
63777   fi
63778 
63779         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63780       fi
63781     fi # end user specified settings
63782 
63783     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63784     if test "x$FREETYPE_CFLAGS" = x; then
63785 
63786   # Only process if variable expands to non-empty
63787 
63788   if test "x$FREETYPE_INCLUDE_PATH" != x; then
63789     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63790 
63791   # Input might be given as Windows format, start by converting to
63792   # unix format.
63793   path="$FREETYPE_INCLUDE_PATH"
63794   new_path=`$CYGPATH -u "$path"`
63795 
63796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63799   # "foo.exe" is OK but "foo" is an error.
63800   #
63801   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63802   # It is also a way to make sure we got the proper file name for the real test later on.
63803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63804   if test "x$test_shortpath" = x; then
63805     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63806 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63807     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63808   fi
63809 
63810   # Call helper function which possibly converts this using DOS-style short mode.
63811   # If so, the updated path is stored in $new_path.
63812 
63813   input_path="$new_path"
63814   # Check if we need to convert this using DOS-style short mode. If the path
63815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63816   # take no chances and rewrite it.
63817   # Note: m4 eats our [], so we need to use [ and ] instead.
63818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63819   if test "x$has_forbidden_chars" != x; then
63820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63821     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63822     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63823     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63824       # Going to short mode and back again did indeed matter. Since short mode is
63825       # case insensitive, let's make it lowercase to improve readability.
63826       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63827       # Now convert it back to Unix-style (cygpath)
63828       input_path=`$CYGPATH -u "$shortmode_path"`
63829       new_path="$input_path"
63830     fi
63831   fi
63832 
63833   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63834   if test "x$test_cygdrive_prefix" = x; then
63835     # As a simple fix, exclude /usr/bin since it's not a real path.
63836     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63837       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63838       # a path prefixed by /cygdrive for fixpath to work.
63839       new_path="$CYGWIN_ROOT_PATH$input_path"
63840     fi
63841   fi
63842 
63843 
63844   if test "x$path" != "x$new_path"; then
63845     FREETYPE_INCLUDE_PATH="$new_path"
63846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63847 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63848   fi
63849 
63850     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63851 
63852   path="$FREETYPE_INCLUDE_PATH"
63853   has_colon=`$ECHO $path | $GREP ^.:`
63854   new_path="$path"
63855   if test "x$has_colon" = x; then
63856     # Not in mixed or Windows style, start by that.
63857     new_path=`cmd //c echo $path`
63858   fi
63859 
63860 
63861   input_path="$new_path"
63862   # Check if we need to convert this using DOS-style short mode. If the path
63863   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63864   # take no chances and rewrite it.
63865   # Note: m4 eats our [], so we need to use [ and ] instead.
63866   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63867   if test "x$has_forbidden_chars" != x; then
63868     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63869     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63870   fi
63871 
63872 
63873   windows_path="$new_path"
63874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63875     unix_path=`$CYGPATH -u "$windows_path"`
63876     new_path="$unix_path"
63877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63879     new_path="$unix_path"
63880   fi
63881 
63882   if test "x$path" != "x$new_path"; then
63883     FREETYPE_INCLUDE_PATH="$new_path"
63884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63885 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63886   fi
63887 
63888   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63889   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63890 
63891     else
63892       # We're on a unix platform. Hooray! :)
63893       path="$FREETYPE_INCLUDE_PATH"
63894       has_space=`$ECHO "$path" | $GREP " "`
63895       if test "x$has_space" != x; then
63896         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63897 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63898         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63899       fi
63900 
63901       # Use eval to expand a potential ~
63902       eval path="$path"
63903       if test ! -f "$path" && test ! -d "$path"; then
63904         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63905       fi
63906 
63907       if test -d "$path"; then
63908         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63909       else
63910         dir="`$DIRNAME "$path"`"
63911         base="`$BASENAME "$path"`"
63912         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63913       fi
63914     fi
63915   fi
63916 
63917       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63918         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63919       else
63920         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63921       fi
63922     fi
63923 
63924     if test "x$FREETYPE_LIBS" = x; then
63925 
63926   # Only process if variable expands to non-empty
63927 
63928   if test "x$FREETYPE_LIB_PATH" != x; then
63929     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63930 
63931   # Input might be given as Windows format, start by converting to
63932   # unix format.
63933   path="$FREETYPE_LIB_PATH"
63934   new_path=`$CYGPATH -u "$path"`
63935 
63936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63939   # "foo.exe" is OK but "foo" is an error.
63940   #
63941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63942   # It is also a way to make sure we got the proper file name for the real test later on.
63943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63944   if test "x$test_shortpath" = x; then
63945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63946 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63947     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63948   fi
63949 
63950   # Call helper function which possibly converts this using DOS-style short mode.
63951   # If so, the updated path is stored in $new_path.
63952 
63953   input_path="$new_path"
63954   # Check if we need to convert this using DOS-style short mode. If the path
63955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63956   # take no chances and rewrite it.
63957   # Note: m4 eats our [], so we need to use [ and ] instead.
63958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63959   if test "x$has_forbidden_chars" != x; then
63960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63964       # Going to short mode and back again did indeed matter. Since short mode is
63965       # case insensitive, let's make it lowercase to improve readability.
63966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63967       # Now convert it back to Unix-style (cygpath)
63968       input_path=`$CYGPATH -u "$shortmode_path"`
63969       new_path="$input_path"
63970     fi
63971   fi
63972 
63973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63974   if test "x$test_cygdrive_prefix" = x; then
63975     # As a simple fix, exclude /usr/bin since it's not a real path.
63976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63978       # a path prefixed by /cygdrive for fixpath to work.
63979       new_path="$CYGWIN_ROOT_PATH$input_path"
63980     fi
63981   fi
63982 
63983 
63984   if test "x$path" != "x$new_path"; then
63985     FREETYPE_LIB_PATH="$new_path"
63986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63987 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63988   fi
63989 
63990     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63991 
63992   path="$FREETYPE_LIB_PATH"
63993   has_colon=`$ECHO $path | $GREP ^.:`
63994   new_path="$path"
63995   if test "x$has_colon" = x; then
63996     # Not in mixed or Windows style, start by that.
63997     new_path=`cmd //c echo $path`
63998   fi
63999 
64000 
64001   input_path="$new_path"
64002   # Check if we need to convert this using DOS-style short mode. If the path
64003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64004   # take no chances and rewrite it.
64005   # Note: m4 eats our [], so we need to use [ and ] instead.
64006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64007   if test "x$has_forbidden_chars" != x; then
64008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64010   fi
64011 
64012 
64013   windows_path="$new_path"
64014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64015     unix_path=`$CYGPATH -u "$windows_path"`
64016     new_path="$unix_path"
64017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64019     new_path="$unix_path"
64020   fi
64021 
64022   if test "x$path" != "x$new_path"; then
64023     FREETYPE_LIB_PATH="$new_path"
64024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64025 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64026   fi
64027 
64028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64030 
64031     else
64032       # We're on a unix platform. Hooray! :)
64033       path="$FREETYPE_LIB_PATH"
64034       has_space=`$ECHO "$path" | $GREP " "`
64035       if test "x$has_space" != x; then
64036         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64037 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64038         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64039       fi
64040 
64041       # Use eval to expand a potential ~
64042       eval path="$path"
64043       if test ! -f "$path" && test ! -d "$path"; then
64044         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64045       fi
64046 
64047       if test -d "$path"; then
64048         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64049       else
64050         dir="`$DIRNAME "$path"`"
64051         base="`$BASENAME "$path"`"
64052         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64053       fi
64054     fi
64055   fi
64056 
64057       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64058         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64059       else
64060         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64061       fi
64062     fi
64063 
64064     # Try to compile it
64065     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64066 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
64067     ac_ext=cpp
64068 ac_cpp='$CXXCPP $CPPFLAGS'
64069 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64070 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64071 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64072 
64073     PREV_CXXCFLAGS="$CXXFLAGS"
64074     PREV_LIBS="$LIBS"
64075     PREV_CXX="$CXX"
64076     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64077     LIBS="$LIBS $FREETYPE_LIBS"
64078     CXX="$FIXPATH $CXX"
64079     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64080 /* end confdefs.h.  */
64081 
64082           #include<ft2build.h>
64083           #include FT_FREETYPE_H
64084           int main () {
64085             FT_Init_FreeType(NULL);
64086             return 0;
64087           }
64088 
64089 _ACEOF
64090 if ac_fn_cxx_try_link "$LINENO"; then :
64091 
64092           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64093 $as_echo "yes" >&6; }
64094 
64095 else
64096 
64097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64098 $as_echo "no" >&6; }
64099           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64100 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64101           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64102 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64103 
64104 
64105   # Print a helpful message on how to acquire the necessary build dependency.
64106   # freetype is the help tag: freetype, cups, alsa etc
64107   MISSING_DEPENDENCY=freetype
64108 
64109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64110     cygwin_help $MISSING_DEPENDENCY
64111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64112     msys_help $MISSING_DEPENDENCY
64113   else
64114     PKGHANDLER_COMMAND=
64115 
64116     case $PKGHANDLER in
64117       apt-get)
64118         apt_help     $MISSING_DEPENDENCY ;;
64119       yum)
64120         yum_help     $MISSING_DEPENDENCY ;;
64121       brew)
64122         brew_help    $MISSING_DEPENDENCY ;;
64123       port)
64124         port_help    $MISSING_DEPENDENCY ;;
64125       pkgutil)
64126         pkgutil_help $MISSING_DEPENDENCY ;;
64127       pkgadd)
64128         pkgadd_help  $MISSING_DEPENDENCY ;;
64129     esac
64130 
64131     if test "x$PKGHANDLER_COMMAND" != x; then
64132       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64133     fi
64134   fi
64135 
64136 
64137           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64138 
64139 
64140 fi
64141 rm -f core conftest.err conftest.$ac_objext \
64142     conftest$ac_exeext conftest.$ac_ext
64143     CXXCFLAGS="$PREV_CXXFLAGS"
64144     LIBS="$PREV_LIBS"
64145     CXX="$PREV_CXX"
64146     ac_ext=cpp
64147 ac_cpp='$CXXCPP $CPPFLAGS'
64148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64151 
64152 
64153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64154 $as_echo_n "checking if we should bundle freetype... " >&6; }
64155     if test "x$BUNDLE_FREETYPE" = xyes; then
64156       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64157     fi
64158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64159 $as_echo "$BUNDLE_FREETYPE" >&6; }
64160 
64161   fi # end freetype needed
64162 
64163   FREETYPE_LICENSE=""
64164   if test "x$with_freetype_license" = "xyes"; then
64165     as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64166   elif test "x$with_freetype_license" != "x"; then
64167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64168 $as_echo_n "checking for freetype license... " >&6; }
64169     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64170 $as_echo "$with_freetype_license" >&6; }
64171     FREETYPE_LICENSE="$with_freetype_license"
64172 
64173   # Only process if variable expands to non-empty
64174 
64175   if test "x$FREETYPE_LICENSE" != x; then
64176     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64177 
64178   # Input might be given as Windows format, start by converting to
64179   # unix format.
64180   path="$FREETYPE_LICENSE"
64181   new_path=`$CYGPATH -u "$path"`
64182 
64183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64186   # "foo.exe" is OK but "foo" is an error.
64187   #
64188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64189   # It is also a way to make sure we got the proper file name for the real test later on.
64190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64191   if test "x$test_shortpath" = x; then
64192     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64193 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64194     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64195   fi
64196 
64197   # Call helper function which possibly converts this using DOS-style short mode.
64198   # If so, the updated path is stored in $new_path.
64199 
64200   input_path="$new_path"
64201   # Check if we need to convert this using DOS-style short mode. If the path
64202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64203   # take no chances and rewrite it.
64204   # Note: m4 eats our [], so we need to use [ and ] instead.
64205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64206   if test "x$has_forbidden_chars" != x; then
64207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64211       # Going to short mode and back again did indeed matter. Since short mode is
64212       # case insensitive, let's make it lowercase to improve readability.
64213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64214       # Now convert it back to Unix-style (cygpath)
64215       input_path=`$CYGPATH -u "$shortmode_path"`
64216       new_path="$input_path"
64217     fi
64218   fi
64219 
64220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64221   if test "x$test_cygdrive_prefix" = x; then
64222     # As a simple fix, exclude /usr/bin since it's not a real path.
64223     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64225       # a path prefixed by /cygdrive for fixpath to work.
64226       new_path="$CYGWIN_ROOT_PATH$input_path"
64227     fi
64228   fi
64229 
64230 
64231   if test "x$path" != "x$new_path"; then
64232     FREETYPE_LICENSE="$new_path"
64233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64234 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64235   fi
64236 
64237     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64238 
64239   path="$FREETYPE_LICENSE"
64240   has_colon=`$ECHO $path | $GREP ^.:`
64241   new_path="$path"
64242   if test "x$has_colon" = x; then
64243     # Not in mixed or Windows style, start by that.
64244     new_path=`cmd //c echo $path`
64245   fi
64246 
64247 
64248   input_path="$new_path"
64249   # Check if we need to convert this using DOS-style short mode. If the path
64250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64251   # take no chances and rewrite it.
64252   # Note: m4 eats our [], so we need to use [ and ] instead.
64253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64254   if test "x$has_forbidden_chars" != x; then
64255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64256     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64257   fi
64258 
64259 
64260   windows_path="$new_path"
64261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64262     unix_path=`$CYGPATH -u "$windows_path"`
64263     new_path="$unix_path"
64264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64266     new_path="$unix_path"
64267   fi
64268 
64269   if test "x$path" != "x$new_path"; then
64270     FREETYPE_LICENSE="$new_path"
64271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64272 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64273   fi
64274 
64275   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64276   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64277 
64278     else
64279       # We're on a unix platform. Hooray! :)
64280       path="$FREETYPE_LICENSE"
64281       has_space=`$ECHO "$path" | $GREP " "`
64282       if test "x$has_space" != x; then
64283         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64284 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64285         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64286       fi
64287 
64288       # Use eval to expand a potential ~
64289       eval path="$path"
64290       if test ! -f "$path" && test ! -d "$path"; then
64291         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64292       fi
64293 
64294       if test -d "$path"; then
64295         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64296       else
64297         dir="`$DIRNAME "$path"`"
64298         base="`$BASENAME "$path"`"
64299         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64300       fi
64301     fi
64302   fi
64303 
64304     if test ! -f "$FREETYPE_LICENSE"; then
64305       as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64306     fi
64307   fi
64308 
64309 
64310 
64311 
64312 
64313 
64314 
64315 
64316 # Check whether --with-alsa was given.
64317 if test "${with_alsa+set}" = set; then :
64318   withval=$with_alsa;
64319 fi
64320 
64321 
64322 # Check whether --with-alsa-include was given.
64323 if test "${with_alsa_include+set}" = set; then :
64324   withval=$with_alsa_include;
64325 fi
64326 
64327 
64328 # Check whether --with-alsa-lib was given.
64329 if test "${with_alsa_lib+set}" = set; then :
64330   withval=$with_alsa_lib;
64331 fi
64332 
64333 
64334   if test "x$NEEDS_LIB_ALSA" = xfalse; then
64335     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64336         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64337         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64338       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64339 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64340     fi
64341     ALSA_CFLAGS=
64342     ALSA_LIBS=
64343   else
64344     ALSA_FOUND=no
64345 
64346     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64347       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64348     fi
64349 
64350     if test "x${with_alsa}" != x; then
64351       ALSA_LIBS="-L${with_alsa}/lib -lasound"
64352       ALSA_CFLAGS="-I${with_alsa}/include"
64353       ALSA_FOUND=yes
64354     fi
64355     if test "x${with_alsa_include}" != x; then
64356       ALSA_CFLAGS="-I${with_alsa_include}"
64357       ALSA_FOUND=yes
64358     fi
64359     if test "x${with_alsa_lib}" != x; then
64360       ALSA_LIBS="-L${with_alsa_lib} -lasound"
64361       ALSA_FOUND=yes
64362     fi
64363     # Do not try pkg-config if we have a sysroot set.
64364     if test "x$SYSROOT" = x; then
64365       if test "x$ALSA_FOUND" = xno; then
64366 
64367 pkg_failed=no
64368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64369 $as_echo_n "checking for ALSA... " >&6; }
64370 
64371 if test -n "$ALSA_CFLAGS"; then
64372     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64373  elif test -n "$PKG_CONFIG"; then
64374     if test -n "$PKG_CONFIG" && \
64375     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64376   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64377   ac_status=$?
64378   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64379   test $ac_status = 0; }; then
64380   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64381 else
64382   pkg_failed=yes
64383 fi
64384  else
64385     pkg_failed=untried
64386 fi
64387 if test -n "$ALSA_LIBS"; then
64388     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64389  elif test -n "$PKG_CONFIG"; then
64390     if test -n "$PKG_CONFIG" && \
64391     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64392   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64393   ac_status=$?
64394   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64395   test $ac_status = 0; }; then
64396   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64397 else
64398   pkg_failed=yes
64399 fi
64400  else
64401     pkg_failed=untried
64402 fi
64403 
64404 
64405 
64406 if test $pkg_failed = yes; then
64407 
64408 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64409         _pkg_short_errors_supported=yes
64410 else
64411         _pkg_short_errors_supported=no
64412 fi
64413         if test $_pkg_short_errors_supported = yes; then
64414                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64415         else
64416                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64417         fi
64418         # Put the nasty error message in config.log where it belongs
64419         echo "$ALSA_PKG_ERRORS" >&5
64420 
64421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64422 $as_echo "no" >&6; }
64423                 ALSA_FOUND=no
64424 elif test $pkg_failed = untried; then
64425         ALSA_FOUND=no
64426 else
64427         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64428         ALSA_LIBS=$pkg_cv_ALSA_LIBS
64429         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64430 $as_echo "yes" >&6; }
64431         ALSA_FOUND=yes
64432 fi
64433       fi
64434     fi
64435     if test "x$ALSA_FOUND" = xno; then
64436       for ac_header in alsa/asoundlib.h
64437 do :
64438   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64439 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64440   cat >>confdefs.h <<_ACEOF
64441 #define HAVE_ALSA_ASOUNDLIB_H 1
64442 _ACEOF
64443 
64444             ALSA_FOUND=yes
64445             ALSA_CFLAGS=-Iignoreme
64446             ALSA_LIBS=-lasound
64447             DEFAULT_ALSA=yes
64448 
64449 else
64450   ALSA_FOUND=no
64451 
64452 fi
64453 
64454 done
64455 
64456     fi
64457     if test "x$ALSA_FOUND" = xno; then
64458 
64459   # Print a helpful message on how to acquire the necessary build dependency.
64460   # alsa is the help tag: freetype, cups, alsa etc
64461   MISSING_DEPENDENCY=alsa
64462 
64463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64464     cygwin_help $MISSING_DEPENDENCY
64465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64466     msys_help $MISSING_DEPENDENCY
64467   else
64468     PKGHANDLER_COMMAND=
64469 
64470     case $PKGHANDLER in
64471       apt-get)
64472         apt_help     $MISSING_DEPENDENCY ;;
64473       yum)
64474         yum_help     $MISSING_DEPENDENCY ;;
64475       brew)
64476         brew_help    $MISSING_DEPENDENCY ;;
64477       port)
64478         port_help    $MISSING_DEPENDENCY ;;
64479       pkgutil)
64480         pkgutil_help $MISSING_DEPENDENCY ;;
64481       pkgadd)
64482         pkgadd_help  $MISSING_DEPENDENCY ;;
64483     esac
64484 
64485     if test "x$PKGHANDLER_COMMAND" != x; then
64486       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64487     fi
64488   fi
64489 
64490       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64491     fi
64492   fi
64493 
64494 
64495 
64496 
64497 
64498 
64499 # Check whether --with-libffi was given.
64500 if test "${with_libffi+set}" = set; then :
64501   withval=$with_libffi;
64502 fi
64503 
64504 
64505 # Check whether --with-libffi-include was given.
64506 if test "${with_libffi_include+set}" = set; then :
64507   withval=$with_libffi_include;
64508 fi
64509 
64510 
64511 # Check whether --with-libffi-lib was given.
64512 if test "${with_libffi_lib+set}" = set; then :
64513   withval=$with_libffi_lib;
64514 fi
64515 
64516   # Check whether --enable-libffi-bundling was given.
64517 if test "${enable_libffi_bundling+set}" = set; then :
64518   enableval=$enable_libffi_bundling;
64519 fi
64520 
64521 
64522   if test "x$NEEDS_LIB_FFI" = xfalse; then
64523     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64524         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64525         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64526       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64527 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64528     fi
64529     LIBFFI_CFLAGS=
64530     LIBFFI_LIBS=
64531   else
64532     LIBFFI_FOUND=no
64533 
64534     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64535       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64536     fi
64537 
64538     if test "x${with_libffi}" != x; then
64539       LIBFFI_LIB_PATH="${with_libffi}/lib"
64540       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64541       LIBFFI_CFLAGS="-I${with_libffi}/include"
64542       LIBFFI_FOUND=yes
64543     fi
64544     if test "x${with_libffi_include}" != x; then
64545       LIBFFI_CFLAGS="-I${with_libffi_include}"
64546       LIBFFI_FOUND=yes
64547     fi
64548     if test "x${with_libffi_lib}" != x; then
64549       LIBFFI_LIB_PATH="${with_libffi_lib}"
64550       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64551       LIBFFI_FOUND=yes
64552     fi
64553     # Do not try pkg-config if we have a sysroot set.
64554     if test "x$SYSROOT" = x; then
64555       if test "x$LIBFFI_FOUND" = xno; then
64556         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64557 
64558 pkg_failed=no
64559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64560 $as_echo_n "checking for LIBFFI... " >&6; }
64561 
64562 if test -n "$LIBFFI_CFLAGS"; then
64563     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64564  elif test -n "$PKG_CONFIG"; then
64565     if test -n "$PKG_CONFIG" && \
64566     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64567   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64568   ac_status=$?
64569   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64570   test $ac_status = 0; }; then
64571   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64572 else
64573   pkg_failed=yes
64574 fi
64575  else
64576     pkg_failed=untried
64577 fi
64578 if test -n "$LIBFFI_LIBS"; then
64579     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64580  elif test -n "$PKG_CONFIG"; then
64581     if test -n "$PKG_CONFIG" && \
64582     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64583   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64584   ac_status=$?
64585   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64586   test $ac_status = 0; }; then
64587   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64588 else
64589   pkg_failed=yes
64590 fi
64591  else
64592     pkg_failed=untried
64593 fi
64594 
64595 
64596 
64597 if test $pkg_failed = yes; then
64598 
64599 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64600         _pkg_short_errors_supported=yes
64601 else
64602         _pkg_short_errors_supported=no
64603 fi
64604         if test $_pkg_short_errors_supported = yes; then
64605                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64606         else
64607                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64608         fi
64609         # Put the nasty error message in config.log where it belongs
64610         echo "$LIBFFI_PKG_ERRORS" >&5
64611 
64612         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64613 $as_echo "no" >&6; }
64614                 LIBFFI_FOUND=no
64615 elif test $pkg_failed = untried; then
64616         LIBFFI_FOUND=no
64617 else
64618         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64619         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64620         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64621 $as_echo "yes" >&6; }
64622         LIBFFI_FOUND=yes
64623 fi
64624       fi
64625     fi
64626     if test "x$LIBFFI_FOUND" = xno; then
64627       for ac_header in ffi.h
64628 do :
64629   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64630 if test "x$ac_cv_header_ffi_h" = xyes; then :
64631   cat >>confdefs.h <<_ACEOF
64632 #define HAVE_FFI_H 1
64633 _ACEOF
64634 
64635             LIBFFI_FOUND=yes
64636             LIBFFI_CFLAGS=
64637             LIBFFI_LIBS=-lffi
64638 
64639 else
64640   LIBFFI_FOUND=no
64641 
64642 fi
64643 
64644 done
64645 
64646     fi
64647     if test "x$LIBFFI_FOUND" = xno; then
64648 
64649   # Print a helpful message on how to acquire the necessary build dependency.
64650   # ffi is the help tag: freetype, cups, alsa etc
64651   MISSING_DEPENDENCY=ffi
64652 
64653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64654     cygwin_help $MISSING_DEPENDENCY
64655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64656     msys_help $MISSING_DEPENDENCY
64657   else
64658     PKGHANDLER_COMMAND=
64659 
64660     case $PKGHANDLER in
64661       apt-get)
64662         apt_help     $MISSING_DEPENDENCY ;;
64663       yum)
64664         yum_help     $MISSING_DEPENDENCY ;;
64665       brew)
64666         brew_help    $MISSING_DEPENDENCY ;;
64667       port)
64668         port_help    $MISSING_DEPENDENCY ;;
64669       pkgutil)
64670         pkgutil_help $MISSING_DEPENDENCY ;;
64671       pkgadd)
64672         pkgadd_help  $MISSING_DEPENDENCY ;;
64673     esac
64674 
64675     if test "x$PKGHANDLER_COMMAND" != x; then
64676       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64677     fi
64678   fi
64679 
64680       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64681     fi
64682 
64683     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64684 $as_echo_n "checking if libffi works... " >&6; }
64685     ac_ext=c
64686 ac_cpp='$CPP $CPPFLAGS'
64687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64690 
64691     OLD_CFLAGS="$CFLAGS"
64692     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64693     OLD_LIBS="$LIBS"
64694     LIBS="$LIBS $LIBFFI_LIBS"
64695     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64696 /* end confdefs.h.  */
64697 #include <ffi.h>
64698 int
64699 main ()
64700 {
64701 
64702           ffi_call(NULL, NULL, NULL, NULL);
64703           return 0;
64704 
64705   ;
64706   return 0;
64707 }
64708 _ACEOF
64709 if ac_fn_c_try_link "$LINENO"; then :
64710   LIBFFI_WORKS=yes
64711 else
64712   LIBFFI_WORKS=no
64713 
64714 fi
64715 rm -f core conftest.err conftest.$ac_objext \
64716     conftest$ac_exeext conftest.$ac_ext
64717     CFLAGS="$OLD_CFLAGS"
64718     LIBS="$OLD_LIBS"
64719     ac_ext=cpp
64720 ac_cpp='$CXXCPP $CPPFLAGS'
64721 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64722 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64723 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64724 
64725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64726 $as_echo "$LIBFFI_WORKS" >&6; }
64727 
64728     if test "x$LIBFFI_WORKS" = xno; then
64729 
64730   # Print a helpful message on how to acquire the necessary build dependency.
64731   # ffi is the help tag: freetype, cups, alsa etc
64732   MISSING_DEPENDENCY=ffi
64733 
64734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64735     cygwin_help $MISSING_DEPENDENCY
64736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64737     msys_help $MISSING_DEPENDENCY
64738   else
64739     PKGHANDLER_COMMAND=
64740 
64741     case $PKGHANDLER in
64742       apt-get)
64743         apt_help     $MISSING_DEPENDENCY ;;
64744       yum)
64745         yum_help     $MISSING_DEPENDENCY ;;
64746       brew)
64747         brew_help    $MISSING_DEPENDENCY ;;
64748       port)
64749         port_help    $MISSING_DEPENDENCY ;;
64750       pkgutil)
64751         pkgutil_help $MISSING_DEPENDENCY ;;
64752       pkgadd)
64753         pkgadd_help  $MISSING_DEPENDENCY ;;
64754     esac
64755 
64756     if test "x$PKGHANDLER_COMMAND" != x; then
64757       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64758     fi
64759   fi
64760 
64761       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64762     fi
64763 
64764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64765 $as_echo_n "checking if libffi should be bundled... " >&6; }
64766     if test "x$enable_libffi_bundling" = "x"; then
64767       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64768 $as_echo "no" >&6; }
64769       ENABLE_LIBFFI_BUNDLING=false
64770     elif  test "x$enable_libffi_bundling" = "xno"; then
64771       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64772 $as_echo "no, forced" >&6; }
64773       ENABLE_LIBFFI_BUNDLING=false
64774     elif  test "x$enable_libffi_bundling" = "xyes"; then
64775       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64776 $as_echo "yes, forced" >&6; }
64777       ENABLE_LIBFFI_BUNDLING=true
64778     else
64779       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64780     fi
64781 
64782     # Find the libffi.so.X to bundle
64783     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64785 $as_echo_n "checking for libffi lib file location... " >&6; }
64786       if test "x${LIBFFI_LIB_PATH}" != x; then
64787         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64788           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64789         else
64790           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64791         fi
64792       else
64793         # If we don't have an explicit path, look in a few obvious places
64794         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64795           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64796             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64797           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64798             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64799           else
64800             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64801           fi
64802         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64803           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64804             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64805           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64806             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64807           else
64808             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64809           fi
64810         else
64811           # Fallback on the default /usr/lib dir
64812           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64813             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64814           else
64815             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64816           fi
64817         fi
64818       fi
64819       # Make sure the wildcard is evaluated
64820       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64822 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64823     fi
64824   fi
64825 
64826 
64827 
64828 
64829 
64830 
64831 
64832   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64833     # Extract the first word of "llvm-config", so it can be a program name with args.
64834 set dummy llvm-config; ac_word=$2
64835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64836 $as_echo_n "checking for $ac_word... " >&6; }
64837 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64838   $as_echo_n "(cached) " >&6
64839 else
64840   if test -n "$LLVM_CONFIG"; then
64841   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64842 else
64843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64844 for as_dir in $PATH
64845 do
64846   IFS=$as_save_IFS
64847   test -z "$as_dir" && as_dir=.
64848     for ac_exec_ext in '' $ac_executable_extensions; do
64849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64850     ac_cv_prog_LLVM_CONFIG="llvm-config"
64851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64852     break 2
64853   fi
64854 done
64855   done
64856 IFS=$as_save_IFS
64857 
64858 fi
64859 fi
64860 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64861 if test -n "$LLVM_CONFIG"; then
64862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64863 $as_echo "$LLVM_CONFIG" >&6; }
64864 else
64865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64866 $as_echo "no" >&6; }
64867 fi
64868 
64869 
64870 
64871     if test "x$LLVM_CONFIG" != xllvm-config; then
64872       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64873     fi
64874 
64875     llvm_components="jit mcjit engine nativecodegen native"
64876     unset LLVM_CFLAGS
64877     for flag in $("$LLVM_CONFIG" --cxxflags); do
64878       if echo "${flag}" | grep -q '^-[ID]'; then
64879         if test "${flag}" != "-D_DEBUG" ; then
64880           if test "${LLVM_CFLAGS}" != "" ; then
64881             LLVM_CFLAGS="${LLVM_CFLAGS} "
64882           fi
64883           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64884         fi
64885       fi
64886     done
64887     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64888     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64889 
64890     unset LLVM_LDFLAGS
64891     for flag in $("${LLVM_CONFIG}" --ldflags); do
64892       if echo "${flag}" | grep -q '^-L'; then
64893         if test "${LLVM_LDFLAGS}" != ""; then
64894           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64895         fi
64896         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64897       fi
64898     done
64899 
64900     unset LLVM_LIBS
64901     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64902       if echo "${flag}" | grep -q '^-l'; then
64903         if test "${LLVM_LIBS}" != ""; then
64904           LLVM_LIBS="${LLVM_LIBS} "
64905         fi
64906         LLVM_LIBS="${LLVM_LIBS}${flag}"
64907       fi
64908     done
64909 
64910     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64911     # always properly detect -ltinfo
64912     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64913 
64914 
64915 
64916 
64917   fi
64918 
64919 
64920 
64921 # Check whether --with-libjpeg was given.
64922 if test "${with_libjpeg+set}" = set; then :
64923   withval=$with_libjpeg;
64924 fi
64925 
64926 
64927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64928 $as_echo_n "checking for which libjpeg to use... " >&6; }
64929   # default is bundled
64930   DEFAULT_LIBJPEG=bundled
64931   # if user didn't specify, use DEFAULT_LIBJPEG
64932   if test "x${with_libjpeg}" = "x"; then
64933     with_libjpeg=${DEFAULT_LIBJPEG}
64934   fi
64935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64936 $as_echo "${with_libjpeg}" >&6; }
64937 
64938   if test "x${with_libjpeg}" = "xbundled"; then
64939     USE_EXTERNAL_LIBJPEG=false
64940   elif test "x${with_libjpeg}" = "xsystem"; then
64941     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64942 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64943 
64944 else
64945    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64946 fi
64947 
64948 
64949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64950 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64951 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64952   $as_echo_n "(cached) " >&6
64953 else
64954   ac_check_lib_save_LIBS=$LIBS
64955 LIBS="-ljpeg  $LIBS"
64956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64957 /* end confdefs.h.  */
64958 
64959 /* Override any GCC internal prototype to avoid an error.
64960    Use char because int might match the return type of a GCC
64961    builtin and then its argument prototype would still apply.  */
64962 #ifdef __cplusplus
64963 extern "C"
64964 #endif
64965 char jpeg_CreateDecompress ();
64966 int
64967 main ()
64968 {
64969 return jpeg_CreateDecompress ();
64970   ;
64971   return 0;
64972 }
64973 _ACEOF
64974 if ac_fn_cxx_try_link "$LINENO"; then :
64975   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64976 else
64977   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64978 fi
64979 rm -f core conftest.err conftest.$ac_objext \
64980     conftest$ac_exeext conftest.$ac_ext
64981 LIBS=$ac_check_lib_save_LIBS
64982 fi
64983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64984 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64985 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64986   cat >>confdefs.h <<_ACEOF
64987 #define HAVE_LIBJPEG 1
64988 _ACEOF
64989 
64990   LIBS="-ljpeg $LIBS"
64991 
64992 else
64993    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64994 fi
64995 
64996 
64997     USE_EXTERNAL_LIBJPEG=true
64998   else
64999     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
65000   fi
65001 
65002 
65003 
65004 
65005 
65006 # Check whether --with-giflib was given.
65007 if test "${with_giflib+set}" = set; then :
65008   withval=$with_giflib;
65009 fi
65010 
65011 
65012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
65013 $as_echo_n "checking for which giflib to use... " >&6; }
65014   # default is bundled
65015   DEFAULT_GIFLIB=bundled
65016   # if user didn't specify, use DEFAULT_GIFLIB
65017   if test "x${with_giflib}" = "x"; then
65018     with_giflib=${DEFAULT_GIFLIB}
65019   fi
65020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65021 $as_echo "${with_giflib}" >&6; }
65022 
65023   if test "x${with_giflib}" = "xbundled"; then
65024     USE_EXTERNAL_LIBGIF=false
65025   elif test "x${with_giflib}" = "xsystem"; then
65026     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65027 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65028 
65029 else
65030    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65031 fi
65032 
65033 
65034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65035 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65036 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65037   $as_echo_n "(cached) " >&6
65038 else
65039   ac_check_lib_save_LIBS=$LIBS
65040 LIBS="-lgif  $LIBS"
65041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65042 /* end confdefs.h.  */
65043 
65044 /* Override any GCC internal prototype to avoid an error.
65045    Use char because int might match the return type of a GCC
65046    builtin and then its argument prototype would still apply.  */
65047 #ifdef __cplusplus
65048 extern "C"
65049 #endif
65050 char DGifGetCode ();
65051 int
65052 main ()
65053 {
65054 return DGifGetCode ();
65055   ;
65056   return 0;
65057 }
65058 _ACEOF
65059 if ac_fn_cxx_try_link "$LINENO"; then :
65060   ac_cv_lib_gif_DGifGetCode=yes
65061 else
65062   ac_cv_lib_gif_DGifGetCode=no
65063 fi
65064 rm -f core conftest.err conftest.$ac_objext \
65065     conftest$ac_exeext conftest.$ac_ext
65066 LIBS=$ac_check_lib_save_LIBS
65067 fi
65068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65069 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65070 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65071   cat >>confdefs.h <<_ACEOF
65072 #define HAVE_LIBGIF 1
65073 _ACEOF
65074 
65075   LIBS="-lgif $LIBS"
65076 
65077 else
65078    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65079 fi
65080 
65081 
65082     USE_EXTERNAL_LIBGIF=true
65083   else
65084     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65085   fi
65086 
65087 
65088 
65089 
65090 
65091 # Check whether --with-libpng was given.
65092 if test "${with_libpng+set}" = set; then :
65093   withval=$with_libpng;
65094 fi
65095 
65096 
65097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65098 $as_echo_n "checking for which libpng to use... " >&6; }
65099 
65100   # default is bundled
65101   DEFAULT_LIBPNG=bundled
65102   # if user didn't specify, use DEFAULT_LIBPNG
65103   if test "x${with_libpng}" = "x"; then
65104     with_libpng=${DEFAULT_LIBPNG}
65105   fi
65106 
65107   if test "x${with_libpng}" = "xbundled"; then
65108     USE_EXTERNAL_LIBPNG=false
65109     PNG_CFLAGS=""
65110     PNG_LIBS=""
65111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65112 $as_echo "bundled" >&6; }
65113   elif test "x${with_libpng}" = "xsystem"; then
65114 
65115 pkg_failed=no
65116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65117 $as_echo_n "checking for PNG... " >&6; }
65118 
65119 if test -n "$PNG_CFLAGS"; then
65120     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65121  elif test -n "$PKG_CONFIG"; then
65122     if test -n "$PKG_CONFIG" && \
65123     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65124   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65125   ac_status=$?
65126   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65127   test $ac_status = 0; }; then
65128   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65129 else
65130   pkg_failed=yes
65131 fi
65132  else
65133     pkg_failed=untried
65134 fi
65135 if test -n "$PNG_LIBS"; then
65136     pkg_cv_PNG_LIBS="$PNG_LIBS"
65137  elif test -n "$PKG_CONFIG"; then
65138     if test -n "$PKG_CONFIG" && \
65139     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65140   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65141   ac_status=$?
65142   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65143   test $ac_status = 0; }; then
65144   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65145 else
65146   pkg_failed=yes
65147 fi
65148  else
65149     pkg_failed=untried
65150 fi
65151 
65152 
65153 
65154 if test $pkg_failed = yes; then
65155 
65156 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65157         _pkg_short_errors_supported=yes
65158 else
65159         _pkg_short_errors_supported=no
65160 fi
65161         if test $_pkg_short_errors_supported = yes; then
65162                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65163         else
65164                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65165         fi
65166         # Put the nasty error message in config.log where it belongs
65167         echo "$PNG_PKG_ERRORS" >&5
65168 
65169         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65170 $as_echo "no" >&6; }
65171                 LIBPNG_FOUND=no
65172 elif test $pkg_failed = untried; then
65173         LIBPNG_FOUND=no
65174 else
65175         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65176         PNG_LIBS=$pkg_cv_PNG_LIBS
65177         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65178 $as_echo "yes" >&6; }
65179         LIBPNG_FOUND=yes
65180 fi
65181     if test "x${LIBPNG_FOUND}" = "xyes"; then
65182       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65183       USE_EXTERNAL_LIBPNG=true
65184       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65185 $as_echo "system" >&6; }
65186     else
65187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65188 $as_echo "system not found" >&6; }
65189       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65190     fi
65191   else
65192     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65193   fi
65194 
65195 
65196 
65197 
65198 
65199 
65200 
65201 # Check whether --with-zlib was given.
65202 if test "${with_zlib+set}" = set; then :
65203   withval=$with_zlib;
65204 fi
65205 
65206 
65207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65208 $as_echo_n "checking for compress in -lz... " >&6; }
65209 if ${ac_cv_lib_z_compress+:} false; then :
65210   $as_echo_n "(cached) " >&6
65211 else
65212   ac_check_lib_save_LIBS=$LIBS
65213 LIBS="-lz  $LIBS"
65214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65215 /* end confdefs.h.  */
65216 
65217 /* Override any GCC internal prototype to avoid an error.
65218    Use char because int might match the return type of a GCC
65219    builtin and then its argument prototype would still apply.  */
65220 #ifdef __cplusplus
65221 extern "C"
65222 #endif
65223 char compress ();
65224 int
65225 main ()
65226 {
65227 return compress ();
65228   ;
65229   return 0;
65230 }
65231 _ACEOF
65232 if ac_fn_cxx_try_link "$LINENO"; then :
65233   ac_cv_lib_z_compress=yes
65234 else
65235   ac_cv_lib_z_compress=no
65236 fi
65237 rm -f core conftest.err conftest.$ac_objext \
65238     conftest$ac_exeext conftest.$ac_ext
65239 LIBS=$ac_check_lib_save_LIBS
65240 fi
65241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65242 $as_echo "$ac_cv_lib_z_compress" >&6; }
65243 if test "x$ac_cv_lib_z_compress" = xyes; then :
65244    ZLIB_FOUND=yes
65245 else
65246    ZLIB_FOUND=no
65247 fi
65248 
65249 
65250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65251 $as_echo_n "checking for which zlib to use... " >&6; }
65252 
65253   DEFAULT_ZLIB=system
65254   if test "x$OPENJDK_TARGET_OS" = xwindows; then
65255     # On windows default is bundled...on others default is system
65256     DEFAULT_ZLIB=bundled
65257   fi
65258 
65259   if test "x${ZLIB_FOUND}" != "xyes"; then
65260     # If we don't find any system...set default to bundled
65261     DEFAULT_ZLIB=bundled
65262   fi
65263 
65264   # If user didn't specify, use DEFAULT_ZLIB
65265   if test "x${with_zlib}" = "x"; then
65266     with_zlib=${DEFAULT_ZLIB}
65267   fi
65268 
65269   if test "x${with_zlib}" = "xbundled"; then
65270     USE_EXTERNAL_LIBZ=false
65271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65272 $as_echo "bundled" >&6; }
65273   elif test "x${with_zlib}" = "xsystem"; then
65274     if test "x${ZLIB_FOUND}" = "xyes"; then
65275       USE_EXTERNAL_LIBZ=true
65276       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65277 $as_echo "system" >&6; }
65278     else
65279       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65280 $as_echo "system not found" >&6; }
65281       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65282     fi
65283   else
65284     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65285   fi
65286 
65287 
65288 
65289 
65290 
65291 # Check whether --with-lcms was given.
65292 if test "${with_lcms+set}" = set; then :
65293   withval=$with_lcms;
65294 fi
65295 
65296 
65297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65298 $as_echo_n "checking for which lcms to use... " >&6; }
65299 
65300   DEFAULT_LCMS=bundled
65301   # If user didn't specify, use DEFAULT_LCMS
65302   if test "x${with_lcms}" = "x"; then
65303     with_lcms=${DEFAULT_LCMS}
65304   fi
65305 
65306   if test "x${with_lcms}" = "xbundled"; then
65307     USE_EXTERNAL_LCMS=false
65308     LCMS_CFLAGS=""
65309     LCMS_LIBS=""
65310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65311 $as_echo "bundled" >&6; }
65312   elif test "x${with_lcms}" = "xsystem"; then
65313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65314 $as_echo "system" >&6; }
65315 
65316 pkg_failed=no
65317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65318 $as_echo_n "checking for LCMS... " >&6; }
65319 
65320 if test -n "$LCMS_CFLAGS"; then
65321     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65322  elif test -n "$PKG_CONFIG"; then
65323     if test -n "$PKG_CONFIG" && \
65324     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65325   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65326   ac_status=$?
65327   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65328   test $ac_status = 0; }; then
65329   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65330 else
65331   pkg_failed=yes
65332 fi
65333  else
65334     pkg_failed=untried
65335 fi
65336 if test -n "$LCMS_LIBS"; then
65337     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65338  elif test -n "$PKG_CONFIG"; then
65339     if test -n "$PKG_CONFIG" && \
65340     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65341   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65342   ac_status=$?
65343   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65344   test $ac_status = 0; }; then
65345   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65346 else
65347   pkg_failed=yes
65348 fi
65349  else
65350     pkg_failed=untried
65351 fi
65352 
65353 
65354 
65355 if test $pkg_failed = yes; then
65356 
65357 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65358         _pkg_short_errors_supported=yes
65359 else
65360         _pkg_short_errors_supported=no
65361 fi
65362         if test $_pkg_short_errors_supported = yes; then
65363                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65364         else
65365                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65366         fi
65367         # Put the nasty error message in config.log where it belongs
65368         echo "$LCMS_PKG_ERRORS" >&5
65369 
65370         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65371 $as_echo "no" >&6; }
65372                 LCMS_FOUND=no
65373 elif test $pkg_failed = untried; then
65374         LCMS_FOUND=no
65375 else
65376         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65377         LCMS_LIBS=$pkg_cv_LCMS_LIBS
65378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65379 $as_echo "yes" >&6; }
65380         LCMS_FOUND=yes
65381 fi
65382     if test "x${LCMS_FOUND}" = "xyes"; then
65383       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65384       USE_EXTERNAL_LCMS=true
65385     else
65386       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65387     fi
65388   else
65389     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65390   fi
65391 
65392 
65393 
65394 
65395 
65396 
65397 
65398 
65399 
65400 
65401 
65402 
65403 
65404   # Setup libm (the maths library)
65405   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65407 $as_echo_n "checking for cos in -lm... " >&6; }
65408 if ${ac_cv_lib_m_cos+:} false; then :
65409   $as_echo_n "(cached) " >&6
65410 else
65411   ac_check_lib_save_LIBS=$LIBS
65412 LIBS="-lm  $LIBS"
65413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65414 /* end confdefs.h.  */
65415 
65416 /* Override any GCC internal prototype to avoid an error.
65417    Use char because int might match the return type of a GCC
65418    builtin and then its argument prototype would still apply.  */
65419 #ifdef __cplusplus
65420 extern "C"
65421 #endif
65422 char cos ();
65423 int
65424 main ()
65425 {
65426 return cos ();
65427   ;
65428   return 0;
65429 }
65430 _ACEOF
65431 if ac_fn_cxx_try_link "$LINENO"; then :
65432   ac_cv_lib_m_cos=yes
65433 else
65434   ac_cv_lib_m_cos=no
65435 fi
65436 rm -f core conftest.err conftest.$ac_objext \
65437     conftest$ac_exeext conftest.$ac_ext
65438 LIBS=$ac_check_lib_save_LIBS
65439 fi
65440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65441 $as_echo "$ac_cv_lib_m_cos" >&6; }
65442 if test "x$ac_cv_lib_m_cos" = xyes; then :
65443   cat >>confdefs.h <<_ACEOF
65444 #define HAVE_LIBM 1
65445 _ACEOF
65446 
65447   LIBS="-lm $LIBS"
65448 
65449 else
65450 
65451         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65452 $as_echo "$as_me: Maths library was not found" >&6;}
65453 
65454 fi
65455 
65456     LIBM="-lm"
65457   else
65458     LIBM=""
65459   fi
65460 
65461 
65462   # Setup libdl (for dynamic library loading)
65463   save_LIBS="$LIBS"
65464   LIBS=""
65465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65466 $as_echo_n "checking for dlopen in -ldl... " >&6; }
65467 if ${ac_cv_lib_dl_dlopen+:} false; then :
65468   $as_echo_n "(cached) " >&6
65469 else
65470   ac_check_lib_save_LIBS=$LIBS
65471 LIBS="-ldl  $LIBS"
65472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65473 /* end confdefs.h.  */
65474 
65475 /* Override any GCC internal prototype to avoid an error.
65476    Use char because int might match the return type of a GCC
65477    builtin and then its argument prototype would still apply.  */
65478 #ifdef __cplusplus
65479 extern "C"
65480 #endif
65481 char dlopen ();
65482 int
65483 main ()
65484 {
65485 return dlopen ();
65486   ;
65487   return 0;
65488 }
65489 _ACEOF
65490 if ac_fn_cxx_try_link "$LINENO"; then :
65491   ac_cv_lib_dl_dlopen=yes
65492 else
65493   ac_cv_lib_dl_dlopen=no
65494 fi
65495 rm -f core conftest.err conftest.$ac_objext \
65496     conftest$ac_exeext conftest.$ac_ext
65497 LIBS=$ac_check_lib_save_LIBS
65498 fi
65499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65500 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65501 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65502   cat >>confdefs.h <<_ACEOF
65503 #define HAVE_LIBDL 1
65504 _ACEOF
65505 
65506   LIBS="-ldl $LIBS"
65507 
65508 fi
65509 
65510   LIBDL="$LIBS"
65511 
65512   LIBS="$save_LIBS"
65513 
65514   # Deprecated libraries, keep the flags for backwards compatibility
65515   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65516 
65517 
65518 # Check whether --with-dxsdk was given.
65519 if test "${with_dxsdk+set}" = set; then :
65520   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65521 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65522 fi
65523 
65524 
65525 
65526 
65527 # Check whether --with-dxsdk-lib was given.
65528 if test "${with_dxsdk_lib+set}" = set; then :
65529   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65530 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65531 fi
65532 
65533 
65534 
65535 
65536 # Check whether --with-dxsdk-include was given.
65537 if test "${with_dxsdk_include+set}" = set; then :
65538   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65539 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65540 fi
65541 
65542 
65543   fi
65544 
65545   # Control if libzip can use mmap. Available for purposes of overriding.
65546   LIBZIP_CAN_USE_MMAP=true
65547 
65548 
65549 
65550   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65551     # Find the root of the Solaris Studio installation from the compiler path
65552     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65553     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65555 $as_echo_n "checking for libstlport.so.1... " >&6; }
65556     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65557       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65558       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65559     fi
65560     if test -f "$STLPORT_LIB"; then
65561       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65562 $as_echo "yes, $STLPORT_LIB" >&6; }
65563 
65564   # Only process if variable expands to non-empty
65565 
65566   if test "x$STLPORT_LIB" != x; then
65567     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65568 
65569   # Input might be given as Windows format, start by converting to
65570   # unix format.
65571   path="$STLPORT_LIB"
65572   new_path=`$CYGPATH -u "$path"`
65573 
65574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65577   # "foo.exe" is OK but "foo" is an error.
65578   #
65579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65580   # It is also a way to make sure we got the proper file name for the real test later on.
65581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65582   if test "x$test_shortpath" = x; then
65583     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65584 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65585     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65586   fi
65587 
65588   # Call helper function which possibly converts this using DOS-style short mode.
65589   # If so, the updated path is stored in $new_path.
65590 
65591   input_path="$new_path"
65592   # Check if we need to convert this using DOS-style short mode. If the path
65593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65594   # take no chances and rewrite it.
65595   # Note: m4 eats our [], so we need to use [ and ] instead.
65596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65597   if test "x$has_forbidden_chars" != x; then
65598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65602       # Going to short mode and back again did indeed matter. Since short mode is
65603       # case insensitive, let's make it lowercase to improve readability.
65604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65605       # Now convert it back to Unix-style (cygpath)
65606       input_path=`$CYGPATH -u "$shortmode_path"`
65607       new_path="$input_path"
65608     fi
65609   fi
65610 
65611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65612   if test "x$test_cygdrive_prefix" = x; then
65613     # As a simple fix, exclude /usr/bin since it's not a real path.
65614     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65616       # a path prefixed by /cygdrive for fixpath to work.
65617       new_path="$CYGWIN_ROOT_PATH$input_path"
65618     fi
65619   fi
65620 
65621 
65622   if test "x$path" != "x$new_path"; then
65623     STLPORT_LIB="$new_path"
65624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65625 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65626   fi
65627 
65628     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65629 
65630   path="$STLPORT_LIB"
65631   has_colon=`$ECHO $path | $GREP ^.:`
65632   new_path="$path"
65633   if test "x$has_colon" = x; then
65634     # Not in mixed or Windows style, start by that.
65635     new_path=`cmd //c echo $path`
65636   fi
65637 
65638 
65639   input_path="$new_path"
65640   # Check if we need to convert this using DOS-style short mode. If the path
65641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65642   # take no chances and rewrite it.
65643   # Note: m4 eats our [], so we need to use [ and ] instead.
65644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65645   if test "x$has_forbidden_chars" != x; then
65646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65647     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65648   fi
65649 
65650 
65651   windows_path="$new_path"
65652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65653     unix_path=`$CYGPATH -u "$windows_path"`
65654     new_path="$unix_path"
65655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65657     new_path="$unix_path"
65658   fi
65659 
65660   if test "x$path" != "x$new_path"; then
65661     STLPORT_LIB="$new_path"
65662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65663 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65664   fi
65665 
65666   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65667   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65668 
65669     else
65670       # We're on a unix platform. Hooray! :)
65671       path="$STLPORT_LIB"
65672       has_space=`$ECHO "$path" | $GREP " "`
65673       if test "x$has_space" != x; then
65674         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65675 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65676         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65677       fi
65678 
65679       # Use eval to expand a potential ~
65680       eval path="$path"
65681       if test ! -f "$path" && test ! -d "$path"; then
65682         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65683       fi
65684 
65685       if test -d "$path"; then
65686         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65687       else
65688         dir="`$DIRNAME "$path"`"
65689         base="`$BASENAME "$path"`"
65690         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65691       fi
65692     fi
65693   fi
65694 
65695     else
65696       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65697 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65698       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65699     fi
65700 
65701   fi
65702 
65703 
65704 
65705 
65706 
65707 
65708 
65709 
65710 
65711 
65712 
65713 
65714 
65715 
65716 # Hotspot setup depends on lib checks.
65717 
65718 
65719   # The user can in some cases supply additional jvm features. For the custom
65720   # variant, this defines the entire variant.
65721 
65722 # Check whether --with-jvm-features was given.
65723 if test "${with_jvm_features+set}" = set; then :
65724   withval=$with_jvm_features;
65725 fi
65726 
65727   if test "x$with_jvm_features" != x; then
65728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65729 $as_echo_n "checking additional JVM features... " >&6; }
65730     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65731     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65732 $as_echo "$JVM_FEATURES" >&6; }
65733   fi
65734 
65735   # Override hotspot cpu definitions for ARM platforms
65736   if test "x$OPENJDK_TARGET_CPU" = xarm; then
65737     HOTSPOT_TARGET_CPU=arm_32
65738     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65739     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65740     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65741   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65742     HOTSPOT_TARGET_CPU=arm_64
65743     HOTSPOT_TARGET_CPU_ARCH=arm
65744     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65745     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65746   fi
65747 
65748   # Verify that dependencies are met for explicitly set features.
65749   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65750     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65751   fi
65752 
65753   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65754     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65755   fi
65756 
65757   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65758     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65759   fi
65760 
65761   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65762     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65763   fi
65764 
65765   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65766     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65767   fi
65768 
65769   # Turn on additional features based on other parts of configure
65770   if test "x$INCLUDE_DTRACE" = "xtrue"; then
65771     JVM_FEATURES="$JVM_FEATURES dtrace"
65772   else
65773     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65774       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65775     fi
65776   fi
65777 
65778   if test "x$STATIC_BUILD" = "xtrue"; then
65779     JVM_FEATURES="$JVM_FEATURES static-build"
65780   else
65781     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65782       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65783     fi
65784   fi
65785 
65786   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65787     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65788       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65789     fi
65790   fi
65791 
65792   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65793     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65794       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65795     fi
65796   fi
65797 
65798   # Only enable jvmci on x86_64, sparcv9 and aarch64.
65799   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65800      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65801      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65802     JVM_FEATURES_jvmci="jvmci"
65803   else
65804     JVM_FEATURES_jvmci=""
65805   fi
65806 
65807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65808 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65809   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65811 $as_echo "yes, forced" >&6; }
65812     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65813       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65814     fi
65815     INCLUDE_GRAAL="true"
65816   else
65817     # By default enable graal build on linux-x64 or where AOT is available.
65818     # graal build requires jvmci.
65819     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
65820         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
65821          test "x$OPENJDK_TARGET_OS" = "xlinux" || \
65822          test "x$ENABLE_AOT" = "xtrue") ; then
65823       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65824 $as_echo "yes" >&6; }
65825       JVM_FEATURES_graal="graal"
65826       INCLUDE_GRAAL="true"
65827     else
65828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65829 $as_echo "no" >&6; }
65830       JVM_FEATURES_graal=""
65831       INCLUDE_GRAAL="false"
65832     fi
65833   fi
65834 
65835 
65836 
65837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65838 $as_echo_n "checking if aot should be enabled... " >&6; }
65839   if test "x$ENABLE_AOT" = "xtrue"; then
65840     if test "x$enable_aot" = "xyes"; then
65841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65842 $as_echo "yes, forced" >&6; }
65843     else
65844       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65845 $as_echo "yes" >&6; }
65846     fi
65847     JVM_FEATURES_aot="aot"
65848   else
65849     if test "x$enable_aot" = "xno"; then
65850       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65851 $as_echo "no, forced" >&6; }
65852     else
65853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65854 $as_echo "no" >&6; }
65855     fi
65856     JVM_FEATURES_aot=""
65857   fi
65858 
65859   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65860     # Default to use link time optimizations on minimal on arm
65861     JVM_FEATURES_link_time_opt="link-time-opt"
65862   else
65863     JVM_FEATURES_link_time_opt=""
65864   fi
65865 
65866   # All variants but minimal (and custom) get these features
65867   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65868   if test "x$ENABLE_CDS" = "xtrue"; then
65869     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65870   fi
65871 
65872   # Enable features depending on variant.
65873   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65874   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65875   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65876   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65877   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65878   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65879   JVM_FEATURES_custom="$JVM_FEATURES"
65880 
65881 
65882 
65883 
65884 
65885 
65886 
65887 
65888 
65889   # Used for verification of Makefiles by check-jvm-feature
65890 
65891 
65892   # We don't support --with-jvm-interpreter anymore, use zero instead.
65893 
65894 
65895 # Check whether --with-jvm-interpreter was given.
65896 if test "${with_jvm_interpreter+set}" = set; then :
65897   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65898 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65899 fi
65900 
65901 
65902 
65903 
65904 ###############################################################################
65905 #
65906 # We need to do some final tweaking, when everything else is done.
65907 #
65908 ###############################################################################
65909 
65910 
65911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65912 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65913 
65914   if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65915     ENABLE_INTREE_EC=true
65916     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65917 $as_echo "yes" >&6; }
65918   else
65919     ENABLE_INTREE_EC=false
65920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65921 $as_echo "no" >&6; }
65922   fi
65923 
65924 
65925 
65926 
65927   # Check whether --enable-jtreg-failure-handler was given.
65928 if test "${enable_jtreg_failure_handler+set}" = set; then :
65929   enableval=$enable_jtreg_failure_handler;
65930 fi
65931 
65932 
65933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65934 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65935 
65936   if test "x$enable_jtreg_failure_handler" = "xyes"; then
65937     if test "x$JT_HOME" = "x"; then
65938       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65939     else
65940       BUILD_FAILURE_HANDLER=true
65941       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65942 $as_echo "yes, forced" >&6; }
65943     fi
65944   elif test "x$enable_jtreg_failure_handler" = "xno"; then
65945     BUILD_FAILURE_HANDLER=false
65946     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65947 $as_echo "no, forced" >&6; }
65948   elif test "x$enable_jtreg_failure_handler" = "xauto" \
65949       || test "x$enable_jtreg_failure_handler" = "x"; then
65950     if test "x$JT_HOME" = "x"; then
65951       BUILD_FAILURE_HANDLER=false
65952       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65953 $as_echo "no, missing jtreg" >&6; }
65954     else
65955       BUILD_FAILURE_HANDLER=true
65956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65957 $as_echo "yes, jtreg present" >&6; }
65958     fi
65959   else
65960     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65961   fi
65962 
65963 
65964 
65965 
65966   # Check whether --enable-generate-classlist was given.
65967 if test "${enable_generate_classlist+set}" = set; then :
65968   enableval=$enable_generate_classlist;
65969 fi
65970 
65971 
65972   # Check if it's likely that it's possible to generate the classlist. Depending
65973   # on exact jvm configuration it could be possible anyway.
65974   if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
65975     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65976   else
65977     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65978   fi
65979 
65980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65981 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65982   if test "x$enable_generate_classlist" = "xyes"; then
65983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65984 $as_echo "yes, forced" >&6; }
65985     ENABLE_GENERATE_CLASSLIST="true"
65986     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65987       { $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
65988 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
65989     fi
65990   elif test "x$enable_generate_classlist" = "xno"; then
65991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65992 $as_echo "no, forced" >&6; }
65993     ENABLE_GENERATE_CLASSLIST="false"
65994   elif test "x$enable_generate_classlist" = "x"; then
65995     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65996       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65997 $as_echo "yes" >&6; }
65998       ENABLE_GENERATE_CLASSLIST="true"
65999     else
66000       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66001 $as_echo "no" >&6; }
66002       ENABLE_GENERATE_CLASSLIST="false"
66003     fi
66004   else
66005     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
66006   fi
66007 
66008 
66009 
66010 
66011 ###############################################################################
66012 #
66013 # Configure parts of the build that only affect the build performance,
66014 # not the result.
66015 #
66016 ###############################################################################
66017 
66018 
66019   # How many cores do we have on this build system?
66020 
66021 # Check whether --with-num-cores was given.
66022 if test "${with_num_cores+set}" = set; then :
66023   withval=$with_num_cores;
66024 fi
66025 
66026   if test "x$with_num_cores" = x; then
66027     # The number of cores were not specified, try to probe them.
66028 
66029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66030 $as_echo_n "checking for number of cores... " >&6; }
66031   NUM_CORES=1
66032   FOUND_CORES=no
66033 
66034   if test -f /proc/cpuinfo; then
66035     # Looks like a Linux (or cygwin) system
66036     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66037     FOUND_CORES=yes
66038   elif test -x /usr/sbin/psrinfo; then
66039     # Looks like a Solaris system
66040     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66041     FOUND_CORES=yes
66042   elif test -x /usr/sbin/sysctl; then
66043     # Looks like a MacOSX system
66044     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66045     FOUND_CORES=yes
66046   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66047     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66048     FOUND_CORES=yes
66049   elif test -n "$NUMBER_OF_PROCESSORS"; then
66050     # On windows, look in the env
66051     NUM_CORES=$NUMBER_OF_PROCESSORS
66052     FOUND_CORES=yes
66053   fi
66054 
66055   if test "x$FOUND_CORES" = xyes; then
66056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66057 $as_echo "$NUM_CORES" >&6; }
66058   else
66059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66060 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
66061     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66062 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66063   fi
66064 
66065   else
66066     NUM_CORES=$with_num_cores
66067   fi
66068 
66069 
66070 
66071   # How much memory do we have on this build system?
66072 
66073 # Check whether --with-memory-size was given.
66074 if test "${with_memory_size+set}" = set; then :
66075   withval=$with_memory_size;
66076 fi
66077 
66078   if test "x$with_memory_size" = x; then
66079     # The memory size was not specified, try to probe it.
66080 
66081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66082 $as_echo_n "checking for memory size... " >&6; }
66083   # Default to 1024 MB
66084   MEMORY_SIZE=1024
66085   FOUND_MEM=no
66086 
66087   if test -f /proc/meminfo; then
66088     # Looks like a Linux (or cygwin) system
66089     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66090     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66091     FOUND_MEM=yes
66092   elif test -x /usr/sbin/prtconf; then
66093     # Looks like a Solaris or AIX system
66094     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66095     FOUND_MEM=yes
66096   elif test -x /usr/sbin/sysctl; then
66097     # Looks like a MacOSX system
66098     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66099     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66100     FOUND_MEM=yes
66101   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66102     # Windows, but without cygwin
66103     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66104     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66105     FOUND_MEM=yes
66106   fi
66107 
66108   if test "x$FOUND_MEM" = xyes; then
66109     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66110 $as_echo "$MEMORY_SIZE MB" >&6; }
66111   else
66112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66113 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66114     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66115 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66116   fi
66117 
66118   else
66119     MEMORY_SIZE=$with_memory_size
66120   fi
66121 
66122 
66123 
66124   # Provide a decent default number of parallel jobs for make depending on
66125   # number of cores, amount of memory and machine architecture.
66126 
66127 # Check whether --with-jobs was given.
66128 if test "${with_jobs+set}" = set; then :
66129   withval=$with_jobs;
66130 fi
66131 
66132   if test "x$with_jobs" = x; then
66133     # Number of jobs was not specified, calculate.
66134     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66135 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66136     # Approximate memory in GB.
66137     memory_gb=`expr $MEMORY_SIZE / 1024`
66138     # Pick the lowest of memory in gb and number of cores.
66139     if test "$memory_gb" -lt "$NUM_CORES"; then
66140       JOBS="$memory_gb"
66141     else
66142       JOBS="$NUM_CORES"
66143     fi
66144     if test "$JOBS" -eq "0"; then
66145       JOBS=1
66146     fi
66147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66148 $as_echo "$JOBS" >&6; }
66149   else
66150     JOBS=$with_jobs
66151   fi
66152 
66153 
66154 
66155   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66156 
66157 # Check whether --with-test-jobs was given.
66158 if test "${with_test_jobs+set}" = set; then :
66159   withval=$with_test_jobs;
66160 fi
66161 
66162   if test "x$with_test_jobs" = x; then
66163       TEST_JOBS=0
66164   else
66165       TEST_JOBS=$with_test_jobs
66166   fi
66167 
66168 
66169 
66170 # Setup arguments for the boot jdk (after cores and memory have been setup)
66171 
66172   ##############################################################################
66173   #
66174   # Specify jvm options for anything that is run with the Boot JDK.
66175   # Not all JVM:s accept the same arguments on the command line.
66176   #
66177 
66178 # Check whether --with-boot-jdk-jvmargs was given.
66179 if test "${with_boot_jdk_jvmargs+set}" = set; then :
66180   withval=$with_boot_jdk_jvmargs;
66181 fi
66182 
66183 
66184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66185 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
66186 
66187   # Disable special log output when a debug build is used as Boot JDK...
66188 
66189   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66190   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66191   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66192   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66193   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66194   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66195     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66196     JVM_ARG_OK=true
66197   else
66198     $ECHO "Arg failed:" >&5
66199     $ECHO "$OUTPUT" >&5
66200     JVM_ARG_OK=false
66201   fi
66202 
66203 
66204   # Force en-US environment
66205 
66206   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66207   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66208   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66209   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66210   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66211   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66212     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66213     JVM_ARG_OK=true
66214   else
66215     $ECHO "Arg failed:" >&5
66216     $ECHO "$OUTPUT" >&5
66217     JVM_ARG_OK=false
66218   fi
66219 
66220 
66221   # Apply user provided options.
66222 
66223   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66224   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66225   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66226   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66227   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66228   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66229     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66230     JVM_ARG_OK=true
66231   else
66232     $ECHO "Arg failed:" >&5
66233     $ECHO "$OUTPUT" >&5
66234     JVM_ARG_OK=false
66235   fi
66236 
66237 
66238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66239 $as_echo "$boot_jdk_jvmargs" >&6; }
66240 
66241   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66242   JAVA_FLAGS=$boot_jdk_jvmargs
66243 
66244 
66245 
66246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66247 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66248 
66249   # Starting amount of heap memory.
66250 
66251   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66252   $ECHO "Command: $JAVA -Xms64M -version" >&5
66253   OUTPUT=`$JAVA -Xms64M -version 2>&1`
66254   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66255   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66256   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66257     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66258     JVM_ARG_OK=true
66259   else
66260     $ECHO "Arg failed:" >&5
66261     $ECHO "$OUTPUT" >&5
66262     JVM_ARG_OK=false
66263   fi
66264 
66265   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66266 
66267   # Maximum amount of heap memory and stack size.
66268   JVM_HEAP_LIMIT_32="1024"
66269   # Running a 64 bit JVM allows for and requires a bigger heap
66270   JVM_HEAP_LIMIT_64="1600"
66271   STACK_SIZE_32=768
66272   STACK_SIZE_64=1536
66273   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66274   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66275     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66276   fi
66277   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66278     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66279   fi
66280   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66281     JVM_HEAP_LIMIT_32=512
66282     JVM_HEAP_LIMIT_64=512
66283   fi
66284 
66285   if test "x$BOOT_JDK_BITS" = "x32"; then
66286     STACK_SIZE=$STACK_SIZE_32
66287     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66288   else
66289     STACK_SIZE=$STACK_SIZE_64
66290     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66291   fi
66292 
66293   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66294   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66295   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66296   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66297   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66298   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66299     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66300     JVM_ARG_OK=true
66301   else
66302     $ECHO "Arg failed:" >&5
66303     $ECHO "$OUTPUT" >&5
66304     JVM_ARG_OK=false
66305   fi
66306 
66307 
66308   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66309   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66310   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66311   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66312   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66313   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66314     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66315     JVM_ARG_OK=true
66316   else
66317     $ECHO "Arg failed:" >&5
66318     $ECHO "$OUTPUT" >&5
66319     JVM_ARG_OK=false
66320   fi
66321 
66322 
66323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66324 $as_echo "$boot_jdk_jvmargs_big" >&6; }
66325 
66326   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66327 
66328 
66329   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66330     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66331     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66332   else
66333     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66334     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66335   fi
66336   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66337   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66339 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66341 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66342 
66343 
66344   # By default, the main javac compilations use big
66345   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66346 
66347 
66348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66349 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66350 
66351   # Use serial gc for small short lived tools if possible
66352 
66353   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66354   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66355   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66356   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66357   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66358   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66359     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66360     JVM_ARG_OK=true
66361   else
66362     $ECHO "Arg failed:" >&5
66363     $ECHO "$OUTPUT" >&5
66364     JVM_ARG_OK=false
66365   fi
66366 
66367 
66368   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66369   $ECHO "Command: $JAVA -Xms32M -version" >&5
66370   OUTPUT=`$JAVA -Xms32M -version 2>&1`
66371   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66372   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66373   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66374     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66375     JVM_ARG_OK=true
66376   else
66377     $ECHO "Arg failed:" >&5
66378     $ECHO "$OUTPUT" >&5
66379     JVM_ARG_OK=false
66380   fi
66381 
66382 
66383   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66384   $ECHO "Command: $JAVA -Xmx512M -version" >&5
66385   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66386   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66387   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66388   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66389     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66390     JVM_ARG_OK=true
66391   else
66392     $ECHO "Arg failed:" >&5
66393     $ECHO "$OUTPUT" >&5
66394     JVM_ARG_OK=false
66395   fi
66396 
66397 
66398   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66399   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66400   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66401   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66402   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66403   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66404     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66405     JVM_ARG_OK=true
66406   else
66407     $ECHO "Arg failed:" >&5
66408     $ECHO "$OUTPUT" >&5
66409     JVM_ARG_OK=false
66410   fi
66411 
66412 
66413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66414 $as_echo "$boot_jdk_jvmargs_small" >&6; }
66415 
66416   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66417 
66418 
66419   JAVA_TOOL_FLAGS_SMALL=""
66420   for f in $JAVA_FLAGS_SMALL; do
66421     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66422   done
66423 
66424 
66425 
66426 # Setup smart javac (after cores and memory have been setup)
66427 
66428 
66429 # Check whether --with-sjavac-server-java was given.
66430 if test "${with_sjavac_server_java+set}" = set; then :
66431   withval=$with_sjavac_server_java;
66432 fi
66433 
66434 
66435   if test "x$with_sjavac_server_java" != x; then
66436     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66437     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66438     if test "x$FOUND_VERSION" = x; then
66439       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66440     fi
66441   else
66442     SJAVAC_SERVER_JAVA="$JAVA"
66443   fi
66444 
66445 
66446   if test "$MEMORY_SIZE" -gt "3000"; then
66447     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66448       JVM_64BIT=true
66449     fi
66450   fi
66451 
66452   MX_VALUE=`expr $MEMORY_SIZE / 2`
66453   if test "$JVM_64BIT" = true; then
66454     # Set ms lower than mx since more than one instance of the server might
66455     # get launched at the same time before they figure out which instance won.
66456     MS_VALUE=512
66457     if test "$MX_VALUE" -gt "2048"; then
66458       MX_VALUE=2048
66459     fi
66460   else
66461     MS_VALUE=256
66462     if test "$MX_VALUE" -gt "1500"; then
66463       MX_VALUE=1500
66464     fi
66465   fi
66466   if test "$MX_VALUE" -lt "512"; then
66467     MX_VALUE=512
66468   fi
66469 
66470   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66471   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66472   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66473   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66474   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66475   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66476     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66477     JVM_ARG_OK=true
66478   else
66479     $ECHO "Arg failed:" >&5
66480     $ECHO "$OUTPUT" >&5
66481     JVM_ARG_OK=false
66482   fi
66483 
66484 
66485 
66486   # Check whether --enable-sjavac was given.
66487 if test "${enable_sjavac+set}" = set; then :
66488   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66489 else
66490   ENABLE_SJAVAC="no"
66491 fi
66492 
66493   if test "x$JVM_ARG_OK" = "xfalse"; then
66494     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66495 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66496     ENABLE_SJAVAC="no"
66497   fi
66498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66499 $as_echo_n "checking whether to use sjavac... " >&6; }
66500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66501 $as_echo "$ENABLE_SJAVAC" >&6; }
66502 
66503 
66504   # Check whether --enable-javac-server was given.
66505 if test "${enable_javac_server+set}" = set; then :
66506   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66507 else
66508   ENABLE_JAVAC_SERVER="yes"
66509 fi
66510 
66511   if test "x$JVM_ARG_OK" = "xfalse"; then
66512     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66513 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66514     ENABLE_JAVAC_SERVER="no"
66515   fi
66516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66517 $as_echo_n "checking whether to use javac server... " >&6; }
66518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66519 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66520 
66521 
66522   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66523     # When using a server javac, the small client instances do not need much
66524     # resources.
66525     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66526   fi
66527 
66528 
66529 # Setup use of icecc if requested
66530 
66531   # Check whether --enable-icecc was given.
66532 if test "${enable_icecc+set}" = set; then :
66533   enableval=$enable_icecc;
66534 fi
66535 
66536 
66537   if test "x${enable_icecc}" = "xyes"; then
66538 
66539 
66540 
66541   # Publish this variable in the help.
66542 
66543 
66544   if [ -z "${ICECC_CMD+x}" ]; then
66545     # The variable is not set by user, try to locate tool using the code snippet
66546     for ac_prog in icecc
66547 do
66548   # Extract the first word of "$ac_prog", so it can be a program name with args.
66549 set dummy $ac_prog; ac_word=$2
66550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66551 $as_echo_n "checking for $ac_word... " >&6; }
66552 if ${ac_cv_path_ICECC_CMD+:} false; then :
66553   $as_echo_n "(cached) " >&6
66554 else
66555   case $ICECC_CMD in
66556   [\\/]* | ?:[\\/]*)
66557   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66558   ;;
66559   *)
66560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66561 for as_dir in $PATH
66562 do
66563   IFS=$as_save_IFS
66564   test -z "$as_dir" && as_dir=.
66565     for ac_exec_ext in '' $ac_executable_extensions; do
66566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66567     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66569     break 2
66570   fi
66571 done
66572   done
66573 IFS=$as_save_IFS
66574 
66575   ;;
66576 esac
66577 fi
66578 ICECC_CMD=$ac_cv_path_ICECC_CMD
66579 if test -n "$ICECC_CMD"; then
66580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66581 $as_echo "$ICECC_CMD" >&6; }
66582 else
66583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66584 $as_echo "no" >&6; }
66585 fi
66586 
66587 
66588   test -n "$ICECC_CMD" && break
66589 done
66590 
66591   else
66592     # The variable is set, but is it from the command line or the environment?
66593 
66594     # Try to remove the string !ICECC_CMD! from our list.
66595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66597       # If it failed, the variable was not from the command line. Ignore it,
66598       # but warn the user (except for BASH, which is always set by the calling BASH).
66599       if test "xICECC_CMD" != xBASH; then
66600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66601 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66602       fi
66603       # Try to locate tool using the code snippet
66604       for ac_prog in icecc
66605 do
66606   # Extract the first word of "$ac_prog", so it can be a program name with args.
66607 set dummy $ac_prog; ac_word=$2
66608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66609 $as_echo_n "checking for $ac_word... " >&6; }
66610 if ${ac_cv_path_ICECC_CMD+:} false; then :
66611   $as_echo_n "(cached) " >&6
66612 else
66613   case $ICECC_CMD in
66614   [\\/]* | ?:[\\/]*)
66615   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66616   ;;
66617   *)
66618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66619 for as_dir in $PATH
66620 do
66621   IFS=$as_save_IFS
66622   test -z "$as_dir" && as_dir=.
66623     for ac_exec_ext in '' $ac_executable_extensions; do
66624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66625     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66627     break 2
66628   fi
66629 done
66630   done
66631 IFS=$as_save_IFS
66632 
66633   ;;
66634 esac
66635 fi
66636 ICECC_CMD=$ac_cv_path_ICECC_CMD
66637 if test -n "$ICECC_CMD"; then
66638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66639 $as_echo "$ICECC_CMD" >&6; }
66640 else
66641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66642 $as_echo "no" >&6; }
66643 fi
66644 
66645 
66646   test -n "$ICECC_CMD" && break
66647 done
66648 
66649     else
66650       # If it succeeded, then it was overridden by the user. We will use it
66651       # for the tool.
66652 
66653       # First remove it from the list of overridden variables, so we can test
66654       # for unknown variables in the end.
66655       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66656 
66657       # Check if we try to supply an empty value
66658       if test "x$ICECC_CMD" = x; then
66659         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66660 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66662 $as_echo_n "checking for ICECC_CMD... " >&6; }
66663         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66664 $as_echo "disabled" >&6; }
66665       else
66666         # Check if the provided tool contains a complete path.
66667         tool_specified="$ICECC_CMD"
66668         tool_basename="${tool_specified##*/}"
66669         if test "x$tool_basename" = "x$tool_specified"; then
66670           # A command without a complete path is provided, search $PATH.
66671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66672 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66673           # Extract the first word of "$tool_basename", so it can be a program name with args.
66674 set dummy $tool_basename; ac_word=$2
66675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66676 $as_echo_n "checking for $ac_word... " >&6; }
66677 if ${ac_cv_path_ICECC_CMD+:} false; then :
66678   $as_echo_n "(cached) " >&6
66679 else
66680   case $ICECC_CMD in
66681   [\\/]* | ?:[\\/]*)
66682   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66683   ;;
66684   *)
66685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66686 for as_dir in $PATH
66687 do
66688   IFS=$as_save_IFS
66689   test -z "$as_dir" && as_dir=.
66690     for ac_exec_ext in '' $ac_executable_extensions; do
66691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66692     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66694     break 2
66695   fi
66696 done
66697   done
66698 IFS=$as_save_IFS
66699 
66700   ;;
66701 esac
66702 fi
66703 ICECC_CMD=$ac_cv_path_ICECC_CMD
66704 if test -n "$ICECC_CMD"; then
66705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66706 $as_echo "$ICECC_CMD" >&6; }
66707 else
66708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66709 $as_echo "no" >&6; }
66710 fi
66711 
66712 
66713           if test "x$ICECC_CMD" = x; then
66714             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66715           fi
66716         else
66717           # Otherwise we believe it is a complete path. Use it as it is.
66718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66719 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66720           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66721 $as_echo_n "checking for ICECC_CMD... " >&6; }
66722           if test ! -x "$tool_specified"; then
66723             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66724 $as_echo "not found" >&6; }
66725             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66726           fi
66727           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66728 $as_echo "$tool_specified" >&6; }
66729         fi
66730       fi
66731     fi
66732 
66733   fi
66734 
66735 
66736 
66737   if test "x$ICECC_CMD" = x; then
66738     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66739   fi
66740 
66741 
66742     old_path="$PATH"
66743 
66744     # Look for icecc-create-env in some known places
66745     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66746 
66747 
66748 
66749   # Publish this variable in the help.
66750 
66751 
66752   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66753     # The variable is not set by user, try to locate tool using the code snippet
66754     for ac_prog in icecc-create-env
66755 do
66756   # Extract the first word of "$ac_prog", so it can be a program name with args.
66757 set dummy $ac_prog; ac_word=$2
66758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66759 $as_echo_n "checking for $ac_word... " >&6; }
66760 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66761   $as_echo_n "(cached) " >&6
66762 else
66763   case $ICECC_CREATE_ENV in
66764   [\\/]* | ?:[\\/]*)
66765   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66766   ;;
66767   *)
66768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66769 for as_dir in $PATH
66770 do
66771   IFS=$as_save_IFS
66772   test -z "$as_dir" && as_dir=.
66773     for ac_exec_ext in '' $ac_executable_extensions; do
66774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66775     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66777     break 2
66778   fi
66779 done
66780   done
66781 IFS=$as_save_IFS
66782 
66783   ;;
66784 esac
66785 fi
66786 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66787 if test -n "$ICECC_CREATE_ENV"; then
66788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66789 $as_echo "$ICECC_CREATE_ENV" >&6; }
66790 else
66791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66792 $as_echo "no" >&6; }
66793 fi
66794 
66795 
66796   test -n "$ICECC_CREATE_ENV" && break
66797 done
66798 
66799   else
66800     # The variable is set, but is it from the command line or the environment?
66801 
66802     # Try to remove the string !ICECC_CREATE_ENV! from our list.
66803     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66804     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66805       # If it failed, the variable was not from the command line. Ignore it,
66806       # but warn the user (except for BASH, which is always set by the calling BASH).
66807       if test "xICECC_CREATE_ENV" != xBASH; then
66808         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66809 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66810       fi
66811       # Try to locate tool using the code snippet
66812       for ac_prog in icecc-create-env
66813 do
66814   # Extract the first word of "$ac_prog", so it can be a program name with args.
66815 set dummy $ac_prog; ac_word=$2
66816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66817 $as_echo_n "checking for $ac_word... " >&6; }
66818 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66819   $as_echo_n "(cached) " >&6
66820 else
66821   case $ICECC_CREATE_ENV in
66822   [\\/]* | ?:[\\/]*)
66823   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66824   ;;
66825   *)
66826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66827 for as_dir in $PATH
66828 do
66829   IFS=$as_save_IFS
66830   test -z "$as_dir" && as_dir=.
66831     for ac_exec_ext in '' $ac_executable_extensions; do
66832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66833     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66835     break 2
66836   fi
66837 done
66838   done
66839 IFS=$as_save_IFS
66840 
66841   ;;
66842 esac
66843 fi
66844 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66845 if test -n "$ICECC_CREATE_ENV"; then
66846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66847 $as_echo "$ICECC_CREATE_ENV" >&6; }
66848 else
66849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66850 $as_echo "no" >&6; }
66851 fi
66852 
66853 
66854   test -n "$ICECC_CREATE_ENV" && break
66855 done
66856 
66857     else
66858       # If it succeeded, then it was overridden by the user. We will use it
66859       # for the tool.
66860 
66861       # First remove it from the list of overridden variables, so we can test
66862       # for unknown variables in the end.
66863       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66864 
66865       # Check if we try to supply an empty value
66866       if test "x$ICECC_CREATE_ENV" = x; then
66867         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66868 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66870 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66871         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66872 $as_echo "disabled" >&6; }
66873       else
66874         # Check if the provided tool contains a complete path.
66875         tool_specified="$ICECC_CREATE_ENV"
66876         tool_basename="${tool_specified##*/}"
66877         if test "x$tool_basename" = "x$tool_specified"; then
66878           # A command without a complete path is provided, search $PATH.
66879           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66880 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66881           # Extract the first word of "$tool_basename", so it can be a program name with args.
66882 set dummy $tool_basename; ac_word=$2
66883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66884 $as_echo_n "checking for $ac_word... " >&6; }
66885 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66886   $as_echo_n "(cached) " >&6
66887 else
66888   case $ICECC_CREATE_ENV in
66889   [\\/]* | ?:[\\/]*)
66890   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66891   ;;
66892   *)
66893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66894 for as_dir in $PATH
66895 do
66896   IFS=$as_save_IFS
66897   test -z "$as_dir" && as_dir=.
66898     for ac_exec_ext in '' $ac_executable_extensions; do
66899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66900     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66902     break 2
66903   fi
66904 done
66905   done
66906 IFS=$as_save_IFS
66907 
66908   ;;
66909 esac
66910 fi
66911 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66912 if test -n "$ICECC_CREATE_ENV"; then
66913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66914 $as_echo "$ICECC_CREATE_ENV" >&6; }
66915 else
66916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66917 $as_echo "no" >&6; }
66918 fi
66919 
66920 
66921           if test "x$ICECC_CREATE_ENV" = x; then
66922             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66923           fi
66924         else
66925           # Otherwise we believe it is a complete path. Use it as it is.
66926           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66927 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66928           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66929 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66930           if test ! -x "$tool_specified"; then
66931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66932 $as_echo "not found" >&6; }
66933             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66934           fi
66935           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66936 $as_echo "$tool_specified" >&6; }
66937         fi
66938       fi
66939     fi
66940 
66941   fi
66942 
66943 
66944 
66945   if test "x$ICECC_CREATE_ENV" = x; then
66946     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66947   fi
66948 
66949 
66950     # Use icecc-create-env to create a minimal compilation environment that can
66951     # be sent to the other hosts in the icecream cluster.
66952     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66953     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66954     # Older versions of icecc does not have the --gcc parameter
66955     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66956       icecc_gcc_arg="--gcc"
66957     fi
66958     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66959 
66960   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66961       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66962           ${icecc_create_env_log} 2>&1 )
66963   if test "$?" != "0"; then
66964     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66965 $as_echo "$as_me: icecc-create-env output:" >&6;}
66966     cat \
66967           ${icecc_create_env_log}
66968     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66969   fi
66970 
66971     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66972       # For clang, the icecc compilerwrapper is needed. It usually resides next
66973       # to icecc-create-env.
66974 
66975 
66976 
66977   # Publish this variable in the help.
66978 
66979 
66980   if [ -z "${ICECC_WRAPPER+x}" ]; then
66981     # The variable is not set by user, try to locate tool using the code snippet
66982     for ac_prog in compilerwrapper
66983 do
66984   # Extract the first word of "$ac_prog", so it can be a program name with args.
66985 set dummy $ac_prog; ac_word=$2
66986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66987 $as_echo_n "checking for $ac_word... " >&6; }
66988 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66989   $as_echo_n "(cached) " >&6
66990 else
66991   case $ICECC_WRAPPER in
66992   [\\/]* | ?:[\\/]*)
66993   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66994   ;;
66995   *)
66996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66997 for as_dir in $PATH
66998 do
66999   IFS=$as_save_IFS
67000   test -z "$as_dir" && as_dir=.
67001     for ac_exec_ext in '' $ac_executable_extensions; do
67002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67003     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67005     break 2
67006   fi
67007 done
67008   done
67009 IFS=$as_save_IFS
67010 
67011   ;;
67012 esac
67013 fi
67014 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67015 if test -n "$ICECC_WRAPPER"; then
67016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67017 $as_echo "$ICECC_WRAPPER" >&6; }
67018 else
67019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67020 $as_echo "no" >&6; }
67021 fi
67022 
67023 
67024   test -n "$ICECC_WRAPPER" && break
67025 done
67026 
67027   else
67028     # The variable is set, but is it from the command line or the environment?
67029 
67030     # Try to remove the string !ICECC_WRAPPER! from our list.
67031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67033       # If it failed, the variable was not from the command line. Ignore it,
67034       # but warn the user (except for BASH, which is always set by the calling BASH).
67035       if test "xICECC_WRAPPER" != xBASH; then
67036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67037 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67038       fi
67039       # Try to locate tool using the code snippet
67040       for ac_prog in compilerwrapper
67041 do
67042   # Extract the first word of "$ac_prog", so it can be a program name with args.
67043 set dummy $ac_prog; ac_word=$2
67044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67045 $as_echo_n "checking for $ac_word... " >&6; }
67046 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67047   $as_echo_n "(cached) " >&6
67048 else
67049   case $ICECC_WRAPPER in
67050   [\\/]* | ?:[\\/]*)
67051   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67052   ;;
67053   *)
67054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67055 for as_dir in $PATH
67056 do
67057   IFS=$as_save_IFS
67058   test -z "$as_dir" && as_dir=.
67059     for ac_exec_ext in '' $ac_executable_extensions; do
67060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67061     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67063     break 2
67064   fi
67065 done
67066   done
67067 IFS=$as_save_IFS
67068 
67069   ;;
67070 esac
67071 fi
67072 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67073 if test -n "$ICECC_WRAPPER"; then
67074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67075 $as_echo "$ICECC_WRAPPER" >&6; }
67076 else
67077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67078 $as_echo "no" >&6; }
67079 fi
67080 
67081 
67082   test -n "$ICECC_WRAPPER" && break
67083 done
67084 
67085     else
67086       # If it succeeded, then it was overridden by the user. We will use it
67087       # for the tool.
67088 
67089       # First remove it from the list of overridden variables, so we can test
67090       # for unknown variables in the end.
67091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67092 
67093       # Check if we try to supply an empty value
67094       if test "x$ICECC_WRAPPER" = x; then
67095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67096 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67098 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67100 $as_echo "disabled" >&6; }
67101       else
67102         # Check if the provided tool contains a complete path.
67103         tool_specified="$ICECC_WRAPPER"
67104         tool_basename="${tool_specified##*/}"
67105         if test "x$tool_basename" = "x$tool_specified"; then
67106           # A command without a complete path is provided, search $PATH.
67107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67108 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67109           # Extract the first word of "$tool_basename", so it can be a program name with args.
67110 set dummy $tool_basename; ac_word=$2
67111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67112 $as_echo_n "checking for $ac_word... " >&6; }
67113 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67114   $as_echo_n "(cached) " >&6
67115 else
67116   case $ICECC_WRAPPER in
67117   [\\/]* | ?:[\\/]*)
67118   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67119   ;;
67120   *)
67121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67122 for as_dir in $PATH
67123 do
67124   IFS=$as_save_IFS
67125   test -z "$as_dir" && as_dir=.
67126     for ac_exec_ext in '' $ac_executable_extensions; do
67127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67128     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67130     break 2
67131   fi
67132 done
67133   done
67134 IFS=$as_save_IFS
67135 
67136   ;;
67137 esac
67138 fi
67139 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67140 if test -n "$ICECC_WRAPPER"; then
67141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67142 $as_echo "$ICECC_WRAPPER" >&6; }
67143 else
67144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67145 $as_echo "no" >&6; }
67146 fi
67147 
67148 
67149           if test "x$ICECC_WRAPPER" = x; then
67150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67151           fi
67152         else
67153           # Otherwise we believe it is a complete path. Use it as it is.
67154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67155 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67157 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67158           if test ! -x "$tool_specified"; then
67159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67160 $as_echo "not found" >&6; }
67161             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67162           fi
67163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67164 $as_echo "$tool_specified" >&6; }
67165         fi
67166       fi
67167     fi
67168 
67169   fi
67170 
67171 
67172 
67173   if test "x$ICECC_WRAPPER" = x; then
67174     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67175   fi
67176 
67177 
67178 
67179   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67180       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67181   if test "$?" != "0"; then
67182     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67183 $as_echo "$as_me: icecc-create-env output:" >&6;}
67184     cat ${icecc_create_env_log}
67185     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67186   fi
67187 
67188     else
67189       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67190     fi
67191     PATH="$old_path"
67192     # The bundle with the compiler gets a name based on checksums. Parse log file
67193     # to find it.
67194     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67195     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67196     if test ! -f ${ICECC_ENV_BUNDLE}; then
67197       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67198     fi
67199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67200 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67202 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67203     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67204 
67205     if test "x${COMPILE_TYPE}" = "xcross"; then
67206       # If cross compiling, create a separate env package for the build compiler
67207       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67208       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67209       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67210 
67211   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67212       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67213             ${icecc_create_env_log_build} 2>&1 )
67214   if test "$?" != "0"; then
67215     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67216 $as_echo "$as_me: icecc-create-env output:" >&6;}
67217     cat \
67218             ${icecc_create_env_log_build}
67219     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67220   fi
67221 
67222       elif test "x${BUILD_CC##*/}" = "xclang"; then
67223 
67224   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67225       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67226   if test "$?" != "0"; then
67227     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67228 $as_echo "$as_me: icecc-create-env output:" >&6;}
67229     cat ${icecc_create_env_log_build}
67230     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67231   fi
67232 
67233       else
67234         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67235       fi
67236       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67237       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67238       if test ! -f ${ICECC_ENV_BUNDLE}; then
67239         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67240       fi
67241       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67242 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67243       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67244 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67245       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67246           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67247     else
67248       BUILD_ICECC="${ICECC}"
67249     fi
67250 
67251 
67252   fi
67253 
67254 
67255 # Can the C/C++ compiler use precompiled headers?
67256 
67257 
67258   ###############################################################################
67259   #
67260   # Can the C/C++ compiler use precompiled headers?
67261   #
67262   # Check whether --enable-precompiled-headers was given.
67263 if test "${enable_precompiled_headers+set}" = set; then :
67264   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67265 else
67266   ENABLE_PRECOMPH=yes
67267 fi
67268 
67269 
67270   USE_PRECOMPILED_HEADER=true
67271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67272 $as_echo_n "checking If precompiled header is enabled... " >&6; }
67273   if test "x$ENABLE_PRECOMPH" = xno; then
67274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67275 $as_echo "no, forced" >&6; }
67276     USE_PRECOMPILED_HEADER=false
67277   elif test "x$ICECC" != "x"; then
67278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67279 $as_echo "no, does not work effectively with icecc" >&6; }
67280     USE_PRECOMPILED_HEADER=false
67281   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67282     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67283 $as_echo "no, does not work with Solaris Studio" >&6; }
67284     USE_PRECOMPILED_HEADER=false
67285   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67287 $as_echo "no, does not work with xlc" >&6; }
67288     USE_PRECOMPILED_HEADER=false
67289   else
67290     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67291 $as_echo "yes" >&6; }
67292   fi
67293 
67294   if test "x$ENABLE_PRECOMPH" = xyes; then
67295     # Check that the compiler actually supports precomp headers.
67296     if test "x$TOOLCHAIN_TYPE" = xgcc; then
67297       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67298 $as_echo_n "checking that precompiled headers work... " >&6; }
67299       echo "int alfa();" > conftest.h
67300       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67301       if test ! -f conftest.hpp.gch; then
67302         USE_PRECOMPILED_HEADER=false
67303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67304 $as_echo "no" >&6; }
67305       else
67306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67307 $as_echo "yes" >&6; }
67308       fi
67309       $RM conftest.h conftest.hpp.gch
67310     fi
67311   fi
67312 
67313 
67314 
67315 
67316 # Setup use of ccache, if available
67317 
67318   # Check whether --enable-ccache was given.
67319 if test "${enable_ccache+set}" = set; then :
67320   enableval=$enable_ccache;
67321 fi
67322 
67323 
67324   CCACHE_STATUS=
67325   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67326 $as_echo_n "checking is ccache enabled... " >&6; }
67327   if test "x$enable_ccache" = xyes; then
67328     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67329       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67330 $as_echo "yes" >&6; }
67331       OLD_PATH="$PATH"
67332       if test "x$TOOLCHAIN_PATH" != x; then
67333         PATH=$TOOLCHAIN_PATH:$PATH
67334       fi
67335 
67336 
67337 
67338   # Publish this variable in the help.
67339 
67340 
67341   if [ -z "${CCACHE+x}" ]; then
67342     # The variable is not set by user, try to locate tool using the code snippet
67343     for ac_prog in ccache
67344 do
67345   # Extract the first word of "$ac_prog", so it can be a program name with args.
67346 set dummy $ac_prog; ac_word=$2
67347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67348 $as_echo_n "checking for $ac_word... " >&6; }
67349 if ${ac_cv_path_CCACHE+:} false; then :
67350   $as_echo_n "(cached) " >&6
67351 else
67352   case $CCACHE in
67353   [\\/]* | ?:[\\/]*)
67354   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67355   ;;
67356   *)
67357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67358 for as_dir in $PATH
67359 do
67360   IFS=$as_save_IFS
67361   test -z "$as_dir" && as_dir=.
67362     for ac_exec_ext in '' $ac_executable_extensions; do
67363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67364     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67366     break 2
67367   fi
67368 done
67369   done
67370 IFS=$as_save_IFS
67371 
67372   ;;
67373 esac
67374 fi
67375 CCACHE=$ac_cv_path_CCACHE
67376 if test -n "$CCACHE"; then
67377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67378 $as_echo "$CCACHE" >&6; }
67379 else
67380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67381 $as_echo "no" >&6; }
67382 fi
67383 
67384 
67385   test -n "$CCACHE" && break
67386 done
67387 
67388   else
67389     # The variable is set, but is it from the command line or the environment?
67390 
67391     # Try to remove the string !CCACHE! from our list.
67392     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67393     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67394       # If it failed, the variable was not from the command line. Ignore it,
67395       # but warn the user (except for BASH, which is always set by the calling BASH).
67396       if test "xCCACHE" != xBASH; then
67397         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67398 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67399       fi
67400       # Try to locate tool using the code snippet
67401       for ac_prog in ccache
67402 do
67403   # Extract the first word of "$ac_prog", so it can be a program name with args.
67404 set dummy $ac_prog; ac_word=$2
67405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67406 $as_echo_n "checking for $ac_word... " >&6; }
67407 if ${ac_cv_path_CCACHE+:} false; then :
67408   $as_echo_n "(cached) " >&6
67409 else
67410   case $CCACHE in
67411   [\\/]* | ?:[\\/]*)
67412   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67413   ;;
67414   *)
67415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67416 for as_dir in $PATH
67417 do
67418   IFS=$as_save_IFS
67419   test -z "$as_dir" && as_dir=.
67420     for ac_exec_ext in '' $ac_executable_extensions; do
67421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67422     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67424     break 2
67425   fi
67426 done
67427   done
67428 IFS=$as_save_IFS
67429 
67430   ;;
67431 esac
67432 fi
67433 CCACHE=$ac_cv_path_CCACHE
67434 if test -n "$CCACHE"; then
67435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67436 $as_echo "$CCACHE" >&6; }
67437 else
67438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67439 $as_echo "no" >&6; }
67440 fi
67441 
67442 
67443   test -n "$CCACHE" && break
67444 done
67445 
67446     else
67447       # If it succeeded, then it was overridden by the user. We will use it
67448       # for the tool.
67449 
67450       # First remove it from the list of overridden variables, so we can test
67451       # for unknown variables in the end.
67452       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67453 
67454       # Check if we try to supply an empty value
67455       if test "x$CCACHE" = x; then
67456         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67457 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67458         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67459 $as_echo_n "checking for CCACHE... " >&6; }
67460         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67461 $as_echo "disabled" >&6; }
67462       else
67463         # Check if the provided tool contains a complete path.
67464         tool_specified="$CCACHE"
67465         tool_basename="${tool_specified##*/}"
67466         if test "x$tool_basename" = "x$tool_specified"; then
67467           # A command without a complete path is provided, search $PATH.
67468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67469 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67470           # Extract the first word of "$tool_basename", so it can be a program name with args.
67471 set dummy $tool_basename; ac_word=$2
67472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67473 $as_echo_n "checking for $ac_word... " >&6; }
67474 if ${ac_cv_path_CCACHE+:} false; then :
67475   $as_echo_n "(cached) " >&6
67476 else
67477   case $CCACHE in
67478   [\\/]* | ?:[\\/]*)
67479   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67480   ;;
67481   *)
67482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67483 for as_dir in $PATH
67484 do
67485   IFS=$as_save_IFS
67486   test -z "$as_dir" && as_dir=.
67487     for ac_exec_ext in '' $ac_executable_extensions; do
67488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67489     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67491     break 2
67492   fi
67493 done
67494   done
67495 IFS=$as_save_IFS
67496 
67497   ;;
67498 esac
67499 fi
67500 CCACHE=$ac_cv_path_CCACHE
67501 if test -n "$CCACHE"; then
67502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67503 $as_echo "$CCACHE" >&6; }
67504 else
67505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67506 $as_echo "no" >&6; }
67507 fi
67508 
67509 
67510           if test "x$CCACHE" = x; then
67511             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67512           fi
67513         else
67514           # Otherwise we believe it is a complete path. Use it as it is.
67515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67516 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67517           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67518 $as_echo_n "checking for CCACHE... " >&6; }
67519           if test ! -x "$tool_specified"; then
67520             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67521 $as_echo "not found" >&6; }
67522             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67523           fi
67524           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67525 $as_echo "$tool_specified" >&6; }
67526         fi
67527       fi
67528     fi
67529 
67530   fi
67531 
67532 
67533 
67534   if test "x$CCACHE" = x; then
67535     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67536   fi
67537 
67538 
67539       PATH="$OLD_PATH"
67540       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67541       CCACHE_STATUS="Active ($CCACHE_VERSION)"
67542     else
67543       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67544 $as_echo "no" >&6; }
67545       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67546 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67547     fi
67548   elif test "x$enable_ccache" = xno; then
67549     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67550 $as_echo "no, explicitly disabled" >&6; }
67551     CCACHE_STATUS="Disabled"
67552   elif test "x$enable_ccache" = x; then
67553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67554 $as_echo "no" >&6; }
67555   else
67556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67557 $as_echo "unknown" >&6; }
67558     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67559   fi
67560 
67561 
67562 
67563 # Check whether --with-ccache-dir was given.
67564 if test "${with_ccache_dir+set}" = set; then :
67565   withval=$with_ccache_dir;
67566 fi
67567 
67568 
67569   if test "x$with_ccache_dir" != x; then
67570     # When using a non home ccache directory, assume the use is to share ccache files
67571     # with other users. Thus change the umask.
67572     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67573     if test "x$CCACHE" = x; then
67574       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67575 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67576     fi
67577   fi
67578 
67579   if test "x$CCACHE" != x; then
67580 
67581   if test "x$CCACHE" != x; then
67582     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67583       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67584           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67585       if test "x$HAS_BAD_CCACHE" != "x"; then
67586         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67587       fi
67588     fi
67589     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67590       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67591           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67592       if test "x$HAS_BAD_CCACHE" != "x"; then
67593         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67594       fi
67595       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67596 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67597       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67598       PUSHED_FLAGS="$CXXFLAGS"
67599       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67600       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67601 /* end confdefs.h.  */
67602 
67603 int
67604 main ()
67605 {
67606 
67607   ;
67608   return 0;
67609 }
67610 _ACEOF
67611 if ac_fn_cxx_try_compile "$LINENO"; then :
67612   CC_KNOWS_CCACHE_TRICK=yes
67613 else
67614   CC_KNOWS_CCACHE_TRICK=no
67615 fi
67616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67617       CXXFLAGS="$PUSHED_FLAGS"
67618       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67620 $as_echo "yes" >&6; }
67621         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67622 
67623         CCACHE_SLOPPINESS=pch_defines,time_macros
67624       else
67625         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67626 $as_echo "no" >&6; }
67627         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67628       fi
67629     fi
67630 
67631     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67632         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67633 
67634     if test "x$SET_CCACHE_DIR" != x; then
67635       mkdir -p $CCACHE_DIR > /dev/null 2>&1
67636       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67637     fi
67638   fi
67639 
67640   fi
67641 
67642 
67643 ###############################################################################
67644 #
67645 # And now the finish...
67646 #
67647 ###############################################################################
67648 
67649 # Check for some common pitfalls
67650 
67651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67652     file_to_test="$TOPDIR/LICENSE"
67653     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67654       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
67655     fi
67656   fi
67657 
67658 
67659   # Did user specify any unknown variables?
67660 
67661   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67662     # Replace the separating ! with spaces before presenting for end user.
67663     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67664     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67665 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67666   fi
67667 
67668 
67669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67670 $as_echo_n "checking if build directory is on local disk... " >&6; }
67671 
67672   # df -l lists only local disks; if the given directory is not found then
67673   # a non-zero exit code is given
67674   if test "x$DF" = x; then
67675     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67676       # msys does not have df; use Windows "net use" instead.
67677       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67678       if test "x$IS_NETWORK_DISK" = x; then
67679         OUTPUT_DIR_IS_LOCAL="yes"
67680       else
67681         OUTPUT_DIR_IS_LOCAL="no"
67682       fi
67683     else
67684       # No df here, say it's local
67685       OUTPUT_DIR_IS_LOCAL="yes"
67686     fi
67687   else
67688     if $DF -l $OUTPUTDIR > /dev/null 2>&1; then
67689       OUTPUT_DIR_IS_LOCAL="yes"
67690     else
67691       OUTPUT_DIR_IS_LOCAL="no"
67692     fi
67693   fi
67694 
67695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67696 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67697 
67698 
67699 
67700   # Check if the user has any old-style ALT_ variables set.
67701   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67702 
67703   # Before generating output files, test if they exist. If they do, this is a reconfigure.
67704   # Since we can't properly handle the dependencies for this, warn the user about the situation
67705   if test -e $OUTPUTDIR/spec.gmk; then
67706     IS_RECONFIGURE=yes
67707   else
67708     IS_RECONFIGURE=no
67709   fi
67710 
67711 
67712 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67713 
67714 
67715 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67716 
67717   # Keep feature lists sorted and free of duplicates
67718   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67719   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67720   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67721   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67722   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67723   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67724   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67725 
67726   # Validate features
67727   for variant in $JVM_VARIANTS; do
67728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67729 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67730     features_var_name=JVM_FEATURES_$variant
67731     JVM_FEATURES_TO_TEST=${!features_var_name}
67732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67733 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67734     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67735     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67736     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67737     if test "x$INVALID_FEATURES" != x; then
67738       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67739     fi
67740   done
67741 
67742 
67743 # We're messing a bit with internal autoconf variables to put the config.status
67744 # in the output directory instead of the current directory.
67745 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67746 
67747 # Create the actual output files. Now the main work of configure is done.
67748 cat >confcache <<\_ACEOF
67749 # This file is a shell script that caches the results of configure
67750 # tests run on this system so they can be shared between configure
67751 # scripts and configure runs, see configure's option --config-cache.
67752 # It is not useful on other systems.  If it contains results you don't
67753 # want to keep, you may remove or edit it.
67754 #
67755 # config.status only pays attention to the cache file if you give it
67756 # the --recheck option to rerun configure.
67757 #
67758 # `ac_cv_env_foo' variables (set or unset) will be overridden when
67759 # loading this file, other *unset* `ac_cv_foo' will be assigned the
67760 # following values.
67761 
67762 _ACEOF
67763 
67764 # The following way of writing the cache mishandles newlines in values,
67765 # but we know of no workaround that is simple, portable, and efficient.
67766 # So, we kill variables containing newlines.
67767 # Ultrix sh set writes to stderr and can't be redirected directly,
67768 # and sets the high bit in the cache file unless we assign to the vars.
67769 (
67770   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67771     eval ac_val=\$$ac_var
67772     case $ac_val in #(
67773     *${as_nl}*)
67774       case $ac_var in #(
67775       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67776 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67777       esac
67778       case $ac_var in #(
67779       _ | IFS | as_nl) ;; #(
67780       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67781       *) { eval $ac_var=; unset $ac_var;} ;;
67782       esac ;;
67783     esac
67784   done
67785 
67786   (set) 2>&1 |
67787     case $as_nl`(ac_space=' '; set) 2>&1` in #(
67788     *${as_nl}ac_space=\ *)
67789       # `set' does not quote correctly, so add quotes: double-quote
67790       # substitution turns \\\\ into \\, and sed turns \\ into \.
67791       sed -n \
67792         "s/'/'\\\\''/g;
67793           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67794       ;; #(
67795     *)
67796       # `set' quotes correctly as required by POSIX, so do not add quotes.
67797       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67798       ;;
67799     esac |
67800     sort
67801 ) |
67802   sed '
67803      /^ac_cv_env_/b end
67804      t clear
67805      :clear
67806      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67807      t end
67808      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67809      :end' >>confcache
67810 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67811   if test -w "$cache_file"; then
67812     if test "x$cache_file" != "x/dev/null"; then
67813       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67814 $as_echo "$as_me: updating cache $cache_file" >&6;}
67815       if test ! -f "$cache_file" || test -h "$cache_file"; then
67816         cat confcache >"$cache_file"
67817       else
67818         case $cache_file in #(
67819         */* | ?:*)
67820           mv -f confcache "$cache_file"$$ &&
67821           mv -f "$cache_file"$$ "$cache_file" ;; #(
67822         *)
67823           mv -f confcache "$cache_file" ;;
67824         esac
67825       fi
67826     fi
67827   else
67828     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67829 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67830   fi
67831 fi
67832 rm -f confcache
67833 
67834 test "x$prefix" = xNONE && prefix=$ac_default_prefix
67835 # Let make expand exec_prefix.
67836 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67837 
67838 # Transform confdefs.h into DEFS.
67839 # Protect against shell expansion while executing Makefile rules.
67840 # Protect against Makefile macro expansion.
67841 #
67842 # If the first sed substitution is executed (which looks for macros that
67843 # take arguments), then branch to the quote section.  Otherwise,
67844 # look for a macro that doesn't take arguments.
67845 ac_script='
67846 :mline
67847 /\\$/{
67848  N
67849  s,\\\n,,
67850  b mline
67851 }
67852 t clear
67853 :clear
67854 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
67855 t quote
67856 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
67857 t quote
67858 b any
67859 :quote
67860 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67861 s/\[/\\&/g
67862 s/\]/\\&/g
67863 s/\$/$$/g
67864 H
67865 :any
67866 ${
67867         g
67868         s/^\n//
67869         s/\n/ /g
67870         p
67871 }
67872 '
67873 DEFS=`sed -n "$ac_script" confdefs.h`
67874 
67875 
67876 ac_libobjs=
67877 ac_ltlibobjs=
67878 U=
67879 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67880   # 1. Remove the extension, and $U if already installed.
67881   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67882   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67883   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67884   #    will be set to the directory where LIBOBJS objects are built.
67885   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67886   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67887 done
67888 LIBOBJS=$ac_libobjs
67889 
67890 LTLIBOBJS=$ac_ltlibobjs
67891 
67892 
67893 
67894 : "${CONFIG_STATUS=./config.status}"
67895 ac_write_fail=0
67896 ac_clean_files_save=$ac_clean_files
67897 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67898 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67899 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67900 as_write_fail=0
67901 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67902 #! $SHELL
67903 # Generated by $as_me.
67904 # Run this file to recreate the current configuration.
67905 # Compiler output produced by configure, useful for debugging
67906 # configure, is in config.log if it exists.
67907 
67908 debug=false
67909 ac_cs_recheck=false
67910 ac_cs_silent=false
67911 
67912 SHELL=\${CONFIG_SHELL-$SHELL}
67913 export SHELL
67914 _ASEOF
67915 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67916 ## -------------------- ##
67917 ## M4sh Initialization. ##
67918 ## -------------------- ##
67919 
67920 # Be more Bourne compatible
67921 DUALCASE=1; export DUALCASE # for MKS sh
67922 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67923   emulate sh
67924   NULLCMD=:
67925   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67926   # is contrary to our usage.  Disable this feature.
67927   alias -g '${1+"$@"}'='"$@"'
67928   setopt NO_GLOB_SUBST
67929 else
67930   case `(set -o) 2>/dev/null` in #(
67931   *posix*) :
67932     set -o posix ;; #(
67933   *) :
67934      ;;
67935 esac
67936 fi
67937 
67938 
67939 as_nl='
67940 '
67941 export as_nl
67942 # Printing a long string crashes Solaris 7 /usr/bin/printf.
67943 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67944 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67945 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67946 # Prefer a ksh shell builtin over an external printf program on Solaris,
67947 # but without wasting forks for bash or zsh.
67948 if test -z "$BASH_VERSION$ZSH_VERSION" \
67949     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67950   as_echo='print -r --'
67951   as_echo_n='print -rn --'
67952 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67953   as_echo='printf %s\n'
67954   as_echo_n='printf %s'
67955 else
67956   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67957     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67958     as_echo_n='/usr/ucb/echo -n'
67959   else
67960     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67961     as_echo_n_body='eval
67962       arg=$1;
67963       case $arg in #(
67964       *"$as_nl"*)
67965         expr "X$arg" : "X\\(.*\\)$as_nl";
67966         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67967       esac;
67968       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67969     '
67970     export as_echo_n_body
67971     as_echo_n='sh -c $as_echo_n_body as_echo'
67972   fi
67973   export as_echo_body
67974   as_echo='sh -c $as_echo_body as_echo'
67975 fi
67976 
67977 # The user is always right.
67978 if test "${PATH_SEPARATOR+set}" != set; then
67979   PATH_SEPARATOR=:
67980   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67981     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67982       PATH_SEPARATOR=';'
67983   }
67984 fi
67985 
67986 
67987 # IFS
67988 # We need space, tab and new line, in precisely that order.  Quoting is
67989 # there to prevent editors from complaining about space-tab.
67990 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
67991 # splitting by setting IFS to empty value.)
67992 IFS=" ""        $as_nl"
67993 
67994 # Find who we are.  Look in the path if we contain no directory separator.
67995 as_myself=
67996 case $0 in #((
67997   *[\\/]* ) as_myself=$0 ;;
67998   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67999 for as_dir in $PATH
68000 do
68001   IFS=$as_save_IFS
68002   test -z "$as_dir" && as_dir=.
68003     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
68004   done
68005 IFS=$as_save_IFS
68006 
68007      ;;
68008 esac
68009 # We did not find ourselves, most probably we were run as `sh COMMAND'
68010 # in which case we are not to be found in the path.
68011 if test "x$as_myself" = x; then
68012   as_myself=$0
68013 fi
68014 if test ! -f "$as_myself"; then
68015   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
68016   exit 1
68017 fi
68018 
68019 # Unset variables that we do not need and which cause bugs (e.g. in
68020 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
68021 # suppresses any "Segmentation fault" message there.  '((' could
68022 # trigger a bug in pdksh 5.2.14.
68023 for as_var in BASH_ENV ENV MAIL MAILPATH
68024 do eval test x\${$as_var+set} = xset \
68025   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68026 done
68027 PS1='$ '
68028 PS2='> '
68029 PS4='+ '
68030 
68031 # NLS nuisances.
68032 LC_ALL=C
68033 export LC_ALL
68034 LANGUAGE=C
68035 export LANGUAGE
68036 
68037 # CDPATH.
68038 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68039 
68040 
68041 # as_fn_error STATUS ERROR [LINENO LOG_FD]
68042 # ----------------------------------------
68043 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68044 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68045 # script with STATUS, using 1 if that was 0.
68046 as_fn_error ()
68047 {
68048   as_status=$1; test $as_status -eq 0 && as_status=1
68049   if test "$4"; then
68050     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68051     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68052   fi
68053   $as_echo "$as_me: error: $2" >&2
68054   as_fn_exit $as_status
68055 } # as_fn_error
68056 
68057 
68058 # as_fn_set_status STATUS
68059 # -----------------------
68060 # Set $? to STATUS, without forking.
68061 as_fn_set_status ()
68062 {
68063   return $1
68064 } # as_fn_set_status
68065 
68066 # as_fn_exit STATUS
68067 # -----------------
68068 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68069 as_fn_exit ()
68070 {
68071   set +e
68072   as_fn_set_status $1
68073   exit $1
68074 } # as_fn_exit
68075 
68076 # as_fn_unset VAR
68077 # ---------------
68078 # Portably unset VAR.
68079 as_fn_unset ()
68080 {
68081   { eval $1=; unset $1;}
68082 }
68083 as_unset=as_fn_unset
68084 # as_fn_append VAR VALUE
68085 # ----------------------
68086 # Append the text in VALUE to the end of the definition contained in VAR. Take
68087 # advantage of any shell optimizations that allow amortized linear growth over
68088 # repeated appends, instead of the typical quadratic growth present in naive
68089 # implementations.
68090 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68091   eval 'as_fn_append ()
68092   {
68093     eval $1+=\$2
68094   }'
68095 else
68096   as_fn_append ()
68097   {
68098     eval $1=\$$1\$2
68099   }
68100 fi # as_fn_append
68101 
68102 # as_fn_arith ARG...
68103 # ------------------
68104 # Perform arithmetic evaluation on the ARGs, and store the result in the
68105 # global $as_val. Take advantage of shells that can avoid forks. The arguments
68106 # must be portable across $(()) and expr.
68107 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68108   eval 'as_fn_arith ()
68109   {
68110     as_val=$(( $* ))
68111   }'
68112 else
68113   as_fn_arith ()
68114   {
68115     as_val=`expr "$@" || test $? -eq 1`
68116   }
68117 fi # as_fn_arith
68118 
68119 
68120 if expr a : '\(a\)' >/dev/null 2>&1 &&
68121    test "X`expr 00001 : '.*\(...\)'`" = X001; then
68122   as_expr=expr
68123 else
68124   as_expr=false
68125 fi
68126 
68127 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68128   as_basename=basename
68129 else
68130   as_basename=false
68131 fi
68132 
68133 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68134   as_dirname=dirname
68135 else
68136   as_dirname=false
68137 fi
68138 
68139 as_me=`$as_basename -- "$0" ||
68140 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68141          X"$0" : 'X\(//\)$' \| \
68142          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68143 $as_echo X/"$0" |
68144     sed '/^.*\/\([^/][^/]*\)\/*$/{
68145             s//\1/
68146             q
68147           }
68148           /^X\/\(\/\/\)$/{
68149             s//\1/
68150             q
68151           }
68152           /^X\/\(\/\).*/{
68153             s//\1/
68154             q
68155           }
68156           s/.*/./; q'`
68157 
68158 # Avoid depending upon Character Ranges.
68159 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68160 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68161 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68162 as_cr_digits='0123456789'
68163 as_cr_alnum=$as_cr_Letters$as_cr_digits
68164 
68165 ECHO_C= ECHO_N= ECHO_T=
68166 case `echo -n x` in #(((((
68167 -n*)
68168   case `echo 'xy\c'` in
68169   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
68170   xy)  ECHO_C='\c';;
68171   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68172        ECHO_T=' ';;
68173   esac;;
68174 *)
68175   ECHO_N='-n';;
68176 esac
68177 
68178 rm -f conf$$ conf$$.exe conf$$.file
68179 if test -d conf$$.dir; then
68180   rm -f conf$$.dir/conf$$.file
68181 else
68182   rm -f conf$$.dir
68183   mkdir conf$$.dir 2>/dev/null
68184 fi
68185 if (echo >conf$$.file) 2>/dev/null; then
68186   if ln -s conf$$.file conf$$ 2>/dev/null; then
68187     as_ln_s='ln -s'
68188     # ... but there are two gotchas:
68189     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68190     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68191     # In both cases, we have to default to `cp -pR'.
68192     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68193       as_ln_s='cp -pR'
68194   elif ln conf$$.file conf$$ 2>/dev/null; then
68195     as_ln_s=ln
68196   else
68197     as_ln_s='cp -pR'
68198   fi
68199 else
68200   as_ln_s='cp -pR'
68201 fi
68202 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68203 rmdir conf$$.dir 2>/dev/null
68204 
68205 
68206 # as_fn_mkdir_p
68207 # -------------
68208 # Create "$as_dir" as a directory, including parents if necessary.
68209 as_fn_mkdir_p ()
68210 {
68211 
68212   case $as_dir in #(
68213   -*) as_dir=./$as_dir;;
68214   esac
68215   test -d "$as_dir" || eval $as_mkdir_p || {
68216     as_dirs=
68217     while :; do
68218       case $as_dir in #(
68219       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68220       *) as_qdir=$as_dir;;
68221       esac
68222       as_dirs="'$as_qdir' $as_dirs"
68223       as_dir=`$as_dirname -- "$as_dir" ||
68224 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68225          X"$as_dir" : 'X\(//\)[^/]' \| \
68226          X"$as_dir" : 'X\(//\)$' \| \
68227          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68228 $as_echo X"$as_dir" |
68229     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68230             s//\1/
68231             q
68232           }
68233           /^X\(\/\/\)[^/].*/{
68234             s//\1/
68235             q
68236           }
68237           /^X\(\/\/\)$/{
68238             s//\1/
68239             q
68240           }
68241           /^X\(\/\).*/{
68242             s//\1/
68243             q
68244           }
68245           s/.*/./; q'`
68246       test -d "$as_dir" && break
68247     done
68248     test -z "$as_dirs" || eval "mkdir $as_dirs"
68249   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68250 
68251 
68252 } # as_fn_mkdir_p
68253 if mkdir -p . 2>/dev/null; then
68254   as_mkdir_p='mkdir -p "$as_dir"'
68255 else
68256   test -d ./-p && rmdir ./-p
68257   as_mkdir_p=false
68258 fi
68259 
68260 
68261 # as_fn_executable_p FILE
68262 # -----------------------
68263 # Test if FILE is an executable regular file.
68264 as_fn_executable_p ()
68265 {
68266   test -f "$1" && test -x "$1"
68267 } # as_fn_executable_p
68268 as_test_x='test -x'
68269 as_executable_p=as_fn_executable_p
68270 
68271 # Sed expression to map a string onto a valid CPP name.
68272 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68273 
68274 # Sed expression to map a string onto a valid variable name.
68275 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68276 
68277 
68278 exec 6>&1
68279 ## ----------------------------------- ##
68280 ## Main body of $CONFIG_STATUS script. ##
68281 ## ----------------------------------- ##
68282 _ASEOF
68283 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68284 
68285 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68286 # Save the log message, to keep $0 and so on meaningful, and to
68287 # report actual input values of CONFIG_FILES etc. instead of their
68288 # values after options handling.
68289 ac_log="
68290 This file was extended by OpenJDK $as_me jdk9, which was
68291 generated by GNU Autoconf 2.69.  Invocation command line was
68292 
68293   CONFIG_FILES    = $CONFIG_FILES
68294   CONFIG_HEADERS  = $CONFIG_HEADERS
68295   CONFIG_LINKS    = $CONFIG_LINKS
68296   CONFIG_COMMANDS = $CONFIG_COMMANDS
68297   $ $0 $@
68298 
68299 on `(hostname || uname -n) 2>/dev/null | sed 1q`
68300 "
68301 
68302 _ACEOF
68303 
68304 case $ac_config_files in *"
68305 "*) set x $ac_config_files; shift; ac_config_files=$*;;
68306 esac
68307 
68308 
68309 
68310 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68311 # Files that config.status was made for.
68312 config_files="$ac_config_files"
68313 
68314 _ACEOF
68315 
68316 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68317 ac_cs_usage="\
68318 \`$as_me' instantiates files and other configuration actions
68319 from templates according to the current configuration.  Unless the files
68320 and actions are specified as TAGs, all are instantiated by default.
68321 
68322 Usage: $0 [OPTION]... [TAG]...
68323 
68324   -h, --help       print this help, then exit
68325   -V, --version    print version number and configuration settings, then exit
68326       --config     print configuration, then exit
68327   -q, --quiet, --silent
68328                    do not print progress messages
68329   -d, --debug      don't remove temporary files
68330       --recheck    update $as_me by reconfiguring in the same conditions
68331       --file=FILE[:TEMPLATE]
68332                    instantiate the configuration file FILE
68333 
68334 Configuration files:
68335 $config_files
68336 
68337 Report bugs to <build-dev@openjdk.java.net>.
68338 OpenJDK home page: <http://openjdk.java.net>."
68339 
68340 _ACEOF
68341 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68342 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68343 ac_cs_version="\\
68344 OpenJDK config.status jdk9
68345 configured by $0, generated by GNU Autoconf 2.69,
68346   with options \\"\$ac_cs_config\\"
68347 
68348 Copyright (C) 2012 Free Software Foundation, Inc.
68349 This config.status script is free software; the Free Software Foundation
68350 gives unlimited permission to copy, distribute and modify it."
68351 
68352 ac_pwd='$ac_pwd'
68353 srcdir='$srcdir'
68354 AWK='$AWK'
68355 test -n "\$AWK" || AWK=awk
68356 _ACEOF
68357 
68358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68359 # The default lists apply if the user does not specify any file.
68360 ac_need_defaults=:
68361 while test $# != 0
68362 do
68363   case $1 in
68364   --*=?*)
68365     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68366     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68367     ac_shift=:
68368     ;;
68369   --*=)
68370     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68371     ac_optarg=
68372     ac_shift=:
68373     ;;
68374   *)
68375     ac_option=$1
68376     ac_optarg=$2
68377     ac_shift=shift
68378     ;;
68379   esac
68380 
68381   case $ac_option in
68382   # Handling of the options.
68383   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68384     ac_cs_recheck=: ;;
68385   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68386     $as_echo "$ac_cs_version"; exit ;;
68387   --config | --confi | --conf | --con | --co | --c )
68388     $as_echo "$ac_cs_config"; exit ;;
68389   --debug | --debu | --deb | --de | --d | -d )
68390     debug=: ;;
68391   --file | --fil | --fi | --f )
68392     $ac_shift
68393     case $ac_optarg in
68394     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68395     '') as_fn_error $? "missing file argument" ;;
68396     esac
68397     as_fn_append CONFIG_FILES " '$ac_optarg'"
68398     ac_need_defaults=false;;
68399   --he | --h |  --help | --hel | -h )
68400     $as_echo "$ac_cs_usage"; exit ;;
68401   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68402   | -silent | --silent | --silen | --sile | --sil | --si | --s)
68403     ac_cs_silent=: ;;
68404 
68405   # This is an error.
68406   -*) as_fn_error $? "unrecognized option: \`$1'
68407 Try \`$0 --help' for more information." ;;
68408 
68409   *) as_fn_append ac_config_targets " $1"
68410      ac_need_defaults=false ;;
68411 
68412   esac
68413   shift
68414 done
68415 
68416 ac_configure_extra_args=
68417 
68418 if $ac_cs_silent; then
68419   exec 6>/dev/null
68420   ac_configure_extra_args="$ac_configure_extra_args --silent"
68421 fi
68422 
68423 _ACEOF
68424 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68425 if \$ac_cs_recheck; then
68426   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68427   shift
68428   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68429   CONFIG_SHELL='$SHELL'
68430   export CONFIG_SHELL
68431   exec "\$@"
68432 fi
68433 
68434 _ACEOF
68435 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68436 exec 5>>config.log
68437 {
68438   echo
68439   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68440 ## Running $as_me. ##
68441 _ASBOX
68442   $as_echo "$ac_log"
68443 } >&5
68444 
68445 _ACEOF
68446 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68447 _ACEOF
68448 
68449 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68450 
68451 # Handling of arguments.
68452 for ac_config_target in $ac_config_targets
68453 do
68454   case $ac_config_target in
68455     "$OUTPUTDIR/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68456     "$OUTPUTDIR/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68457     "$OUTPUTDIR/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68458     "$OUTPUTDIR/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68459     "$OUTPUTDIR/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68460 
68461   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68462   esac
68463 done
68464 
68465 
68466 # If the user did not use the arguments to specify the items to instantiate,
68467 # then the envvar interface is used.  Set only those that are not.
68468 # We use the long form for the default assignment because of an extremely
68469 # bizarre bug on SunOS 4.1.3.
68470 if $ac_need_defaults; then
68471   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68472 fi
68473 
68474 # Have a temporary directory for convenience.  Make it in the build tree
68475 # simply because there is no reason against having it here, and in addition,
68476 # creating and moving files from /tmp can sometimes cause problems.
68477 # Hook for its removal unless debugging.
68478 # Note that there is a small window in which the directory will not be cleaned:
68479 # after its creation but before its name has been assigned to `$tmp'.
68480 $debug ||
68481 {
68482   tmp= ac_tmp=
68483   trap 'exit_status=$?
68484   : "${ac_tmp:=$tmp}"
68485   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68486 ' 0
68487   trap 'as_fn_exit 1' 1 2 13 15
68488 }
68489 # Create a (secure) tmp directory for tmp files.
68490 
68491 {
68492   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68493   test -d "$tmp"
68494 }  ||
68495 {
68496   tmp=./conf$$-$RANDOM
68497   (umask 077 && mkdir "$tmp")
68498 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68499 ac_tmp=$tmp
68500 
68501 # Set up the scripts for CONFIG_FILES section.
68502 # No need to generate them if there are no CONFIG_FILES.
68503 # This happens for instance with `./config.status config.h'.
68504 if test -n "$CONFIG_FILES"; then
68505 
68506 
68507 ac_cr=`echo X | tr X '\015'`
68508 # On cygwin, bash can eat \r inside `` if the user requested igncr.
68509 # But we know of no other shell where ac_cr would be empty at this
68510 # point, so we can use a bashism as a fallback.
68511 if test "x$ac_cr" = x; then
68512   eval ac_cr=\$\'\\r\'
68513 fi
68514 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68515 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68516   ac_cs_awk_cr='\\r'
68517 else
68518   ac_cs_awk_cr=$ac_cr
68519 fi
68520 
68521 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68522 _ACEOF
68523 
68524 
68525 {
68526   echo "cat >conf$$subs.awk <<_ACEOF" &&
68527   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68528   echo "_ACEOF"
68529 } >conf$$subs.sh ||
68530   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68531 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68532 ac_delim='%!_!# '
68533 for ac_last_try in false false false false false :; do
68534   . ./conf$$subs.sh ||
68535     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68536 
68537   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68538   if test $ac_delim_n = $ac_delim_num; then
68539     break
68540   elif $ac_last_try; then
68541     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68542   else
68543     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68544   fi
68545 done
68546 rm -f conf$$subs.sh
68547 
68548 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68549 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68550 _ACEOF
68551 sed -n '
68552 h
68553 s/^/S["/; s/!.*/"]=/
68554 p
68555 g
68556 s/^[^!]*!//
68557 :repl
68558 t repl
68559 s/'"$ac_delim"'$//
68560 t delim
68561 :nl
68562 h
68563 s/\(.\{148\}\)..*/\1/
68564 t more1
68565 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68566 p
68567 n
68568 b repl
68569 :more1
68570 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68571 p
68572 g
68573 s/.\{148\}//
68574 t nl
68575 :delim
68576 h
68577 s/\(.\{148\}\)..*/\1/
68578 t more2
68579 s/["\\]/\\&/g; s/^/"/; s/$/"/
68580 p
68581 b
68582 :more2
68583 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68584 p
68585 g
68586 s/.\{148\}//
68587 t delim
68588 ' <conf$$subs.awk | sed '
68589 /^[^""]/{
68590   N
68591   s/\n//
68592 }
68593 ' >>$CONFIG_STATUS || ac_write_fail=1
68594 rm -f conf$$subs.awk
68595 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68596 _ACAWK
68597 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68598   for (key in S) S_is_set[key] = 1
68599   FS = ""
68600 
68601 }
68602 {
68603   line = $ 0
68604   nfields = split(line, field, "@")
68605   substed = 0
68606   len = length(field[1])
68607   for (i = 2; i < nfields; i++) {
68608     key = field[i]
68609     keylen = length(key)
68610     if (S_is_set[key]) {
68611       value = S[key]
68612       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68613       len += length(value) + length(field[++i])
68614       substed = 1
68615     } else
68616       len += 1 + keylen
68617   }
68618 
68619   print line
68620 }
68621 
68622 _ACAWK
68623 _ACEOF
68624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68625 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68626   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68627 else
68628   cat
68629 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68630   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68631 _ACEOF
68632 
68633 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68634 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68635 # trailing colons and then remove the whole line if VPATH becomes empty
68636 # (actually we leave an empty line to preserve line numbers).
68637 if test "x$srcdir" = x.; then
68638   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
68639 h
68640 s///
68641 s/^/:/
68642 s/[      ]*$/:/
68643 s/:\$(srcdir):/:/g
68644 s/:\${srcdir}:/:/g
68645 s/:@srcdir@:/:/g
68646 s/^:*//
68647 s/:*$//
68648 x
68649 s/\(=[   ]*\).*/\1/
68650 G
68651 s/\n//
68652 s/^[^=]*=[       ]*$//
68653 }'
68654 fi
68655 
68656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68657 fi # test -n "$CONFIG_FILES"
68658 
68659 
68660 eval set X "  :F $CONFIG_FILES      "
68661 shift
68662 for ac_tag
68663 do
68664   case $ac_tag in
68665   :[FHLC]) ac_mode=$ac_tag; continue;;
68666   esac
68667   case $ac_mode$ac_tag in
68668   :[FHL]*:*);;
68669   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68670   :[FH]-) ac_tag=-:-;;
68671   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68672   esac
68673   ac_save_IFS=$IFS
68674   IFS=:
68675   set x $ac_tag
68676   IFS=$ac_save_IFS
68677   shift
68678   ac_file=$1
68679   shift
68680 
68681   case $ac_mode in
68682   :L) ac_source=$1;;
68683   :[FH])
68684     ac_file_inputs=
68685     for ac_f
68686     do
68687       case $ac_f in
68688       -) ac_f="$ac_tmp/stdin";;
68689       *) # Look for the file first in the build tree, then in the source tree
68690          # (if the path is not absolute).  The absolute path cannot be DOS-style,
68691          # because $ac_f cannot contain `:'.
68692          test -f "$ac_f" ||
68693            case $ac_f in
68694            [\\/$]*) false;;
68695            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68696            esac ||
68697            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68698       esac
68699       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68700       as_fn_append ac_file_inputs " '$ac_f'"
68701     done
68702 
68703     # Let's still pretend it is `configure' which instantiates (i.e., don't
68704     # use $as_me), people would be surprised to read:
68705     #    /* config.h.  Generated by config.status.  */
68706     configure_input='Generated from '`
68707           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68708         `' by configure.'
68709     if test x"$ac_file" != x-; then
68710       configure_input="$ac_file.  $configure_input"
68711       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68712 $as_echo "$as_me: creating $ac_file" >&6;}
68713     fi
68714     # Neutralize special characters interpreted by sed in replacement strings.
68715     case $configure_input in #(
68716     *\&* | *\|* | *\\* )
68717        ac_sed_conf_input=`$as_echo "$configure_input" |
68718        sed 's/[\\\\&|]/\\\\&/g'`;; #(
68719     *) ac_sed_conf_input=$configure_input;;
68720     esac
68721 
68722     case $ac_tag in
68723     *:-:* | *:-) cat >"$ac_tmp/stdin" \
68724       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68725     esac
68726     ;;
68727   esac
68728 
68729   ac_dir=`$as_dirname -- "$ac_file" ||
68730 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68731          X"$ac_file" : 'X\(//\)[^/]' \| \
68732          X"$ac_file" : 'X\(//\)$' \| \
68733          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68734 $as_echo X"$ac_file" |
68735     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68736             s//\1/
68737             q
68738           }
68739           /^X\(\/\/\)[^/].*/{
68740             s//\1/
68741             q
68742           }
68743           /^X\(\/\/\)$/{
68744             s//\1/
68745             q
68746           }
68747           /^X\(\/\).*/{
68748             s//\1/
68749             q
68750           }
68751           s/.*/./; q'`
68752   as_dir="$ac_dir"; as_fn_mkdir_p
68753   ac_builddir=.
68754 
68755 case "$ac_dir" in
68756 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68757 *)
68758   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68759   # A ".." for each directory in $ac_dir_suffix.
68760   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68761   case $ac_top_builddir_sub in
68762   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68763   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68764   esac ;;
68765 esac
68766 ac_abs_top_builddir=$ac_pwd
68767 ac_abs_builddir=$ac_pwd$ac_dir_suffix
68768 # for backward compatibility:
68769 ac_top_builddir=$ac_top_build_prefix
68770 
68771 case $srcdir in
68772   .)  # We are building in place.
68773     ac_srcdir=.
68774     ac_top_srcdir=$ac_top_builddir_sub
68775     ac_abs_top_srcdir=$ac_pwd ;;
68776   [\\/]* | ?:[\\/]* )  # Absolute name.
68777     ac_srcdir=$srcdir$ac_dir_suffix;
68778     ac_top_srcdir=$srcdir
68779     ac_abs_top_srcdir=$srcdir ;;
68780   *) # Relative name.
68781     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68782     ac_top_srcdir=$ac_top_build_prefix$srcdir
68783     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68784 esac
68785 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68786 
68787 
68788   case $ac_mode in
68789   :F)
68790   #
68791   # CONFIG_FILE
68792   #
68793 
68794 _ACEOF
68795 
68796 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68797 # If the template does not know about datarootdir, expand it.
68798 # FIXME: This hack should be removed a few years after 2.60.
68799 ac_datarootdir_hack=; ac_datarootdir_seen=
68800 ac_sed_dataroot='
68801 /datarootdir/ {
68802   p
68803   q
68804 }
68805 /@datadir@/p
68806 /@docdir@/p
68807 /@infodir@/p
68808 /@localedir@/p
68809 /@mandir@/p'
68810 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68811 *datarootdir*) ac_datarootdir_seen=yes;;
68812 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68813   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68814 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68815 _ACEOF
68816 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68817   ac_datarootdir_hack='
68818   s&@datadir@&$datadir&g
68819   s&@docdir@&$docdir&g
68820   s&@infodir@&$infodir&g
68821   s&@localedir@&$localedir&g
68822   s&@mandir@&$mandir&g
68823   s&\\\${datarootdir}&$datarootdir&g' ;;
68824 esac
68825 _ACEOF
68826 
68827 # Neutralize VPATH when `$srcdir' = `.'.
68828 # Shell code in configure.ac might set extrasub.
68829 # FIXME: do we really want to maintain this feature?
68830 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68831 ac_sed_extra="$ac_vpsub
68832 $extrasub
68833 _ACEOF
68834 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68835 :t
68836 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68837 s|@configure_input@|$ac_sed_conf_input|;t t
68838 s&@top_builddir@&$ac_top_builddir_sub&;t t
68839 s&@top_build_prefix@&$ac_top_build_prefix&;t t
68840 s&@srcdir@&$ac_srcdir&;t t
68841 s&@abs_srcdir@&$ac_abs_srcdir&;t t
68842 s&@top_srcdir@&$ac_top_srcdir&;t t
68843 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68844 s&@builddir@&$ac_builddir&;t t
68845 s&@abs_builddir@&$ac_abs_builddir&;t t
68846 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68847 $ac_datarootdir_hack
68848 "
68849 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68850   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68851 
68852 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68853   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68854   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
68855       "$ac_tmp/out"`; test -z "$ac_out"; } &&
68856   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68857 which seems to be undefined.  Please make sure it is defined" >&5
68858 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68859 which seems to be undefined.  Please make sure it is defined" >&2;}
68860 
68861   rm -f "$ac_tmp/stdin"
68862   case $ac_file in
68863   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68864   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68865   esac \
68866   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68867  ;;
68868 
68869 
68870 
68871   esac
68872 
68873 done # for ac_tag
68874 
68875 
68876 as_fn_exit 0
68877 _ACEOF
68878 ac_clean_files=$ac_clean_files_save
68879 
68880 test $ac_write_fail = 0 ||
68881   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68882 
68883 
68884 # configure is writing to config.log, and then calls config.status.
68885 # config.status does its own redirection, appending to config.log.
68886 # Unfortunately, on DOS this fails, as config.log is still kept open
68887 # by configure, so config.status won't be able to write to it; its
68888 # output is simply discarded.  So we exec the FD to /dev/null,
68889 # effectively closing config.log, so it can be properly (re)opened and
68890 # appended to by config.status.  When coming back to configure, we
68891 # need to make the FD available again.
68892 if test "$no_create" != yes; then
68893   ac_cs_success=:
68894   ac_config_status_args=
68895   test "$silent" = yes &&
68896     ac_config_status_args="$ac_config_status_args --quiet"
68897   exec 5>/dev/null
68898   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68899   exec 5>>config.log
68900   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68901   # would make configure fail if this is the last instruction.
68902   $ac_cs_success || as_fn_exit 1
68903 fi
68904 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68905   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68906 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68907 fi
68908 
68909 
68910 # After AC_OUTPUT, we need to do final work
68911 
68912 
68913   # Try to move config.log (generated by autoconf) to the configure-support directory.
68914   if test -e ./config.log; then
68915     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68916   fi
68917 
68918   # Rotate our log file (configure.log)
68919   if test -e "$OUTPUTDIR/configure.log.old"; then
68920     $RM -f "$OUTPUTDIR/configure.log.old"
68921   fi
68922   if test -e "$OUTPUTDIR/configure.log"; then
68923     $MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
68924   fi
68925 
68926   # Move configure.log from current directory to the build output root
68927   if test -e ./configure.log; then
68928     $MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
68929   fi
68930 
68931   # Make the compare script executable
68932   $CHMOD +x $OUTPUTDIR/compare.sh
68933 
68934 
68935 # Finally output some useful information to the user
68936 
68937   # Finally output some useful information to the user
68938 
68939   printf "\n"
68940   printf "====================================================\n"
68941   if test "x$no_create" != "xyes"; then
68942     if test "x$IS_RECONFIGURE" != "xyes"; then
68943       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
68944     else
68945       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
68946     fi
68947   else
68948     if test "x$IS_RECONFIGURE" != "xyes"; then
68949       printf "A configuration has been successfully checked but not created\n"
68950     else
68951       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
68952     fi
68953   fi
68954   if test "x$CONFIGURE_COMMAND_LINE" != x; then
68955     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68956   else
68957     printf "using default settings.\n"
68958   fi
68959 
68960   printf "\n"
68961   printf "Configuration summary:\n"
68962   printf "* Debug level:    $DEBUG_LEVEL\n"
68963   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68964   printf "* JDK variant:    $JDK_VARIANT\n"
68965   printf "* JVM variants:   $JVM_VARIANTS\n"
68966   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68967   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68968 
68969   printf "\n"
68970   printf "Tools summary:\n"
68971   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68972     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68973   fi
68974   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68975   if test "x$TOOLCHAIN_VERSION" != "x"; then
68976     print_version=" $TOOLCHAIN_VERSION"
68977   fi
68978   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68979   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68980   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68981 
68982   printf "\n"
68983   printf "Build performance summary:\n"
68984   printf "* Cores to use:   $JOBS\n"
68985   printf "* Memory limit:   $MEMORY_SIZE MB\n"
68986   if test "x$CCACHE_STATUS" != "x"; then
68987     printf "* ccache status:  $CCACHE_STATUS\n"
68988   fi
68989   printf "\n"
68990 
68991   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68992     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68993     printf "will result in longer build times.\n"
68994     printf "\n"
68995   fi
68996 
68997   if test "x$FOUND_ALT_VARIABLES" != "x"; then
68998     printf "WARNING: You have old-style ALT_ environment variables set.\n"
68999     printf "These are not respected, and will be ignored. It is recommended\n"
69000     printf "that you clean your environment. The following variables are set:\n"
69001     printf "$FOUND_ALT_VARIABLES\n"
69002     printf "\n"
69003   fi
69004 
69005   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
69006     printf "WARNING: Your build output directory is not on a local disk.\n"
69007     printf "This will severely degrade build performance!\n"
69008     printf "It is recommended that you create an output directory on a local disk,\n"
69009     printf "and run the configure script again from that directory.\n"
69010     printf "\n"
69011   fi
69012 
69013   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
69014     printf "WARNING: The result of this configuration has overridden an older\n"
69015     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
69016     printf "proper build. Failure to do so might result in strange build problems.\n"
69017     printf "\n"
69018   fi
69019 
69020   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
69021     printf "WARNING: The result of this configuration was not saved.\n"
69022     printf "You should run without '--no-create | -n' to create the configuration.\n"
69023     printf "\n"
69024   fi
69025 
69026 
69027 
69028   # Locate config.log.
69029   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69030     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69031   elif test -e "./config.log"; then
69032     CONFIG_LOG_PATH="."
69033   fi
69034 
69035   if test -e "$CONFIG_LOG_PATH/config.log"; then
69036     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69037     if test $? -eq 0; then
69038       printf "The following warnings were produced. Repeated here for convenience:\n"
69039       # We must quote sed expression (using []) to stop m4 from eating the [].
69040       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69041       printf "\n"
69042     fi
69043   fi
69044