generated-configure.sh revision 1474:76f24d2c01ed
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
24DUALCASE=1; export DUALCASE # for MKS sh
25if 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
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_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.
51if 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 --'
55elif (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'
58else
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'
78fi
79
80# The user is always right.
81if 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  }
87fi
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.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
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
108IFS=$as_save_IFS
109
110     ;;
111esac
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.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
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.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export 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.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $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
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if 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
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -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
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
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
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
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
242fi; }
243IFS=$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.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $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
265exit 255
266fi
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
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_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.
314as_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.
324as_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.
372as_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.
382if (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  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # 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.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # 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.
417as_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
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_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.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_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
509ECHO_C= ECHO_N= ECHO_T=
510case `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';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (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
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_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.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 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.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_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
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687COMPILER_SUPPORTS_TARGET_BITS_FLAG
688ZERO_ARCHFLAG
689LDFLAGS_TESTEXE_SUFFIX
690LDFLAGS_TESTLIB_SUFFIX
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694LDFLAGS_JDKEXE_SUFFIX
695LDFLAGS_JDKLIB_SUFFIX
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707LEGACY_EXTRA_LDFLAGS
708LEGACY_EXTRA_CXXFLAGS
709LEGACY_EXTRA_CFLAGS
710CXX_O_FLAG_NONE
711CXX_O_FLAG_DEBUG
712CXX_O_FLAG_NORM
713CXX_O_FLAG_HI
714CXX_O_FLAG_HIGHEST
715C_O_FLAG_NONE
716C_O_FLAG_DEBUG
717C_O_FLAG_NORM
718C_O_FLAG_HI
719C_O_FLAG_HIGHEST
720CXXFLAGS_DEBUG_OPTIONS
721CFLAGS_DEBUG_OPTIONS
722CXXFLAGS_DEBUG_SYMBOLS
723CFLAGS_DEBUG_SYMBOLS
724CXX_FLAG_DEPS
725C_FLAG_DEPS
726SET_SHARED_LIBRARY_MAPFILE
727SET_SHARED_LIBRARY_NAME
728SET_SHARED_LIBRARY_ORIGIN
729SET_EXECUTABLE_ORIGIN
730SHARED_LIBRARY_FLAGS
731CXX_FLAG_REORDER
732C_FLAG_REORDER
733SYSROOT_LDFLAGS
734SYSROOT_CFLAGS
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740POST_MCS_CMD
741POST_STRIP_CMD
742ARFLAGS
743COMPILER_TARGET_BITS_FLAG
744JT_HOME
745JTREGEXE
746USING_BROKEN_SUSE_LD
747PACKAGE_PATH
748USE_CLANG
749HOTSPOT_LD
750HOTSPOT_CXX
751HOTSPOT_RC
752HOTSPOT_MT
753BUILD_LD
754BUILD_CXX
755BUILD_CC
756ac_ct_OBJDUMP
757OBJDUMP
758ac_ct_OBJCOPY
759OBJCOPY
760ac_ct_NM
761ac_ct_STRIP
762MCS
763GNM
764NM
765STRIP
766MSBUILD
767DUMPBIN
768RC
769MT
770LIPO
771ac_ct_AR
772AR
773AS
774LDCXX
775LD
776CXXCPP
777CPP
778ac_ct_CXX
779CXXFLAGS
780CXX
781ac_ct_PROPER_COMPILER_CXX
782PROPER_COMPILER_CXX
783TOOLCHAIN_PATH_CXX
784POTENTIAL_CXX
785OBJEXT
786EXEEXT
787ac_ct_CC
788CPPFLAGS
789LDFLAGS
790CFLAGS
791CC
792ac_ct_PROPER_COMPILER_CC
793PROPER_COMPILER_CC
794TOOLCHAIN_PATH_CC
795POTENTIAL_CC
796VS_LIB
797VS_INCLUDE
798VS_PATH
799CYGWIN_LINK
800EXE_SUFFIX
801OBJ_SUFFIX
802STATIC_LIBRARY
803SHARED_LIBRARY
804STATIC_LIBRARY_SUFFIX
805SHARED_LIBRARY_SUFFIX
806LIBRARY_PREFIX
807TOOLCHAIN_TYPE
808BUILD_HOTSPOT
809HOTSPOT_DIST
810BUILD_OUTPUT
811OVERRIDE_SRC_ROOT
812ADD_SRC_ROOT
813JDK_TOPDIR
814NASHORN_TOPDIR
815HOTSPOT_TOPDIR
816JAXWS_TOPDIR
817JAXP_TOPDIR
818CORBA_TOPDIR
819LANGTOOLS_TOPDIR
820JAVAC_FLAGS
821BOOT_JDK_SOURCETARGET
822JARSIGNER
823JAR
824JAVAH
825JAVAC
826JAVA
827BOOT_JDK
828JAVA_CHECK
829JAVAC_CHECK
830COOKED_BUILD_NUMBER
831JDK_VERSION
832COPYRIGHT_YEAR
833MACOSX_BUNDLE_ID_BASE
834MACOSX_BUNDLE_NAME_BASE
835COMPANY_NAME
836JDK_RC_PLATFORM_NAME
837PRODUCT_SUFFIX
838PRODUCT_NAME
839LAUNCHER_NAME
840MILESTONE
841JDK_BUILD_NUMBER
842JDK_UPDATE_VERSION
843JDK_MICRO_VERSION
844JDK_MINOR_VERSION
845JDK_MAJOR_VERSION
846USER_RELEASE_SUFFIX
847COMPRESS_JARS
848RMICONNECTOR_IIOP
849UNLIMITED_CRYPTO
850CACERTS_FILE
851TEST_IN_BUILD
852BUILD_HEADLESS
853SUPPORT_HEADFUL
854SUPPORT_HEADLESS
855BDEPS_FTP
856BDEPS_UNZIP
857OS_VERSION_MICRO
858OS_VERSION_MINOR
859OS_VERSION_MAJOR
860PKG_CONFIG
861BASH_ARGS
862CODESIGN
863XATTR
864DSYMUTIL
865IS_GNU_TIME
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953SETFILE
954DF
955READLINK
956CYGPATH
957SED
958FGREP
959EGREP
960GREP
961AWK
962XARGS
963WHICH
964WC
965UNIQ
966UNAME
967TR
968TOUCH
969TEE
970TAR
971TAIL
972SORT
973SH
974RM
975PRINTF
976NAWK
977MV
978MKTEMP
979MKDIR
980LS
981LN
982HEAD
983FIND
984FILE
985EXPR
986ECHO
987DIRNAME
988DIFF
989DATE
990CUT
991CP
992COMM
993CMP
994CHMOD
995CAT
996BASH
997BASENAME
998DATE_WHEN_CONFIGURED
999ORIGINAL_PATH
1000CONFIGURE_COMMAND_LINE
1001target_alias
1002host_alias
1003build_alias
1004LIBS
1005ECHO_T
1006ECHO_N
1007ECHO_C
1008DEFS
1009mandir
1010localedir
1011libdir
1012psdir
1013pdfdir
1014dvidir
1015htmldir
1016infodir
1017docdir
1018oldincludedir
1019includedir
1020localstatedir
1021sharedstatedir
1022sysconfdir
1023datadir
1024datarootdir
1025libexecdir
1026sbindir
1027bindir
1028program_transform_name
1029prefix
1030exec_prefix
1031PACKAGE_URL
1032PACKAGE_BUGREPORT
1033PACKAGE_STRING
1034PACKAGE_VERSION
1035PACKAGE_TARNAME
1036PACKAGE_NAME
1037PATH_SEPARATOR
1038SHELL'
1039ac_subst_files=''
1040ac_user_opts='
1041enable_option_checking
1042with_target_bits
1043enable_openjdk_only
1044with_custom_make_dir
1045with_jdk_variant
1046with_jvm_interpreter
1047with_jvm_variants
1048enable_debug
1049with_debug_level
1050with_devkit
1051with_sys_root
1052with_sysroot
1053with_tools_dir
1054with_toolchain_path
1055with_extra_path
1056with_sdk_name
1057with_conf_name
1058with_output_sync
1059with_builddeps_conf
1060with_builddeps_server
1061with_builddeps_dir
1062with_builddeps_group
1063enable_headful
1064enable_hotspot_test_in_build
1065with_cacerts_file
1066enable_unlimited_crypto
1067enable_rmiconnector_iiop
1068with_milestone
1069with_update_version
1070with_user_release_suffix
1071with_build_number
1072with_copyright_year
1073with_boot_jdk
1074with_add_source_root
1075with_override_source_root
1076with_adds_and_overrides
1077with_override_langtools
1078with_override_corba
1079with_override_jaxp
1080with_override_jaxws
1081with_override_hotspot
1082with_override_nashorn
1083with_override_jdk
1084with_import_hotspot
1085with_toolchain_type
1086with_toolchain_version
1087with_jtreg
1088with_extra_cflags
1089with_extra_cxxflags
1090with_extra_ldflags
1091enable_debug_symbols
1092enable_zip_debug_info
1093enable_native_coverage
1094with_x
1095with_cups
1096with_cups_include
1097with_freetype
1098with_freetype_include
1099with_freetype_lib
1100with_freetype_src
1101enable_freetype_bundling
1102with_alsa
1103with_alsa_include
1104with_alsa_lib
1105with_libjpeg
1106with_giflib
1107with_lcms
1108with_libpng
1109with_zlib
1110with_stdc__lib
1111with_msvcr_dll
1112with_msvcp_dll
1113with_dxsdk
1114with_dxsdk_lib
1115with_dxsdk_include
1116with_num_cores
1117with_memory_size
1118with_jobs
1119with_boot_jdk_jvmargs
1120with_sjavac_server_java
1121enable_sjavac
1122enable_precompiled_headers
1123enable_ccache
1124with_ccache_dir
1125'
1126      ac_precious_vars='build_alias
1127host_alias
1128target_alias
1129BASENAME
1130BASH
1131CAT
1132CHMOD
1133CMP
1134COMM
1135CP
1136CUT
1137DATE
1138DIFF
1139DIRNAME
1140ECHO
1141EXPR
1142FILE
1143FIND
1144HEAD
1145LN
1146LS
1147MKDIR
1148MKTEMP
1149MV
1150NAWK
1151PRINTF
1152RM
1153SH
1154SORT
1155TAIL
1156TAR
1157TEE
1158TOUCH
1159TR
1160UNAME
1161UNIQ
1162WC
1163WHICH
1164XARGS
1165AWK
1166GREP
1167EGREP
1168FGREP
1169SED
1170CYGPATH
1171READLINK
1172DF
1173SETFILE
1174CPIO
1175UNZIP
1176ZIP
1177LDD
1178OTOOL
1179READELF
1180HG
1181STAT
1182TIME
1183DSYMUTIL
1184XATTR
1185CODESIGN
1186PKG_CONFIG
1187JAVA
1188JAVAC
1189JAVAH
1190JAR
1191JARSIGNER
1192CC
1193CFLAGS
1194LDFLAGS
1195LIBS
1196CPPFLAGS
1197CXX
1198CXXFLAGS
1199CCC
1200CPP
1201CXXCPP
1202AS
1203AR
1204LIPO
1205STRIP
1206NM
1207GNM
1208MCS
1209OBJCOPY
1210OBJDUMP
1211BUILD_CC
1212BUILD_CXX
1213BUILD_LD
1214JTREGEXE
1215XMKMF
1216FREETYPE_CFLAGS
1217FREETYPE_LIBS
1218ALSA_CFLAGS
1219ALSA_LIBS
1220LCMS_CFLAGS
1221LCMS_LIBS
1222PNG_CFLAGS
1223PNG_LIBS
1224LIBFFI_CFLAGS
1225LIBFFI_LIBS
1226CCACHE'
1227
1228
1229# Initialize some variables set by options.
1230ac_init_help=
1231ac_init_version=false
1232ac_unrecognized_opts=
1233ac_unrecognized_sep=
1234# The variables have the same names as the options, with
1235# dashes changed to underlines.
1236cache_file=/dev/null
1237exec_prefix=NONE
1238no_create=
1239no_recursion=
1240prefix=NONE
1241program_prefix=NONE
1242program_suffix=NONE
1243program_transform_name=s,x,x,
1244silent=
1245site=
1246srcdir=
1247verbose=
1248x_includes=NONE
1249x_libraries=NONE
1250
1251# Installation directory options.
1252# These are left unexpanded so users can "make install exec_prefix=/foo"
1253# and all the variables that are supposed to be based on exec_prefix
1254# by default will actually change.
1255# Use braces instead of parens because sh, perl, etc. also accept them.
1256# (The list follows the same order as the GNU Coding Standards.)
1257bindir='${exec_prefix}/bin'
1258sbindir='${exec_prefix}/sbin'
1259libexecdir='${exec_prefix}/libexec'
1260datarootdir='${prefix}/share'
1261datadir='${datarootdir}'
1262sysconfdir='${prefix}/etc'
1263sharedstatedir='${prefix}/com'
1264localstatedir='${prefix}/var'
1265includedir='${prefix}/include'
1266oldincludedir='/usr/include'
1267docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1268infodir='${datarootdir}/info'
1269htmldir='${docdir}'
1270dvidir='${docdir}'
1271pdfdir='${docdir}'
1272psdir='${docdir}'
1273libdir='${exec_prefix}/lib'
1274localedir='${datarootdir}/locale'
1275mandir='${datarootdir}/man'
1276
1277ac_prev=
1278ac_dashdash=
1279for ac_option
1280do
1281  # If the previous option needs an argument, assign it.
1282  if test -n "$ac_prev"; then
1283    eval $ac_prev=\$ac_option
1284    ac_prev=
1285    continue
1286  fi
1287
1288  case $ac_option in
1289  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1290  *=)   ac_optarg= ;;
1291  *)    ac_optarg=yes ;;
1292  esac
1293
1294  # Accept the important Cygnus configure options, so we can diagnose typos.
1295
1296  case $ac_dashdash$ac_option in
1297  --)
1298    ac_dashdash=yes ;;
1299
1300  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1301    ac_prev=bindir ;;
1302  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1303    bindir=$ac_optarg ;;
1304
1305  -build | --build | --buil | --bui | --bu)
1306    ac_prev=build_alias ;;
1307  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1308    build_alias=$ac_optarg ;;
1309
1310  -cache-file | --cache-file | --cache-fil | --cache-fi \
1311  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1312    ac_prev=cache_file ;;
1313  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1314  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1315    cache_file=$ac_optarg ;;
1316
1317  --config-cache | -C)
1318    cache_file=config.cache ;;
1319
1320  -datadir | --datadir | --datadi | --datad)
1321    ac_prev=datadir ;;
1322  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1323    datadir=$ac_optarg ;;
1324
1325  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1326  | --dataroo | --dataro | --datar)
1327    ac_prev=datarootdir ;;
1328  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1329  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1330    datarootdir=$ac_optarg ;;
1331
1332  -disable-* | --disable-*)
1333    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1334    # Reject names that are not valid shell variable names.
1335    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1336      as_fn_error $? "invalid feature name: $ac_useropt"
1337    ac_useropt_orig=$ac_useropt
1338    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1339    case $ac_user_opts in
1340      *"
1341"enable_$ac_useropt"
1342"*) ;;
1343      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1344	 ac_unrecognized_sep=', ';;
1345    esac
1346    eval enable_$ac_useropt=no ;;
1347
1348  -docdir | --docdir | --docdi | --doc | --do)
1349    ac_prev=docdir ;;
1350  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1351    docdir=$ac_optarg ;;
1352
1353  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1354    ac_prev=dvidir ;;
1355  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1356    dvidir=$ac_optarg ;;
1357
1358  -enable-* | --enable-*)
1359    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1360    # Reject names that are not valid shell variable names.
1361    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1362      as_fn_error $? "invalid feature name: $ac_useropt"
1363    ac_useropt_orig=$ac_useropt
1364    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1365    case $ac_user_opts in
1366      *"
1367"enable_$ac_useropt"
1368"*) ;;
1369      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1370	 ac_unrecognized_sep=', ';;
1371    esac
1372    eval enable_$ac_useropt=\$ac_optarg ;;
1373
1374  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1375  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1376  | --exec | --exe | --ex)
1377    ac_prev=exec_prefix ;;
1378  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1379  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1380  | --exec=* | --exe=* | --ex=*)
1381    exec_prefix=$ac_optarg ;;
1382
1383  -gas | --gas | --ga | --g)
1384    # Obsolete; use --with-gas.
1385    with_gas=yes ;;
1386
1387  -help | --help | --hel | --he | -h)
1388    ac_init_help=long ;;
1389  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1390    ac_init_help=recursive ;;
1391  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1392    ac_init_help=short ;;
1393
1394  -host | --host | --hos | --ho)
1395    ac_prev=host_alias ;;
1396  -host=* | --host=* | --hos=* | --ho=*)
1397    host_alias=$ac_optarg ;;
1398
1399  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1400    ac_prev=htmldir ;;
1401  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1402  | --ht=*)
1403    htmldir=$ac_optarg ;;
1404
1405  -includedir | --includedir | --includedi | --included | --include \
1406  | --includ | --inclu | --incl | --inc)
1407    ac_prev=includedir ;;
1408  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1409  | --includ=* | --inclu=* | --incl=* | --inc=*)
1410    includedir=$ac_optarg ;;
1411
1412  -infodir | --infodir | --infodi | --infod | --info | --inf)
1413    ac_prev=infodir ;;
1414  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1415    infodir=$ac_optarg ;;
1416
1417  -libdir | --libdir | --libdi | --libd)
1418    ac_prev=libdir ;;
1419  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1420    libdir=$ac_optarg ;;
1421
1422  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1423  | --libexe | --libex | --libe)
1424    ac_prev=libexecdir ;;
1425  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1426  | --libexe=* | --libex=* | --libe=*)
1427    libexecdir=$ac_optarg ;;
1428
1429  -localedir | --localedir | --localedi | --localed | --locale)
1430    ac_prev=localedir ;;
1431  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1432    localedir=$ac_optarg ;;
1433
1434  -localstatedir | --localstatedir | --localstatedi | --localstated \
1435  | --localstate | --localstat | --localsta | --localst | --locals)
1436    ac_prev=localstatedir ;;
1437  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1438  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1439    localstatedir=$ac_optarg ;;
1440
1441  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1442    ac_prev=mandir ;;
1443  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1444    mandir=$ac_optarg ;;
1445
1446  -nfp | --nfp | --nf)
1447    # Obsolete; use --without-fp.
1448    with_fp=no ;;
1449
1450  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1451  | --no-cr | --no-c | -n)
1452    no_create=yes ;;
1453
1454  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1455  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1456    no_recursion=yes ;;
1457
1458  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1459  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1460  | --oldin | --oldi | --old | --ol | --o)
1461    ac_prev=oldincludedir ;;
1462  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1463  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1464  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1465    oldincludedir=$ac_optarg ;;
1466
1467  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1468    ac_prev=prefix ;;
1469  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1470    prefix=$ac_optarg ;;
1471
1472  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1473  | --program-pre | --program-pr | --program-p)
1474    ac_prev=program_prefix ;;
1475  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1476  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1477    program_prefix=$ac_optarg ;;
1478
1479  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1480  | --program-suf | --program-su | --program-s)
1481    ac_prev=program_suffix ;;
1482  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1483  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1484    program_suffix=$ac_optarg ;;
1485
1486  -program-transform-name | --program-transform-name \
1487  | --program-transform-nam | --program-transform-na \
1488  | --program-transform-n | --program-transform- \
1489  | --program-transform | --program-transfor \
1490  | --program-transfo | --program-transf \
1491  | --program-trans | --program-tran \
1492  | --progr-tra | --program-tr | --program-t)
1493    ac_prev=program_transform_name ;;
1494  -program-transform-name=* | --program-transform-name=* \
1495  | --program-transform-nam=* | --program-transform-na=* \
1496  | --program-transform-n=* | --program-transform-=* \
1497  | --program-transform=* | --program-transfor=* \
1498  | --program-transfo=* | --program-transf=* \
1499  | --program-trans=* | --program-tran=* \
1500  | --progr-tra=* | --program-tr=* | --program-t=*)
1501    program_transform_name=$ac_optarg ;;
1502
1503  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1504    ac_prev=pdfdir ;;
1505  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1506    pdfdir=$ac_optarg ;;
1507
1508  -psdir | --psdir | --psdi | --psd | --ps)
1509    ac_prev=psdir ;;
1510  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1511    psdir=$ac_optarg ;;
1512
1513  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514  | -silent | --silent | --silen | --sile | --sil)
1515    silent=yes ;;
1516
1517  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1518    ac_prev=sbindir ;;
1519  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1520  | --sbi=* | --sb=*)
1521    sbindir=$ac_optarg ;;
1522
1523  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1524  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1525  | --sharedst | --shareds | --shared | --share | --shar \
1526  | --sha | --sh)
1527    ac_prev=sharedstatedir ;;
1528  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1529  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1530  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1531  | --sha=* | --sh=*)
1532    sharedstatedir=$ac_optarg ;;
1533
1534  -site | --site | --sit)
1535    ac_prev=site ;;
1536  -site=* | --site=* | --sit=*)
1537    site=$ac_optarg ;;
1538
1539  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1540    ac_prev=srcdir ;;
1541  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1542    srcdir=$ac_optarg ;;
1543
1544  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1545  | --syscon | --sysco | --sysc | --sys | --sy)
1546    ac_prev=sysconfdir ;;
1547  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1548  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1549    sysconfdir=$ac_optarg ;;
1550
1551  -target | --target | --targe | --targ | --tar | --ta | --t)
1552    ac_prev=target_alias ;;
1553  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1554    target_alias=$ac_optarg ;;
1555
1556  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1557    verbose=yes ;;
1558
1559  -version | --version | --versio | --versi | --vers | -V)
1560    ac_init_version=: ;;
1561
1562  -with-* | --with-*)
1563    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1564    # Reject names that are not valid shell variable names.
1565    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1566      as_fn_error $? "invalid package name: $ac_useropt"
1567    ac_useropt_orig=$ac_useropt
1568    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1569    case $ac_user_opts in
1570      *"
1571"with_$ac_useropt"
1572"*) ;;
1573      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1574	 ac_unrecognized_sep=', ';;
1575    esac
1576    eval with_$ac_useropt=\$ac_optarg ;;
1577
1578  -without-* | --without-*)
1579    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1580    # Reject names that are not valid shell variable names.
1581    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1582      as_fn_error $? "invalid package name: $ac_useropt"
1583    ac_useropt_orig=$ac_useropt
1584    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1585    case $ac_user_opts in
1586      *"
1587"with_$ac_useropt"
1588"*) ;;
1589      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1590	 ac_unrecognized_sep=', ';;
1591    esac
1592    eval with_$ac_useropt=no ;;
1593
1594  --x)
1595    # Obsolete; use --with-x.
1596    with_x=yes ;;
1597
1598  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1599  | --x-incl | --x-inc | --x-in | --x-i)
1600    ac_prev=x_includes ;;
1601  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1602  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1603    x_includes=$ac_optarg ;;
1604
1605  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1606  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1607    ac_prev=x_libraries ;;
1608  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1609  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1610    x_libraries=$ac_optarg ;;
1611
1612  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1613Try \`$0 --help' for more information"
1614    ;;
1615
1616  *=*)
1617    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1618    # Reject names that are not valid shell variable names.
1619    case $ac_envvar in #(
1620      '' | [0-9]* | *[!_$as_cr_alnum]* )
1621      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1622    esac
1623    eval $ac_envvar=\$ac_optarg
1624    export $ac_envvar ;;
1625
1626  *)
1627    # FIXME: should be removed in autoconf 3.0.
1628    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1629    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1630      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1631    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1632    ;;
1633
1634  esac
1635done
1636
1637if test -n "$ac_prev"; then
1638  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1639  as_fn_error $? "missing argument to $ac_option"
1640fi
1641
1642if test -n "$ac_unrecognized_opts"; then
1643  case $enable_option_checking in
1644    no) ;;
1645    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1646    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1647  esac
1648fi
1649
1650# Check all directory arguments for consistency.
1651for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1652		datadir sysconfdir sharedstatedir localstatedir includedir \
1653		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1654		libdir localedir mandir
1655do
1656  eval ac_val=\$$ac_var
1657  # Remove trailing slashes.
1658  case $ac_val in
1659    */ )
1660      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1661      eval $ac_var=\$ac_val;;
1662  esac
1663  # Be sure to have absolute directory names.
1664  case $ac_val in
1665    [\\/$]* | ?:[\\/]* )  continue;;
1666    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1667  esac
1668  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1669done
1670
1671# There might be people who depend on the old broken behavior: `$host'
1672# used to hold the argument of --host etc.
1673# FIXME: To remove some day.
1674build=$build_alias
1675host=$host_alias
1676target=$target_alias
1677
1678# FIXME: To remove some day.
1679if test "x$host_alias" != x; then
1680  if test "x$build_alias" = x; then
1681    cross_compiling=maybe
1682  elif test "x$build_alias" != "x$host_alias"; then
1683    cross_compiling=yes
1684  fi
1685fi
1686
1687ac_tool_prefix=
1688test -n "$host_alias" && ac_tool_prefix=$host_alias-
1689
1690test "$silent" = yes && exec 6>/dev/null
1691
1692
1693ac_pwd=`pwd` && test -n "$ac_pwd" &&
1694ac_ls_di=`ls -di .` &&
1695ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1696  as_fn_error $? "working directory cannot be determined"
1697test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1698  as_fn_error $? "pwd does not report name of working directory"
1699
1700
1701# Find the source files, if location was not specified.
1702if test -z "$srcdir"; then
1703  ac_srcdir_defaulted=yes
1704  # Try the directory containing this script, then the parent directory.
1705  ac_confdir=`$as_dirname -- "$as_myself" ||
1706$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1707	 X"$as_myself" : 'X\(//\)[^/]' \| \
1708	 X"$as_myself" : 'X\(//\)$' \| \
1709	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1710$as_echo X"$as_myself" |
1711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)[^/].*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\/\)$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\).*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  s/.*/./; q'`
1728  srcdir=$ac_confdir
1729  if test ! -r "$srcdir/$ac_unique_file"; then
1730    srcdir=..
1731  fi
1732else
1733  ac_srcdir_defaulted=no
1734fi
1735if test ! -r "$srcdir/$ac_unique_file"; then
1736  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1737  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1738fi
1739ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1740ac_abs_confdir=`(
1741	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1742	pwd)`
1743# When building in place, set srcdir=.
1744if test "$ac_abs_confdir" = "$ac_pwd"; then
1745  srcdir=.
1746fi
1747# Remove unnecessary trailing slashes from srcdir.
1748# Double slashes in file names in object file debugging info
1749# mess up M-x gdb in Emacs.
1750case $srcdir in
1751*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1752esac
1753for ac_var in $ac_precious_vars; do
1754  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_env_${ac_var}_value=\$${ac_var}
1756  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1757  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1758done
1759
1760#
1761# Report the --help message.
1762#
1763if test "$ac_init_help" = "long"; then
1764  # Omit some internal or obsolete options to make the list less imposing.
1765  # This message is too long to be a string in the A/UX 3.1 sh.
1766  cat <<_ACEOF
1767\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1768
1769Usage: $0 [OPTION]... [VAR=VALUE]...
1770
1771To assign environment variables (e.g., CC, CFLAGS...), specify them as
1772VAR=VALUE.  See below for descriptions of some of the useful variables.
1773
1774Defaults for the options are specified in brackets.
1775
1776Configuration:
1777  -h, --help              display this help and exit
1778      --help=short        display options specific to this package
1779      --help=recursive    display the short help of all the included packages
1780  -V, --version           display version information and exit
1781  -q, --quiet, --silent   do not print \`checking ...' messages
1782      --cache-file=FILE   cache test results in FILE [disabled]
1783  -C, --config-cache      alias for \`--cache-file=config.cache'
1784  -n, --no-create         do not create output files
1785      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1786
1787Installation directories:
1788  --prefix=PREFIX         install architecture-independent files in PREFIX
1789                          [$ac_default_prefix]
1790  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1791                          [PREFIX]
1792
1793By default, \`make install' will install all the files in
1794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1796for instance \`--prefix=\$HOME'.
1797
1798For better control, use the options below.
1799
1800Fine tuning of the installation directories:
1801  --bindir=DIR            user executables [EPREFIX/bin]
1802  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1803  --libexecdir=DIR        program executables [EPREFIX/libexec]
1804  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1805  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1806  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1807  --libdir=DIR            object code libraries [EPREFIX/lib]
1808  --includedir=DIR        C header files [PREFIX/include]
1809  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1810  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1811  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1812  --infodir=DIR           info documentation [DATAROOTDIR/info]
1813  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1814  --mandir=DIR            man documentation [DATAROOTDIR/man]
1815  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1816  --htmldir=DIR           html documentation [DOCDIR]
1817  --dvidir=DIR            dvi documentation [DOCDIR]
1818  --pdfdir=DIR            pdf documentation [DOCDIR]
1819  --psdir=DIR             ps documentation [DOCDIR]
1820_ACEOF
1821
1822  cat <<\_ACEOF
1823
1824X features:
1825  --x-includes=DIR    X include files are in DIR
1826  --x-libraries=DIR   X library files are in DIR
1827
1828System types:
1829  --build=BUILD     configure for building on BUILD [guessed]
1830  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1831  --target=TARGET   configure for building compilers for TARGET [HOST]
1832_ACEOF
1833fi
1834
1835if test -n "$ac_init_help"; then
1836  case $ac_init_help in
1837     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1838   esac
1839  cat <<\_ACEOF
1840
1841Optional Features:
1842  --disable-option-checking  ignore unrecognized --enable/--with options
1843  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1844  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1845  --enable-openjdk-only   suppress building custom source even if present
1846                          [disabled]
1847  --enable-debug          set the debug level to fastdebug (shorthand for
1848                          --with-debug-level=fastdebug) [disabled]
1849  --disable-headful       disable building headful support (graphical UI
1850                          support) [enabled]
1851  --enable-hotspot-test-in-build
1852                          run the Queens test after Hotspot build [disabled]
1853  --enable-unlimited-crypto
1854                          Enable unlimited crypto policy [disabled]
1855  --enable-rmiconnector-iiop
1856                          enable the JMX RMIConnector iiop transport
1857                          [disabled]
1858  --disable-debug-symbols disable generation of debug symbols [enabled]
1859  --disable-zip-debug-info
1860                          disable zipping of debug-info files [enabled]
1861  --enable-native-coverage
1862                          enable native compilation with code coverage
1863                          data[disabled]
1864  --disable-freetype-bundling
1865                          disable bundling of the freetype library with the
1866                          build result [enabled on Windows or when using
1867                          --with-freetype, disabled otherwise]
1868  --enable-sjavac         use sjavac to do fast incremental compiles
1869                          [disabled]
1870  --disable-precompiled-headers
1871                          disable using precompiled headers when compiling C++
1872                          [enabled]
1873  --enable-ccache         enable using ccache to speed up recompilations
1874                          [disabled]
1875
1876Optional Packages:
1877  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1878  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1879  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1880                          support it), e.g. --with-target-bits=32 [guessed]
1881  --with-custom-make-dir  Deprecated. Option is kept for backwards
1882                          compatibility and is ignored
1883  --with-jdk-variant      JDK variant to build (normal) [normal]
1884  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1885  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1886                          client, minimal1, kernel, zero, zeroshark, core)
1887                          [server]
1888  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1889                          optimized (HotSpot build only)) [release]
1890  --with-devkit           use this devkit for compilers, tools and resources
1891  --with-sys-root         alias for --with-sysroot for backwards compatability
1892  --with-sysroot          use this directory as sysroot
1893  --with-tools-dir        alias for --with-toolchain-path for backwards
1894                          compatibility
1895  --with-toolchain-path   prepend these directories when searching for
1896                          toolchain binaries (compilers etc)
1897  --with-extra-path       prepend these directories to the default path
1898  --with-sdk-name         use the platform SDK of the given name. [macosx]
1899  --with-conf-name        use this as the name of the configuration [generated
1900                          from important configuration options]
1901  --with-output-sync      set make output sync type if supported by make.
1902                          [recurse]
1903  --with-builddeps-conf   use this configuration file for the builddeps
1904  --with-builddeps-server download and use build dependencies from this server
1905                          url
1906  --with-builddeps-dir    store downloaded build dependencies here
1907                          [/localhome/builddeps]
1908  --with-builddeps-group  chgrp the downloaded build dependencies to this
1909                          group
1910  --with-cacerts-file     specify alternative cacerts file
1911  --with-milestone        Set milestone value for build [internal]
1912  --with-update-version   Set update version value for build [b00]
1913  --with-user-release-suffix
1914                          Add a custom string to the version string if build
1915                          number is not set.[username_builddateb00]
1916  --with-build-number     Set build number value for build [b00]
1917  --with-copyright-year   Set copyright year value for build [current year]
1918  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1919  --with-add-source-root  for each and every source directory, look in this
1920                          additional source root for the same directory; if it
1921                          exists and have files in it, include it in the build
1922  --with-override-source-root
1923                          for each and every source directory, look in this
1924                          override source root for the same directory; if it
1925                          exists, use that directory instead and ignore the
1926                          directory in the original source root
1927  --with-adds-and-overrides
1928                          use the subdirs 'adds' and 'overrides' in the
1929                          specified directory as add-source-root and
1930                          override-source-root
1931  --with-override-langtools
1932                          use this langtools dir for the build
1933  --with-override-corba   use this corba dir for the build
1934  --with-override-jaxp    use this jaxp dir for the build
1935  --with-override-jaxws   use this jaxws dir for the build
1936  --with-override-hotspot use this hotspot dir for the build
1937  --with-override-nashorn use this nashorn dir for the build
1938  --with-override-jdk     use this jdk dir for the build
1939  --with-import-hotspot   import hotspot binaries from this jdk image or
1940                          hotspot build dist dir instead of building from
1941                          source
1942  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1943                          to show possible values [platform dependent]
1944  --with-toolchain-version
1945                          the version of the toolchain to look for, use
1946                          '--help' to show possible values [platform
1947                          dependent]
1948  --with-jtreg            Regression Test Harness [probed]
1949  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1950  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1951  --with-extra-ldflags    extra flags to be used when linking jdk
1952  --with-x                use the X Window System
1953  --with-cups             specify prefix directory for the cups package
1954                          (expecting the headers under PATH/include)
1955  --with-cups-include     specify directory for the cups include files
1956  --with-freetype         specify prefix directory for the freetype package
1957                          (expecting the libraries under PATH/lib and the
1958                          headers under PATH/include)
1959  --with-freetype-include specify directory for the freetype include files
1960  --with-freetype-lib     specify directory for the freetype library
1961  --with-freetype-src     specify directory with freetype sources to
1962                          automatically build the library (experimental,
1963                          Windows-only)
1964  --with-alsa             specify prefix directory for the alsa package
1965                          (expecting the libraries under PATH/lib and the
1966                          headers under PATH/include)
1967  --with-alsa-include     specify directory for the alsa include files
1968  --with-alsa-lib         specify directory for the alsa library
1969  --with-libjpeg          use libjpeg from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-giflib           use giflib from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-lcms             use lcms2 from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-libpng           use libpng from build system or OpenJDK source
1976                          (system, bundled) [bundled]
1977  --with-zlib             use zlib from build system or OpenJDK source
1978                          (system, bundled) [bundled]
1979  --with-stdc++lib=<static>,<dynamic>,<default>
1980                          force linking of the C++ runtime on Linux to either
1981                          static or dynamic, default is static with dynamic as
1982                          fallback
1983  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1984                          (Windows only) [probed]
1985  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1986                          (Windows only) [probed]
1987  --with-dxsdk            Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-dxsdk-include    Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-num-cores        number of cores in the build system, e.g.
1994                          --with-num-cores=8 [probed]
1995  --with-memory-size      memory (in MB) available in the build system, e.g.
1996                          --with-memory-size=1024 [probed]
1997  --with-jobs             number of parallel jobs to let make run [calculated
1998                          based on cores and memory]
1999  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2000                          invocations of boot JDK, overriding the default
2001                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2002                          -enableassertions"
2003  --with-sjavac-server-java
2004                          use this java binary for running the sjavac
2005                          background server [Boot JDK java]
2006  --with-ccache-dir       where to store ccache files [~/.ccache]
2007
2008Some influential environment variables:
2009  BASENAME    Override default value for BASENAME
2010  BASH        Override default value for BASH
2011  CAT         Override default value for CAT
2012  CHMOD       Override default value for CHMOD
2013  CMP         Override default value for CMP
2014  COMM        Override default value for COMM
2015  CP          Override default value for CP
2016  CUT         Override default value for CUT
2017  DATE        Override default value for DATE
2018  DIFF        Override default value for DIFF
2019  DIRNAME     Override default value for DIRNAME
2020  ECHO        Override default value for ECHO
2021  EXPR        Override default value for EXPR
2022  FILE        Override default value for FILE
2023  FIND        Override default value for FIND
2024  HEAD        Override default value for HEAD
2025  LN          Override default value for LN
2026  LS          Override default value for LS
2027  MKDIR       Override default value for MKDIR
2028  MKTEMP      Override default value for MKTEMP
2029  MV          Override default value for MV
2030  NAWK        Override default value for NAWK
2031  PRINTF      Override default value for PRINTF
2032  RM          Override default value for RM
2033  SH          Override default value for SH
2034  SORT        Override default value for SORT
2035  TAIL        Override default value for TAIL
2036  TAR         Override default value for TAR
2037  TEE         Override default value for TEE
2038  TOUCH       Override default value for TOUCH
2039  TR          Override default value for TR
2040  UNAME       Override default value for UNAME
2041  UNIQ        Override default value for UNIQ
2042  WC          Override default value for WC
2043  WHICH       Override default value for WHICH
2044  XARGS       Override default value for XARGS
2045  AWK         Override default value for AWK
2046  GREP        Override default value for GREP
2047  EGREP       Override default value for EGREP
2048  FGREP       Override default value for FGREP
2049  SED         Override default value for SED
2050  CYGPATH     Override default value for CYGPATH
2051  READLINK    Override default value for READLINK
2052  DF          Override default value for DF
2053  SETFILE     Override default value for SETFILE
2054  CPIO        Override default value for CPIO
2055  UNZIP       Override default value for UNZIP
2056  ZIP         Override default value for ZIP
2057  LDD         Override default value for LDD
2058  OTOOL       Override default value for OTOOL
2059  READELF     Override default value for READELF
2060  HG          Override default value for HG
2061  STAT        Override default value for STAT
2062  TIME        Override default value for TIME
2063  DSYMUTIL    Override default value for DSYMUTIL
2064  XATTR       Override default value for XATTR
2065  CODESIGN    Override default value for CODESIGN
2066  PKG_CONFIG  path to pkg-config utility
2067  JAVA        Override default value for JAVA
2068  JAVAC       Override default value for JAVAC
2069  JAVAH       Override default value for JAVAH
2070  JAR         Override default value for JAR
2071  JARSIGNER   Override default value for JARSIGNER
2072  CC          C compiler command
2073  CFLAGS      C compiler flags
2074  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2075              nonstandard directory <lib dir>
2076  LIBS        libraries to pass to the linker, e.g. -l<library>
2077  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2078              you have headers in a nonstandard directory <include dir>
2079  CXX         C++ compiler command
2080  CXXFLAGS    C++ compiler flags
2081  CPP         C preprocessor
2082  CXXCPP      C++ preprocessor
2083  AS          Override default value for AS
2084  AR          Override default value for AR
2085  LIPO        Override default value for LIPO
2086  STRIP       Override default value for STRIP
2087  NM          Override default value for NM
2088  GNM         Override default value for GNM
2089  MCS         Override default value for MCS
2090  OBJCOPY     Override default value for OBJCOPY
2091  OBJDUMP     Override default value for OBJDUMP
2092  BUILD_CC    Override default value for BUILD_CC
2093  BUILD_CXX   Override default value for BUILD_CXX
2094  BUILD_LD    Override default value for BUILD_LD
2095  JTREGEXE    Override default value for JTREGEXE
2096  XMKMF       Path to xmkmf, Makefile generator for X Window System
2097  FREETYPE_CFLAGS
2098              C compiler flags for FREETYPE, overriding pkg-config
2099  FREETYPE_LIBS
2100              linker flags for FREETYPE, overriding pkg-config
2101  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2102  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2103  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2104  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2105  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106  PNG_LIBS    linker flags for PNG, overriding pkg-config
2107  LIBFFI_CFLAGS
2108              C compiler flags for LIBFFI, overriding pkg-config
2109  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110  CCACHE      Override default value for CCACHE
2111
2112Use these variables to override the choices made by `configure' or to help
2113it to find libraries and programs with nonstandard names/locations.
2114
2115Report bugs to <build-dev@openjdk.java.net>.
2116OpenJDK home page: <http://openjdk.java.net>.
2117_ACEOF
2118ac_status=$?
2119fi
2120
2121if test "$ac_init_help" = "recursive"; then
2122  # If there are subdirs, report their specific --help.
2123  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2124    test -d "$ac_dir" ||
2125      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2126      continue
2127    ac_builddir=.
2128
2129case "$ac_dir" in
2130.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2131*)
2132  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2133  # A ".." for each directory in $ac_dir_suffix.
2134  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2135  case $ac_top_builddir_sub in
2136  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2138  esac ;;
2139esac
2140ac_abs_top_builddir=$ac_pwd
2141ac_abs_builddir=$ac_pwd$ac_dir_suffix
2142# for backward compatibility:
2143ac_top_builddir=$ac_top_build_prefix
2144
2145case $srcdir in
2146  .)  # We are building in place.
2147    ac_srcdir=.
2148    ac_top_srcdir=$ac_top_builddir_sub
2149    ac_abs_top_srcdir=$ac_pwd ;;
2150  [\\/]* | ?:[\\/]* )  # Absolute name.
2151    ac_srcdir=$srcdir$ac_dir_suffix;
2152    ac_top_srcdir=$srcdir
2153    ac_abs_top_srcdir=$srcdir ;;
2154  *) # Relative name.
2155    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2156    ac_top_srcdir=$ac_top_build_prefix$srcdir
2157    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2158esac
2159ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2160
2161    cd "$ac_dir" || { ac_status=$?; continue; }
2162    # Check for guested configure.
2163    if test -f "$ac_srcdir/configure.gnu"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2166    elif test -f "$ac_srcdir/configure"; then
2167      echo &&
2168      $SHELL "$ac_srcdir/configure" --help=recursive
2169    else
2170      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2171    fi || ac_status=$?
2172    cd "$ac_pwd" || { ac_status=$?; break; }
2173  done
2174fi
2175
2176test -n "$ac_init_help" && exit $ac_status
2177if $ac_init_version; then
2178  cat <<\_ACEOF
2179OpenJDK configure jdk9
2180generated by GNU Autoconf 2.69
2181
2182Copyright (C) 2012 Free Software Foundation, Inc.
2183This configure script is free software; the Free Software Foundation
2184gives unlimited permission to copy, distribute and modify it.
2185_ACEOF
2186  exit
2187fi
2188
2189## ------------------------ ##
2190## Autoconf initialization. ##
2191## ------------------------ ##
2192
2193# ac_fn_c_try_compile LINENO
2194# --------------------------
2195# Try to compile conftest.$ac_ext, and return whether this succeeded.
2196ac_fn_c_try_compile ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  rm -f conftest.$ac_objext
2200  if { { ac_try="$ac_compile"
2201case "(($ac_try" in
2202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203  *) ac_try_echo=$ac_try;;
2204esac
2205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206$as_echo "$ac_try_echo"; } >&5
2207  (eval "$ac_compile") 2>conftest.err
2208  ac_status=$?
2209  if test -s conftest.err; then
2210    grep -v '^ *+' conftest.err >conftest.er1
2211    cat conftest.er1 >&5
2212    mv -f conftest.er1 conftest.err
2213  fi
2214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215  test $ac_status = 0; } && {
2216	 test -z "$ac_c_werror_flag" ||
2217	 test ! -s conftest.err
2218       } && test -s conftest.$ac_objext; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: failed program was:" >&5
2222sed 's/^/| /' conftest.$ac_ext >&5
2223
2224	ac_retval=1
2225fi
2226  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_try_compile
2230
2231# ac_fn_cxx_try_compile LINENO
2232# ----------------------------
2233# Try to compile conftest.$ac_ext, and return whether this succeeded.
2234ac_fn_cxx_try_compile ()
2235{
2236  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237  rm -f conftest.$ac_objext
2238  if { { ac_try="$ac_compile"
2239case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_compile") 2>conftest.err
2246  ac_status=$?
2247  if test -s conftest.err; then
2248    grep -v '^ *+' conftest.err >conftest.er1
2249    cat conftest.er1 >&5
2250    mv -f conftest.er1 conftest.err
2251  fi
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && {
2254	 test -z "$ac_cxx_werror_flag" ||
2255	 test ! -s conftest.err
2256       } && test -s conftest.$ac_objext; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262	ac_retval=1
2263fi
2264  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265  as_fn_set_status $ac_retval
2266
2267} # ac_fn_cxx_try_compile
2268
2269# ac_fn_c_try_cpp LINENO
2270# ----------------------
2271# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_cpp ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  if { { ac_try="$ac_cpp conftest.$ac_ext"
2276case "(($ac_try" in
2277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278  *) ac_try_echo=$ac_try;;
2279esac
2280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281$as_echo "$ac_try_echo"; } >&5
2282  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2283  ac_status=$?
2284  if test -s conftest.err; then
2285    grep -v '^ *+' conftest.err >conftest.er1
2286    cat conftest.er1 >&5
2287    mv -f conftest.er1 conftest.err
2288  fi
2289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290  test $ac_status = 0; } > conftest.i && {
2291	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2292	 test ! -s conftest.err
2293       }; then :
2294  ac_retval=0
2295else
2296  $as_echo "$as_me: failed program was:" >&5
2297sed 's/^/| /' conftest.$ac_ext >&5
2298
2299    ac_retval=1
2300fi
2301  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302  as_fn_set_status $ac_retval
2303
2304} # ac_fn_c_try_cpp
2305
2306# ac_fn_cxx_try_cpp LINENO
2307# ------------------------
2308# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2309ac_fn_cxx_try_cpp ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  if { { ac_try="$ac_cpp conftest.$ac_ext"
2313case "(($ac_try" in
2314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315  *) ac_try_echo=$ac_try;;
2316esac
2317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318$as_echo "$ac_try_echo"; } >&5
2319  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2320  ac_status=$?
2321  if test -s conftest.err; then
2322    grep -v '^ *+' conftest.err >conftest.er1
2323    cat conftest.er1 >&5
2324    mv -f conftest.er1 conftest.err
2325  fi
2326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327  test $ac_status = 0; } > conftest.i && {
2328	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2329	 test ! -s conftest.err
2330       }; then :
2331  ac_retval=0
2332else
2333  $as_echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
2336    ac_retval=1
2337fi
2338  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339  as_fn_set_status $ac_retval
2340
2341} # ac_fn_cxx_try_cpp
2342
2343# ac_fn_c_try_link LINENO
2344# -----------------------
2345# Try to link conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_c_try_link ()
2347{
2348  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349  rm -f conftest.$ac_objext conftest$ac_exeext
2350  if { { ac_try="$ac_link"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_link") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } && {
2366	 test -z "$ac_c_werror_flag" ||
2367	 test ! -s conftest.err
2368       } && test -s conftest$ac_exeext && {
2369	 test "$cross_compiling" = yes ||
2370	 test -x conftest$ac_exeext
2371       }; then :
2372  ac_retval=0
2373else
2374  $as_echo "$as_me: failed program was:" >&5
2375sed 's/^/| /' conftest.$ac_ext >&5
2376
2377	ac_retval=1
2378fi
2379  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2380  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2381  # interfere with the next link command; also delete a directory that is
2382  # left behind by Apple's compiler.  We do this before executing the actions.
2383  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2384  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385  as_fn_set_status $ac_retval
2386
2387} # ac_fn_c_try_link
2388
2389# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2390# ---------------------------------------------------------
2391# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2392# the include files in INCLUDES and setting the cache variable VAR
2393# accordingly.
2394ac_fn_cxx_check_header_mongrel ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  if eval \${$3+:} false; then :
2398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2399$as_echo_n "checking for $2... " >&6; }
2400if eval \${$3+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402fi
2403eval ac_res=\$$3
2404	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2405$as_echo "$ac_res" >&6; }
2406else
2407  # Is the header compilable?
2408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2409$as_echo_n "checking $2 usability... " >&6; }
2410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411/* end confdefs.h.  */
2412$4
2413#include <$2>
2414_ACEOF
2415if ac_fn_cxx_try_compile "$LINENO"; then :
2416  ac_header_compiler=yes
2417else
2418  ac_header_compiler=no
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2422$as_echo "$ac_header_compiler" >&6; }
2423
2424# Is the header present?
2425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2426$as_echo_n "checking $2 presence... " >&6; }
2427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h.  */
2429#include <$2>
2430_ACEOF
2431if ac_fn_cxx_try_cpp "$LINENO"; then :
2432  ac_header_preproc=yes
2433else
2434  ac_header_preproc=no
2435fi
2436rm -f conftest.err conftest.i conftest.$ac_ext
2437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2438$as_echo "$ac_header_preproc" >&6; }
2439
2440# So?  What about this header?
2441case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2442  yes:no: )
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2444$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2446$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2447    ;;
2448  no:yes:* )
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2450$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2452$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2454$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2456$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2458$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2459( $as_echo "## ----------------------------------------- ##
2460## Report this to build-dev@openjdk.java.net ##
2461## ----------------------------------------- ##"
2462     ) | sed "s/^/$as_me: WARNING:     /" >&2
2463    ;;
2464esac
2465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2466$as_echo_n "checking for $2... " >&6; }
2467if eval \${$3+:} false; then :
2468  $as_echo_n "(cached) " >&6
2469else
2470  eval "$3=\$ac_header_compiler"
2471fi
2472eval ac_res=\$$3
2473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2474$as_echo "$ac_res" >&6; }
2475fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477
2478} # ac_fn_cxx_check_header_mongrel
2479
2480# ac_fn_cxx_try_run LINENO
2481# ------------------------
2482# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2483# that executables *can* be run.
2484ac_fn_cxx_try_run ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if { { ac_try="$ac_link"
2488case "(($ac_try" in
2489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490  *) ac_try_echo=$ac_try;;
2491esac
2492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493$as_echo "$ac_try_echo"; } >&5
2494  (eval "$ac_link") 2>&5
2495  ac_status=$?
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2498  { { case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_try") 2>&5
2505  ac_status=$?
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; }; }; then :
2508  ac_retval=0
2509else
2510  $as_echo "$as_me: program exited with status $ac_status" >&5
2511       $as_echo "$as_me: failed program was:" >&5
2512sed 's/^/| /' conftest.$ac_ext >&5
2513
2514       ac_retval=$ac_status
2515fi
2516  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_cxx_try_run
2521
2522# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2523# ---------------------------------------------------------
2524# Tests whether HEADER exists and can be compiled using the include files in
2525# INCLUDES, setting the cache variable VAR accordingly.
2526ac_fn_cxx_check_header_compile ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
2531if eval \${$3+:} false; then :
2532  $as_echo_n "(cached) " >&6
2533else
2534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h.  */
2536$4
2537#include <$2>
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  eval "$3=yes"
2541else
2542  eval "$3=no"
2543fi
2544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550
2551} # ac_fn_cxx_check_header_compile
2552
2553# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2554# ----------------------------------------------
2555# Tries to find the compile-time value of EXPR in a program that includes
2556# INCLUDES, setting VAR accordingly. Returns whether the value could be
2557# computed
2558ac_fn_cxx_compute_int ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  if test "$cross_compiling" = yes; then
2562    # Depending upon the size, compute the lo and hi bounds.
2563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564/* end confdefs.h.  */
2565$4
2566int
2567main ()
2568{
2569static int test_array [1 - 2 * !(($2) >= 0)];
2570test_array [0] = 0;
2571return test_array [0];
2572
2573  ;
2574  return 0;
2575}
2576_ACEOF
2577if ac_fn_cxx_try_compile "$LINENO"; then :
2578  ac_lo=0 ac_mid=0
2579  while :; do
2580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581/* end confdefs.h.  */
2582$4
2583int
2584main ()
2585{
2586static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2587test_array [0] = 0;
2588return test_array [0];
2589
2590  ;
2591  return 0;
2592}
2593_ACEOF
2594if ac_fn_cxx_try_compile "$LINENO"; then :
2595  ac_hi=$ac_mid; break
2596else
2597  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2598			if test $ac_lo -le $ac_mid; then
2599			  ac_lo= ac_hi=
2600			  break
2601			fi
2602			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2603fi
2604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2605  done
2606else
2607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) < 0)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=-1 ac_mid=-1
2623  while :; do
2624    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2625/* end confdefs.h.  */
2626$4
2627int
2628main ()
2629{
2630static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2631test_array [0] = 0;
2632return test_array [0];
2633
2634  ;
2635  return 0;
2636}
2637_ACEOF
2638if ac_fn_cxx_try_compile "$LINENO"; then :
2639  ac_lo=$ac_mid; break
2640else
2641  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2642			if test $ac_mid -le $ac_hi; then
2643			  ac_lo= ac_hi=
2644			  break
2645			fi
2646			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2647fi
2648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2649  done
2650else
2651  ac_lo= ac_hi=
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656# Binary search between lo and hi bounds.
2657while test "x$ac_lo" != "x$ac_hi"; do
2658  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid
2675else
2676  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679done
2680case $ac_lo in #((
2681?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2682'') ac_retval=1 ;;
2683esac
2684  else
2685    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688static long int longval () { return $2; }
2689static unsigned long int ulongval () { return $2; }
2690#include <stdio.h>
2691#include <stdlib.h>
2692int
2693main ()
2694{
2695
2696  FILE *f = fopen ("conftest.val", "w");
2697  if (! f)
2698    return 1;
2699  if (($2) < 0)
2700    {
2701      long int i = longval ();
2702      if (i != ($2))
2703	return 1;
2704      fprintf (f, "%ld", i);
2705    }
2706  else
2707    {
2708      unsigned long int i = ulongval ();
2709      if (i != ($2))
2710	return 1;
2711      fprintf (f, "%lu", i);
2712    }
2713  /* Do not output a trailing newline, as this causes \r\n confusion
2714     on some platforms.  */
2715  return ferror (f) || fclose (f) != 0;
2716
2717  ;
2718  return 0;
2719}
2720_ACEOF
2721if ac_fn_cxx_try_run "$LINENO"; then :
2722  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2723else
2724  ac_retval=1
2725fi
2726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2727  conftest.$ac_objext conftest.beam conftest.$ac_ext
2728rm -f conftest.val
2729
2730  fi
2731  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2732  as_fn_set_status $ac_retval
2733
2734} # ac_fn_cxx_compute_int
2735
2736# ac_fn_cxx_try_link LINENO
2737# -------------------------
2738# Try to link conftest.$ac_ext, and return whether this succeeded.
2739ac_fn_cxx_try_link ()
2740{
2741  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742  rm -f conftest.$ac_objext conftest$ac_exeext
2743  if { { ac_try="$ac_link"
2744case "(($ac_try" in
2745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2746  *) ac_try_echo=$ac_try;;
2747esac
2748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2749$as_echo "$ac_try_echo"; } >&5
2750  (eval "$ac_link") 2>conftest.err
2751  ac_status=$?
2752  if test -s conftest.err; then
2753    grep -v '^ *+' conftest.err >conftest.er1
2754    cat conftest.er1 >&5
2755    mv -f conftest.er1 conftest.err
2756  fi
2757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2758  test $ac_status = 0; } && {
2759	 test -z "$ac_cxx_werror_flag" ||
2760	 test ! -s conftest.err
2761       } && test -s conftest$ac_exeext && {
2762	 test "$cross_compiling" = yes ||
2763	 test -x conftest$ac_exeext
2764       }; then :
2765  ac_retval=0
2766else
2767  $as_echo "$as_me: failed program was:" >&5
2768sed 's/^/| /' conftest.$ac_ext >&5
2769
2770	ac_retval=1
2771fi
2772  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2773  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2774  # interfere with the next link command; also delete a directory that is
2775  # left behind by Apple's compiler.  We do this before executing the actions.
2776  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2777  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778  as_fn_set_status $ac_retval
2779
2780} # ac_fn_cxx_try_link
2781
2782# ac_fn_cxx_check_func LINENO FUNC VAR
2783# ------------------------------------
2784# Tests whether FUNC exists, setting the cache variable VAR accordingly
2785ac_fn_cxx_check_func ()
2786{
2787  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2789$as_echo_n "checking for $2... " >&6; }
2790if eval \${$3+:} false; then :
2791  $as_echo_n "(cached) " >&6
2792else
2793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h.  */
2795/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2796   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2797#define $2 innocuous_$2
2798
2799/* System header to define __stub macros and hopefully few prototypes,
2800    which can conflict with char $2 (); below.
2801    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2802    <limits.h> exists even on freestanding compilers.  */
2803
2804#ifdef __STDC__
2805# include <limits.h>
2806#else
2807# include <assert.h>
2808#endif
2809
2810#undef $2
2811
2812/* Override any GCC internal prototype to avoid an error.
2813   Use char because int might match the return type of a GCC
2814   builtin and then its argument prototype would still apply.  */
2815#ifdef __cplusplus
2816extern "C"
2817#endif
2818char $2 ();
2819/* The GNU C library defines this for functions which it implements
2820    to always fail with ENOSYS.  Some functions are actually named
2821    something starting with __ and the normal name is an alias.  */
2822#if defined __stub_$2 || defined __stub___$2
2823choke me
2824#endif
2825
2826int
2827main ()
2828{
2829return $2 ();
2830  ;
2831  return 0;
2832}
2833_ACEOF
2834if ac_fn_cxx_try_link "$LINENO"; then :
2835  eval "$3=yes"
2836else
2837  eval "$3=no"
2838fi
2839rm -f core conftest.err conftest.$ac_objext \
2840    conftest$ac_exeext conftest.$ac_ext
2841fi
2842eval ac_res=\$$3
2843	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2844$as_echo "$ac_res" >&6; }
2845  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2846
2847} # ac_fn_cxx_check_func
2848
2849# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2850# -------------------------------------------------------
2851# Tests whether HEADER exists and can be compiled using the include files in
2852# INCLUDES, setting the cache variable VAR accordingly.
2853ac_fn_c_check_header_compile ()
2854{
2855  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2857$as_echo_n "checking for $2... " >&6; }
2858if eval \${$3+:} false; then :
2859  $as_echo_n "(cached) " >&6
2860else
2861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862/* end confdefs.h.  */
2863$4
2864#include <$2>
2865_ACEOF
2866if ac_fn_c_try_compile "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872fi
2873eval ac_res=\$$3
2874	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2875$as_echo "$ac_res" >&6; }
2876  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2877
2878} # ac_fn_c_check_header_compile
2879cat >config.log <<_ACEOF
2880This file contains any messages produced by compilers while
2881running configure, to aid debugging if configure makes a mistake.
2882
2883It was created by OpenJDK $as_me jdk9, which was
2884generated by GNU Autoconf 2.69.  Invocation command line was
2885
2886  $ $0 $@
2887
2888_ACEOF
2889exec 5>>config.log
2890{
2891cat <<_ASUNAME
2892## --------- ##
2893## Platform. ##
2894## --------- ##
2895
2896hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2897uname -m = `(uname -m) 2>/dev/null || echo unknown`
2898uname -r = `(uname -r) 2>/dev/null || echo unknown`
2899uname -s = `(uname -s) 2>/dev/null || echo unknown`
2900uname -v = `(uname -v) 2>/dev/null || echo unknown`
2901
2902/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2903/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2904
2905/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2906/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2907/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2908/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2909/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2910/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2911/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2912
2913_ASUNAME
2914
2915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916for as_dir in $PATH
2917do
2918  IFS=$as_save_IFS
2919  test -z "$as_dir" && as_dir=.
2920    $as_echo "PATH: $as_dir"
2921  done
2922IFS=$as_save_IFS
2923
2924} >&5
2925
2926cat >&5 <<_ACEOF
2927
2928
2929## ----------- ##
2930## Core tests. ##
2931## ----------- ##
2932
2933_ACEOF
2934
2935
2936# Keep a trace of the command line.
2937# Strip out --no-create and --no-recursion so they do not pile up.
2938# Strip out --silent because we don't want to record it for future runs.
2939# Also quote any args containing shell meta-characters.
2940# Make two passes to allow for proper duplicate-argument suppression.
2941ac_configure_args=
2942ac_configure_args0=
2943ac_configure_args1=
2944ac_must_keep_next=false
2945for ac_pass in 1 2
2946do
2947  for ac_arg
2948  do
2949    case $ac_arg in
2950    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2951    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2952    | -silent | --silent | --silen | --sile | --sil)
2953      continue ;;
2954    *\'*)
2955      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2956    esac
2957    case $ac_pass in
2958    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2959    2)
2960      as_fn_append ac_configure_args1 " '$ac_arg'"
2961      if test $ac_must_keep_next = true; then
2962	ac_must_keep_next=false # Got value, back to normal.
2963      else
2964	case $ac_arg in
2965	  *=* | --config-cache | -C | -disable-* | --disable-* \
2966	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2967	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2968	  | -with-* | --with-* | -without-* | --without-* | --x)
2969	    case "$ac_configure_args0 " in
2970	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2971	    esac
2972	    ;;
2973	  -* ) ac_must_keep_next=true ;;
2974	esac
2975      fi
2976      as_fn_append ac_configure_args " '$ac_arg'"
2977      ;;
2978    esac
2979  done
2980done
2981{ ac_configure_args0=; unset ac_configure_args0;}
2982{ ac_configure_args1=; unset ac_configure_args1;}
2983
2984# When interrupted or exit'd, cleanup temporary files, and complete
2985# config.log.  We remove comments because anyway the quotes in there
2986# would cause problems or look ugly.
2987# WARNING: Use '\'' to represent an apostrophe within the trap.
2988# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2989trap 'exit_status=$?
2990  # Save into config.log some information that might help in debugging.
2991  {
2992    echo
2993
2994    $as_echo "## ---------------- ##
2995## Cache variables. ##
2996## ---------------- ##"
2997    echo
2998    # The following way of writing the cache mishandles newlines in values,
2999(
3000  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3001    eval ac_val=\$$ac_var
3002    case $ac_val in #(
3003    *${as_nl}*)
3004      case $ac_var in #(
3005      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3006$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3007      esac
3008      case $ac_var in #(
3009      _ | IFS | as_nl) ;; #(
3010      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3011      *) { eval $ac_var=; unset $ac_var;} ;;
3012      esac ;;
3013    esac
3014  done
3015  (set) 2>&1 |
3016    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3017    *${as_nl}ac_space=\ *)
3018      sed -n \
3019	"s/'\''/'\''\\\\'\'''\''/g;
3020	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3021      ;; #(
3022    *)
3023      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3024      ;;
3025    esac |
3026    sort
3027)
3028    echo
3029
3030    $as_echo "## ----------------- ##
3031## Output variables. ##
3032## ----------------- ##"
3033    echo
3034    for ac_var in $ac_subst_vars
3035    do
3036      eval ac_val=\$$ac_var
3037      case $ac_val in
3038      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3039      esac
3040      $as_echo "$ac_var='\''$ac_val'\''"
3041    done | sort
3042    echo
3043
3044    if test -n "$ac_subst_files"; then
3045      $as_echo "## ------------------- ##
3046## File substitutions. ##
3047## ------------------- ##"
3048      echo
3049      for ac_var in $ac_subst_files
3050      do
3051	eval ac_val=\$$ac_var
3052	case $ac_val in
3053	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3054	esac
3055	$as_echo "$ac_var='\''$ac_val'\''"
3056      done | sort
3057      echo
3058    fi
3059
3060    if test -s confdefs.h; then
3061      $as_echo "## ----------- ##
3062## confdefs.h. ##
3063## ----------- ##"
3064      echo
3065      cat confdefs.h
3066      echo
3067    fi
3068    test "$ac_signal" != 0 &&
3069      $as_echo "$as_me: caught signal $ac_signal"
3070    $as_echo "$as_me: exit $exit_status"
3071  } >&5
3072  rm -f core *.core core.conftest.* &&
3073    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3074    exit $exit_status
3075' 0
3076for ac_signal in 1 2 13 15; do
3077  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3078done
3079ac_signal=0
3080
3081# confdefs.h avoids OS command line length limits that DEFS can exceed.
3082rm -f -r conftest* confdefs.h
3083
3084$as_echo "/* confdefs.h */" > confdefs.h
3085
3086# Predefined preprocessor variables.
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_NAME "$PACKAGE_NAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_VERSION "$PACKAGE_VERSION"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_STRING "$PACKAGE_STRING"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3106_ACEOF
3107
3108cat >>confdefs.h <<_ACEOF
3109#define PACKAGE_URL "$PACKAGE_URL"
3110_ACEOF
3111
3112
3113# Let the site file select an alternate cache file if it wants to.
3114# Prefer an explicitly selected file to automatically selected ones.
3115ac_site_file1=NONE
3116ac_site_file2=NONE
3117if test -n "$CONFIG_SITE"; then
3118  # We do not want a PATH search for config.site.
3119  case $CONFIG_SITE in #((
3120    -*)  ac_site_file1=./$CONFIG_SITE;;
3121    */*) ac_site_file1=$CONFIG_SITE;;
3122    *)   ac_site_file1=./$CONFIG_SITE;;
3123  esac
3124elif test "x$prefix" != xNONE; then
3125  ac_site_file1=$prefix/share/config.site
3126  ac_site_file2=$prefix/etc/config.site
3127else
3128  ac_site_file1=$ac_default_prefix/share/config.site
3129  ac_site_file2=$ac_default_prefix/etc/config.site
3130fi
3131for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3132do
3133  test "x$ac_site_file" = xNONE && continue
3134  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3135    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3136$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3137    sed 's/^/| /' "$ac_site_file" >&5
3138    . "$ac_site_file" \
3139      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3141as_fn_error $? "failed to load site script $ac_site_file
3142See \`config.log' for more details" "$LINENO" 5; }
3143  fi
3144done
3145
3146if test -r "$cache_file"; then
3147  # Some versions of bash will fail to source /dev/null (special files
3148  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3149  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3150    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3151$as_echo "$as_me: loading cache $cache_file" >&6;}
3152    case $cache_file in
3153      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3154      *)                      . "./$cache_file";;
3155    esac
3156  fi
3157else
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3159$as_echo "$as_me: creating cache $cache_file" >&6;}
3160  >$cache_file
3161fi
3162
3163# Check that the precious variables saved in the cache have kept the same
3164# value.
3165ac_cache_corrupted=false
3166for ac_var in $ac_precious_vars; do
3167  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3168  eval ac_new_set=\$ac_env_${ac_var}_set
3169  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3170  eval ac_new_val=\$ac_env_${ac_var}_value
3171  case $ac_old_set,$ac_new_set in
3172    set,)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,set)
3177      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3178$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3179      ac_cache_corrupted=: ;;
3180    ,);;
3181    *)
3182      if test "x$ac_old_val" != "x$ac_new_val"; then
3183	# differences in whitespace do not lead to failure.
3184	ac_old_val_w=`echo x $ac_old_val`
3185	ac_new_val_w=`echo x $ac_new_val`
3186	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3188$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3189	  ac_cache_corrupted=:
3190	else
3191	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3192$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3193	  eval $ac_var=\$ac_old_val
3194	fi
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3196$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3197	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3198$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3199      fi;;
3200  esac
3201  # Pass precious variables to config.status.
3202  if test "$ac_new_set" = set; then
3203    case $ac_new_val in
3204    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3205    *) ac_arg=$ac_var=$ac_new_val ;;
3206    esac
3207    case " $ac_configure_args " in
3208      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3209      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3210    esac
3211  fi
3212done
3213if $ac_cache_corrupted; then
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3217$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3218  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3219fi
3220## -------------------- ##
3221## Main body of script. ##
3222## -------------------- ##
3223
3224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229
3230
3231
3232ac_aux_dir=
3233for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3234  if test -f "$ac_dir/install-sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install-sh -c"
3237    break
3238  elif test -f "$ac_dir/install.sh"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/install.sh -c"
3241    break
3242  elif test -f "$ac_dir/shtool"; then
3243    ac_aux_dir=$ac_dir
3244    ac_install_sh="$ac_aux_dir/shtool install -c"
3245    break
3246  fi
3247done
3248if test -z "$ac_aux_dir"; then
3249  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3250fi
3251
3252# These three variables are undocumented and unsupported,
3253# and are intended to be withdrawn in a future Autoconf release.
3254# They can cause serious problems if a builder's source tree is in a directory
3255# whose full name contains unusual characters.
3256ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3257ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3258ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3259
3260
3261# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3262
3263#
3264# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288#
3289# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3290#
3291# This program is free software; you can redistribute it and/or modify
3292# it under the terms of the GNU General Public License as published by
3293# the Free Software Foundation; either version 2 of the License, or
3294# (at your option) any later version.
3295#
3296# This program is distributed in the hope that it will be useful, but
3297# WITHOUT ANY WARRANTY; without even the implied warranty of
3298# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3299# General Public License for more details.
3300#
3301# You should have received a copy of the GNU General Public License
3302# along with this program; if not, write to the Free Software
3303# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3304#
3305# As a special exception to the GNU General Public License, if you
3306# distribute this file as part of a program that contains a
3307# configuration script generated by Autoconf, you may include it under
3308# the same distribution terms that you use for the rest of that program.
3309
3310# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3311# ----------------------------------
3312# PKG_PROG_PKG_CONFIG
3313
3314# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3315#
3316# Check to see whether a particular set of modules exists.  Similar
3317# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3318#
3319#
3320# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3321# this or PKG_CHECK_MODULES is called, or make sure to call
3322# PKG_CHECK_EXISTS manually
3323# --------------------------------------------------------------
3324
3325
3326
3327# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3328# ---------------------------------------------
3329# _PKG_CONFIG
3330
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332# -----------------------------
3333# _PKG_SHORT_ERRORS_SUPPORTED
3334
3335
3336# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3337# [ACTION-IF-NOT-FOUND])
3338#
3339#
3340# Note that if there is a possibility the first call to
3341# PKG_CHECK_MODULES might not happen, you should be sure to include an
3342# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3343#
3344#
3345# --------------------------------------------------------------
3346# PKG_CHECK_MODULES
3347
3348
3349# Include these first...
3350#
3351# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3352# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3353#
3354# This code is free software; you can redistribute it and/or modify it
3355# under the terms of the GNU General Public License version 2 only, as
3356# published by the Free Software Foundation.  Oracle designates this
3357# particular file as subject to the "Classpath" exception as provided
3358# by Oracle in the LICENSE file that accompanied this code.
3359#
3360# This code is distributed in the hope that it will be useful, but WITHOUT
3361# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3362# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3363# version 2 for more details (a copy is included in the LICENSE file that
3364# accompanied this code).
3365#
3366# You should have received a copy of the GNU General Public License version
3367# 2 along with this work; if not, write to the Free Software Foundation,
3368# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3369#
3370# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3371# or visit www.oracle.com if you need additional information or have any
3372# questions.
3373#
3374
3375# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3376# If so, then append $1 to $2 \
3377# Also set JVM_ARG_OK to true/false depending on outcome.
3378
3379
3380# Appends a string to a path variable, only adding the : when needed.
3381
3382
3383# Prepends a string to a path variable, only adding the : when needed.
3384
3385
3386# This will make sure the given variable points to a full and proper
3387# path. This means:
3388# 1) There will be no spaces in the path. On unix platforms,
3389#    spaces in the path will result in an error. On Windows,
3390#    the path will be rewritten using short-style to be space-free.
3391# 2) The path will be absolute, and it will be in unix-style (on
3392#     cygwin).
3393# $1: The name of the variable to fix
3394
3395
3396# This will make sure the given variable points to a executable
3397# with a full and proper path. This means:
3398# 1) There will be no spaces in the path. On unix platforms,
3399#    spaces in the path will result in an error. On Windows,
3400#    the path will be rewritten using short-style to be space-free.
3401# 2) The path will be absolute, and it will be in unix-style (on
3402#     cygwin).
3403# Any arguments given to the executable is preserved.
3404# If the input variable does not have a directory specification, then
3405# it need to be in the PATH.
3406# $1: The name of the variable to fix
3407
3408
3409
3410
3411# Register a --with argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --with-
3413
3414
3415# Register a --enable argument but mark it as deprecated
3416# $1: The name of the with argument to deprecate, not including --enable-
3417# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3418
3419
3420
3421
3422# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3423# $1: variable to check
3424
3425
3426# Check that there are no unprocessed overridden variables left.
3427# If so, they are an incorrect argument and we will exit with an error.
3428
3429
3430# Setup a tool for the given variable. If correctly specified by the user,
3431# use that value, otherwise search for the tool using the supplied code snippet.
3432# $1: variable to set
3433# $2: code snippet to call to look for the tool
3434
3435
3436# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3437# $1: variable to set
3438# $2: executable name (or list of names) to look for
3439
3440
3441# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3442# $1: variable to set
3443# $2: executable name (or list of names) to look for
3444
3445
3446# Like BASIC_PATH_PROGS but fails if no tool was found.
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Like BASIC_SETUP_TOOL but fails if no tool was found.
3452# $1: variable to set
3453# $2: autoconf macro to call to look for the special tool
3454
3455
3456# Setup the most fundamental tools that relies on not much else to set up,
3457# but is used by much of the early bootstrap code.
3458
3459
3460# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3461
3462
3463# Evaluates platform specific overrides for devkit variables.
3464# $1: Name of variable
3465
3466
3467
3468
3469
3470
3471#%%% Simple tools %%%
3472
3473# Check if we have found a usable version of make
3474# $1: the path to a potential make binary (or empty)
3475# $2: the description on how we found this
3476
3477
3478
3479
3480# Goes looking for a usable version of GNU make.
3481
3482
3483
3484
3485
3486
3487# Check if build directory is on local disk. If not possible to determine,
3488# we prefer to claim it's local.
3489# Argument 1: directory to test
3490# Argument 2: what to do if it is on local disk
3491# Argument 3: what to do otherwise (remote disk or failure)
3492
3493
3494# Check that source files have basic read permissions set. This might
3495# not be the case in cygwin in certain conditions.
3496
3497
3498
3499
3500# Check for support for specific options in bash
3501
3502
3503#
3504# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506#
3507# This code is free software; you can redistribute it and/or modify it
3508# under the terms of the GNU General Public License version 2 only, as
3509# published by the Free Software Foundation.  Oracle designates this
3510# particular file as subject to the "Classpath" exception as provided
3511# by Oracle in the LICENSE file that accompanied this code.
3512#
3513# This code is distributed in the hope that it will be useful, but WITHOUT
3514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516# version 2 for more details (a copy is included in the LICENSE file that
3517# accompanied this code).
3518#
3519# You should have received a copy of the GNU General Public License version
3520# 2 along with this work; if not, write to the Free Software Foundation,
3521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522#
3523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524# or visit www.oracle.com if you need additional information or have any
3525# questions.
3526#
3527
3528
3529
3530
3531
3532# Helper function which possibly converts a path using DOS-style short mode.
3533# If so, the updated path is stored in $new_path.
3534# $1: The path to check
3535
3536
3537# Helper function which possibly converts a path using DOS-style short mode.
3538# If so, the updated path is stored in $new_path.
3539# $1: The path to check
3540
3541
3542# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3543# and could probably be heavily simplified. However, all changes in this
3544# area tend to need lot of testing in different scenarios, and in lack of
3545# proper unit testing, cleaning this up has not been deemed worth the effort
3546# at the moment.
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3557
3558
3559
3560
3561#
3562# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3564#
3565# This code is free software; you can redistribute it and/or modify it
3566# under the terms of the GNU General Public License version 2 only, as
3567# published by the Free Software Foundation.  Oracle designates this
3568# particular file as subject to the "Classpath" exception as provided
3569# by Oracle in the LICENSE file that accompanied this code.
3570#
3571# This code is distributed in the hope that it will be useful, but WITHOUT
3572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3574# version 2 for more details (a copy is included in the LICENSE file that
3575# accompanied this code).
3576#
3577# You should have received a copy of the GNU General Public License version
3578# 2 along with this work; if not, write to the Free Software Foundation,
3579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3580#
3581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3582# or visit www.oracle.com if you need additional information or have any
3583# questions.
3584#
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596# ... then the rest
3597#
3598# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3599# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3600#
3601# This code is free software; you can redistribute it and/or modify it
3602# under the terms of the GNU General Public License version 2 only, as
3603# published by the Free Software Foundation.  Oracle designates this
3604# particular file as subject to the "Classpath" exception as provided
3605# by Oracle in the LICENSE file that accompanied this code.
3606#
3607# This code is distributed in the hope that it will be useful, but WITHOUT
3608# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3609# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3610# version 2 for more details (a copy is included in the LICENSE file that
3611# accompanied this code).
3612#
3613# You should have received a copy of the GNU General Public License version
3614# 2 along with this work; if not, write to the Free Software Foundation,
3615# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3616#
3617# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3618# or visit www.oracle.com if you need additional information or have any
3619# questions.
3620#
3621
3622########################################################################
3623# This file handles detection of the Boot JDK. The Boot JDK detection
3624# process has been developed as a response to solve a complex real-world
3625# problem. Initially, it was simple, but it has grown as platform after
3626# platform, idiosyncracy after idiosyncracy has been supported.
3627#
3628# The basic idea is this:
3629# 1) You need an acceptable *) JDK to use as a Boot JDK
3630# 2) There are several ways to locate a JDK, that are mostly platform
3631#    dependent **)
3632# 3) You can have multiple JDKs installed
3633# 4) If possible, configure should try to dig out an acceptable JDK
3634#    automatically, without having to resort to command-line options
3635#
3636# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3637#     javac) and not a JRE, etc.
3638#
3639# **) On Windows we typically use a well-known path.
3640#     On MacOSX we typically use the tool java_home.
3641#     On Linux we typically find javac in the $PATH, and then follow a
3642#     chain of symlinks that often ends up in a real JDK.
3643#
3644# This leads to the code where we check in different ways to locate a
3645# JDK, and if one is found, check if it is acceptable. If not, we print
3646# our reasons for rejecting it (useful when debugging non-working
3647# configure situations) and continue checking the next one.
3648########################################################################
3649
3650# Execute the check given as argument, and verify the result
3651# If the Boot JDK was previously found, do nothing
3652# $1 A command line (typically autoconf macro) to execute
3653
3654
3655# Test: Is bootjdk explicitely set by command line arguments?
3656
3657
3658# Test: Is bootjdk available from builddeps?
3659
3660
3661# Test: Is $JAVA_HOME set?
3662
3663
3664# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3665
3666
3667# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3668# $1: Argument to the java_home binary (optional)
3669
3670
3671# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3672
3673
3674# Look for a jdk in the given path. If there are multiple, try to select the newest.
3675# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3676# $1 = Path to directory containing jdk installations.
3677# $2 = String to append to the found JDK directory to get the proper JDK home
3678
3679
3680# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3681# environmental variable as base for where to look.
3682# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3683
3684
3685# Test: Is there a JDK installed in default, well-known locations?
3686
3687
3688# Check that a command-line tool in the Boot JDK is correct
3689# $1 = name of variable to assign
3690# $2 = name of binary
3691
3692
3693###############################################################################
3694#
3695# We need a Boot JDK to bootstrap the build.
3696#
3697
3698
3699
3700
3701
3702#
3703# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3704# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3705#
3706# This code is free software; you can redistribute it and/or modify it
3707# under the terms of the GNU General Public License version 2 only, as
3708# published by the Free Software Foundation.  Oracle designates this
3709# particular file as subject to the "Classpath" exception as provided
3710# by Oracle in the LICENSE file that accompanied this code.
3711#
3712# This code is distributed in the hope that it will be useful, but WITHOUT
3713# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3714# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3715# version 2 for more details (a copy is included in the LICENSE file that
3716# accompanied this code).
3717#
3718# You should have received a copy of the GNU General Public License version
3719# 2 along with this work; if not, write to the Free Software Foundation,
3720# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3721#
3722# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3723# or visit www.oracle.com if you need additional information or have any
3724# questions.
3725#
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746#
3747# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3748# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3749#
3750# This code is free software; you can redistribute it and/or modify it
3751# under the terms of the GNU General Public License version 2 only, as
3752# published by the Free Software Foundation.  Oracle designates this
3753# particular file as subject to the "Classpath" exception as provided
3754# by Oracle in the LICENSE file that accompanied this code.
3755#
3756# This code is distributed in the hope that it will be useful, but WITHOUT
3757# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3758# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3759# version 2 for more details (a copy is included in the LICENSE file that
3760# accompanied this code).
3761#
3762# You should have received a copy of the GNU General Public License version
3763# 2 along with this work; if not, write to the Free Software Foundation,
3764# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3765#
3766# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3767# or visit www.oracle.com if you need additional information or have any
3768# questions.
3769#
3770
3771
3772
3773
3774
3775# Documentation on common flags used for solstudio in HIGHEST.
3776#
3777# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3778#          done with care, there are some assumptions below that need to
3779#          be understood about the use of pointers, and IEEE behavior.
3780#
3781# -fns: Use non-standard floating point mode (not IEEE 754)
3782# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3783# -fsingle: Use single precision floating point with 'float'
3784# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3785#   (Source with excessing pointer casting and data access with mixed
3786#    pointer types are not recommended)
3787# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3788#   (If you expect perfect errno behavior, do not use this)
3789# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3790# -xrestrict: Pointer parameters to functions do not overlap
3791#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3792#    If you pass in multiple pointers to the same data, do not use this)
3793# -xlibmil: Inline some library routines
3794#   (If you expect perfect errno behavior, do not use this)
3795# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3796#   (If you expect perfect errno behavior, do not use this)
3797#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3798
3799    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3800    # Bug?
3801    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3802    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3803    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3804    #fi
3805
3806
3807
3808
3809
3810# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3811#                                   [RUN-IF-FALSE])
3812# ------------------------------------------------------------
3813# Check that the c and c++ compilers support an argument
3814
3815
3816# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3817#                                    [RUN-IF-FALSE])
3818# ------------------------------------------------------------
3819# Check that the linker support an argument
3820
3821
3822
3823
3824#
3825# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3827#
3828# This code is free software; you can redistribute it and/or modify it
3829# under the terms of the GNU General Public License version 2 only, as
3830# published by the Free Software Foundation.  Oracle designates this
3831# particular file as subject to the "Classpath" exception as provided
3832# by Oracle in the LICENSE file that accompanied this code.
3833#
3834# This code is distributed in the hope that it will be useful, but WITHOUT
3835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3837# version 2 for more details (a copy is included in the LICENSE file that
3838# accompanied this code).
3839#
3840# You should have received a copy of the GNU General Public License version
3841# 2 along with this work; if not, write to the Free Software Foundation,
3842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3843#
3844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3845# or visit www.oracle.com if you need additional information or have any
3846# questions.
3847#
3848
3849
3850
3851
3852
3853cygwin_help() {
3854  case $1 in
3855    unzip)
3856      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3857      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3858      ;;
3859    zip)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    make)
3864      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3866      ;;
3867    freetype)
3868      HELP_MSG="
3869The freetype library can now be build during the configure process.
3870Download the freetype sources and unpack them into an arbitrary directory:
3871
3872wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3873tar -xzf freetype-2.5.3.tar.gz
3874
3875Then run configure with '--with-freetype-src=<freetype_src>'. This will
3876automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3877builds or into '<freetype_src>/lib32' for 32-bit builds.
3878Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3879and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3880      ;;
3881  esac
3882}
3883
3884msys_help() {
3885  PKGHANDLER_COMMAND=""
3886}
3887
3888apt_help() {
3889  case $1 in
3890    devkit)
3891      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3892    openjdk)
3893      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3894    alsa)
3895      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3896    cups)
3897      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3898    freetype)
3899      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3900    pulse)
3901      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3902    x11)
3903      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3904    ccache)
3905      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3906  esac
3907}
3908
3909yum_help() {
3910  case $1 in
3911    devkit)
3912      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3913    openjdk)
3914      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3915    alsa)
3916      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3917    cups)
3918      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3919    freetype)
3920      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3921    pulse)
3922      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3923    x11)
3924      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3925    ccache)
3926      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3927  esac
3928}
3929
3930port_help() {
3931  PKGHANDLER_COMMAND=""
3932}
3933
3934pkgutil_help() {
3935  PKGHANDLER_COMMAND=""
3936}
3937
3938pkgadd_help() {
3939  PKGHANDLER_COMMAND=""
3940}
3941
3942# This function will check if we're called from the "configure" wrapper while
3943# printing --help. If so, we will print out additional information that can
3944# only be extracted within the autoconf script, and then exit. This must be
3945# called at the very beginning in configure.ac.
3946
3947
3948
3949
3950
3951
3952#
3953# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3954# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3955#
3956# This code is free software; you can redistribute it and/or modify it
3957# under the terms of the GNU General Public License version 2 only, as
3958# published by the Free Software Foundation.  Oracle designates this
3959# particular file as subject to the "Classpath" exception as provided
3960# by Oracle in the LICENSE file that accompanied this code.
3961#
3962# This code is distributed in the hope that it will be useful, but WITHOUT
3963# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3964# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3965# version 2 for more details (a copy is included in the LICENSE file that
3966# accompanied this code).
3967#
3968# You should have received a copy of the GNU General Public License version
3969# 2 along with this work; if not, write to the Free Software Foundation,
3970# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3971#
3972# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3973# or visit www.oracle.com if you need additional information or have any
3974# questions.
3975#
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986###############################################################################
3987#
3988# Should we build only OpenJDK even if closed sources are present?
3989#
3990
3991
3992
3993
3994###############################################################################
3995#
3996# Setup version numbers
3997#
3998
3999
4000
4001
4002
4003
4004################################################################################
4005#
4006# Gcov coverage data for hotspot
4007#
4008
4009
4010#
4011# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4012# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4013#
4014# This code is free software; you can redistribute it and/or modify it
4015# under the terms of the GNU General Public License version 2 only, as
4016# published by the Free Software Foundation.  Oracle designates this
4017# particular file as subject to the "Classpath" exception as provided
4018# by Oracle in the LICENSE file that accompanied this code.
4019#
4020# This code is distributed in the hope that it will be useful, but WITHOUT
4021# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4022# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4023# version 2 for more details (a copy is included in the LICENSE file that
4024# accompanied this code).
4025#
4026# You should have received a copy of the GNU General Public License version
4027# 2 along with this work; if not, write to the Free Software Foundation,
4028# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4029#
4030# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4031# or visit www.oracle.com if you need additional information or have any
4032# questions.
4033#
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055#
4056# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4057# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4058#
4059# This code is free software; you can redistribute it and/or modify it
4060# under the terms of the GNU General Public License version 2 only, as
4061# published by the Free Software Foundation.  Oracle designates this
4062# particular file as subject to the "Classpath" exception as provided
4063# by Oracle in the LICENSE file that accompanied this code.
4064#
4065# This code is distributed in the hope that it will be useful, but WITHOUT
4066# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4067# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4068# version 2 for more details (a copy is included in the LICENSE file that
4069# accompanied this code).
4070#
4071# You should have received a copy of the GNU General Public License version
4072# 2 along with this work; if not, write to the Free Software Foundation,
4073# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4074#
4075# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4076# or visit www.oracle.com if you need additional information or have any
4077# questions.
4078#
4079
4080# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4081# Converts autoconf style CPU name to OpenJDK style, into
4082# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4083
4084
4085# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4086# Converts autoconf style OS name to OpenJDK style, into
4087# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4088
4089
4090# Expects $host_os $host_cpu $build_os and $build_cpu
4091# and $with_target_bits to have been setup!
4092#
4093# Translate the standard triplet(quadruplet) definition
4094# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4095# OPENJDK_BUILD_OS, etc.
4096
4097
4098# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4099# accordingly. Must be done after setting up build and target system, but before
4100# doing anything else with these values.
4101
4102
4103# Setup the legacy variables, for controlling the old makefiles.
4104#
4105
4106
4107
4108
4109#%%% Build and target systems %%%
4110
4111
4112
4113
4114# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4115# Add -mX to various FLAGS variables.
4116
4117
4118
4119
4120
4121
4122#
4123# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147
4148
4149
4150
4151
4152
4153
4154#
4155# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4156# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4157#
4158# This code is free software; you can redistribute it and/or modify it
4159# under the terms of the GNU General Public License version 2 only, as
4160# published by the Free Software Foundation.  Oracle designates this
4161# particular file as subject to the "Classpath" exception as provided
4162# by Oracle in the LICENSE file that accompanied this code.
4163#
4164# This code is distributed in the hope that it will be useful, but WITHOUT
4165# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4166# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4167# version 2 for more details (a copy is included in the LICENSE file that
4168# accompanied this code).
4169#
4170# You should have received a copy of the GNU General Public License version
4171# 2 along with this work; if not, write to the Free Software Foundation,
4172# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4173#
4174# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4175# or visit www.oracle.com if you need additional information or have any
4176# questions.
4177#
4178
4179########################################################################
4180# This file is responsible for detecting, verifying and setting up the
4181# toolchain, i.e. the compiler, linker and related utilities. It will setup
4182# proper paths to the binaries, but it will not setup any flags.
4183#
4184# The binaries used is determined by the toolchain type, which is the family of
4185# compilers and related tools that are used.
4186########################################################################
4187
4188
4189# All valid toolchains, regardless of platform (used by help.m4)
4190VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4191
4192# These toolchains are valid on different platforms
4193VALID_TOOLCHAINS_linux="gcc clang"
4194VALID_TOOLCHAINS_solaris="solstudio"
4195VALID_TOOLCHAINS_macosx="gcc clang"
4196VALID_TOOLCHAINS_aix="xlc"
4197VALID_TOOLCHAINS_windows="microsoft"
4198
4199# Toolchain descriptions
4200TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4201TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4202TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4203TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4204TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4205
4206# Setup a number of variables describing how native output files are
4207# named on this platform/toolchain.
4208
4209
4210# Determine which toolchain type to use, and make sure it is valid for this
4211# platform. Setup various information about the selected toolchain.
4212
4213
4214# Before we start detecting the toolchain executables, we might need some
4215# special setup, e.g. additional paths etc.
4216
4217
4218# Restore path, etc
4219
4220
4221# Check if a compiler is of the toolchain type we expect, and save the version
4222# information from it. If the compiler does not match the expected type,
4223# this function will abort using AC_MSG_ERROR. If it matches, the version will
4224# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4225# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4226#
4227# $1 = compiler to test (CC or CXX)
4228# $2 = human readable name of compiler (C or C++)
4229
4230
4231# Try to locate the given C or C++ compiler in the path, or otherwise.
4232#
4233# $1 = compiler to test (CC or CXX)
4234# $2 = human readable name of compiler (C or C++)
4235# $3 = list of compiler names to search for
4236
4237
4238# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4239# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4240# archiver (AR). Verify that the compilers are correct according to the
4241# toolchain type.
4242
4243
4244# Setup additional tools that is considered a part of the toolchain, but not the
4245# core part. Many of these are highly platform-specific and do not exist,
4246# and/or are not needed on all platforms.
4247
4248
4249# Setup the build tools (i.e, the compiler and linker used to build programs
4250# that should be run on the build platform, not the target platform, as a build
4251# helper). Since the non-cross-compile case uses the normal, target compilers
4252# for this, we can only do this after these have been setup.
4253
4254
4255# Setup legacy variables that are still needed as alternative ways to refer to
4256# parts of the toolchain.
4257
4258
4259# Do some additional checks on the detected tools.
4260
4261
4262# Setup the JTReg Regression Test Harness.
4263
4264
4265#
4266# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290################################################################################
4291# The order of these defines the priority by which we try to find them.
4292VALID_VS_VERSIONS="2013 2012 2010"
4293
4294VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4295VS_VERSION_INTERNAL_2010=100
4296VS_MSVCR_2010=msvcr100.dll
4297# We don't use msvcp on Visual Studio 2010
4298#VS_MSVCP_2010=msvcp100.dll
4299VS_ENVVAR_2010="VS100COMNTOOLS"
4300VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4301VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4302VS_VS_PLATFORM_NAME_2010="v100"
4303VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4304
4305VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4306VS_VERSION_INTERNAL_2012=110
4307VS_MSVCR_2012=msvcr110.dll
4308VS_MSVCP_2012=msvcp110.dll
4309VS_ENVVAR_2012="VS110COMNTOOLS"
4310VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4311VS_SDK_INSTALLDIR_2012=
4312VS_VS_PLATFORM_NAME_2012="v110"
4313VS_SDK_PLATFORM_NAME_2012=
4314
4315VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4316VS_VERSION_INTERNAL_2013=120
4317VS_MSVCR_2013=msvcr120.dll
4318VS_MSVCP_2013=msvcp120.dll
4319VS_ENVVAR_2013="VS120COMNTOOLS"
4320VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4321VS_SDK_INSTALLDIR_2013=
4322VS_VS_PLATFORM_NAME_2013="v120"
4323VS_SDK_PLATFORM_NAME_2013=
4324
4325################################################################################
4326
4327
4328
4329################################################################################
4330
4331
4332
4333################################################################################
4334# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4335# build environment and assigns it to VS_ENV_CMD
4336
4337
4338################################################################################
4339
4340
4341
4342################################################################################
4343# Check if the VS env variables were setup prior to running configure.
4344# If not, then find vcvarsall.bat and run it automatically, and integrate
4345# the set env variables into the spec file.
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360# This line needs to be here, verbatim, after all includes and the dummy hook
4361# definitions. It is replaced with custom functionality when building
4362# custom sources.
4363#CUSTOM_AUTOCONF_INCLUDE
4364
4365# Do not change or remove the following line, it is needed for consistency checks:
4366DATE_WHEN_GENERATED=1430900462
4367
4368###############################################################################
4369#
4370# Initialization / Boot-strapping
4371#
4372# The bootstrapping process needs to solve the "chicken or the egg" problem,
4373# thus it jumps back and forth, each time gaining something needed later on.
4374#
4375###############################################################################
4376
4377# If we are requested to print additional help, do that and then exit.
4378# This must be the very first call.
4379
4380  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4381    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4382    $PRINTF "Which are valid to use depends on the build platform.\n"
4383    for toolchain in $VALID_TOOLCHAINS_all; do
4384      # Use indirect variable referencing
4385      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4386      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4387      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4388    done
4389
4390    # And now exit directly
4391    exit 0
4392  fi
4393
4394
4395# Basic initialization that must happen first of all in the normal process.
4396
4397  # Save the original command line. This is passed to us by the wrapper configure script.
4398
4399  # Save the path variable before it gets changed
4400  ORIGINAL_PATH="$PATH"
4401
4402  DATE_WHEN_CONFIGURED=`LANG=C date`
4403
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4405$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4407$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4408
4409
4410  # Start with tools that do not need have cross compilation support
4411  # and can be expected to be found in the default PATH. These tools are
4412  # used by configure. Nor are these tools expected to be found in the
4413  # devkit from the builddeps server either, since they are
4414  # needed to download the devkit.
4415
4416  # First are all the simple required tools.
4417
4418
4419
4420  # Publish this variable in the help.
4421
4422
4423  if test "x$BASENAME" = x; then
4424    # The variable is not set by user, try to locate tool using the code snippet
4425    for ac_prog in basename
4426do
4427  # Extract the first word of "$ac_prog", so it can be a program name with args.
4428set dummy $ac_prog; ac_word=$2
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4430$as_echo_n "checking for $ac_word... " >&6; }
4431if ${ac_cv_path_BASENAME+:} false; then :
4432  $as_echo_n "(cached) " >&6
4433else
4434  case $BASENAME in
4435  [\\/]* | ?:[\\/]*)
4436  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4437  ;;
4438  *)
4439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442  IFS=$as_save_IFS
4443  test -z "$as_dir" && as_dir=.
4444    for ac_exec_ext in '' $ac_executable_extensions; do
4445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4446    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4448    break 2
4449  fi
4450done
4451  done
4452IFS=$as_save_IFS
4453
4454  ;;
4455esac
4456fi
4457BASENAME=$ac_cv_path_BASENAME
4458if test -n "$BASENAME"; then
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4460$as_echo "$BASENAME" >&6; }
4461else
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463$as_echo "no" >&6; }
4464fi
4465
4466
4467  test -n "$BASENAME" && break
4468done
4469
4470  else
4471    # The variable is set, but is it from the command line or the environment?
4472
4473    # Try to remove the string !BASENAME! from our list.
4474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4476      # If it failed, the variable was not from the command line. Ignore it,
4477      # but warn the user (except for BASH, which is always set by the calling BASH).
4478      if test "xBASENAME" != xBASH; then
4479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4480$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4481      fi
4482      # Try to locate tool using the code snippet
4483      for ac_prog in basename
4484do
4485  # Extract the first word of "$ac_prog", so it can be a program name with args.
4486set dummy $ac_prog; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
4489if ${ac_cv_path_BASENAME+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  case $BASENAME in
4493  [\\/]* | ?:[\\/]*)
4494  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4495  ;;
4496  *)
4497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in $PATH
4499do
4500  IFS=$as_save_IFS
4501  test -z "$as_dir" && as_dir=.
4502    for ac_exec_ext in '' $ac_executable_extensions; do
4503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4504    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4506    break 2
4507  fi
4508done
4509  done
4510IFS=$as_save_IFS
4511
4512  ;;
4513esac
4514fi
4515BASENAME=$ac_cv_path_BASENAME
4516if test -n "$BASENAME"; then
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4518$as_echo "$BASENAME" >&6; }
4519else
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
4522fi
4523
4524
4525  test -n "$BASENAME" && break
4526done
4527
4528    else
4529      # If it succeeded, then it was overridden by the user. We will use it
4530      # for the tool.
4531
4532      # First remove it from the list of overridden variables, so we can test
4533      # for unknown variables in the end.
4534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4535
4536      # Check if the provided tool contains a complete path.
4537      tool_specified="$BASENAME"
4538      tool_basename="${tool_specified##*/}"
4539      if test "x$tool_basename" = "x$tool_specified"; then
4540        # A command without a complete path is provided, search $PATH.
4541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4542$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4543        # Extract the first word of "$tool_basename", so it can be a program name with args.
4544set dummy $tool_basename; ac_word=$2
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546$as_echo_n "checking for $ac_word... " >&6; }
4547if ${ac_cv_path_BASENAME+:} false; then :
4548  $as_echo_n "(cached) " >&6
4549else
4550  case $BASENAME in
4551  [\\/]* | ?:[\\/]*)
4552  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4553  ;;
4554  *)
4555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556for as_dir in $PATH
4557do
4558  IFS=$as_save_IFS
4559  test -z "$as_dir" && as_dir=.
4560    for ac_exec_ext in '' $ac_executable_extensions; do
4561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4562    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4564    break 2
4565  fi
4566done
4567  done
4568IFS=$as_save_IFS
4569
4570  ;;
4571esac
4572fi
4573BASENAME=$ac_cv_path_BASENAME
4574if test -n "$BASENAME"; then
4575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4576$as_echo "$BASENAME" >&6; }
4577else
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580fi
4581
4582
4583        if test "x$BASENAME" = x; then
4584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4585        fi
4586      else
4587        # Otherwise we believe it is a complete path. Use it as it is.
4588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4589$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4591$as_echo_n "checking for BASENAME... " >&6; }
4592        if test ! -x "$tool_specified"; then
4593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4594$as_echo "not found" >&6; }
4595          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4596        fi
4597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4598$as_echo "$tool_specified" >&6; }
4599      fi
4600    fi
4601  fi
4602
4603
4604
4605  if test "x$BASENAME" = x; then
4606    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4607  fi
4608
4609
4610
4611
4612
4613  # Publish this variable in the help.
4614
4615
4616  if test "x$BASH" = x; then
4617    # The variable is not set by user, try to locate tool using the code snippet
4618    for ac_prog in bash
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_BASH+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $BASH in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650BASH=$ac_cv_path_BASH
4651if test -n "$BASH"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4653$as_echo "$BASH" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$BASH" && break
4661done
4662
4663  else
4664    # The variable is set, but is it from the command line or the environment?
4665
4666    # Try to remove the string !BASH! from our list.
4667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4669      # If it failed, the variable was not from the command line. Ignore it,
4670      # but warn the user (except for BASH, which is always set by the calling BASH).
4671      if test "xBASH" != xBASH; then
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4673$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4674      fi
4675      # Try to locate tool using the code snippet
4676      for ac_prog in bash
4677do
4678  # Extract the first word of "$ac_prog", so it can be a program name with args.
4679set dummy $ac_prog; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_BASH+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $BASH in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708BASH=$ac_cv_path_BASH
4709if test -n "$BASH"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4711$as_echo "$BASH" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718  test -n "$BASH" && break
4719done
4720
4721    else
4722      # If it succeeded, then it was overridden by the user. We will use it
4723      # for the tool.
4724
4725      # First remove it from the list of overridden variables, so we can test
4726      # for unknown variables in the end.
4727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4728
4729      # Check if the provided tool contains a complete path.
4730      tool_specified="$BASH"
4731      tool_basename="${tool_specified##*/}"
4732      if test "x$tool_basename" = "x$tool_specified"; then
4733        # A command without a complete path is provided, search $PATH.
4734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4735$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4736        # Extract the first word of "$tool_basename", so it can be a program name with args.
4737set dummy $tool_basename; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if ${ac_cv_path_BASH+:} false; then :
4741  $as_echo_n "(cached) " >&6
4742else
4743  case $BASH in
4744  [\\/]* | ?:[\\/]*)
4745  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4746  ;;
4747  *)
4748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4749for as_dir in $PATH
4750do
4751  IFS=$as_save_IFS
4752  test -z "$as_dir" && as_dir=.
4753    for ac_exec_ext in '' $ac_executable_extensions; do
4754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4755    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4757    break 2
4758  fi
4759done
4760  done
4761IFS=$as_save_IFS
4762
4763  ;;
4764esac
4765fi
4766BASH=$ac_cv_path_BASH
4767if test -n "$BASH"; then
4768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4769$as_echo "$BASH" >&6; }
4770else
4771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772$as_echo "no" >&6; }
4773fi
4774
4775
4776        if test "x$BASH" = x; then
4777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4778        fi
4779      else
4780        # Otherwise we believe it is a complete path. Use it as it is.
4781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4782$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4784$as_echo_n "checking for BASH... " >&6; }
4785        if test ! -x "$tool_specified"; then
4786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4787$as_echo "not found" >&6; }
4788          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4789        fi
4790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4791$as_echo "$tool_specified" >&6; }
4792      fi
4793    fi
4794  fi
4795
4796
4797
4798  if test "x$BASH" = x; then
4799    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4800  fi
4801
4802
4803
4804
4805
4806  # Publish this variable in the help.
4807
4808
4809  if test "x$CAT" = x; then
4810    # The variable is not set by user, try to locate tool using the code snippet
4811    for ac_prog in cat
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CAT+:} false; then :
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $CAT in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830    for ac_exec_ext in '' $ac_executable_extensions; do
4831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4832    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837  done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843CAT=$ac_cv_path_CAT
4844if test -n "$CAT"; then
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4846$as_echo "$CAT" >&6; }
4847else
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$CAT" && break
4854done
4855
4856  else
4857    # The variable is set, but is it from the command line or the environment?
4858
4859    # Try to remove the string !CAT! from our list.
4860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4862      # If it failed, the variable was not from the command line. Ignore it,
4863      # but warn the user (except for BASH, which is always set by the calling BASH).
4864      if test "xCAT" != xBASH; then
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4866$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4867      fi
4868      # Try to locate tool using the code snippet
4869      for ac_prog in cat
4870do
4871  # Extract the first word of "$ac_prog", so it can be a program name with args.
4872set dummy $ac_prog; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CAT+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  case $CAT in
4879  [\\/]* | ?:[\\/]*)
4880  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4881  ;;
4882  *)
4883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in $PATH
4885do
4886  IFS=$as_save_IFS
4887  test -z "$as_dir" && as_dir=.
4888    for ac_exec_ext in '' $ac_executable_extensions; do
4889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892    break 2
4893  fi
4894done
4895  done
4896IFS=$as_save_IFS
4897
4898  ;;
4899esac
4900fi
4901CAT=$ac_cv_path_CAT
4902if test -n "$CAT"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4904$as_echo "$CAT" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911  test -n "$CAT" && break
4912done
4913
4914    else
4915      # If it succeeded, then it was overridden by the user. We will use it
4916      # for the tool.
4917
4918      # First remove it from the list of overridden variables, so we can test
4919      # for unknown variables in the end.
4920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4921
4922      # Check if the provided tool contains a complete path.
4923      tool_specified="$CAT"
4924      tool_basename="${tool_specified##*/}"
4925      if test "x$tool_basename" = "x$tool_specified"; then
4926        # A command without a complete path is provided, search $PATH.
4927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4928$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4929        # Extract the first word of "$tool_basename", so it can be a program name with args.
4930set dummy $tool_basename; ac_word=$2
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4932$as_echo_n "checking for $ac_word... " >&6; }
4933if ${ac_cv_path_CAT+:} false; then :
4934  $as_echo_n "(cached) " >&6
4935else
4936  case $CAT in
4937  [\\/]* | ?:[\\/]*)
4938  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4939  ;;
4940  *)
4941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in $PATH
4943do
4944  IFS=$as_save_IFS
4945  test -z "$as_dir" && as_dir=.
4946    for ac_exec_ext in '' $ac_executable_extensions; do
4947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4948    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950    break 2
4951  fi
4952done
4953  done
4954IFS=$as_save_IFS
4955
4956  ;;
4957esac
4958fi
4959CAT=$ac_cv_path_CAT
4960if test -n "$CAT"; then
4961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4962$as_echo "$CAT" >&6; }
4963else
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4965$as_echo "no" >&6; }
4966fi
4967
4968
4969        if test "x$CAT" = x; then
4970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4971        fi
4972      else
4973        # Otherwise we believe it is a complete path. Use it as it is.
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4975$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4977$as_echo_n "checking for CAT... " >&6; }
4978        if test ! -x "$tool_specified"; then
4979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4980$as_echo "not found" >&6; }
4981          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4982        fi
4983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4984$as_echo "$tool_specified" >&6; }
4985      fi
4986    fi
4987  fi
4988
4989
4990
4991  if test "x$CAT" = x; then
4992    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4993  fi
4994
4995
4996
4997
4998
4999  # Publish this variable in the help.
5000
5001
5002  if test "x$CHMOD" = x; then
5003    # The variable is not set by user, try to locate tool using the code snippet
5004    for ac_prog in chmod
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_CHMOD+:} false; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $CHMOD in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036CHMOD=$ac_cv_path_CHMOD
5037if test -n "$CHMOD"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5039$as_echo "$CHMOD" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$CHMOD" && break
5047done
5048
5049  else
5050    # The variable is set, but is it from the command line or the environment?
5051
5052    # Try to remove the string !CHMOD! from our list.
5053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5055      # If it failed, the variable was not from the command line. Ignore it,
5056      # but warn the user (except for BASH, which is always set by the calling BASH).
5057      if test "xCHMOD" != xBASH; then
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5059$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5060      fi
5061      # Try to locate tool using the code snippet
5062      for ac_prog in chmod
5063do
5064  # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CHMOD+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CHMOD in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CHMOD=$ac_cv_path_CHMOD
5095if test -n "$CHMOD"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5097$as_echo "$CHMOD" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104  test -n "$CHMOD" && break
5105done
5106
5107    else
5108      # If it succeeded, then it was overridden by the user. We will use it
5109      # for the tool.
5110
5111      # First remove it from the list of overridden variables, so we can test
5112      # for unknown variables in the end.
5113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5114
5115      # Check if the provided tool contains a complete path.
5116      tool_specified="$CHMOD"
5117      tool_basename="${tool_specified##*/}"
5118      if test "x$tool_basename" = "x$tool_specified"; then
5119        # A command without a complete path is provided, search $PATH.
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5121$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5122        # Extract the first word of "$tool_basename", so it can be a program name with args.
5123set dummy $tool_basename; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_path_CHMOD+:} false; then :
5127  $as_echo_n "(cached) " >&6
5128else
5129  case $CHMOD in
5130  [\\/]* | ?:[\\/]*)
5131  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5132  ;;
5133  *)
5134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137  IFS=$as_save_IFS
5138  test -z "$as_dir" && as_dir=.
5139    for ac_exec_ext in '' $ac_executable_extensions; do
5140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5141    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143    break 2
5144  fi
5145done
5146  done
5147IFS=$as_save_IFS
5148
5149  ;;
5150esac
5151fi
5152CHMOD=$ac_cv_path_CHMOD
5153if test -n "$CHMOD"; then
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5155$as_echo "$CHMOD" >&6; }
5156else
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162        if test "x$CHMOD" = x; then
5163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5164        fi
5165      else
5166        # Otherwise we believe it is a complete path. Use it as it is.
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5168$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5170$as_echo_n "checking for CHMOD... " >&6; }
5171        if test ! -x "$tool_specified"; then
5172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5173$as_echo "not found" >&6; }
5174          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5175        fi
5176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5177$as_echo "$tool_specified" >&6; }
5178      fi
5179    fi
5180  fi
5181
5182
5183
5184  if test "x$CHMOD" = x; then
5185    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5186  fi
5187
5188
5189
5190
5191
5192  # Publish this variable in the help.
5193
5194
5195  if test "x$CMP" = x; then
5196    # The variable is not set by user, try to locate tool using the code snippet
5197    for ac_prog in cmp
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_CMP+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $CMP in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229CMP=$ac_cv_path_CMP
5230if test -n "$CMP"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5232$as_echo "$CMP" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$CMP" && break
5240done
5241
5242  else
5243    # The variable is set, but is it from the command line or the environment?
5244
5245    # Try to remove the string !CMP! from our list.
5246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5248      # If it failed, the variable was not from the command line. Ignore it,
5249      # but warn the user (except for BASH, which is always set by the calling BASH).
5250      if test "xCMP" != xBASH; then
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5252$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5253      fi
5254      # Try to locate tool using the code snippet
5255      for ac_prog in cmp
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_CMP+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $CMP in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287CMP=$ac_cv_path_CMP
5288if test -n "$CMP"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5290$as_echo "$CMP" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$CMP" && break
5298done
5299
5300    else
5301      # If it succeeded, then it was overridden by the user. We will use it
5302      # for the tool.
5303
5304      # First remove it from the list of overridden variables, so we can test
5305      # for unknown variables in the end.
5306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5307
5308      # Check if the provided tool contains a complete path.
5309      tool_specified="$CMP"
5310      tool_basename="${tool_specified##*/}"
5311      if test "x$tool_basename" = "x$tool_specified"; then
5312        # A command without a complete path is provided, search $PATH.
5313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5314$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5315        # Extract the first word of "$tool_basename", so it can be a program name with args.
5316set dummy $tool_basename; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_CMP+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $CMP in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345CMP=$ac_cv_path_CMP
5346if test -n "$CMP"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5348$as_echo "$CMP" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355        if test "x$CMP" = x; then
5356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5357        fi
5358      else
5359        # Otherwise we believe it is a complete path. Use it as it is.
5360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5361$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5363$as_echo_n "checking for CMP... " >&6; }
5364        if test ! -x "$tool_specified"; then
5365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5366$as_echo "not found" >&6; }
5367          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5368        fi
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5370$as_echo "$tool_specified" >&6; }
5371      fi
5372    fi
5373  fi
5374
5375
5376
5377  if test "x$CMP" = x; then
5378    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5379  fi
5380
5381
5382
5383
5384
5385  # Publish this variable in the help.
5386
5387
5388  if test "x$COMM" = x; then
5389    # The variable is not set by user, try to locate tool using the code snippet
5390    for ac_prog in comm
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if ${ac_cv_path_COMM+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $COMM in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422COMM=$ac_cv_path_COMM
5423if test -n "$COMM"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5425$as_echo "$COMM" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$COMM" && break
5433done
5434
5435  else
5436    # The variable is set, but is it from the command line or the environment?
5437
5438    # Try to remove the string !COMM! from our list.
5439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5441      # If it failed, the variable was not from the command line. Ignore it,
5442      # but warn the user (except for BASH, which is always set by the calling BASH).
5443      if test "xCOMM" != xBASH; then
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5445$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5446      fi
5447      # Try to locate tool using the code snippet
5448      for ac_prog in comm
5449do
5450  # Extract the first word of "$ac_prog", so it can be a program name with args.
5451set dummy $ac_prog; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_COMM+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $COMM in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480COMM=$ac_cv_path_COMM
5481if test -n "$COMM"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5483$as_echo "$COMM" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490  test -n "$COMM" && break
5491done
5492
5493    else
5494      # If it succeeded, then it was overridden by the user. We will use it
5495      # for the tool.
5496
5497      # First remove it from the list of overridden variables, so we can test
5498      # for unknown variables in the end.
5499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5500
5501      # Check if the provided tool contains a complete path.
5502      tool_specified="$COMM"
5503      tool_basename="${tool_specified##*/}"
5504      if test "x$tool_basename" = "x$tool_specified"; then
5505        # A command without a complete path is provided, search $PATH.
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5507$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5508        # Extract the first word of "$tool_basename", so it can be a program name with args.
5509set dummy $tool_basename; ac_word=$2
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511$as_echo_n "checking for $ac_word... " >&6; }
5512if ${ac_cv_path_COMM+:} false; then :
5513  $as_echo_n "(cached) " >&6
5514else
5515  case $COMM in
5516  [\\/]* | ?:[\\/]*)
5517  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5518  ;;
5519  *)
5520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523  IFS=$as_save_IFS
5524  test -z "$as_dir" && as_dir=.
5525    for ac_exec_ext in '' $ac_executable_extensions; do
5526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529    break 2
5530  fi
5531done
5532  done
5533IFS=$as_save_IFS
5534
5535  ;;
5536esac
5537fi
5538COMM=$ac_cv_path_COMM
5539if test -n "$COMM"; then
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5541$as_echo "$COMM" >&6; }
5542else
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544$as_echo "no" >&6; }
5545fi
5546
5547
5548        if test "x$COMM" = x; then
5549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5550        fi
5551      else
5552        # Otherwise we believe it is a complete path. Use it as it is.
5553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5554$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5556$as_echo_n "checking for COMM... " >&6; }
5557        if test ! -x "$tool_specified"; then
5558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5559$as_echo "not found" >&6; }
5560          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5561        fi
5562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5563$as_echo "$tool_specified" >&6; }
5564      fi
5565    fi
5566  fi
5567
5568
5569
5570  if test "x$COMM" = x; then
5571    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5572  fi
5573
5574
5575
5576
5577
5578  # Publish this variable in the help.
5579
5580
5581  if test "x$CP" = x; then
5582    # The variable is not set by user, try to locate tool using the code snippet
5583    for ac_prog in cp
5584do
5585  # Extract the first word of "$ac_prog", so it can be a program name with args.
5586set dummy $ac_prog; ac_word=$2
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
5589if ${ac_cv_path_CP+:} false; then :
5590  $as_echo_n "(cached) " >&6
5591else
5592  case $CP in
5593  [\\/]* | ?:[\\/]*)
5594  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5595  ;;
5596  *)
5597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600  IFS=$as_save_IFS
5601  test -z "$as_dir" && as_dir=.
5602    for ac_exec_ext in '' $ac_executable_extensions; do
5603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5604    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5606    break 2
5607  fi
5608done
5609  done
5610IFS=$as_save_IFS
5611
5612  ;;
5613esac
5614fi
5615CP=$ac_cv_path_CP
5616if test -n "$CP"; then
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5618$as_echo "$CP" >&6; }
5619else
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621$as_echo "no" >&6; }
5622fi
5623
5624
5625  test -n "$CP" && break
5626done
5627
5628  else
5629    # The variable is set, but is it from the command line or the environment?
5630
5631    # Try to remove the string !CP! from our list.
5632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5634      # If it failed, the variable was not from the command line. Ignore it,
5635      # but warn the user (except for BASH, which is always set by the calling BASH).
5636      if test "xCP" != xBASH; then
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5638$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5639      fi
5640      # Try to locate tool using the code snippet
5641      for ac_prog in cp
5642do
5643  # Extract the first word of "$ac_prog", so it can be a program name with args.
5644set dummy $ac_prog; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CP+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CP in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CP=$ac_cv_path_CP
5674if test -n "$CP"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5676$as_echo "$CP" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683  test -n "$CP" && break
5684done
5685
5686    else
5687      # If it succeeded, then it was overridden by the user. We will use it
5688      # for the tool.
5689
5690      # First remove it from the list of overridden variables, so we can test
5691      # for unknown variables in the end.
5692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5693
5694      # Check if the provided tool contains a complete path.
5695      tool_specified="$CP"
5696      tool_basename="${tool_specified##*/}"
5697      if test "x$tool_basename" = "x$tool_specified"; then
5698        # A command without a complete path is provided, search $PATH.
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5700$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5701        # Extract the first word of "$tool_basename", so it can be a program name with args.
5702set dummy $tool_basename; ac_word=$2
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5704$as_echo_n "checking for $ac_word... " >&6; }
5705if ${ac_cv_path_CP+:} false; then :
5706  $as_echo_n "(cached) " >&6
5707else
5708  case $CP in
5709  [\\/]* | ?:[\\/]*)
5710  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5711  ;;
5712  *)
5713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714for as_dir in $PATH
5715do
5716  IFS=$as_save_IFS
5717  test -z "$as_dir" && as_dir=.
5718    for ac_exec_ext in '' $ac_executable_extensions; do
5719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5720    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5722    break 2
5723  fi
5724done
5725  done
5726IFS=$as_save_IFS
5727
5728  ;;
5729esac
5730fi
5731CP=$ac_cv_path_CP
5732if test -n "$CP"; then
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5734$as_echo "$CP" >&6; }
5735else
5736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
5738fi
5739
5740
5741        if test "x$CP" = x; then
5742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5743        fi
5744      else
5745        # Otherwise we believe it is a complete path. Use it as it is.
5746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5747$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5749$as_echo_n "checking for CP... " >&6; }
5750        if test ! -x "$tool_specified"; then
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5752$as_echo "not found" >&6; }
5753          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5754        fi
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5756$as_echo "$tool_specified" >&6; }
5757      fi
5758    fi
5759  fi
5760
5761
5762
5763  if test "x$CP" = x; then
5764    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5765  fi
5766
5767
5768
5769
5770
5771  # Publish this variable in the help.
5772
5773
5774  if test "x$CUT" = x; then
5775    # The variable is not set by user, try to locate tool using the code snippet
5776    for ac_prog in cut
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CUT+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CUT in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CUT=$ac_cv_path_CUT
5809if test -n "$CUT"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5811$as_echo "$CUT" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CUT" && break
5819done
5820
5821  else
5822    # The variable is set, but is it from the command line or the environment?
5823
5824    # Try to remove the string !CUT! from our list.
5825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827      # If it failed, the variable was not from the command line. Ignore it,
5828      # but warn the user (except for BASH, which is always set by the calling BASH).
5829      if test "xCUT" != xBASH; then
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5831$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5832      fi
5833      # Try to locate tool using the code snippet
5834      for ac_prog in cut
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CUT+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CUT in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CUT=$ac_cv_path_CUT
5867if test -n "$CUT"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5869$as_echo "$CUT" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CUT" && break
5877done
5878
5879    else
5880      # If it succeeded, then it was overridden by the user. We will use it
5881      # for the tool.
5882
5883      # First remove it from the list of overridden variables, so we can test
5884      # for unknown variables in the end.
5885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886
5887      # Check if the provided tool contains a complete path.
5888      tool_specified="$CUT"
5889      tool_basename="${tool_specified##*/}"
5890      if test "x$tool_basename" = "x$tool_specified"; then
5891        # A command without a complete path is provided, search $PATH.
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5893$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5894        # Extract the first word of "$tool_basename", so it can be a program name with args.
5895set dummy $tool_basename; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_CUT+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $CUT in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5913    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924CUT=$ac_cv_path_CUT
5925if test -n "$CUT"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5927$as_echo "$CUT" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934        if test "x$CUT" = x; then
5935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5936        fi
5937      else
5938        # Otherwise we believe it is a complete path. Use it as it is.
5939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5940$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5942$as_echo_n "checking for CUT... " >&6; }
5943        if test ! -x "$tool_specified"; then
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5945$as_echo "not found" >&6; }
5946          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5947        fi
5948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5949$as_echo "$tool_specified" >&6; }
5950      fi
5951    fi
5952  fi
5953
5954
5955
5956  if test "x$CUT" = x; then
5957    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5958  fi
5959
5960
5961
5962
5963
5964  # Publish this variable in the help.
5965
5966
5967  if test "x$DATE" = x; then
5968    # The variable is not set by user, try to locate tool using the code snippet
5969    for ac_prog in date
5970do
5971  # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_path_DATE+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  case $DATE in
5979  [\\/]* | ?:[\\/]*)
5980  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5981  ;;
5982  *)
5983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5990    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998  ;;
5999esac
6000fi
6001DATE=$ac_cv_path_DATE
6002if test -n "$DATE"; then
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6004$as_echo "$DATE" >&6; }
6005else
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011  test -n "$DATE" && break
6012done
6013
6014  else
6015    # The variable is set, but is it from the command line or the environment?
6016
6017    # Try to remove the string !DATE! from our list.
6018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6020      # If it failed, the variable was not from the command line. Ignore it,
6021      # but warn the user (except for BASH, which is always set by the calling BASH).
6022      if test "xDATE" != xBASH; then
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6024$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6025      fi
6026      # Try to locate tool using the code snippet
6027      for ac_prog in date
6028do
6029  # Extract the first word of "$ac_prog", so it can be a program name with args.
6030set dummy $ac_prog; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_DATE+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $DATE in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059DATE=$ac_cv_path_DATE
6060if test -n "$DATE"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6062$as_echo "$DATE" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069  test -n "$DATE" && break
6070done
6071
6072    else
6073      # If it succeeded, then it was overridden by the user. We will use it
6074      # for the tool.
6075
6076      # First remove it from the list of overridden variables, so we can test
6077      # for unknown variables in the end.
6078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6079
6080      # Check if the provided tool contains a complete path.
6081      tool_specified="$DATE"
6082      tool_basename="${tool_specified##*/}"
6083      if test "x$tool_basename" = "x$tool_specified"; then
6084        # A command without a complete path is provided, search $PATH.
6085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6086$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6087        # Extract the first word of "$tool_basename", so it can be a program name with args.
6088set dummy $tool_basename; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_DATE+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $DATE in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117DATE=$ac_cv_path_DATE
6118if test -n "$DATE"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6120$as_echo "$DATE" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127        if test "x$DATE" = x; then
6128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6129        fi
6130      else
6131        # Otherwise we believe it is a complete path. Use it as it is.
6132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6133$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6135$as_echo_n "checking for DATE... " >&6; }
6136        if test ! -x "$tool_specified"; then
6137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6138$as_echo "not found" >&6; }
6139          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6140        fi
6141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6142$as_echo "$tool_specified" >&6; }
6143      fi
6144    fi
6145  fi
6146
6147
6148
6149  if test "x$DATE" = x; then
6150    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6151  fi
6152
6153
6154
6155
6156
6157  # Publish this variable in the help.
6158
6159
6160  if test "x$DIFF" = x; then
6161    # The variable is not set by user, try to locate tool using the code snippet
6162    for ac_prog in gdiff diff
6163do
6164  # Extract the first word of "$ac_prog", so it can be a program name with args.
6165set dummy $ac_prog; ac_word=$2
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6167$as_echo_n "checking for $ac_word... " >&6; }
6168if ${ac_cv_path_DIFF+:} false; then :
6169  $as_echo_n "(cached) " >&6
6170else
6171  case $DIFF in
6172  [\\/]* | ?:[\\/]*)
6173  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6174  ;;
6175  *)
6176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179  IFS=$as_save_IFS
6180  test -z "$as_dir" && as_dir=.
6181    for ac_exec_ext in '' $ac_executable_extensions; do
6182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6183    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185    break 2
6186  fi
6187done
6188  done
6189IFS=$as_save_IFS
6190
6191  ;;
6192esac
6193fi
6194DIFF=$ac_cv_path_DIFF
6195if test -n "$DIFF"; then
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6197$as_echo "$DIFF" >&6; }
6198else
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204  test -n "$DIFF" && break
6205done
6206
6207  else
6208    # The variable is set, but is it from the command line or the environment?
6209
6210    # Try to remove the string !DIFF! from our list.
6211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6213      # If it failed, the variable was not from the command line. Ignore it,
6214      # but warn the user (except for BASH, which is always set by the calling BASH).
6215      if test "xDIFF" != xBASH; then
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6217$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6218      fi
6219      # Try to locate tool using the code snippet
6220      for ac_prog in gdiff diff
6221do
6222  # Extract the first word of "$ac_prog", so it can be a program name with args.
6223set dummy $ac_prog; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_path_DIFF+:} false; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  case $DIFF in
6230  [\\/]* | ?:[\\/]*)
6231  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6232  ;;
6233  *)
6234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237  IFS=$as_save_IFS
6238  test -z "$as_dir" && as_dir=.
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243    break 2
6244  fi
6245done
6246  done
6247IFS=$as_save_IFS
6248
6249  ;;
6250esac
6251fi
6252DIFF=$ac_cv_path_DIFF
6253if test -n "$DIFF"; then
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6255$as_echo "$DIFF" >&6; }
6256else
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262  test -n "$DIFF" && break
6263done
6264
6265    else
6266      # If it succeeded, then it was overridden by the user. We will use it
6267      # for the tool.
6268
6269      # First remove it from the list of overridden variables, so we can test
6270      # for unknown variables in the end.
6271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6272
6273      # Check if the provided tool contains a complete path.
6274      tool_specified="$DIFF"
6275      tool_basename="${tool_specified##*/}"
6276      if test "x$tool_basename" = "x$tool_specified"; then
6277        # A command without a complete path is provided, search $PATH.
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6279$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6280        # Extract the first word of "$tool_basename", so it can be a program name with args.
6281set dummy $tool_basename; ac_word=$2
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283$as_echo_n "checking for $ac_word... " >&6; }
6284if ${ac_cv_path_DIFF+:} false; then :
6285  $as_echo_n "(cached) " >&6
6286else
6287  case $DIFF in
6288  [\\/]* | ?:[\\/]*)
6289  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6290  ;;
6291  *)
6292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295  IFS=$as_save_IFS
6296  test -z "$as_dir" && as_dir=.
6297    for ac_exec_ext in '' $ac_executable_extensions; do
6298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6299    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301    break 2
6302  fi
6303done
6304  done
6305IFS=$as_save_IFS
6306
6307  ;;
6308esac
6309fi
6310DIFF=$ac_cv_path_DIFF
6311if test -n "$DIFF"; then
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6313$as_echo "$DIFF" >&6; }
6314else
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316$as_echo "no" >&6; }
6317fi
6318
6319
6320        if test "x$DIFF" = x; then
6321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6322        fi
6323      else
6324        # Otherwise we believe it is a complete path. Use it as it is.
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6326$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6328$as_echo_n "checking for DIFF... " >&6; }
6329        if test ! -x "$tool_specified"; then
6330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6331$as_echo "not found" >&6; }
6332          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6333        fi
6334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6335$as_echo "$tool_specified" >&6; }
6336      fi
6337    fi
6338  fi
6339
6340
6341
6342  if test "x$DIFF" = x; then
6343    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6344  fi
6345
6346
6347
6348
6349
6350  # Publish this variable in the help.
6351
6352
6353  if test "x$DIRNAME" = x; then
6354    # The variable is not set by user, try to locate tool using the code snippet
6355    for ac_prog in dirname
6356do
6357  # Extract the first word of "$ac_prog", so it can be a program name with args.
6358set dummy $ac_prog; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if ${ac_cv_path_DIRNAME+:} false; then :
6362  $as_echo_n "(cached) " >&6
6363else
6364  case $DIRNAME in
6365  [\\/]* | ?:[\\/]*)
6366  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6367  ;;
6368  *)
6369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372  IFS=$as_save_IFS
6373  test -z "$as_dir" && as_dir=.
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378    break 2
6379  fi
6380done
6381  done
6382IFS=$as_save_IFS
6383
6384  ;;
6385esac
6386fi
6387DIRNAME=$ac_cv_path_DIRNAME
6388if test -n "$DIRNAME"; then
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6390$as_echo "$DIRNAME" >&6; }
6391else
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396
6397  test -n "$DIRNAME" && break
6398done
6399
6400  else
6401    # The variable is set, but is it from the command line or the environment?
6402
6403    # Try to remove the string !DIRNAME! from our list.
6404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6406      # If it failed, the variable was not from the command line. Ignore it,
6407      # but warn the user (except for BASH, which is always set by the calling BASH).
6408      if test "xDIRNAME" != xBASH; then
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6410$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6411      fi
6412      # Try to locate tool using the code snippet
6413      for ac_prog in dirname
6414do
6415  # Extract the first word of "$ac_prog", so it can be a program name with args.
6416set dummy $ac_prog; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_DIRNAME+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $DIRNAME in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445DIRNAME=$ac_cv_path_DIRNAME
6446if test -n "$DIRNAME"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6448$as_echo "$DIRNAME" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455  test -n "$DIRNAME" && break
6456done
6457
6458    else
6459      # If it succeeded, then it was overridden by the user. We will use it
6460      # for the tool.
6461
6462      # First remove it from the list of overridden variables, so we can test
6463      # for unknown variables in the end.
6464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6465
6466      # Check if the provided tool contains a complete path.
6467      tool_specified="$DIRNAME"
6468      tool_basename="${tool_specified##*/}"
6469      if test "x$tool_basename" = "x$tool_specified"; then
6470        # A command without a complete path is provided, search $PATH.
6471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6472$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6473        # Extract the first word of "$tool_basename", so it can be a program name with args.
6474set dummy $tool_basename; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if ${ac_cv_path_DIRNAME+:} false; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $DIRNAME in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503DIRNAME=$ac_cv_path_DIRNAME
6504if test -n "$DIRNAME"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6506$as_echo "$DIRNAME" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513        if test "x$DIRNAME" = x; then
6514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6515        fi
6516      else
6517        # Otherwise we believe it is a complete path. Use it as it is.
6518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6519$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6521$as_echo_n "checking for DIRNAME... " >&6; }
6522        if test ! -x "$tool_specified"; then
6523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6524$as_echo "not found" >&6; }
6525          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6526        fi
6527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6528$as_echo "$tool_specified" >&6; }
6529      fi
6530    fi
6531  fi
6532
6533
6534
6535  if test "x$DIRNAME" = x; then
6536    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6537  fi
6538
6539
6540
6541
6542
6543  # Publish this variable in the help.
6544
6545
6546  if test "x$ECHO" = x; then
6547    # The variable is not set by user, try to locate tool using the code snippet
6548    for ac_prog in echo
6549do
6550  # Extract the first word of "$ac_prog", so it can be a program name with args.
6551set dummy $ac_prog; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_ECHO+:} false; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  case $ECHO in
6558  [\\/]* | ?:[\\/]*)
6559  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6560  ;;
6561  *)
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571    break 2
6572  fi
6573done
6574  done
6575IFS=$as_save_IFS
6576
6577  ;;
6578esac
6579fi
6580ECHO=$ac_cv_path_ECHO
6581if test -n "$ECHO"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6583$as_echo "$ECHO" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
6590  test -n "$ECHO" && break
6591done
6592
6593  else
6594    # The variable is set, but is it from the command line or the environment?
6595
6596    # Try to remove the string !ECHO! from our list.
6597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6599      # If it failed, the variable was not from the command line. Ignore it,
6600      # but warn the user (except for BASH, which is always set by the calling BASH).
6601      if test "xECHO" != xBASH; then
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6603$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6604      fi
6605      # Try to locate tool using the code snippet
6606      for ac_prog in echo
6607do
6608  # Extract the first word of "$ac_prog", so it can be a program name with args.
6609set dummy $ac_prog; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_ECHO+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $ECHO in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638ECHO=$ac_cv_path_ECHO
6639if test -n "$ECHO"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6641$as_echo "$ECHO" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648  test -n "$ECHO" && break
6649done
6650
6651    else
6652      # If it succeeded, then it was overridden by the user. We will use it
6653      # for the tool.
6654
6655      # First remove it from the list of overridden variables, so we can test
6656      # for unknown variables in the end.
6657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6658
6659      # Check if the provided tool contains a complete path.
6660      tool_specified="$ECHO"
6661      tool_basename="${tool_specified##*/}"
6662      if test "x$tool_basename" = "x$tool_specified"; then
6663        # A command without a complete path is provided, search $PATH.
6664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6665$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6666        # Extract the first word of "$tool_basename", so it can be a program name with args.
6667set dummy $tool_basename; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_ECHO+:} false; then :
6671  $as_echo_n "(cached) " >&6
6672else
6673  case $ECHO in
6674  [\\/]* | ?:[\\/]*)
6675  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6676  ;;
6677  *)
6678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in $PATH
6680do
6681  IFS=$as_save_IFS
6682  test -z "$as_dir" && as_dir=.
6683    for ac_exec_ext in '' $ac_executable_extensions; do
6684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6685    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687    break 2
6688  fi
6689done
6690  done
6691IFS=$as_save_IFS
6692
6693  ;;
6694esac
6695fi
6696ECHO=$ac_cv_path_ECHO
6697if test -n "$ECHO"; then
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6699$as_echo "$ECHO" >&6; }
6700else
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
6706        if test "x$ECHO" = x; then
6707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6708        fi
6709      else
6710        # Otherwise we believe it is a complete path. Use it as it is.
6711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6712$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6714$as_echo_n "checking for ECHO... " >&6; }
6715        if test ! -x "$tool_specified"; then
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6717$as_echo "not found" >&6; }
6718          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6719        fi
6720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6721$as_echo "$tool_specified" >&6; }
6722      fi
6723    fi
6724  fi
6725
6726
6727
6728  if test "x$ECHO" = x; then
6729    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6730  fi
6731
6732
6733
6734
6735
6736  # Publish this variable in the help.
6737
6738
6739  if test "x$EXPR" = x; then
6740    # The variable is not set by user, try to locate tool using the code snippet
6741    for ac_prog in expr
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_EXPR+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $EXPR in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773EXPR=$ac_cv_path_EXPR
6774if test -n "$EXPR"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6776$as_echo "$EXPR" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$EXPR" && break
6784done
6785
6786  else
6787    # The variable is set, but is it from the command line or the environment?
6788
6789    # Try to remove the string !EXPR! from our list.
6790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6792      # If it failed, the variable was not from the command line. Ignore it,
6793      # but warn the user (except for BASH, which is always set by the calling BASH).
6794      if test "xEXPR" != xBASH; then
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6796$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6797      fi
6798      # Try to locate tool using the code snippet
6799      for ac_prog in expr
6800do
6801  # Extract the first word of "$ac_prog", so it can be a program name with args.
6802set dummy $ac_prog; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_EXPR+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $EXPR in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831EXPR=$ac_cv_path_EXPR
6832if test -n "$EXPR"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6834$as_echo "$EXPR" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841  test -n "$EXPR" && break
6842done
6843
6844    else
6845      # If it succeeded, then it was overridden by the user. We will use it
6846      # for the tool.
6847
6848      # First remove it from the list of overridden variables, so we can test
6849      # for unknown variables in the end.
6850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6851
6852      # Check if the provided tool contains a complete path.
6853      tool_specified="$EXPR"
6854      tool_basename="${tool_specified##*/}"
6855      if test "x$tool_basename" = "x$tool_specified"; then
6856        # A command without a complete path is provided, search $PATH.
6857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6858$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6859        # Extract the first word of "$tool_basename", so it can be a program name with args.
6860set dummy $tool_basename; ac_word=$2
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862$as_echo_n "checking for $ac_word... " >&6; }
6863if ${ac_cv_path_EXPR+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  case $EXPR in
6867  [\\/]* | ?:[\\/]*)
6868  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6869  ;;
6870  *)
6871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872for as_dir in $PATH
6873do
6874  IFS=$as_save_IFS
6875  test -z "$as_dir" && as_dir=.
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880    break 2
6881  fi
6882done
6883  done
6884IFS=$as_save_IFS
6885
6886  ;;
6887esac
6888fi
6889EXPR=$ac_cv_path_EXPR
6890if test -n "$EXPR"; then
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6892$as_echo "$EXPR" >&6; }
6893else
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895$as_echo "no" >&6; }
6896fi
6897
6898
6899        if test "x$EXPR" = x; then
6900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6901        fi
6902      else
6903        # Otherwise we believe it is a complete path. Use it as it is.
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6905$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6907$as_echo_n "checking for EXPR... " >&6; }
6908        if test ! -x "$tool_specified"; then
6909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6910$as_echo "not found" >&6; }
6911          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6912        fi
6913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6914$as_echo "$tool_specified" >&6; }
6915      fi
6916    fi
6917  fi
6918
6919
6920
6921  if test "x$EXPR" = x; then
6922    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6923  fi
6924
6925
6926
6927
6928
6929  # Publish this variable in the help.
6930
6931
6932  if test "x$FILE" = x; then
6933    # The variable is not set by user, try to locate tool using the code snippet
6934    for ac_prog in file
6935do
6936  # Extract the first word of "$ac_prog", so it can be a program name with args.
6937set dummy $ac_prog; ac_word=$2
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939$as_echo_n "checking for $ac_word... " >&6; }
6940if ${ac_cv_path_FILE+:} false; then :
6941  $as_echo_n "(cached) " >&6
6942else
6943  case $FILE in
6944  [\\/]* | ?:[\\/]*)
6945  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6946  ;;
6947  *)
6948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949for as_dir in $PATH
6950do
6951  IFS=$as_save_IFS
6952  test -z "$as_dir" && as_dir=.
6953    for ac_exec_ext in '' $ac_executable_extensions; do
6954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957    break 2
6958  fi
6959done
6960  done
6961IFS=$as_save_IFS
6962
6963  ;;
6964esac
6965fi
6966FILE=$ac_cv_path_FILE
6967if test -n "$FILE"; then
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6969$as_echo "$FILE" >&6; }
6970else
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972$as_echo "no" >&6; }
6973fi
6974
6975
6976  test -n "$FILE" && break
6977done
6978
6979  else
6980    # The variable is set, but is it from the command line or the environment?
6981
6982    # Try to remove the string !FILE! from our list.
6983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6985      # If it failed, the variable was not from the command line. Ignore it,
6986      # but warn the user (except for BASH, which is always set by the calling BASH).
6987      if test "xFILE" != xBASH; then
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6989$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6990      fi
6991      # Try to locate tool using the code snippet
6992      for ac_prog in file
6993do
6994  # Extract the first word of "$ac_prog", so it can be a program name with args.
6995set dummy $ac_prog; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_FILE+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $FILE in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024FILE=$ac_cv_path_FILE
7025if test -n "$FILE"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7027$as_echo "$FILE" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034  test -n "$FILE" && break
7035done
7036
7037    else
7038      # If it succeeded, then it was overridden by the user. We will use it
7039      # for the tool.
7040
7041      # First remove it from the list of overridden variables, so we can test
7042      # for unknown variables in the end.
7043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7044
7045      # Check if the provided tool contains a complete path.
7046      tool_specified="$FILE"
7047      tool_basename="${tool_specified##*/}"
7048      if test "x$tool_basename" = "x$tool_specified"; then
7049        # A command without a complete path is provided, search $PATH.
7050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7051$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7052        # Extract the first word of "$tool_basename", so it can be a program name with args.
7053set dummy $tool_basename; ac_word=$2
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7055$as_echo_n "checking for $ac_word... " >&6; }
7056if ${ac_cv_path_FILE+:} false; then :
7057  $as_echo_n "(cached) " >&6
7058else
7059  case $FILE in
7060  [\\/]* | ?:[\\/]*)
7061  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7062  ;;
7063  *)
7064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7065for as_dir in $PATH
7066do
7067  IFS=$as_save_IFS
7068  test -z "$as_dir" && as_dir=.
7069    for ac_exec_ext in '' $ac_executable_extensions; do
7070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7071    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7073    break 2
7074  fi
7075done
7076  done
7077IFS=$as_save_IFS
7078
7079  ;;
7080esac
7081fi
7082FILE=$ac_cv_path_FILE
7083if test -n "$FILE"; then
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7085$as_echo "$FILE" >&6; }
7086else
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7088$as_echo "no" >&6; }
7089fi
7090
7091
7092        if test "x$FILE" = x; then
7093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7094        fi
7095      else
7096        # Otherwise we believe it is a complete path. Use it as it is.
7097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7098$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7100$as_echo_n "checking for FILE... " >&6; }
7101        if test ! -x "$tool_specified"; then
7102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7103$as_echo "not found" >&6; }
7104          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7105        fi
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7107$as_echo "$tool_specified" >&6; }
7108      fi
7109    fi
7110  fi
7111
7112
7113
7114  if test "x$FILE" = x; then
7115    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7116  fi
7117
7118
7119
7120
7121
7122  # Publish this variable in the help.
7123
7124
7125  if test "x$FIND" = x; then
7126    # The variable is not set by user, try to locate tool using the code snippet
7127    for ac_prog in find
7128do
7129  # Extract the first word of "$ac_prog", so it can be a program name with args.
7130set dummy $ac_prog; ac_word=$2
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7132$as_echo_n "checking for $ac_word... " >&6; }
7133if ${ac_cv_path_FIND+:} false; then :
7134  $as_echo_n "(cached) " >&6
7135else
7136  case $FIND in
7137  [\\/]* | ?:[\\/]*)
7138  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7139  ;;
7140  *)
7141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142for as_dir in $PATH
7143do
7144  IFS=$as_save_IFS
7145  test -z "$as_dir" && as_dir=.
7146    for ac_exec_ext in '' $ac_executable_extensions; do
7147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150    break 2
7151  fi
7152done
7153  done
7154IFS=$as_save_IFS
7155
7156  ;;
7157esac
7158fi
7159FIND=$ac_cv_path_FIND
7160if test -n "$FIND"; then
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7162$as_echo "$FIND" >&6; }
7163else
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
7166fi
7167
7168
7169  test -n "$FIND" && break
7170done
7171
7172  else
7173    # The variable is set, but is it from the command line or the environment?
7174
7175    # Try to remove the string !FIND! from our list.
7176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7178      # If it failed, the variable was not from the command line. Ignore it,
7179      # but warn the user (except for BASH, which is always set by the calling BASH).
7180      if test "xFIND" != xBASH; then
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7182$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7183      fi
7184      # Try to locate tool using the code snippet
7185      for ac_prog in find
7186do
7187  # Extract the first word of "$ac_prog", so it can be a program name with args.
7188set dummy $ac_prog; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_FIND+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $FIND in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217FIND=$ac_cv_path_FIND
7218if test -n "$FIND"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7220$as_echo "$FIND" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227  test -n "$FIND" && break
7228done
7229
7230    else
7231      # If it succeeded, then it was overridden by the user. We will use it
7232      # for the tool.
7233
7234      # First remove it from the list of overridden variables, so we can test
7235      # for unknown variables in the end.
7236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7237
7238      # Check if the provided tool contains a complete path.
7239      tool_specified="$FIND"
7240      tool_basename="${tool_specified##*/}"
7241      if test "x$tool_basename" = "x$tool_specified"; then
7242        # A command without a complete path is provided, search $PATH.
7243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7244$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7245        # Extract the first word of "$tool_basename", so it can be a program name with args.
7246set dummy $tool_basename; ac_word=$2
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248$as_echo_n "checking for $ac_word... " >&6; }
7249if ${ac_cv_path_FIND+:} false; then :
7250  $as_echo_n "(cached) " >&6
7251else
7252  case $FIND in
7253  [\\/]* | ?:[\\/]*)
7254  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7255  ;;
7256  *)
7257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258for as_dir in $PATH
7259do
7260  IFS=$as_save_IFS
7261  test -z "$as_dir" && as_dir=.
7262    for ac_exec_ext in '' $ac_executable_extensions; do
7263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266    break 2
7267  fi
7268done
7269  done
7270IFS=$as_save_IFS
7271
7272  ;;
7273esac
7274fi
7275FIND=$ac_cv_path_FIND
7276if test -n "$FIND"; then
7277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7278$as_echo "$FIND" >&6; }
7279else
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281$as_echo "no" >&6; }
7282fi
7283
7284
7285        if test "x$FIND" = x; then
7286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7287        fi
7288      else
7289        # Otherwise we believe it is a complete path. Use it as it is.
7290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7291$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7293$as_echo_n "checking for FIND... " >&6; }
7294        if test ! -x "$tool_specified"; then
7295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7296$as_echo "not found" >&6; }
7297          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7298        fi
7299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7300$as_echo "$tool_specified" >&6; }
7301      fi
7302    fi
7303  fi
7304
7305
7306
7307  if test "x$FIND" = x; then
7308    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7309  fi
7310
7311
7312
7313
7314
7315  # Publish this variable in the help.
7316
7317
7318  if test "x$HEAD" = x; then
7319    # The variable is not set by user, try to locate tool using the code snippet
7320    for ac_prog in head
7321do
7322  # Extract the first word of "$ac_prog", so it can be a program name with args.
7323set dummy $ac_prog; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_HEAD+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $HEAD in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352HEAD=$ac_cv_path_HEAD
7353if test -n "$HEAD"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7355$as_echo "$HEAD" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362  test -n "$HEAD" && break
7363done
7364
7365  else
7366    # The variable is set, but is it from the command line or the environment?
7367
7368    # Try to remove the string !HEAD! from our list.
7369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7371      # If it failed, the variable was not from the command line. Ignore it,
7372      # but warn the user (except for BASH, which is always set by the calling BASH).
7373      if test "xHEAD" != xBASH; then
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7375$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7376      fi
7377      # Try to locate tool using the code snippet
7378      for ac_prog in head
7379do
7380  # Extract the first word of "$ac_prog", so it can be a program name with args.
7381set dummy $ac_prog; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_HEAD+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $HEAD in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410HEAD=$ac_cv_path_HEAD
7411if test -n "$HEAD"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7413$as_echo "$HEAD" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420  test -n "$HEAD" && break
7421done
7422
7423    else
7424      # If it succeeded, then it was overridden by the user. We will use it
7425      # for the tool.
7426
7427      # First remove it from the list of overridden variables, so we can test
7428      # for unknown variables in the end.
7429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7430
7431      # Check if the provided tool contains a complete path.
7432      tool_specified="$HEAD"
7433      tool_basename="${tool_specified##*/}"
7434      if test "x$tool_basename" = "x$tool_specified"; then
7435        # A command without a complete path is provided, search $PATH.
7436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7437$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7438        # Extract the first word of "$tool_basename", so it can be a program name with args.
7439set dummy $tool_basename; ac_word=$2
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7441$as_echo_n "checking for $ac_word... " >&6; }
7442if ${ac_cv_path_HEAD+:} false; then :
7443  $as_echo_n "(cached) " >&6
7444else
7445  case $HEAD in
7446  [\\/]* | ?:[\\/]*)
7447  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7448  ;;
7449  *)
7450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7451for as_dir in $PATH
7452do
7453  IFS=$as_save_IFS
7454  test -z "$as_dir" && as_dir=.
7455    for ac_exec_ext in '' $ac_executable_extensions; do
7456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7457    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7459    break 2
7460  fi
7461done
7462  done
7463IFS=$as_save_IFS
7464
7465  ;;
7466esac
7467fi
7468HEAD=$ac_cv_path_HEAD
7469if test -n "$HEAD"; then
7470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7471$as_echo "$HEAD" >&6; }
7472else
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
7475fi
7476
7477
7478        if test "x$HEAD" = x; then
7479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7480        fi
7481      else
7482        # Otherwise we believe it is a complete path. Use it as it is.
7483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7484$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7486$as_echo_n "checking for HEAD... " >&6; }
7487        if test ! -x "$tool_specified"; then
7488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7489$as_echo "not found" >&6; }
7490          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7491        fi
7492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7493$as_echo "$tool_specified" >&6; }
7494      fi
7495    fi
7496  fi
7497
7498
7499
7500  if test "x$HEAD" = x; then
7501    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7502  fi
7503
7504
7505
7506
7507
7508  # Publish this variable in the help.
7509
7510
7511  if test "x$LN" = x; then
7512    # The variable is not set by user, try to locate tool using the code snippet
7513    for ac_prog in ln
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_LN+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $LN in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545LN=$ac_cv_path_LN
7546if test -n "$LN"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7548$as_echo "$LN" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$LN" && break
7556done
7557
7558  else
7559    # The variable is set, but is it from the command line or the environment?
7560
7561    # Try to remove the string !LN! from our list.
7562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7564      # If it failed, the variable was not from the command line. Ignore it,
7565      # but warn the user (except for BASH, which is always set by the calling BASH).
7566      if test "xLN" != xBASH; then
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7568$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7569      fi
7570      # Try to locate tool using the code snippet
7571      for ac_prog in ln
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_LN+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $LN in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603LN=$ac_cv_path_LN
7604if test -n "$LN"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7606$as_echo "$LN" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$LN" && break
7614done
7615
7616    else
7617      # If it succeeded, then it was overridden by the user. We will use it
7618      # for the tool.
7619
7620      # First remove it from the list of overridden variables, so we can test
7621      # for unknown variables in the end.
7622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7623
7624      # Check if the provided tool contains a complete path.
7625      tool_specified="$LN"
7626      tool_basename="${tool_specified##*/}"
7627      if test "x$tool_basename" = "x$tool_specified"; then
7628        # A command without a complete path is provided, search $PATH.
7629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7630$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7631        # Extract the first word of "$tool_basename", so it can be a program name with args.
7632set dummy $tool_basename; ac_word=$2
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634$as_echo_n "checking for $ac_word... " >&6; }
7635if ${ac_cv_path_LN+:} false; then :
7636  $as_echo_n "(cached) " >&6
7637else
7638  case $LN in
7639  [\\/]* | ?:[\\/]*)
7640  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7641  ;;
7642  *)
7643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7644for as_dir in $PATH
7645do
7646  IFS=$as_save_IFS
7647  test -z "$as_dir" && as_dir=.
7648    for ac_exec_ext in '' $ac_executable_extensions; do
7649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7650    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7652    break 2
7653  fi
7654done
7655  done
7656IFS=$as_save_IFS
7657
7658  ;;
7659esac
7660fi
7661LN=$ac_cv_path_LN
7662if test -n "$LN"; then
7663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7664$as_echo "$LN" >&6; }
7665else
7666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7667$as_echo "no" >&6; }
7668fi
7669
7670
7671        if test "x$LN" = x; then
7672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7673        fi
7674      else
7675        # Otherwise we believe it is a complete path. Use it as it is.
7676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7677$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7679$as_echo_n "checking for LN... " >&6; }
7680        if test ! -x "$tool_specified"; then
7681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7682$as_echo "not found" >&6; }
7683          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7684        fi
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7686$as_echo "$tool_specified" >&6; }
7687      fi
7688    fi
7689  fi
7690
7691
7692
7693  if test "x$LN" = x; then
7694    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7695  fi
7696
7697
7698
7699
7700
7701  # Publish this variable in the help.
7702
7703
7704  if test "x$LS" = x; then
7705    # The variable is not set by user, try to locate tool using the code snippet
7706    for ac_prog in ls
7707do
7708  # Extract the first word of "$ac_prog", so it can be a program name with args.
7709set dummy $ac_prog; ac_word=$2
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711$as_echo_n "checking for $ac_word... " >&6; }
7712if ${ac_cv_path_LS+:} false; then :
7713  $as_echo_n "(cached) " >&6
7714else
7715  case $LS in
7716  [\\/]* | ?:[\\/]*)
7717  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7718  ;;
7719  *)
7720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723  IFS=$as_save_IFS
7724  test -z "$as_dir" && as_dir=.
7725    for ac_exec_ext in '' $ac_executable_extensions; do
7726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729    break 2
7730  fi
7731done
7732  done
7733IFS=$as_save_IFS
7734
7735  ;;
7736esac
7737fi
7738LS=$ac_cv_path_LS
7739if test -n "$LS"; then
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7741$as_echo "$LS" >&6; }
7742else
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744$as_echo "no" >&6; }
7745fi
7746
7747
7748  test -n "$LS" && break
7749done
7750
7751  else
7752    # The variable is set, but is it from the command line or the environment?
7753
7754    # Try to remove the string !LS! from our list.
7755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7757      # If it failed, the variable was not from the command line. Ignore it,
7758      # but warn the user (except for BASH, which is always set by the calling BASH).
7759      if test "xLS" != xBASH; then
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7761$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7762      fi
7763      # Try to locate tool using the code snippet
7764      for ac_prog in ls
7765do
7766  # Extract the first word of "$ac_prog", so it can be a program name with args.
7767set dummy $ac_prog; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_path_LS+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  case $LS in
7774  [\\/]* | ?:[\\/]*)
7775  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7776  ;;
7777  *)
7778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781  IFS=$as_save_IFS
7782  test -z "$as_dir" && as_dir=.
7783    for ac_exec_ext in '' $ac_executable_extensions; do
7784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787    break 2
7788  fi
7789done
7790  done
7791IFS=$as_save_IFS
7792
7793  ;;
7794esac
7795fi
7796LS=$ac_cv_path_LS
7797if test -n "$LS"; then
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7799$as_echo "$LS" >&6; }
7800else
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803fi
7804
7805
7806  test -n "$LS" && break
7807done
7808
7809    else
7810      # If it succeeded, then it was overridden by the user. We will use it
7811      # for the tool.
7812
7813      # First remove it from the list of overridden variables, so we can test
7814      # for unknown variables in the end.
7815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7816
7817      # Check if the provided tool contains a complete path.
7818      tool_specified="$LS"
7819      tool_basename="${tool_specified##*/}"
7820      if test "x$tool_basename" = "x$tool_specified"; then
7821        # A command without a complete path is provided, search $PATH.
7822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7823$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7824        # Extract the first word of "$tool_basename", so it can be a program name with args.
7825set dummy $tool_basename; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_LS+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $LS in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854LS=$ac_cv_path_LS
7855if test -n "$LS"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7857$as_echo "$LS" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864        if test "x$LS" = x; then
7865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7866        fi
7867      else
7868        # Otherwise we believe it is a complete path. Use it as it is.
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7870$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7872$as_echo_n "checking for LS... " >&6; }
7873        if test ! -x "$tool_specified"; then
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7875$as_echo "not found" >&6; }
7876          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7877        fi
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7879$as_echo "$tool_specified" >&6; }
7880      fi
7881    fi
7882  fi
7883
7884
7885
7886  if test "x$LS" = x; then
7887    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7888  fi
7889
7890
7891
7892
7893
7894  # Publish this variable in the help.
7895
7896
7897  if test "x$MKDIR" = x; then
7898    # The variable is not set by user, try to locate tool using the code snippet
7899    for ac_prog in mkdir
7900do
7901  # Extract the first word of "$ac_prog", so it can be a program name with args.
7902set dummy $ac_prog; ac_word=$2
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904$as_echo_n "checking for $ac_word... " >&6; }
7905if ${ac_cv_path_MKDIR+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  case $MKDIR in
7909  [\\/]* | ?:[\\/]*)
7910  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916  IFS=$as_save_IFS
7917  test -z "$as_dir" && as_dir=.
7918    for ac_exec_ext in '' $ac_executable_extensions; do
7919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922    break 2
7923  fi
7924done
7925  done
7926IFS=$as_save_IFS
7927
7928  ;;
7929esac
7930fi
7931MKDIR=$ac_cv_path_MKDIR
7932if test -n "$MKDIR"; then
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7934$as_echo "$MKDIR" >&6; }
7935else
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937$as_echo "no" >&6; }
7938fi
7939
7940
7941  test -n "$MKDIR" && break
7942done
7943
7944  else
7945    # The variable is set, but is it from the command line or the environment?
7946
7947    # Try to remove the string !MKDIR! from our list.
7948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7950      # If it failed, the variable was not from the command line. Ignore it,
7951      # but warn the user (except for BASH, which is always set by the calling BASH).
7952      if test "xMKDIR" != xBASH; then
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7954$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7955      fi
7956      # Try to locate tool using the code snippet
7957      for ac_prog in mkdir
7958do
7959  # Extract the first word of "$ac_prog", so it can be a program name with args.
7960set dummy $ac_prog; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_MKDIR+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $MKDIR in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989MKDIR=$ac_cv_path_MKDIR
7990if test -n "$MKDIR"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7992$as_echo "$MKDIR" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999  test -n "$MKDIR" && break
8000done
8001
8002    else
8003      # If it succeeded, then it was overridden by the user. We will use it
8004      # for the tool.
8005
8006      # First remove it from the list of overridden variables, so we can test
8007      # for unknown variables in the end.
8008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8009
8010      # Check if the provided tool contains a complete path.
8011      tool_specified="$MKDIR"
8012      tool_basename="${tool_specified##*/}"
8013      if test "x$tool_basename" = "x$tool_specified"; then
8014        # A command without a complete path is provided, search $PATH.
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8016$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8017        # Extract the first word of "$tool_basename", so it can be a program name with args.
8018set dummy $tool_basename; ac_word=$2
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8020$as_echo_n "checking for $ac_word... " >&6; }
8021if ${ac_cv_path_MKDIR+:} false; then :
8022  $as_echo_n "(cached) " >&6
8023else
8024  case $MKDIR in
8025  [\\/]* | ?:[\\/]*)
8026  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8027  ;;
8028  *)
8029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8030for as_dir in $PATH
8031do
8032  IFS=$as_save_IFS
8033  test -z "$as_dir" && as_dir=.
8034    for ac_exec_ext in '' $ac_executable_extensions; do
8035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8036    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8038    break 2
8039  fi
8040done
8041  done
8042IFS=$as_save_IFS
8043
8044  ;;
8045esac
8046fi
8047MKDIR=$ac_cv_path_MKDIR
8048if test -n "$MKDIR"; then
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8050$as_echo "$MKDIR" >&6; }
8051else
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053$as_echo "no" >&6; }
8054fi
8055
8056
8057        if test "x$MKDIR" = x; then
8058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8059        fi
8060      else
8061        # Otherwise we believe it is a complete path. Use it as it is.
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8063$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8065$as_echo_n "checking for MKDIR... " >&6; }
8066        if test ! -x "$tool_specified"; then
8067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8068$as_echo "not found" >&6; }
8069          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8070        fi
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8072$as_echo "$tool_specified" >&6; }
8073      fi
8074    fi
8075  fi
8076
8077
8078
8079  if test "x$MKDIR" = x; then
8080    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8081  fi
8082
8083
8084
8085
8086
8087  # Publish this variable in the help.
8088
8089
8090  if test "x$MKTEMP" = x; then
8091    # The variable is not set by user, try to locate tool using the code snippet
8092    for ac_prog in mktemp
8093do
8094  # Extract the first word of "$ac_prog", so it can be a program name with args.
8095set dummy $ac_prog; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if ${ac_cv_path_MKTEMP+:} false; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  case $MKTEMP in
8102  [\\/]* | ?:[\\/]*)
8103  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121  ;;
8122esac
8123fi
8124MKTEMP=$ac_cv_path_MKTEMP
8125if test -n "$MKTEMP"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8127$as_echo "$MKTEMP" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134  test -n "$MKTEMP" && break
8135done
8136
8137  else
8138    # The variable is set, but is it from the command line or the environment?
8139
8140    # Try to remove the string !MKTEMP! from our list.
8141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8143      # If it failed, the variable was not from the command line. Ignore it,
8144      # but warn the user (except for BASH, which is always set by the calling BASH).
8145      if test "xMKTEMP" != xBASH; then
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8147$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8148      fi
8149      # Try to locate tool using the code snippet
8150      for ac_prog in mktemp
8151do
8152  # Extract the first word of "$ac_prog", so it can be a program name with args.
8153set dummy $ac_prog; ac_word=$2
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
8156if ${ac_cv_path_MKTEMP+:} false; then :
8157  $as_echo_n "(cached) " >&6
8158else
8159  case $MKTEMP in
8160  [\\/]* | ?:[\\/]*)
8161  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8162  ;;
8163  *)
8164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167  IFS=$as_save_IFS
8168  test -z "$as_dir" && as_dir=.
8169    for ac_exec_ext in '' $ac_executable_extensions; do
8170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173    break 2
8174  fi
8175done
8176  done
8177IFS=$as_save_IFS
8178
8179  ;;
8180esac
8181fi
8182MKTEMP=$ac_cv_path_MKTEMP
8183if test -n "$MKTEMP"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8185$as_echo "$MKTEMP" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192  test -n "$MKTEMP" && break
8193done
8194
8195    else
8196      # If it succeeded, then it was overridden by the user. We will use it
8197      # for the tool.
8198
8199      # First remove it from the list of overridden variables, so we can test
8200      # for unknown variables in the end.
8201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8202
8203      # Check if the provided tool contains a complete path.
8204      tool_specified="$MKTEMP"
8205      tool_basename="${tool_specified##*/}"
8206      if test "x$tool_basename" = "x$tool_specified"; then
8207        # A command without a complete path is provided, search $PATH.
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8209$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8210        # Extract the first word of "$tool_basename", so it can be a program name with args.
8211set dummy $tool_basename; ac_word=$2
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8213$as_echo_n "checking for $ac_word... " >&6; }
8214if ${ac_cv_path_MKTEMP+:} false; then :
8215  $as_echo_n "(cached) " >&6
8216else
8217  case $MKTEMP in
8218  [\\/]* | ?:[\\/]*)
8219  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8220  ;;
8221  *)
8222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8223for as_dir in $PATH
8224do
8225  IFS=$as_save_IFS
8226  test -z "$as_dir" && as_dir=.
8227    for ac_exec_ext in '' $ac_executable_extensions; do
8228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8229    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8231    break 2
8232  fi
8233done
8234  done
8235IFS=$as_save_IFS
8236
8237  ;;
8238esac
8239fi
8240MKTEMP=$ac_cv_path_MKTEMP
8241if test -n "$MKTEMP"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8243$as_echo "$MKTEMP" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250        if test "x$MKTEMP" = x; then
8251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8252        fi
8253      else
8254        # Otherwise we believe it is a complete path. Use it as it is.
8255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8256$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8258$as_echo_n "checking for MKTEMP... " >&6; }
8259        if test ! -x "$tool_specified"; then
8260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8261$as_echo "not found" >&6; }
8262          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8263        fi
8264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8265$as_echo "$tool_specified" >&6; }
8266      fi
8267    fi
8268  fi
8269
8270
8271
8272  if test "x$MKTEMP" = x; then
8273    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8274  fi
8275
8276
8277
8278
8279
8280  # Publish this variable in the help.
8281
8282
8283  if test "x$MV" = x; then
8284    # The variable is not set by user, try to locate tool using the code snippet
8285    for ac_prog in mv
8286do
8287  # Extract the first word of "$ac_prog", so it can be a program name with args.
8288set dummy $ac_prog; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_MV+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $MV in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317MV=$ac_cv_path_MV
8318if test -n "$MV"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8320$as_echo "$MV" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327  test -n "$MV" && break
8328done
8329
8330  else
8331    # The variable is set, but is it from the command line or the environment?
8332
8333    # Try to remove the string !MV! from our list.
8334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8336      # If it failed, the variable was not from the command line. Ignore it,
8337      # but warn the user (except for BASH, which is always set by the calling BASH).
8338      if test "xMV" != xBASH; then
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8340$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8341      fi
8342      # Try to locate tool using the code snippet
8343      for ac_prog in mv
8344do
8345  # Extract the first word of "$ac_prog", so it can be a program name with args.
8346set dummy $ac_prog; ac_word=$2
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8348$as_echo_n "checking for $ac_word... " >&6; }
8349if ${ac_cv_path_MV+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352  case $MV in
8353  [\\/]* | ?:[\\/]*)
8354  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8355  ;;
8356  *)
8357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358for as_dir in $PATH
8359do
8360  IFS=$as_save_IFS
8361  test -z "$as_dir" && as_dir=.
8362    for ac_exec_ext in '' $ac_executable_extensions; do
8363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366    break 2
8367  fi
8368done
8369  done
8370IFS=$as_save_IFS
8371
8372  ;;
8373esac
8374fi
8375MV=$ac_cv_path_MV
8376if test -n "$MV"; then
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8378$as_echo "$MV" >&6; }
8379else
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
8382fi
8383
8384
8385  test -n "$MV" && break
8386done
8387
8388    else
8389      # If it succeeded, then it was overridden by the user. We will use it
8390      # for the tool.
8391
8392      # First remove it from the list of overridden variables, so we can test
8393      # for unknown variables in the end.
8394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8395
8396      # Check if the provided tool contains a complete path.
8397      tool_specified="$MV"
8398      tool_basename="${tool_specified##*/}"
8399      if test "x$tool_basename" = "x$tool_specified"; then
8400        # A command without a complete path is provided, search $PATH.
8401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8402$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8403        # Extract the first word of "$tool_basename", so it can be a program name with args.
8404set dummy $tool_basename; ac_word=$2
8405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8406$as_echo_n "checking for $ac_word... " >&6; }
8407if ${ac_cv_path_MV+:} false; then :
8408  $as_echo_n "(cached) " >&6
8409else
8410  case $MV in
8411  [\\/]* | ?:[\\/]*)
8412  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8413  ;;
8414  *)
8415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8416for as_dir in $PATH
8417do
8418  IFS=$as_save_IFS
8419  test -z "$as_dir" && as_dir=.
8420    for ac_exec_ext in '' $ac_executable_extensions; do
8421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8422    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8424    break 2
8425  fi
8426done
8427  done
8428IFS=$as_save_IFS
8429
8430  ;;
8431esac
8432fi
8433MV=$ac_cv_path_MV
8434if test -n "$MV"; then
8435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8436$as_echo "$MV" >&6; }
8437else
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8439$as_echo "no" >&6; }
8440fi
8441
8442
8443        if test "x$MV" = x; then
8444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8445        fi
8446      else
8447        # Otherwise we believe it is a complete path. Use it as it is.
8448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8449$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8451$as_echo_n "checking for MV... " >&6; }
8452        if test ! -x "$tool_specified"; then
8453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8454$as_echo "not found" >&6; }
8455          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8456        fi
8457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8458$as_echo "$tool_specified" >&6; }
8459      fi
8460    fi
8461  fi
8462
8463
8464
8465  if test "x$MV" = x; then
8466    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8467  fi
8468
8469
8470
8471
8472
8473  # Publish this variable in the help.
8474
8475
8476  if test "x$NAWK" = x; then
8477    # The variable is not set by user, try to locate tool using the code snippet
8478    for ac_prog in nawk gawk awk
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_path_NAWK+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  case $NAWK in
8488  [\\/]* | ?:[\\/]*)
8489  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8490  ;;
8491  *)
8492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493for as_dir in $PATH
8494do
8495  IFS=$as_save_IFS
8496  test -z "$as_dir" && as_dir=.
8497    for ac_exec_ext in '' $ac_executable_extensions; do
8498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8499    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501    break 2
8502  fi
8503done
8504  done
8505IFS=$as_save_IFS
8506
8507  ;;
8508esac
8509fi
8510NAWK=$ac_cv_path_NAWK
8511if test -n "$NAWK"; then
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8513$as_echo "$NAWK" >&6; }
8514else
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516$as_echo "no" >&6; }
8517fi
8518
8519
8520  test -n "$NAWK" && break
8521done
8522
8523  else
8524    # The variable is set, but is it from the command line or the environment?
8525
8526    # Try to remove the string !NAWK! from our list.
8527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8529      # If it failed, the variable was not from the command line. Ignore it,
8530      # but warn the user (except for BASH, which is always set by the calling BASH).
8531      if test "xNAWK" != xBASH; then
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8533$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8534      fi
8535      # Try to locate tool using the code snippet
8536      for ac_prog in nawk gawk awk
8537do
8538  # Extract the first word of "$ac_prog", so it can be a program name with args.
8539set dummy $ac_prog; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_NAWK+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $NAWK in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568NAWK=$ac_cv_path_NAWK
8569if test -n "$NAWK"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8571$as_echo "$NAWK" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578  test -n "$NAWK" && break
8579done
8580
8581    else
8582      # If it succeeded, then it was overridden by the user. We will use it
8583      # for the tool.
8584
8585      # First remove it from the list of overridden variables, so we can test
8586      # for unknown variables in the end.
8587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8588
8589      # Check if the provided tool contains a complete path.
8590      tool_specified="$NAWK"
8591      tool_basename="${tool_specified##*/}"
8592      if test "x$tool_basename" = "x$tool_specified"; then
8593        # A command without a complete path is provided, search $PATH.
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8595$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8596        # Extract the first word of "$tool_basename", so it can be a program name with args.
8597set dummy $tool_basename; ac_word=$2
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if ${ac_cv_path_NAWK+:} false; then :
8601  $as_echo_n "(cached) " >&6
8602else
8603  case $NAWK in
8604  [\\/]* | ?:[\\/]*)
8605  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8606  ;;
8607  *)
8608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611  IFS=$as_save_IFS
8612  test -z "$as_dir" && as_dir=.
8613    for ac_exec_ext in '' $ac_executable_extensions; do
8614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8615    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8617    break 2
8618  fi
8619done
8620  done
8621IFS=$as_save_IFS
8622
8623  ;;
8624esac
8625fi
8626NAWK=$ac_cv_path_NAWK
8627if test -n "$NAWK"; then
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8629$as_echo "$NAWK" >&6; }
8630else
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
8633fi
8634
8635
8636        if test "x$NAWK" = x; then
8637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8638        fi
8639      else
8640        # Otherwise we believe it is a complete path. Use it as it is.
8641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8642$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8644$as_echo_n "checking for NAWK... " >&6; }
8645        if test ! -x "$tool_specified"; then
8646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8647$as_echo "not found" >&6; }
8648          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8649        fi
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8651$as_echo "$tool_specified" >&6; }
8652      fi
8653    fi
8654  fi
8655
8656
8657
8658  if test "x$NAWK" = x; then
8659    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8660  fi
8661
8662
8663
8664
8665
8666  # Publish this variable in the help.
8667
8668
8669  if test "x$PRINTF" = x; then
8670    # The variable is not set by user, try to locate tool using the code snippet
8671    for ac_prog in printf
8672do
8673  # Extract the first word of "$ac_prog", so it can be a program name with args.
8674set dummy $ac_prog; ac_word=$2
8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676$as_echo_n "checking for $ac_word... " >&6; }
8677if ${ac_cv_path_PRINTF+:} false; then :
8678  $as_echo_n "(cached) " >&6
8679else
8680  case $PRINTF in
8681  [\\/]* | ?:[\\/]*)
8682  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8683  ;;
8684  *)
8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688  IFS=$as_save_IFS
8689  test -z "$as_dir" && as_dir=.
8690    for ac_exec_ext in '' $ac_executable_extensions; do
8691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694    break 2
8695  fi
8696done
8697  done
8698IFS=$as_save_IFS
8699
8700  ;;
8701esac
8702fi
8703PRINTF=$ac_cv_path_PRINTF
8704if test -n "$PRINTF"; then
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8706$as_echo "$PRINTF" >&6; }
8707else
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
8711
8712
8713  test -n "$PRINTF" && break
8714done
8715
8716  else
8717    # The variable is set, but is it from the command line or the environment?
8718
8719    # Try to remove the string !PRINTF! from our list.
8720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8722      # If it failed, the variable was not from the command line. Ignore it,
8723      # but warn the user (except for BASH, which is always set by the calling BASH).
8724      if test "xPRINTF" != xBASH; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8726$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8727      fi
8728      # Try to locate tool using the code snippet
8729      for ac_prog in printf
8730do
8731  # Extract the first word of "$ac_prog", so it can be a program name with args.
8732set dummy $ac_prog; ac_word=$2
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if ${ac_cv_path_PRINTF+:} false; then :
8736  $as_echo_n "(cached) " >&6
8737else
8738  case $PRINTF in
8739  [\\/]* | ?:[\\/]*)
8740  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8741  ;;
8742  *)
8743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746  IFS=$as_save_IFS
8747  test -z "$as_dir" && as_dir=.
8748    for ac_exec_ext in '' $ac_executable_extensions; do
8749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752    break 2
8753  fi
8754done
8755  done
8756IFS=$as_save_IFS
8757
8758  ;;
8759esac
8760fi
8761PRINTF=$ac_cv_path_PRINTF
8762if test -n "$PRINTF"; then
8763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8764$as_echo "$PRINTF" >&6; }
8765else
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767$as_echo "no" >&6; }
8768fi
8769
8770
8771  test -n "$PRINTF" && break
8772done
8773
8774    else
8775      # If it succeeded, then it was overridden by the user. We will use it
8776      # for the tool.
8777
8778      # First remove it from the list of overridden variables, so we can test
8779      # for unknown variables in the end.
8780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8781
8782      # Check if the provided tool contains a complete path.
8783      tool_specified="$PRINTF"
8784      tool_basename="${tool_specified##*/}"
8785      if test "x$tool_basename" = "x$tool_specified"; then
8786        # A command without a complete path is provided, search $PATH.
8787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8788$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8789        # Extract the first word of "$tool_basename", so it can be a program name with args.
8790set dummy $tool_basename; ac_word=$2
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792$as_echo_n "checking for $ac_word... " >&6; }
8793if ${ac_cv_path_PRINTF+:} false; then :
8794  $as_echo_n "(cached) " >&6
8795else
8796  case $PRINTF in
8797  [\\/]* | ?:[\\/]*)
8798  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8799  ;;
8800  *)
8801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8802for as_dir in $PATH
8803do
8804  IFS=$as_save_IFS
8805  test -z "$as_dir" && as_dir=.
8806    for ac_exec_ext in '' $ac_executable_extensions; do
8807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8808    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8810    break 2
8811  fi
8812done
8813  done
8814IFS=$as_save_IFS
8815
8816  ;;
8817esac
8818fi
8819PRINTF=$ac_cv_path_PRINTF
8820if test -n "$PRINTF"; then
8821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8822$as_echo "$PRINTF" >&6; }
8823else
8824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825$as_echo "no" >&6; }
8826fi
8827
8828
8829        if test "x$PRINTF" = x; then
8830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8831        fi
8832      else
8833        # Otherwise we believe it is a complete path. Use it as it is.
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8835$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8837$as_echo_n "checking for PRINTF... " >&6; }
8838        if test ! -x "$tool_specified"; then
8839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8840$as_echo "not found" >&6; }
8841          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8842        fi
8843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8844$as_echo "$tool_specified" >&6; }
8845      fi
8846    fi
8847  fi
8848
8849
8850
8851  if test "x$PRINTF" = x; then
8852    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8853  fi
8854
8855
8856
8857
8858
8859  # Publish this variable in the help.
8860
8861
8862  if test "x$RM" = x; then
8863    # The variable is not set by user, try to locate tool using the code snippet
8864    for ac_prog in rm
8865do
8866  # Extract the first word of "$ac_prog", so it can be a program name with args.
8867set dummy $ac_prog; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_path_RM+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  case $RM in
8874  [\\/]* | ?:[\\/]*)
8875  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8876  ;;
8877  *)
8878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8879for as_dir in $PATH
8880do
8881  IFS=$as_save_IFS
8882  test -z "$as_dir" && as_dir=.
8883    for ac_exec_ext in '' $ac_executable_extensions; do
8884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8885    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8887    break 2
8888  fi
8889done
8890  done
8891IFS=$as_save_IFS
8892
8893  ;;
8894esac
8895fi
8896RM=$ac_cv_path_RM
8897if test -n "$RM"; then
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8899$as_echo "$RM" >&6; }
8900else
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906  test -n "$RM" && break
8907done
8908
8909  else
8910    # The variable is set, but is it from the command line or the environment?
8911
8912    # Try to remove the string !RM! from our list.
8913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8915      # If it failed, the variable was not from the command line. Ignore it,
8916      # but warn the user (except for BASH, which is always set by the calling BASH).
8917      if test "xRM" != xBASH; then
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8919$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8920      fi
8921      # Try to locate tool using the code snippet
8922      for ac_prog in rm
8923do
8924  # Extract the first word of "$ac_prog", so it can be a program name with args.
8925set dummy $ac_prog; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_RM+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $RM in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954RM=$ac_cv_path_RM
8955if test -n "$RM"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8957$as_echo "$RM" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964  test -n "$RM" && break
8965done
8966
8967    else
8968      # If it succeeded, then it was overridden by the user. We will use it
8969      # for the tool.
8970
8971      # First remove it from the list of overridden variables, so we can test
8972      # for unknown variables in the end.
8973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8974
8975      # Check if the provided tool contains a complete path.
8976      tool_specified="$RM"
8977      tool_basename="${tool_specified##*/}"
8978      if test "x$tool_basename" = "x$tool_specified"; then
8979        # A command without a complete path is provided, search $PATH.
8980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8981$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8982        # Extract the first word of "$tool_basename", so it can be a program name with args.
8983set dummy $tool_basename; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_RM+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $RM in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012RM=$ac_cv_path_RM
9013if test -n "$RM"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9015$as_echo "$RM" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022        if test "x$RM" = x; then
9023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9024        fi
9025      else
9026        # Otherwise we believe it is a complete path. Use it as it is.
9027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9028$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9030$as_echo_n "checking for RM... " >&6; }
9031        if test ! -x "$tool_specified"; then
9032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9033$as_echo "not found" >&6; }
9034          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9035        fi
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9037$as_echo "$tool_specified" >&6; }
9038      fi
9039    fi
9040  fi
9041
9042
9043
9044  if test "x$RM" = x; then
9045    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9046  fi
9047
9048
9049
9050
9051
9052  # Publish this variable in the help.
9053
9054
9055  if test "x$SH" = x; then
9056    # The variable is not set by user, try to locate tool using the code snippet
9057    for ac_prog in sh
9058do
9059  # Extract the first word of "$ac_prog", so it can be a program name with args.
9060set dummy $ac_prog; ac_word=$2
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9062$as_echo_n "checking for $ac_word... " >&6; }
9063if ${ac_cv_path_SH+:} false; then :
9064  $as_echo_n "(cached) " >&6
9065else
9066  case $SH in
9067  [\\/]* | ?:[\\/]*)
9068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9069  ;;
9070  *)
9071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072for as_dir in $PATH
9073do
9074  IFS=$as_save_IFS
9075  test -z "$as_dir" && as_dir=.
9076    for ac_exec_ext in '' $ac_executable_extensions; do
9077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9080    break 2
9081  fi
9082done
9083  done
9084IFS=$as_save_IFS
9085
9086  ;;
9087esac
9088fi
9089SH=$ac_cv_path_SH
9090if test -n "$SH"; then
9091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9092$as_echo "$SH" >&6; }
9093else
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
9096fi
9097
9098
9099  test -n "$SH" && break
9100done
9101
9102  else
9103    # The variable is set, but is it from the command line or the environment?
9104
9105    # Try to remove the string !SH! from our list.
9106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9108      # If it failed, the variable was not from the command line. Ignore it,
9109      # but warn the user (except for BASH, which is always set by the calling BASH).
9110      if test "xSH" != xBASH; then
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9112$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9113      fi
9114      # Try to locate tool using the code snippet
9115      for ac_prog in sh
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_SH+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $SH in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147SH=$ac_cv_path_SH
9148if test -n "$SH"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9150$as_echo "$SH" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$SH" && break
9158done
9159
9160    else
9161      # If it succeeded, then it was overridden by the user. We will use it
9162      # for the tool.
9163
9164      # First remove it from the list of overridden variables, so we can test
9165      # for unknown variables in the end.
9166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9167
9168      # Check if the provided tool contains a complete path.
9169      tool_specified="$SH"
9170      tool_basename="${tool_specified##*/}"
9171      if test "x$tool_basename" = "x$tool_specified"; then
9172        # A command without a complete path is provided, search $PATH.
9173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9174$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9175        # Extract the first word of "$tool_basename", so it can be a program name with args.
9176set dummy $tool_basename; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_SH+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $SH in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205SH=$ac_cv_path_SH
9206if test -n "$SH"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9208$as_echo "$SH" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215        if test "x$SH" = x; then
9216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9217        fi
9218      else
9219        # Otherwise we believe it is a complete path. Use it as it is.
9220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9221$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9223$as_echo_n "checking for SH... " >&6; }
9224        if test ! -x "$tool_specified"; then
9225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9226$as_echo "not found" >&6; }
9227          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9228        fi
9229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9230$as_echo "$tool_specified" >&6; }
9231      fi
9232    fi
9233  fi
9234
9235
9236
9237  if test "x$SH" = x; then
9238    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9239  fi
9240
9241
9242
9243
9244
9245  # Publish this variable in the help.
9246
9247
9248  if test "x$SORT" = x; then
9249    # The variable is not set by user, try to locate tool using the code snippet
9250    for ac_prog in sort
9251do
9252  # Extract the first word of "$ac_prog", so it can be a program name with args.
9253set dummy $ac_prog; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_SORT+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $SORT in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282SORT=$ac_cv_path_SORT
9283if test -n "$SORT"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9285$as_echo "$SORT" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292  test -n "$SORT" && break
9293done
9294
9295  else
9296    # The variable is set, but is it from the command line or the environment?
9297
9298    # Try to remove the string !SORT! from our list.
9299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9301      # If it failed, the variable was not from the command line. Ignore it,
9302      # but warn the user (except for BASH, which is always set by the calling BASH).
9303      if test "xSORT" != xBASH; then
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9305$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9306      fi
9307      # Try to locate tool using the code snippet
9308      for ac_prog in sort
9309do
9310  # Extract the first word of "$ac_prog", so it can be a program name with args.
9311set dummy $ac_prog; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_SORT+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $SORT in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340SORT=$ac_cv_path_SORT
9341if test -n "$SORT"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9343$as_echo "$SORT" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350  test -n "$SORT" && break
9351done
9352
9353    else
9354      # If it succeeded, then it was overridden by the user. We will use it
9355      # for the tool.
9356
9357      # First remove it from the list of overridden variables, so we can test
9358      # for unknown variables in the end.
9359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9360
9361      # Check if the provided tool contains a complete path.
9362      tool_specified="$SORT"
9363      tool_basename="${tool_specified##*/}"
9364      if test "x$tool_basename" = "x$tool_specified"; then
9365        # A command without a complete path is provided, search $PATH.
9366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9367$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9368        # Extract the first word of "$tool_basename", so it can be a program name with args.
9369set dummy $tool_basename; ac_word=$2
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9371$as_echo_n "checking for $ac_word... " >&6; }
9372if ${ac_cv_path_SORT+:} false; then :
9373  $as_echo_n "(cached) " >&6
9374else
9375  case $SORT in
9376  [\\/]* | ?:[\\/]*)
9377  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9378  ;;
9379  *)
9380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381for as_dir in $PATH
9382do
9383  IFS=$as_save_IFS
9384  test -z "$as_dir" && as_dir=.
9385    for ac_exec_ext in '' $ac_executable_extensions; do
9386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389    break 2
9390  fi
9391done
9392  done
9393IFS=$as_save_IFS
9394
9395  ;;
9396esac
9397fi
9398SORT=$ac_cv_path_SORT
9399if test -n "$SORT"; then
9400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9401$as_echo "$SORT" >&6; }
9402else
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404$as_echo "no" >&6; }
9405fi
9406
9407
9408        if test "x$SORT" = x; then
9409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9410        fi
9411      else
9412        # Otherwise we believe it is a complete path. Use it as it is.
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9414$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9416$as_echo_n "checking for SORT... " >&6; }
9417        if test ! -x "$tool_specified"; then
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9419$as_echo "not found" >&6; }
9420          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9421        fi
9422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9423$as_echo "$tool_specified" >&6; }
9424      fi
9425    fi
9426  fi
9427
9428
9429
9430  if test "x$SORT" = x; then
9431    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9432  fi
9433
9434
9435
9436
9437
9438  # Publish this variable in the help.
9439
9440
9441  if test "x$TAIL" = x; then
9442    # The variable is not set by user, try to locate tool using the code snippet
9443    for ac_prog in tail
9444do
9445  # Extract the first word of "$ac_prog", so it can be a program name with args.
9446set dummy $ac_prog; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_TAIL+:} false; then :
9450  $as_echo_n "(cached) " >&6
9451else
9452  case $TAIL in
9453  [\\/]* | ?:[\\/]*)
9454  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9455  ;;
9456  *)
9457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460  IFS=$as_save_IFS
9461  test -z "$as_dir" && as_dir=.
9462    for ac_exec_ext in '' $ac_executable_extensions; do
9463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466    break 2
9467  fi
9468done
9469  done
9470IFS=$as_save_IFS
9471
9472  ;;
9473esac
9474fi
9475TAIL=$ac_cv_path_TAIL
9476if test -n "$TAIL"; then
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9478$as_echo "$TAIL" >&6; }
9479else
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485  test -n "$TAIL" && break
9486done
9487
9488  else
9489    # The variable is set, but is it from the command line or the environment?
9490
9491    # Try to remove the string !TAIL! from our list.
9492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9494      # If it failed, the variable was not from the command line. Ignore it,
9495      # but warn the user (except for BASH, which is always set by the calling BASH).
9496      if test "xTAIL" != xBASH; then
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9498$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9499      fi
9500      # Try to locate tool using the code snippet
9501      for ac_prog in tail
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_TAIL+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $TAIL in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533TAIL=$ac_cv_path_TAIL
9534if test -n "$TAIL"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9536$as_echo "$TAIL" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$TAIL" && break
9544done
9545
9546    else
9547      # If it succeeded, then it was overridden by the user. We will use it
9548      # for the tool.
9549
9550      # First remove it from the list of overridden variables, so we can test
9551      # for unknown variables in the end.
9552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9553
9554      # Check if the provided tool contains a complete path.
9555      tool_specified="$TAIL"
9556      tool_basename="${tool_specified##*/}"
9557      if test "x$tool_basename" = "x$tool_specified"; then
9558        # A command without a complete path is provided, search $PATH.
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9560$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9561        # Extract the first word of "$tool_basename", so it can be a program name with args.
9562set dummy $tool_basename; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_TAIL+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $TAIL in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591TAIL=$ac_cv_path_TAIL
9592if test -n "$TAIL"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9594$as_echo "$TAIL" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601        if test "x$TAIL" = x; then
9602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9603        fi
9604      else
9605        # Otherwise we believe it is a complete path. Use it as it is.
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9607$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9609$as_echo_n "checking for TAIL... " >&6; }
9610        if test ! -x "$tool_specified"; then
9611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9612$as_echo "not found" >&6; }
9613          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9614        fi
9615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9616$as_echo "$tool_specified" >&6; }
9617      fi
9618    fi
9619  fi
9620
9621
9622
9623  if test "x$TAIL" = x; then
9624    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9625  fi
9626
9627
9628
9629
9630
9631  # Publish this variable in the help.
9632
9633
9634  if test "x$TAR" = x; then
9635    # The variable is not set by user, try to locate tool using the code snippet
9636    for ac_prog in tar
9637do
9638  # Extract the first word of "$ac_prog", so it can be a program name with args.
9639set dummy $ac_prog; ac_word=$2
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641$as_echo_n "checking for $ac_word... " >&6; }
9642if ${ac_cv_path_TAR+:} false; then :
9643  $as_echo_n "(cached) " >&6
9644else
9645  case $TAR in
9646  [\\/]* | ?:[\\/]*)
9647  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9648  ;;
9649  *)
9650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651for as_dir in $PATH
9652do
9653  IFS=$as_save_IFS
9654  test -z "$as_dir" && as_dir=.
9655    for ac_exec_ext in '' $ac_executable_extensions; do
9656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9657    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9659    break 2
9660  fi
9661done
9662  done
9663IFS=$as_save_IFS
9664
9665  ;;
9666esac
9667fi
9668TAR=$ac_cv_path_TAR
9669if test -n "$TAR"; then
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9671$as_echo "$TAR" >&6; }
9672else
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674$as_echo "no" >&6; }
9675fi
9676
9677
9678  test -n "$TAR" && break
9679done
9680
9681  else
9682    # The variable is set, but is it from the command line or the environment?
9683
9684    # Try to remove the string !TAR! from our list.
9685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9687      # If it failed, the variable was not from the command line. Ignore it,
9688      # but warn the user (except for BASH, which is always set by the calling BASH).
9689      if test "xTAR" != xBASH; then
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9691$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9692      fi
9693      # Try to locate tool using the code snippet
9694      for ac_prog in tar
9695do
9696  # Extract the first word of "$ac_prog", so it can be a program name with args.
9697set dummy $ac_prog; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_path_TAR+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  case $TAR in
9704  [\\/]* | ?:[\\/]*)
9705  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9706  ;;
9707  *)
9708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711  IFS=$as_save_IFS
9712  test -z "$as_dir" && as_dir=.
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9715    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723  ;;
9724esac
9725fi
9726TAR=$ac_cv_path_TAR
9727if test -n "$TAR"; then
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9729$as_echo "$TAR" >&6; }
9730else
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733fi
9734
9735
9736  test -n "$TAR" && break
9737done
9738
9739    else
9740      # If it succeeded, then it was overridden by the user. We will use it
9741      # for the tool.
9742
9743      # First remove it from the list of overridden variables, so we can test
9744      # for unknown variables in the end.
9745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9746
9747      # Check if the provided tool contains a complete path.
9748      tool_specified="$TAR"
9749      tool_basename="${tool_specified##*/}"
9750      if test "x$tool_basename" = "x$tool_specified"; then
9751        # A command without a complete path is provided, search $PATH.
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9753$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9754        # Extract the first word of "$tool_basename", so it can be a program name with args.
9755set dummy $tool_basename; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_TAR+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $TAR in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784TAR=$ac_cv_path_TAR
9785if test -n "$TAR"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9787$as_echo "$TAR" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
9794        if test "x$TAR" = x; then
9795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9796        fi
9797      else
9798        # Otherwise we believe it is a complete path. Use it as it is.
9799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9800$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9802$as_echo_n "checking for TAR... " >&6; }
9803        if test ! -x "$tool_specified"; then
9804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9805$as_echo "not found" >&6; }
9806          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9807        fi
9808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9809$as_echo "$tool_specified" >&6; }
9810      fi
9811    fi
9812  fi
9813
9814
9815
9816  if test "x$TAR" = x; then
9817    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9818  fi
9819
9820
9821
9822
9823
9824  # Publish this variable in the help.
9825
9826
9827  if test "x$TEE" = x; then
9828    # The variable is not set by user, try to locate tool using the code snippet
9829    for ac_prog in tee
9830do
9831  # Extract the first word of "$ac_prog", so it can be a program name with args.
9832set dummy $ac_prog; ac_word=$2
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834$as_echo_n "checking for $ac_word... " >&6; }
9835if ${ac_cv_path_TEE+:} false; then :
9836  $as_echo_n "(cached) " >&6
9837else
9838  case $TEE in
9839  [\\/]* | ?:[\\/]*)
9840  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9841  ;;
9842  *)
9843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844for as_dir in $PATH
9845do
9846  IFS=$as_save_IFS
9847  test -z "$as_dir" && as_dir=.
9848    for ac_exec_ext in '' $ac_executable_extensions; do
9849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852    break 2
9853  fi
9854done
9855  done
9856IFS=$as_save_IFS
9857
9858  ;;
9859esac
9860fi
9861TEE=$ac_cv_path_TEE
9862if test -n "$TEE"; then
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9864$as_echo "$TEE" >&6; }
9865else
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868fi
9869
9870
9871  test -n "$TEE" && break
9872done
9873
9874  else
9875    # The variable is set, but is it from the command line or the environment?
9876
9877    # Try to remove the string !TEE! from our list.
9878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9880      # If it failed, the variable was not from the command line. Ignore it,
9881      # but warn the user (except for BASH, which is always set by the calling BASH).
9882      if test "xTEE" != xBASH; then
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9884$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9885      fi
9886      # Try to locate tool using the code snippet
9887      for ac_prog in tee
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_TEE+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $TEE in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919TEE=$ac_cv_path_TEE
9920if test -n "$TEE"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9922$as_echo "$TEE" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$TEE" && break
9930done
9931
9932    else
9933      # If it succeeded, then it was overridden by the user. We will use it
9934      # for the tool.
9935
9936      # First remove it from the list of overridden variables, so we can test
9937      # for unknown variables in the end.
9938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9939
9940      # Check if the provided tool contains a complete path.
9941      tool_specified="$TEE"
9942      tool_basename="${tool_specified##*/}"
9943      if test "x$tool_basename" = "x$tool_specified"; then
9944        # A command without a complete path is provided, search $PATH.
9945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9946$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9947        # Extract the first word of "$tool_basename", so it can be a program name with args.
9948set dummy $tool_basename; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_TEE+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $TEE in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9966    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977TEE=$ac_cv_path_TEE
9978if test -n "$TEE"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9980$as_echo "$TEE" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987        if test "x$TEE" = x; then
9988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9989        fi
9990      else
9991        # Otherwise we believe it is a complete path. Use it as it is.
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9993$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9995$as_echo_n "checking for TEE... " >&6; }
9996        if test ! -x "$tool_specified"; then
9997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9998$as_echo "not found" >&6; }
9999          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10000        fi
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10002$as_echo "$tool_specified" >&6; }
10003      fi
10004    fi
10005  fi
10006
10007
10008
10009  if test "x$TEE" = x; then
10010    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10011  fi
10012
10013
10014
10015
10016
10017  # Publish this variable in the help.
10018
10019
10020  if test "x$TOUCH" = x; then
10021    # The variable is not set by user, try to locate tool using the code snippet
10022    for ac_prog in touch
10023do
10024  # Extract the first word of "$ac_prog", so it can be a program name with args.
10025set dummy $ac_prog; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_TOUCH+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $TOUCH in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054TOUCH=$ac_cv_path_TOUCH
10055if test -n "$TOUCH"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10057$as_echo "$TOUCH" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064  test -n "$TOUCH" && break
10065done
10066
10067  else
10068    # The variable is set, but is it from the command line or the environment?
10069
10070    # Try to remove the string !TOUCH! from our list.
10071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10073      # If it failed, the variable was not from the command line. Ignore it,
10074      # but warn the user (except for BASH, which is always set by the calling BASH).
10075      if test "xTOUCH" != xBASH; then
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10077$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10078      fi
10079      # Try to locate tool using the code snippet
10080      for ac_prog in touch
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_TOUCH+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $TOUCH in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112TOUCH=$ac_cv_path_TOUCH
10113if test -n "$TOUCH"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10115$as_echo "$TOUCH" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$TOUCH" && break
10123done
10124
10125    else
10126      # If it succeeded, then it was overridden by the user. We will use it
10127      # for the tool.
10128
10129      # First remove it from the list of overridden variables, so we can test
10130      # for unknown variables in the end.
10131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10132
10133      # Check if the provided tool contains a complete path.
10134      tool_specified="$TOUCH"
10135      tool_basename="${tool_specified##*/}"
10136      if test "x$tool_basename" = "x$tool_specified"; then
10137        # A command without a complete path is provided, search $PATH.
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10139$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10140        # Extract the first word of "$tool_basename", so it can be a program name with args.
10141set dummy $tool_basename; ac_word=$2
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10143$as_echo_n "checking for $ac_word... " >&6; }
10144if ${ac_cv_path_TOUCH+:} false; then :
10145  $as_echo_n "(cached) " >&6
10146else
10147  case $TOUCH in
10148  [\\/]* | ?:[\\/]*)
10149  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10150  ;;
10151  *)
10152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10153for as_dir in $PATH
10154do
10155  IFS=$as_save_IFS
10156  test -z "$as_dir" && as_dir=.
10157    for ac_exec_ext in '' $ac_executable_extensions; do
10158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10159    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10161    break 2
10162  fi
10163done
10164  done
10165IFS=$as_save_IFS
10166
10167  ;;
10168esac
10169fi
10170TOUCH=$ac_cv_path_TOUCH
10171if test -n "$TOUCH"; then
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10173$as_echo "$TOUCH" >&6; }
10174else
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
10177fi
10178
10179
10180        if test "x$TOUCH" = x; then
10181          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10182        fi
10183      else
10184        # Otherwise we believe it is a complete path. Use it as it is.
10185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10186$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10188$as_echo_n "checking for TOUCH... " >&6; }
10189        if test ! -x "$tool_specified"; then
10190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10191$as_echo "not found" >&6; }
10192          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10193        fi
10194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10195$as_echo "$tool_specified" >&6; }
10196      fi
10197    fi
10198  fi
10199
10200
10201
10202  if test "x$TOUCH" = x; then
10203    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10204  fi
10205
10206
10207
10208
10209
10210  # Publish this variable in the help.
10211
10212
10213  if test "x$TR" = x; then
10214    # The variable is not set by user, try to locate tool using the code snippet
10215    for ac_prog in tr
10216do
10217  # Extract the first word of "$ac_prog", so it can be a program name with args.
10218set dummy $ac_prog; ac_word=$2
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10220$as_echo_n "checking for $ac_word... " >&6; }
10221if ${ac_cv_path_TR+:} false; then :
10222  $as_echo_n "(cached) " >&6
10223else
10224  case $TR in
10225  [\\/]* | ?:[\\/]*)
10226  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10227  ;;
10228  *)
10229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232  IFS=$as_save_IFS
10233  test -z "$as_dir" && as_dir=.
10234    for ac_exec_ext in '' $ac_executable_extensions; do
10235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10238    break 2
10239  fi
10240done
10241  done
10242IFS=$as_save_IFS
10243
10244  ;;
10245esac
10246fi
10247TR=$ac_cv_path_TR
10248if test -n "$TR"; then
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10250$as_echo "$TR" >&6; }
10251else
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254fi
10255
10256
10257  test -n "$TR" && break
10258done
10259
10260  else
10261    # The variable is set, but is it from the command line or the environment?
10262
10263    # Try to remove the string !TR! from our list.
10264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10266      # If it failed, the variable was not from the command line. Ignore it,
10267      # but warn the user (except for BASH, which is always set by the calling BASH).
10268      if test "xTR" != xBASH; then
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10270$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10271      fi
10272      # Try to locate tool using the code snippet
10273      for ac_prog in tr
10274do
10275  # Extract the first word of "$ac_prog", so it can be a program name with args.
10276set dummy $ac_prog; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TR+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TR in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TR=$ac_cv_path_TR
10306if test -n "$TR"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10308$as_echo "$TR" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$TR" && break
10316done
10317
10318    else
10319      # If it succeeded, then it was overridden by the user. We will use it
10320      # for the tool.
10321
10322      # First remove it from the list of overridden variables, so we can test
10323      # for unknown variables in the end.
10324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10325
10326      # Check if the provided tool contains a complete path.
10327      tool_specified="$TR"
10328      tool_basename="${tool_specified##*/}"
10329      if test "x$tool_basename" = "x$tool_specified"; then
10330        # A command without a complete path is provided, search $PATH.
10331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10332$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10333        # Extract the first word of "$tool_basename", so it can be a program name with args.
10334set dummy $tool_basename; ac_word=$2
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336$as_echo_n "checking for $ac_word... " >&6; }
10337if ${ac_cv_path_TR+:} false; then :
10338  $as_echo_n "(cached) " >&6
10339else
10340  case $TR in
10341  [\\/]* | ?:[\\/]*)
10342  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10343  ;;
10344  *)
10345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346for as_dir in $PATH
10347do
10348  IFS=$as_save_IFS
10349  test -z "$as_dir" && as_dir=.
10350    for ac_exec_ext in '' $ac_executable_extensions; do
10351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10352    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10354    break 2
10355  fi
10356done
10357  done
10358IFS=$as_save_IFS
10359
10360  ;;
10361esac
10362fi
10363TR=$ac_cv_path_TR
10364if test -n "$TR"; then
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10366$as_echo "$TR" >&6; }
10367else
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
10370fi
10371
10372
10373        if test "x$TR" = x; then
10374          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10375        fi
10376      else
10377        # Otherwise we believe it is a complete path. Use it as it is.
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10379$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10381$as_echo_n "checking for TR... " >&6; }
10382        if test ! -x "$tool_specified"; then
10383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10384$as_echo "not found" >&6; }
10385          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10386        fi
10387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10388$as_echo "$tool_specified" >&6; }
10389      fi
10390    fi
10391  fi
10392
10393
10394
10395  if test "x$TR" = x; then
10396    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10397  fi
10398
10399
10400
10401
10402
10403  # Publish this variable in the help.
10404
10405
10406  if test "x$UNAME" = x; then
10407    # The variable is not set by user, try to locate tool using the code snippet
10408    for ac_prog in uname
10409do
10410  # Extract the first word of "$ac_prog", so it can be a program name with args.
10411set dummy $ac_prog; ac_word=$2
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10413$as_echo_n "checking for $ac_word... " >&6; }
10414if ${ac_cv_path_UNAME+:} false; then :
10415  $as_echo_n "(cached) " >&6
10416else
10417  case $UNAME in
10418  [\\/]* | ?:[\\/]*)
10419  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10420  ;;
10421  *)
10422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10423for as_dir in $PATH
10424do
10425  IFS=$as_save_IFS
10426  test -z "$as_dir" && as_dir=.
10427    for ac_exec_ext in '' $ac_executable_extensions; do
10428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10429    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10431    break 2
10432  fi
10433done
10434  done
10435IFS=$as_save_IFS
10436
10437  ;;
10438esac
10439fi
10440UNAME=$ac_cv_path_UNAME
10441if test -n "$UNAME"; then
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10443$as_echo "$UNAME" >&6; }
10444else
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
10447fi
10448
10449
10450  test -n "$UNAME" && break
10451done
10452
10453  else
10454    # The variable is set, but is it from the command line or the environment?
10455
10456    # Try to remove the string !UNAME! from our list.
10457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10459      # If it failed, the variable was not from the command line. Ignore it,
10460      # but warn the user (except for BASH, which is always set by the calling BASH).
10461      if test "xUNAME" != xBASH; then
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10463$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10464      fi
10465      # Try to locate tool using the code snippet
10466      for ac_prog in uname
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_UNAME+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $UNAME in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498UNAME=$ac_cv_path_UNAME
10499if test -n "$UNAME"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10501$as_echo "$UNAME" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$UNAME" && break
10509done
10510
10511    else
10512      # If it succeeded, then it was overridden by the user. We will use it
10513      # for the tool.
10514
10515      # First remove it from the list of overridden variables, so we can test
10516      # for unknown variables in the end.
10517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10518
10519      # Check if the provided tool contains a complete path.
10520      tool_specified="$UNAME"
10521      tool_basename="${tool_specified##*/}"
10522      if test "x$tool_basename" = "x$tool_specified"; then
10523        # A command without a complete path is provided, search $PATH.
10524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10525$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10526        # Extract the first word of "$tool_basename", so it can be a program name with args.
10527set dummy $tool_basename; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_UNAME+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $UNAME in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556UNAME=$ac_cv_path_UNAME
10557if test -n "$UNAME"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10559$as_echo "$UNAME" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566        if test "x$UNAME" = x; then
10567          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10568        fi
10569      else
10570        # Otherwise we believe it is a complete path. Use it as it is.
10571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10572$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10574$as_echo_n "checking for UNAME... " >&6; }
10575        if test ! -x "$tool_specified"; then
10576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10577$as_echo "not found" >&6; }
10578          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10579        fi
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10581$as_echo "$tool_specified" >&6; }
10582      fi
10583    fi
10584  fi
10585
10586
10587
10588  if test "x$UNAME" = x; then
10589    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10590  fi
10591
10592
10593
10594
10595
10596  # Publish this variable in the help.
10597
10598
10599  if test "x$UNIQ" = x; then
10600    # The variable is not set by user, try to locate tool using the code snippet
10601    for ac_prog in uniq
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_UNIQ+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $UNIQ in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633UNIQ=$ac_cv_path_UNIQ
10634if test -n "$UNIQ"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10636$as_echo "$UNIQ" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$UNIQ" && break
10644done
10645
10646  else
10647    # The variable is set, but is it from the command line or the environment?
10648
10649    # Try to remove the string !UNIQ! from our list.
10650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10652      # If it failed, the variable was not from the command line. Ignore it,
10653      # but warn the user (except for BASH, which is always set by the calling BASH).
10654      if test "xUNIQ" != xBASH; then
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10656$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10657      fi
10658      # Try to locate tool using the code snippet
10659      for ac_prog in uniq
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_UNIQ+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $UNIQ in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691UNIQ=$ac_cv_path_UNIQ
10692if test -n "$UNIQ"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10694$as_echo "$UNIQ" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$UNIQ" && break
10702done
10703
10704    else
10705      # If it succeeded, then it was overridden by the user. We will use it
10706      # for the tool.
10707
10708      # First remove it from the list of overridden variables, so we can test
10709      # for unknown variables in the end.
10710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10711
10712      # Check if the provided tool contains a complete path.
10713      tool_specified="$UNIQ"
10714      tool_basename="${tool_specified##*/}"
10715      if test "x$tool_basename" = "x$tool_specified"; then
10716        # A command without a complete path is provided, search $PATH.
10717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10718$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10719        # Extract the first word of "$tool_basename", so it can be a program name with args.
10720set dummy $tool_basename; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_UNIQ+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $UNIQ in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749UNIQ=$ac_cv_path_UNIQ
10750if test -n "$UNIQ"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10752$as_echo "$UNIQ" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759        if test "x$UNIQ" = x; then
10760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10761        fi
10762      else
10763        # Otherwise we believe it is a complete path. Use it as it is.
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10765$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10767$as_echo_n "checking for UNIQ... " >&6; }
10768        if test ! -x "$tool_specified"; then
10769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10770$as_echo "not found" >&6; }
10771          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10772        fi
10773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10774$as_echo "$tool_specified" >&6; }
10775      fi
10776    fi
10777  fi
10778
10779
10780
10781  if test "x$UNIQ" = x; then
10782    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10783  fi
10784
10785
10786
10787
10788
10789  # Publish this variable in the help.
10790
10791
10792  if test "x$WC" = x; then
10793    # The variable is not set by user, try to locate tool using the code snippet
10794    for ac_prog in wc
10795do
10796  # Extract the first word of "$ac_prog", so it can be a program name with args.
10797set dummy $ac_prog; ac_word=$2
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799$as_echo_n "checking for $ac_word... " >&6; }
10800if ${ac_cv_path_WC+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  case $WC in
10804  [\\/]* | ?:[\\/]*)
10805  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10806  ;;
10807  *)
10808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809for as_dir in $PATH
10810do
10811  IFS=$as_save_IFS
10812  test -z "$as_dir" && as_dir=.
10813    for ac_exec_ext in '' $ac_executable_extensions; do
10814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817    break 2
10818  fi
10819done
10820  done
10821IFS=$as_save_IFS
10822
10823  ;;
10824esac
10825fi
10826WC=$ac_cv_path_WC
10827if test -n "$WC"; then
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10829$as_echo "$WC" >&6; }
10830else
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833fi
10834
10835
10836  test -n "$WC" && break
10837done
10838
10839  else
10840    # The variable is set, but is it from the command line or the environment?
10841
10842    # Try to remove the string !WC! from our list.
10843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10845      # If it failed, the variable was not from the command line. Ignore it,
10846      # but warn the user (except for BASH, which is always set by the calling BASH).
10847      if test "xWC" != xBASH; then
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10849$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10850      fi
10851      # Try to locate tool using the code snippet
10852      for ac_prog in wc
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_WC+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $WC in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884WC=$ac_cv_path_WC
10885if test -n "$WC"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10887$as_echo "$WC" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894  test -n "$WC" && break
10895done
10896
10897    else
10898      # If it succeeded, then it was overridden by the user. We will use it
10899      # for the tool.
10900
10901      # First remove it from the list of overridden variables, so we can test
10902      # for unknown variables in the end.
10903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10904
10905      # Check if the provided tool contains a complete path.
10906      tool_specified="$WC"
10907      tool_basename="${tool_specified##*/}"
10908      if test "x$tool_basename" = "x$tool_specified"; then
10909        # A command without a complete path is provided, search $PATH.
10910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10911$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10912        # Extract the first word of "$tool_basename", so it can be a program name with args.
10913set dummy $tool_basename; ac_word=$2
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10915$as_echo_n "checking for $ac_word... " >&6; }
10916if ${ac_cv_path_WC+:} false; then :
10917  $as_echo_n "(cached) " >&6
10918else
10919  case $WC in
10920  [\\/]* | ?:[\\/]*)
10921  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10922  ;;
10923  *)
10924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10925for as_dir in $PATH
10926do
10927  IFS=$as_save_IFS
10928  test -z "$as_dir" && as_dir=.
10929    for ac_exec_ext in '' $ac_executable_extensions; do
10930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10931    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10933    break 2
10934  fi
10935done
10936  done
10937IFS=$as_save_IFS
10938
10939  ;;
10940esac
10941fi
10942WC=$ac_cv_path_WC
10943if test -n "$WC"; then
10944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10945$as_echo "$WC" >&6; }
10946else
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
10949fi
10950
10951
10952        if test "x$WC" = x; then
10953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10954        fi
10955      else
10956        # Otherwise we believe it is a complete path. Use it as it is.
10957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10958$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10960$as_echo_n "checking for WC... " >&6; }
10961        if test ! -x "$tool_specified"; then
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10963$as_echo "not found" >&6; }
10964          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10965        fi
10966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10967$as_echo "$tool_specified" >&6; }
10968      fi
10969    fi
10970  fi
10971
10972
10973
10974  if test "x$WC" = x; then
10975    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10976  fi
10977
10978
10979
10980
10981
10982  # Publish this variable in the help.
10983
10984
10985  if test "x$WHICH" = x; then
10986    # The variable is not set by user, try to locate tool using the code snippet
10987    for ac_prog in which
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_WHICH+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $WHICH in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019WHICH=$ac_cv_path_WHICH
11020if test -n "$WHICH"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11022$as_echo "$WHICH" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$WHICH" && break
11030done
11031
11032  else
11033    # The variable is set, but is it from the command line or the environment?
11034
11035    # Try to remove the string !WHICH! from our list.
11036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11038      # If it failed, the variable was not from the command line. Ignore it,
11039      # but warn the user (except for BASH, which is always set by the calling BASH).
11040      if test "xWHICH" != xBASH; then
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11042$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11043      fi
11044      # Try to locate tool using the code snippet
11045      for ac_prog in which
11046do
11047  # Extract the first word of "$ac_prog", so it can be a program name with args.
11048set dummy $ac_prog; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_WHICH+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $WHICH in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077WHICH=$ac_cv_path_WHICH
11078if test -n "$WHICH"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11080$as_echo "$WHICH" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087  test -n "$WHICH" && break
11088done
11089
11090    else
11091      # If it succeeded, then it was overridden by the user. We will use it
11092      # for the tool.
11093
11094      # First remove it from the list of overridden variables, so we can test
11095      # for unknown variables in the end.
11096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11097
11098      # Check if the provided tool contains a complete path.
11099      tool_specified="$WHICH"
11100      tool_basename="${tool_specified##*/}"
11101      if test "x$tool_basename" = "x$tool_specified"; then
11102        # A command without a complete path is provided, search $PATH.
11103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11104$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11105        # Extract the first word of "$tool_basename", so it can be a program name with args.
11106set dummy $tool_basename; ac_word=$2
11107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11108$as_echo_n "checking for $ac_word... " >&6; }
11109if ${ac_cv_path_WHICH+:} false; then :
11110  $as_echo_n "(cached) " >&6
11111else
11112  case $WHICH in
11113  [\\/]* | ?:[\\/]*)
11114  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11115  ;;
11116  *)
11117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120  IFS=$as_save_IFS
11121  test -z "$as_dir" && as_dir=.
11122    for ac_exec_ext in '' $ac_executable_extensions; do
11123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11124    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11126    break 2
11127  fi
11128done
11129  done
11130IFS=$as_save_IFS
11131
11132  ;;
11133esac
11134fi
11135WHICH=$ac_cv_path_WHICH
11136if test -n "$WHICH"; then
11137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11138$as_echo "$WHICH" >&6; }
11139else
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
11142fi
11143
11144
11145        if test "x$WHICH" = x; then
11146          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11147        fi
11148      else
11149        # Otherwise we believe it is a complete path. Use it as it is.
11150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11151$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11153$as_echo_n "checking for WHICH... " >&6; }
11154        if test ! -x "$tool_specified"; then
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11156$as_echo "not found" >&6; }
11157          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11158        fi
11159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11160$as_echo "$tool_specified" >&6; }
11161      fi
11162    fi
11163  fi
11164
11165
11166
11167  if test "x$WHICH" = x; then
11168    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11169  fi
11170
11171
11172
11173
11174
11175  # Publish this variable in the help.
11176
11177
11178  if test "x$XARGS" = x; then
11179    # The variable is not set by user, try to locate tool using the code snippet
11180    for ac_prog in xargs
11181do
11182  # Extract the first word of "$ac_prog", so it can be a program name with args.
11183set dummy $ac_prog; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_XARGS+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $XARGS in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212XARGS=$ac_cv_path_XARGS
11213if test -n "$XARGS"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11215$as_echo "$XARGS" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222  test -n "$XARGS" && break
11223done
11224
11225  else
11226    # The variable is set, but is it from the command line or the environment?
11227
11228    # Try to remove the string !XARGS! from our list.
11229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11231      # If it failed, the variable was not from the command line. Ignore it,
11232      # but warn the user (except for BASH, which is always set by the calling BASH).
11233      if test "xXARGS" != xBASH; then
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11235$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11236      fi
11237      # Try to locate tool using the code snippet
11238      for ac_prog in xargs
11239do
11240  # Extract the first word of "$ac_prog", so it can be a program name with args.
11241set dummy $ac_prog; ac_word=$2
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11243$as_echo_n "checking for $ac_word... " >&6; }
11244if ${ac_cv_path_XARGS+:} false; then :
11245  $as_echo_n "(cached) " >&6
11246else
11247  case $XARGS in
11248  [\\/]* | ?:[\\/]*)
11249  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11250  ;;
11251  *)
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_exec_ext in '' $ac_executable_extensions; do
11258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11259    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11261    break 2
11262  fi
11263done
11264  done
11265IFS=$as_save_IFS
11266
11267  ;;
11268esac
11269fi
11270XARGS=$ac_cv_path_XARGS
11271if test -n "$XARGS"; then
11272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11273$as_echo "$XARGS" >&6; }
11274else
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
11277fi
11278
11279
11280  test -n "$XARGS" && break
11281done
11282
11283    else
11284      # If it succeeded, then it was overridden by the user. We will use it
11285      # for the tool.
11286
11287      # First remove it from the list of overridden variables, so we can test
11288      # for unknown variables in the end.
11289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11290
11291      # Check if the provided tool contains a complete path.
11292      tool_specified="$XARGS"
11293      tool_basename="${tool_specified##*/}"
11294      if test "x$tool_basename" = "x$tool_specified"; then
11295        # A command without a complete path is provided, search $PATH.
11296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11297$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11298        # Extract the first word of "$tool_basename", so it can be a program name with args.
11299set dummy $tool_basename; ac_word=$2
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11301$as_echo_n "checking for $ac_word... " >&6; }
11302if ${ac_cv_path_XARGS+:} false; then :
11303  $as_echo_n "(cached) " >&6
11304else
11305  case $XARGS in
11306  [\\/]* | ?:[\\/]*)
11307  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11308  ;;
11309  *)
11310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313  IFS=$as_save_IFS
11314  test -z "$as_dir" && as_dir=.
11315    for ac_exec_ext in '' $ac_executable_extensions; do
11316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11317    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11319    break 2
11320  fi
11321done
11322  done
11323IFS=$as_save_IFS
11324
11325  ;;
11326esac
11327fi
11328XARGS=$ac_cv_path_XARGS
11329if test -n "$XARGS"; then
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11331$as_echo "$XARGS" >&6; }
11332else
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335fi
11336
11337
11338        if test "x$XARGS" = x; then
11339          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11340        fi
11341      else
11342        # Otherwise we believe it is a complete path. Use it as it is.
11343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11344$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11346$as_echo_n "checking for XARGS... " >&6; }
11347        if test ! -x "$tool_specified"; then
11348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11349$as_echo "not found" >&6; }
11350          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11351        fi
11352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11353$as_echo "$tool_specified" >&6; }
11354      fi
11355    fi
11356  fi
11357
11358
11359
11360  if test "x$XARGS" = x; then
11361    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11362  fi
11363
11364
11365
11366  # Then required tools that require some special treatment.
11367
11368
11369  # Publish this variable in the help.
11370
11371
11372  if test "x$AWK" = x; then
11373    # The variable is not set by user, try to locate tool using the code snippet
11374    for ac_prog in gawk mawk nawk awk
11375do
11376  # Extract the first word of "$ac_prog", so it can be a program name with args.
11377set dummy $ac_prog; ac_word=$2
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11379$as_echo_n "checking for $ac_word... " >&6; }
11380if ${ac_cv_prog_AWK+:} false; then :
11381  $as_echo_n "(cached) " >&6
11382else
11383  if test -n "$AWK"; then
11384  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11385else
11386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11387for as_dir in $PATH
11388do
11389  IFS=$as_save_IFS
11390  test -z "$as_dir" && as_dir=.
11391    for ac_exec_ext in '' $ac_executable_extensions; do
11392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11393    ac_cv_prog_AWK="$ac_prog"
11394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11395    break 2
11396  fi
11397done
11398  done
11399IFS=$as_save_IFS
11400
11401fi
11402fi
11403AWK=$ac_cv_prog_AWK
11404if test -n "$AWK"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11406$as_echo "$AWK" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413  test -n "$AWK" && break
11414done
11415
11416  else
11417    # The variable is set, but is it from the command line or the environment?
11418
11419    # Try to remove the string !AWK! from our list.
11420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11422      # If it failed, the variable was not from the command line. Ignore it,
11423      # but warn the user (except for BASH, which is always set by the calling BASH).
11424      if test "xAWK" != xBASH; then
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11426$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11427      fi
11428      # Try to locate tool using the code snippet
11429      for ac_prog in gawk mawk nawk awk
11430do
11431  # Extract the first word of "$ac_prog", so it can be a program name with args.
11432set dummy $ac_prog; ac_word=$2
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11434$as_echo_n "checking for $ac_word... " >&6; }
11435if ${ac_cv_prog_AWK+:} false; then :
11436  $as_echo_n "(cached) " >&6
11437else
11438  if test -n "$AWK"; then
11439  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11440else
11441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_prog_AWK="$ac_prog"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456fi
11457fi
11458AWK=$ac_cv_prog_AWK
11459if test -n "$AWK"; then
11460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11461$as_echo "$AWK" >&6; }
11462else
11463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
11465fi
11466
11467
11468  test -n "$AWK" && break
11469done
11470
11471    else
11472      # If it succeeded, then it was overridden by the user. We will use it
11473      # for the tool.
11474
11475      # First remove it from the list of overridden variables, so we can test
11476      # for unknown variables in the end.
11477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11478
11479      # Check if the provided tool contains a complete path.
11480      tool_specified="$AWK"
11481      tool_basename="${tool_specified##*/}"
11482      if test "x$tool_basename" = "x$tool_specified"; then
11483        # A command without a complete path is provided, search $PATH.
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11486        # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_AWK+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $AWK in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516AWK=$ac_cv_path_AWK
11517if test -n "$AWK"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11519$as_echo "$AWK" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526        if test "x$AWK" = x; then
11527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528        fi
11529      else
11530        # Otherwise we believe it is a complete path. Use it as it is.
11531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11534$as_echo_n "checking for AWK... " >&6; }
11535        if test ! -x "$tool_specified"; then
11536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11539        fi
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542      fi
11543    fi
11544  fi
11545
11546
11547  if test "x$AWK" = x; then
11548    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11549  fi
11550
11551
11552
11553
11554  # Publish this variable in the help.
11555
11556
11557  if test "x$GREP" = x; then
11558    # The variable is not set by user, try to locate tool using the code snippet
11559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11560$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11561if ${ac_cv_path_GREP+:} false; then :
11562  $as_echo_n "(cached) " >&6
11563else
11564  if test -z "$GREP"; then
11565  ac_path_GREP_found=false
11566  # Loop through the user's path and test for each of PROGNAME-LIST
11567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11568for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11569do
11570  IFS=$as_save_IFS
11571  test -z "$as_dir" && as_dir=.
11572    for ac_prog in grep ggrep; do
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11575      as_fn_executable_p "$ac_path_GREP" || continue
11576# Check for GNU ac_path_GREP and select it if it is found.
11577  # Check for GNU $ac_path_GREP
11578case `"$ac_path_GREP" --version 2>&1` in
11579*GNU*)
11580  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11581*)
11582  ac_count=0
11583  $as_echo_n 0123456789 >"conftest.in"
11584  while :
11585  do
11586    cat "conftest.in" "conftest.in" >"conftest.tmp"
11587    mv "conftest.tmp" "conftest.in"
11588    cp "conftest.in" "conftest.nl"
11589    $as_echo 'GREP' >> "conftest.nl"
11590    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11591    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11592    as_fn_arith $ac_count + 1 && ac_count=$as_val
11593    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11594      # Best one so far, save it but keep looking for a better one
11595      ac_cv_path_GREP="$ac_path_GREP"
11596      ac_path_GREP_max=$ac_count
11597    fi
11598    # 10*(2^10) chars as input seems more than enough
11599    test $ac_count -gt 10 && break
11600  done
11601  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11602esac
11603
11604      $ac_path_GREP_found && break 3
11605    done
11606  done
11607  done
11608IFS=$as_save_IFS
11609  if test -z "$ac_cv_path_GREP"; then
11610    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11611  fi
11612else
11613  ac_cv_path_GREP=$GREP
11614fi
11615
11616fi
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11618$as_echo "$ac_cv_path_GREP" >&6; }
11619 GREP="$ac_cv_path_GREP"
11620
11621
11622  else
11623    # The variable is set, but is it from the command line or the environment?
11624
11625    # Try to remove the string !GREP! from our list.
11626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11628      # If it failed, the variable was not from the command line. Ignore it,
11629      # but warn the user (except for BASH, which is always set by the calling BASH).
11630      if test "xGREP" != xBASH; then
11631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11632$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11633      fi
11634      # Try to locate tool using the code snippet
11635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11636$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11637if ${ac_cv_path_GREP+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  if test -z "$GREP"; then
11641  ac_path_GREP_found=false
11642  # Loop through the user's path and test for each of PROGNAME-LIST
11643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11644for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11645do
11646  IFS=$as_save_IFS
11647  test -z "$as_dir" && as_dir=.
11648    for ac_prog in grep ggrep; do
11649    for ac_exec_ext in '' $ac_executable_extensions; do
11650      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11651      as_fn_executable_p "$ac_path_GREP" || continue
11652# Check for GNU ac_path_GREP and select it if it is found.
11653  # Check for GNU $ac_path_GREP
11654case `"$ac_path_GREP" --version 2>&1` in
11655*GNU*)
11656  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11657*)
11658  ac_count=0
11659  $as_echo_n 0123456789 >"conftest.in"
11660  while :
11661  do
11662    cat "conftest.in" "conftest.in" >"conftest.tmp"
11663    mv "conftest.tmp" "conftest.in"
11664    cp "conftest.in" "conftest.nl"
11665    $as_echo 'GREP' >> "conftest.nl"
11666    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11667    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11668    as_fn_arith $ac_count + 1 && ac_count=$as_val
11669    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11670      # Best one so far, save it but keep looking for a better one
11671      ac_cv_path_GREP="$ac_path_GREP"
11672      ac_path_GREP_max=$ac_count
11673    fi
11674    # 10*(2^10) chars as input seems more than enough
11675    test $ac_count -gt 10 && break
11676  done
11677  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11678esac
11679
11680      $ac_path_GREP_found && break 3
11681    done
11682  done
11683  done
11684IFS=$as_save_IFS
11685  if test -z "$ac_cv_path_GREP"; then
11686    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11687  fi
11688else
11689  ac_cv_path_GREP=$GREP
11690fi
11691
11692fi
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11694$as_echo "$ac_cv_path_GREP" >&6; }
11695 GREP="$ac_cv_path_GREP"
11696
11697
11698    else
11699      # If it succeeded, then it was overridden by the user. We will use it
11700      # for the tool.
11701
11702      # First remove it from the list of overridden variables, so we can test
11703      # for unknown variables in the end.
11704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11705
11706      # Check if the provided tool contains a complete path.
11707      tool_specified="$GREP"
11708      tool_basename="${tool_specified##*/}"
11709      if test "x$tool_basename" = "x$tool_specified"; then
11710        # A command without a complete path is provided, search $PATH.
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11712$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11713        # Extract the first word of "$tool_basename", so it can be a program name with args.
11714set dummy $tool_basename; ac_word=$2
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
11717if ${ac_cv_path_GREP+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  case $GREP in
11721  [\\/]* | ?:[\\/]*)
11722  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11723  ;;
11724  *)
11725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726for as_dir in $PATH
11727do
11728  IFS=$as_save_IFS
11729  test -z "$as_dir" && as_dir=.
11730    for ac_exec_ext in '' $ac_executable_extensions; do
11731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734    break 2
11735  fi
11736done
11737  done
11738IFS=$as_save_IFS
11739
11740  ;;
11741esac
11742fi
11743GREP=$ac_cv_path_GREP
11744if test -n "$GREP"; then
11745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11746$as_echo "$GREP" >&6; }
11747else
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750fi
11751
11752
11753        if test "x$GREP" = x; then
11754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11755        fi
11756      else
11757        # Otherwise we believe it is a complete path. Use it as it is.
11758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11759$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11761$as_echo_n "checking for GREP... " >&6; }
11762        if test ! -x "$tool_specified"; then
11763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11764$as_echo "not found" >&6; }
11765          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11766        fi
11767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11768$as_echo "$tool_specified" >&6; }
11769      fi
11770    fi
11771  fi
11772
11773
11774  if test "x$GREP" = x; then
11775    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11776  fi
11777
11778
11779
11780
11781  # Publish this variable in the help.
11782
11783
11784  if test "x$EGREP" = x; then
11785    # The variable is not set by user, try to locate tool using the code snippet
11786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11787$as_echo_n "checking for egrep... " >&6; }
11788if ${ac_cv_path_EGREP+:} false; then :
11789  $as_echo_n "(cached) " >&6
11790else
11791  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11792   then ac_cv_path_EGREP="$GREP -E"
11793   else
11794     if test -z "$EGREP"; then
11795  ac_path_EGREP_found=false
11796  # Loop through the user's path and test for each of PROGNAME-LIST
11797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11798for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11799do
11800  IFS=$as_save_IFS
11801  test -z "$as_dir" && as_dir=.
11802    for ac_prog in egrep; do
11803    for ac_exec_ext in '' $ac_executable_extensions; do
11804      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11805      as_fn_executable_p "$ac_path_EGREP" || continue
11806# Check for GNU ac_path_EGREP and select it if it is found.
11807  # Check for GNU $ac_path_EGREP
11808case `"$ac_path_EGREP" --version 2>&1` in
11809*GNU*)
11810  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11811*)
11812  ac_count=0
11813  $as_echo_n 0123456789 >"conftest.in"
11814  while :
11815  do
11816    cat "conftest.in" "conftest.in" >"conftest.tmp"
11817    mv "conftest.tmp" "conftest.in"
11818    cp "conftest.in" "conftest.nl"
11819    $as_echo 'EGREP' >> "conftest.nl"
11820    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11821    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11822    as_fn_arith $ac_count + 1 && ac_count=$as_val
11823    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11824      # Best one so far, save it but keep looking for a better one
11825      ac_cv_path_EGREP="$ac_path_EGREP"
11826      ac_path_EGREP_max=$ac_count
11827    fi
11828    # 10*(2^10) chars as input seems more than enough
11829    test $ac_count -gt 10 && break
11830  done
11831  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11832esac
11833
11834      $ac_path_EGREP_found && break 3
11835    done
11836  done
11837  done
11838IFS=$as_save_IFS
11839  if test -z "$ac_cv_path_EGREP"; then
11840    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11841  fi
11842else
11843  ac_cv_path_EGREP=$EGREP
11844fi
11845
11846   fi
11847fi
11848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11849$as_echo "$ac_cv_path_EGREP" >&6; }
11850 EGREP="$ac_cv_path_EGREP"
11851
11852
11853  else
11854    # The variable is set, but is it from the command line or the environment?
11855
11856    # Try to remove the string !EGREP! from our list.
11857    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11858    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11859      # If it failed, the variable was not from the command line. Ignore it,
11860      # but warn the user (except for BASH, which is always set by the calling BASH).
11861      if test "xEGREP" != xBASH; then
11862        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11863$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11864      fi
11865      # Try to locate tool using the code snippet
11866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11867$as_echo_n "checking for egrep... " >&6; }
11868if ${ac_cv_path_EGREP+:} false; then :
11869  $as_echo_n "(cached) " >&6
11870else
11871  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11872   then ac_cv_path_EGREP="$GREP -E"
11873   else
11874     if test -z "$EGREP"; then
11875  ac_path_EGREP_found=false
11876  # Loop through the user's path and test for each of PROGNAME-LIST
11877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11879do
11880  IFS=$as_save_IFS
11881  test -z "$as_dir" && as_dir=.
11882    for ac_prog in egrep; do
11883    for ac_exec_ext in '' $ac_executable_extensions; do
11884      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11885      as_fn_executable_p "$ac_path_EGREP" || continue
11886# Check for GNU ac_path_EGREP and select it if it is found.
11887  # Check for GNU $ac_path_EGREP
11888case `"$ac_path_EGREP" --version 2>&1` in
11889*GNU*)
11890  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11891*)
11892  ac_count=0
11893  $as_echo_n 0123456789 >"conftest.in"
11894  while :
11895  do
11896    cat "conftest.in" "conftest.in" >"conftest.tmp"
11897    mv "conftest.tmp" "conftest.in"
11898    cp "conftest.in" "conftest.nl"
11899    $as_echo 'EGREP' >> "conftest.nl"
11900    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11901    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11902    as_fn_arith $ac_count + 1 && ac_count=$as_val
11903    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11904      # Best one so far, save it but keep looking for a better one
11905      ac_cv_path_EGREP="$ac_path_EGREP"
11906      ac_path_EGREP_max=$ac_count
11907    fi
11908    # 10*(2^10) chars as input seems more than enough
11909    test $ac_count -gt 10 && break
11910  done
11911  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11912esac
11913
11914      $ac_path_EGREP_found && break 3
11915    done
11916  done
11917  done
11918IFS=$as_save_IFS
11919  if test -z "$ac_cv_path_EGREP"; then
11920    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11921  fi
11922else
11923  ac_cv_path_EGREP=$EGREP
11924fi
11925
11926   fi
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11929$as_echo "$ac_cv_path_EGREP" >&6; }
11930 EGREP="$ac_cv_path_EGREP"
11931
11932
11933    else
11934      # If it succeeded, then it was overridden by the user. We will use it
11935      # for the tool.
11936
11937      # First remove it from the list of overridden variables, so we can test
11938      # for unknown variables in the end.
11939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11940
11941      # Check if the provided tool contains a complete path.
11942      tool_specified="$EGREP"
11943      tool_basename="${tool_specified##*/}"
11944      if test "x$tool_basename" = "x$tool_specified"; then
11945        # A command without a complete path is provided, search $PATH.
11946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11947$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11948        # Extract the first word of "$tool_basename", so it can be a program name with args.
11949set dummy $tool_basename; ac_word=$2
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11951$as_echo_n "checking for $ac_word... " >&6; }
11952if ${ac_cv_path_EGREP+:} false; then :
11953  $as_echo_n "(cached) " >&6
11954else
11955  case $EGREP in
11956  [\\/]* | ?:[\\/]*)
11957  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11958  ;;
11959  *)
11960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11961for as_dir in $PATH
11962do
11963  IFS=$as_save_IFS
11964  test -z "$as_dir" && as_dir=.
11965    for ac_exec_ext in '' $ac_executable_extensions; do
11966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11967    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11969    break 2
11970  fi
11971done
11972  done
11973IFS=$as_save_IFS
11974
11975  ;;
11976esac
11977fi
11978EGREP=$ac_cv_path_EGREP
11979if test -n "$EGREP"; then
11980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11981$as_echo "$EGREP" >&6; }
11982else
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11984$as_echo "no" >&6; }
11985fi
11986
11987
11988        if test "x$EGREP" = x; then
11989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11990        fi
11991      else
11992        # Otherwise we believe it is a complete path. Use it as it is.
11993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11994$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11996$as_echo_n "checking for EGREP... " >&6; }
11997        if test ! -x "$tool_specified"; then
11998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11999$as_echo "not found" >&6; }
12000          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12001        fi
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12003$as_echo "$tool_specified" >&6; }
12004      fi
12005    fi
12006  fi
12007
12008
12009  if test "x$EGREP" = x; then
12010    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12011  fi
12012
12013
12014
12015
12016  # Publish this variable in the help.
12017
12018
12019  if test "x$FGREP" = x; then
12020    # The variable is not set by user, try to locate tool using the code snippet
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12022$as_echo_n "checking for fgrep... " >&6; }
12023if ${ac_cv_path_FGREP+:} false; then :
12024  $as_echo_n "(cached) " >&6
12025else
12026  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12027   then ac_cv_path_FGREP="$GREP -F"
12028   else
12029     if test -z "$FGREP"; then
12030  ac_path_FGREP_found=false
12031  # Loop through the user's path and test for each of PROGNAME-LIST
12032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12034do
12035  IFS=$as_save_IFS
12036  test -z "$as_dir" && as_dir=.
12037    for ac_prog in fgrep; do
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12040      as_fn_executable_p "$ac_path_FGREP" || continue
12041# Check for GNU ac_path_FGREP and select it if it is found.
12042  # Check for GNU $ac_path_FGREP
12043case `"$ac_path_FGREP" --version 2>&1` in
12044*GNU*)
12045  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12046*)
12047  ac_count=0
12048  $as_echo_n 0123456789 >"conftest.in"
12049  while :
12050  do
12051    cat "conftest.in" "conftest.in" >"conftest.tmp"
12052    mv "conftest.tmp" "conftest.in"
12053    cp "conftest.in" "conftest.nl"
12054    $as_echo 'FGREP' >> "conftest.nl"
12055    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12056    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12057    as_fn_arith $ac_count + 1 && ac_count=$as_val
12058    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12059      # Best one so far, save it but keep looking for a better one
12060      ac_cv_path_FGREP="$ac_path_FGREP"
12061      ac_path_FGREP_max=$ac_count
12062    fi
12063    # 10*(2^10) chars as input seems more than enough
12064    test $ac_count -gt 10 && break
12065  done
12066  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12067esac
12068
12069      $ac_path_FGREP_found && break 3
12070    done
12071  done
12072  done
12073IFS=$as_save_IFS
12074  if test -z "$ac_cv_path_FGREP"; then
12075    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12076  fi
12077else
12078  ac_cv_path_FGREP=$FGREP
12079fi
12080
12081   fi
12082fi
12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12084$as_echo "$ac_cv_path_FGREP" >&6; }
12085 FGREP="$ac_cv_path_FGREP"
12086
12087
12088  else
12089    # The variable is set, but is it from the command line or the environment?
12090
12091    # Try to remove the string !FGREP! from our list.
12092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12094      # If it failed, the variable was not from the command line. Ignore it,
12095      # but warn the user (except for BASH, which is always set by the calling BASH).
12096      if test "xFGREP" != xBASH; then
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12098$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12099      fi
12100      # Try to locate tool using the code snippet
12101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12102$as_echo_n "checking for fgrep... " >&6; }
12103if ${ac_cv_path_FGREP+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12107   then ac_cv_path_FGREP="$GREP -F"
12108   else
12109     if test -z "$FGREP"; then
12110  ac_path_FGREP_found=false
12111  # Loop through the user's path and test for each of PROGNAME-LIST
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_prog in fgrep; do
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12120      as_fn_executable_p "$ac_path_FGREP" || continue
12121# Check for GNU ac_path_FGREP and select it if it is found.
12122  # Check for GNU $ac_path_FGREP
12123case `"$ac_path_FGREP" --version 2>&1` in
12124*GNU*)
12125  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12126*)
12127  ac_count=0
12128  $as_echo_n 0123456789 >"conftest.in"
12129  while :
12130  do
12131    cat "conftest.in" "conftest.in" >"conftest.tmp"
12132    mv "conftest.tmp" "conftest.in"
12133    cp "conftest.in" "conftest.nl"
12134    $as_echo 'FGREP' >> "conftest.nl"
12135    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12136    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12137    as_fn_arith $ac_count + 1 && ac_count=$as_val
12138    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12139      # Best one so far, save it but keep looking for a better one
12140      ac_cv_path_FGREP="$ac_path_FGREP"
12141      ac_path_FGREP_max=$ac_count
12142    fi
12143    # 10*(2^10) chars as input seems more than enough
12144    test $ac_count -gt 10 && break
12145  done
12146  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12147esac
12148
12149      $ac_path_FGREP_found && break 3
12150    done
12151  done
12152  done
12153IFS=$as_save_IFS
12154  if test -z "$ac_cv_path_FGREP"; then
12155    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12156  fi
12157else
12158  ac_cv_path_FGREP=$FGREP
12159fi
12160
12161   fi
12162fi
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12164$as_echo "$ac_cv_path_FGREP" >&6; }
12165 FGREP="$ac_cv_path_FGREP"
12166
12167
12168    else
12169      # If it succeeded, then it was overridden by the user. We will use it
12170      # for the tool.
12171
12172      # First remove it from the list of overridden variables, so we can test
12173      # for unknown variables in the end.
12174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12175
12176      # Check if the provided tool contains a complete path.
12177      tool_specified="$FGREP"
12178      tool_basename="${tool_specified##*/}"
12179      if test "x$tool_basename" = "x$tool_specified"; then
12180        # A command without a complete path is provided, search $PATH.
12181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12182$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12183        # Extract the first word of "$tool_basename", so it can be a program name with args.
12184set dummy $tool_basename; ac_word=$2
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12186$as_echo_n "checking for $ac_word... " >&6; }
12187if ${ac_cv_path_FGREP+:} false; then :
12188  $as_echo_n "(cached) " >&6
12189else
12190  case $FGREP in
12191  [\\/]* | ?:[\\/]*)
12192  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12193  ;;
12194  *)
12195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196for as_dir in $PATH
12197do
12198  IFS=$as_save_IFS
12199  test -z "$as_dir" && as_dir=.
12200    for ac_exec_ext in '' $ac_executable_extensions; do
12201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204    break 2
12205  fi
12206done
12207  done
12208IFS=$as_save_IFS
12209
12210  ;;
12211esac
12212fi
12213FGREP=$ac_cv_path_FGREP
12214if test -n "$FGREP"; then
12215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12216$as_echo "$FGREP" >&6; }
12217else
12218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12219$as_echo "no" >&6; }
12220fi
12221
12222
12223        if test "x$FGREP" = x; then
12224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12225        fi
12226      else
12227        # Otherwise we believe it is a complete path. Use it as it is.
12228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12229$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12231$as_echo_n "checking for FGREP... " >&6; }
12232        if test ! -x "$tool_specified"; then
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12234$as_echo "not found" >&6; }
12235          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12236        fi
12237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12238$as_echo "$tool_specified" >&6; }
12239      fi
12240    fi
12241  fi
12242
12243
12244  if test "x$FGREP" = x; then
12245    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12246  fi
12247
12248
12249
12250
12251  # Publish this variable in the help.
12252
12253
12254  if test "x$SED" = x; then
12255    # The variable is not set by user, try to locate tool using the code snippet
12256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12257$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12258if ${ac_cv_path_SED+:} false; then :
12259  $as_echo_n "(cached) " >&6
12260else
12261            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12262     for ac_i in 1 2 3 4 5 6 7; do
12263       ac_script="$ac_script$as_nl$ac_script"
12264     done
12265     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12266     { ac_script=; unset ac_script;}
12267     if test -z "$SED"; then
12268  ac_path_SED_found=false
12269  # Loop through the user's path and test for each of PROGNAME-LIST
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_prog in sed gsed; do
12276    for ac_exec_ext in '' $ac_executable_extensions; do
12277      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12278      as_fn_executable_p "$ac_path_SED" || continue
12279# Check for GNU ac_path_SED and select it if it is found.
12280  # Check for GNU $ac_path_SED
12281case `"$ac_path_SED" --version 2>&1` in
12282*GNU*)
12283  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12284*)
12285  ac_count=0
12286  $as_echo_n 0123456789 >"conftest.in"
12287  while :
12288  do
12289    cat "conftest.in" "conftest.in" >"conftest.tmp"
12290    mv "conftest.tmp" "conftest.in"
12291    cp "conftest.in" "conftest.nl"
12292    $as_echo '' >> "conftest.nl"
12293    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12294    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12295    as_fn_arith $ac_count + 1 && ac_count=$as_val
12296    if test $ac_count -gt ${ac_path_SED_max-0}; then
12297      # Best one so far, save it but keep looking for a better one
12298      ac_cv_path_SED="$ac_path_SED"
12299      ac_path_SED_max=$ac_count
12300    fi
12301    # 10*(2^10) chars as input seems more than enough
12302    test $ac_count -gt 10 && break
12303  done
12304  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12305esac
12306
12307      $ac_path_SED_found && break 3
12308    done
12309  done
12310  done
12311IFS=$as_save_IFS
12312  if test -z "$ac_cv_path_SED"; then
12313    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12314  fi
12315else
12316  ac_cv_path_SED=$SED
12317fi
12318
12319fi
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12321$as_echo "$ac_cv_path_SED" >&6; }
12322 SED="$ac_cv_path_SED"
12323  rm -f conftest.sed
12324
12325  else
12326    # The variable is set, but is it from the command line or the environment?
12327
12328    # Try to remove the string !SED! from our list.
12329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12331      # If it failed, the variable was not from the command line. Ignore it,
12332      # but warn the user (except for BASH, which is always set by the calling BASH).
12333      if test "xSED" != xBASH; then
12334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12335$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12336      fi
12337      # Try to locate tool using the code snippet
12338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12339$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12340if ${ac_cv_path_SED+:} false; then :
12341  $as_echo_n "(cached) " >&6
12342else
12343            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12344     for ac_i in 1 2 3 4 5 6 7; do
12345       ac_script="$ac_script$as_nl$ac_script"
12346     done
12347     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12348     { ac_script=; unset ac_script;}
12349     if test -z "$SED"; then
12350  ac_path_SED_found=false
12351  # Loop through the user's path and test for each of PROGNAME-LIST
12352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12353for as_dir in $PATH
12354do
12355  IFS=$as_save_IFS
12356  test -z "$as_dir" && as_dir=.
12357    for ac_prog in sed gsed; do
12358    for ac_exec_ext in '' $ac_executable_extensions; do
12359      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12360      as_fn_executable_p "$ac_path_SED" || continue
12361# Check for GNU ac_path_SED and select it if it is found.
12362  # Check for GNU $ac_path_SED
12363case `"$ac_path_SED" --version 2>&1` in
12364*GNU*)
12365  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12366*)
12367  ac_count=0
12368  $as_echo_n 0123456789 >"conftest.in"
12369  while :
12370  do
12371    cat "conftest.in" "conftest.in" >"conftest.tmp"
12372    mv "conftest.tmp" "conftest.in"
12373    cp "conftest.in" "conftest.nl"
12374    $as_echo '' >> "conftest.nl"
12375    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12376    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12377    as_fn_arith $ac_count + 1 && ac_count=$as_val
12378    if test $ac_count -gt ${ac_path_SED_max-0}; then
12379      # Best one so far, save it but keep looking for a better one
12380      ac_cv_path_SED="$ac_path_SED"
12381      ac_path_SED_max=$ac_count
12382    fi
12383    # 10*(2^10) chars as input seems more than enough
12384    test $ac_count -gt 10 && break
12385  done
12386  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12387esac
12388
12389      $ac_path_SED_found && break 3
12390    done
12391  done
12392  done
12393IFS=$as_save_IFS
12394  if test -z "$ac_cv_path_SED"; then
12395    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12396  fi
12397else
12398  ac_cv_path_SED=$SED
12399fi
12400
12401fi
12402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12403$as_echo "$ac_cv_path_SED" >&6; }
12404 SED="$ac_cv_path_SED"
12405  rm -f conftest.sed
12406
12407    else
12408      # If it succeeded, then it was overridden by the user. We will use it
12409      # for the tool.
12410
12411      # First remove it from the list of overridden variables, so we can test
12412      # for unknown variables in the end.
12413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414
12415      # Check if the provided tool contains a complete path.
12416      tool_specified="$SED"
12417      tool_basename="${tool_specified##*/}"
12418      if test "x$tool_basename" = "x$tool_specified"; then
12419        # A command without a complete path is provided, search $PATH.
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12421$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12422        # Extract the first word of "$tool_basename", so it can be a program name with args.
12423set dummy $tool_basename; ac_word=$2
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12425$as_echo_n "checking for $ac_word... " >&6; }
12426if ${ac_cv_path_SED+:} false; then :
12427  $as_echo_n "(cached) " >&6
12428else
12429  case $SED in
12430  [\\/]* | ?:[\\/]*)
12431  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12432  ;;
12433  *)
12434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437  IFS=$as_save_IFS
12438  test -z "$as_dir" && as_dir=.
12439    for ac_exec_ext in '' $ac_executable_extensions; do
12440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12441    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12443    break 2
12444  fi
12445done
12446  done
12447IFS=$as_save_IFS
12448
12449  ;;
12450esac
12451fi
12452SED=$ac_cv_path_SED
12453if test -n "$SED"; then
12454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12455$as_echo "$SED" >&6; }
12456else
12457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12458$as_echo "no" >&6; }
12459fi
12460
12461
12462        if test "x$SED" = x; then
12463          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12464        fi
12465      else
12466        # Otherwise we believe it is a complete path. Use it as it is.
12467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12468$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12469        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12470$as_echo_n "checking for SED... " >&6; }
12471        if test ! -x "$tool_specified"; then
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12473$as_echo "not found" >&6; }
12474          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12475        fi
12476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12477$as_echo "$tool_specified" >&6; }
12478      fi
12479    fi
12480  fi
12481
12482
12483  if test "x$SED" = x; then
12484    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12485  fi
12486
12487
12488
12489  # Always force rm.
12490  RM="$RM -f"
12491
12492  # pwd behaves differently on various platforms and some don't support the -L flag.
12493  # Always use the bash builtin pwd to get uniform behavior.
12494  THEPWDCMD=pwd
12495
12496  # These are not required on all platforms
12497
12498
12499  # Publish this variable in the help.
12500
12501
12502  if test "x$CYGPATH" = x; then
12503    # The variable is not set by user, try to locate tool using the code snippet
12504    for ac_prog in cygpath
12505do
12506  # Extract the first word of "$ac_prog", so it can be a program name with args.
12507set dummy $ac_prog; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_CYGPATH+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $CYGPATH in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536CYGPATH=$ac_cv_path_CYGPATH
12537if test -n "$CYGPATH"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12539$as_echo "$CYGPATH" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546  test -n "$CYGPATH" && break
12547done
12548
12549  else
12550    # The variable is set, but is it from the command line or the environment?
12551
12552    # Try to remove the string !CYGPATH! from our list.
12553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12555      # If it failed, the variable was not from the command line. Ignore it,
12556      # but warn the user (except for BASH, which is always set by the calling BASH).
12557      if test "xCYGPATH" != xBASH; then
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12559$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12560      fi
12561      # Try to locate tool using the code snippet
12562      for ac_prog in cygpath
12563do
12564  # Extract the first word of "$ac_prog", so it can be a program name with args.
12565set dummy $ac_prog; ac_word=$2
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12567$as_echo_n "checking for $ac_word... " >&6; }
12568if ${ac_cv_path_CYGPATH+:} false; then :
12569  $as_echo_n "(cached) " >&6
12570else
12571  case $CYGPATH in
12572  [\\/]* | ?:[\\/]*)
12573  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12574  ;;
12575  *)
12576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577for as_dir in $PATH
12578do
12579  IFS=$as_save_IFS
12580  test -z "$as_dir" && as_dir=.
12581    for ac_exec_ext in '' $ac_executable_extensions; do
12582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12583    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12585    break 2
12586  fi
12587done
12588  done
12589IFS=$as_save_IFS
12590
12591  ;;
12592esac
12593fi
12594CYGPATH=$ac_cv_path_CYGPATH
12595if test -n "$CYGPATH"; then
12596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12597$as_echo "$CYGPATH" >&6; }
12598else
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602
12603
12604  test -n "$CYGPATH" && break
12605done
12606
12607    else
12608      # If it succeeded, then it was overridden by the user. We will use it
12609      # for the tool.
12610
12611      # First remove it from the list of overridden variables, so we can test
12612      # for unknown variables in the end.
12613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12614
12615      # Check if the provided tool contains a complete path.
12616      tool_specified="$CYGPATH"
12617      tool_basename="${tool_specified##*/}"
12618      if test "x$tool_basename" = "x$tool_specified"; then
12619        # A command without a complete path is provided, search $PATH.
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12621$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12622        # Extract the first word of "$tool_basename", so it can be a program name with args.
12623set dummy $tool_basename; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_CYGPATH+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $CYGPATH in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652CYGPATH=$ac_cv_path_CYGPATH
12653if test -n "$CYGPATH"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12655$as_echo "$CYGPATH" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662        if test "x$CYGPATH" = x; then
12663          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12664        fi
12665      else
12666        # Otherwise we believe it is a complete path. Use it as it is.
12667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12668$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12670$as_echo_n "checking for CYGPATH... " >&6; }
12671        if test ! -x "$tool_specified"; then
12672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12673$as_echo "not found" >&6; }
12674          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12675        fi
12676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12677$as_echo "$tool_specified" >&6; }
12678      fi
12679    fi
12680  fi
12681
12682
12683
12684
12685  # Publish this variable in the help.
12686
12687
12688  if test "x$READLINK" = x; then
12689    # The variable is not set by user, try to locate tool using the code snippet
12690    for ac_prog in greadlink readlink
12691do
12692  # Extract the first word of "$ac_prog", so it can be a program name with args.
12693set dummy $ac_prog; ac_word=$2
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695$as_echo_n "checking for $ac_word... " >&6; }
12696if ${ac_cv_path_READLINK+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  case $READLINK in
12700  [\\/]* | ?:[\\/]*)
12701  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12702  ;;
12703  *)
12704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705for as_dir in $PATH
12706do
12707  IFS=$as_save_IFS
12708  test -z "$as_dir" && as_dir=.
12709    for ac_exec_ext in '' $ac_executable_extensions; do
12710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713    break 2
12714  fi
12715done
12716  done
12717IFS=$as_save_IFS
12718
12719  ;;
12720esac
12721fi
12722READLINK=$ac_cv_path_READLINK
12723if test -n "$READLINK"; then
12724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12725$as_echo "$READLINK" >&6; }
12726else
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729fi
12730
12731
12732  test -n "$READLINK" && break
12733done
12734
12735  else
12736    # The variable is set, but is it from the command line or the environment?
12737
12738    # Try to remove the string !READLINK! from our list.
12739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12741      # If it failed, the variable was not from the command line. Ignore it,
12742      # but warn the user (except for BASH, which is always set by the calling BASH).
12743      if test "xREADLINK" != xBASH; then
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12745$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12746      fi
12747      # Try to locate tool using the code snippet
12748      for ac_prog in greadlink readlink
12749do
12750  # Extract the first word of "$ac_prog", so it can be a program name with args.
12751set dummy $ac_prog; ac_word=$2
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12753$as_echo_n "checking for $ac_word... " >&6; }
12754if ${ac_cv_path_READLINK+:} false; then :
12755  $as_echo_n "(cached) " >&6
12756else
12757  case $READLINK in
12758  [\\/]* | ?:[\\/]*)
12759  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12760  ;;
12761  *)
12762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12763for as_dir in $PATH
12764do
12765  IFS=$as_save_IFS
12766  test -z "$as_dir" && as_dir=.
12767    for ac_exec_ext in '' $ac_executable_extensions; do
12768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12769    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12771    break 2
12772  fi
12773done
12774  done
12775IFS=$as_save_IFS
12776
12777  ;;
12778esac
12779fi
12780READLINK=$ac_cv_path_READLINK
12781if test -n "$READLINK"; then
12782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12783$as_echo "$READLINK" >&6; }
12784else
12785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12786$as_echo "no" >&6; }
12787fi
12788
12789
12790  test -n "$READLINK" && break
12791done
12792
12793    else
12794      # If it succeeded, then it was overridden by the user. We will use it
12795      # for the tool.
12796
12797      # First remove it from the list of overridden variables, so we can test
12798      # for unknown variables in the end.
12799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12800
12801      # Check if the provided tool contains a complete path.
12802      tool_specified="$READLINK"
12803      tool_basename="${tool_specified##*/}"
12804      if test "x$tool_basename" = "x$tool_specified"; then
12805        # A command without a complete path is provided, search $PATH.
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12807$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12808        # Extract the first word of "$tool_basename", so it can be a program name with args.
12809set dummy $tool_basename; ac_word=$2
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12811$as_echo_n "checking for $ac_word... " >&6; }
12812if ${ac_cv_path_READLINK+:} false; then :
12813  $as_echo_n "(cached) " >&6
12814else
12815  case $READLINK in
12816  [\\/]* | ?:[\\/]*)
12817  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12818  ;;
12819  *)
12820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12821for as_dir in $PATH
12822do
12823  IFS=$as_save_IFS
12824  test -z "$as_dir" && as_dir=.
12825    for ac_exec_ext in '' $ac_executable_extensions; do
12826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12827    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12829    break 2
12830  fi
12831done
12832  done
12833IFS=$as_save_IFS
12834
12835  ;;
12836esac
12837fi
12838READLINK=$ac_cv_path_READLINK
12839if test -n "$READLINK"; then
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12841$as_echo "$READLINK" >&6; }
12842else
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844$as_echo "no" >&6; }
12845fi
12846
12847
12848        if test "x$READLINK" = x; then
12849          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12850        fi
12851      else
12852        # Otherwise we believe it is a complete path. Use it as it is.
12853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12854$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12856$as_echo_n "checking for READLINK... " >&6; }
12857        if test ! -x "$tool_specified"; then
12858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12859$as_echo "not found" >&6; }
12860          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12861        fi
12862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12863$as_echo "$tool_specified" >&6; }
12864      fi
12865    fi
12866  fi
12867
12868
12869
12870
12871  # Publish this variable in the help.
12872
12873
12874  if test "x$DF" = x; then
12875    # The variable is not set by user, try to locate tool using the code snippet
12876    for ac_prog in df
12877do
12878  # Extract the first word of "$ac_prog", so it can be a program name with args.
12879set dummy $ac_prog; ac_word=$2
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881$as_echo_n "checking for $ac_word... " >&6; }
12882if ${ac_cv_path_DF+:} false; then :
12883  $as_echo_n "(cached) " >&6
12884else
12885  case $DF in
12886  [\\/]* | ?:[\\/]*)
12887  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12888  ;;
12889  *)
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899    break 2
12900  fi
12901done
12902  done
12903IFS=$as_save_IFS
12904
12905  ;;
12906esac
12907fi
12908DF=$ac_cv_path_DF
12909if test -n "$DF"; then
12910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12911$as_echo "$DF" >&6; }
12912else
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914$as_echo "no" >&6; }
12915fi
12916
12917
12918  test -n "$DF" && break
12919done
12920
12921  else
12922    # The variable is set, but is it from the command line or the environment?
12923
12924    # Try to remove the string !DF! from our list.
12925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12927      # If it failed, the variable was not from the command line. Ignore it,
12928      # but warn the user (except for BASH, which is always set by the calling BASH).
12929      if test "xDF" != xBASH; then
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12931$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12932      fi
12933      # Try to locate tool using the code snippet
12934      for ac_prog in df
12935do
12936  # Extract the first word of "$ac_prog", so it can be a program name with args.
12937set dummy $ac_prog; ac_word=$2
12938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12939$as_echo_n "checking for $ac_word... " >&6; }
12940if ${ac_cv_path_DF+:} false; then :
12941  $as_echo_n "(cached) " >&6
12942else
12943  case $DF in
12944  [\\/]* | ?:[\\/]*)
12945  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12946  ;;
12947  *)
12948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12949for as_dir in $PATH
12950do
12951  IFS=$as_save_IFS
12952  test -z "$as_dir" && as_dir=.
12953    for ac_exec_ext in '' $ac_executable_extensions; do
12954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12955    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12957    break 2
12958  fi
12959done
12960  done
12961IFS=$as_save_IFS
12962
12963  ;;
12964esac
12965fi
12966DF=$ac_cv_path_DF
12967if test -n "$DF"; then
12968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12969$as_echo "$DF" >&6; }
12970else
12971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12972$as_echo "no" >&6; }
12973fi
12974
12975
12976  test -n "$DF" && break
12977done
12978
12979    else
12980      # If it succeeded, then it was overridden by the user. We will use it
12981      # for the tool.
12982
12983      # First remove it from the list of overridden variables, so we can test
12984      # for unknown variables in the end.
12985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12986
12987      # Check if the provided tool contains a complete path.
12988      tool_specified="$DF"
12989      tool_basename="${tool_specified##*/}"
12990      if test "x$tool_basename" = "x$tool_specified"; then
12991        # A command without a complete path is provided, search $PATH.
12992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12993$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12994        # Extract the first word of "$tool_basename", so it can be a program name with args.
12995set dummy $tool_basename; ac_word=$2
12996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12997$as_echo_n "checking for $ac_word... " >&6; }
12998if ${ac_cv_path_DF+:} false; then :
12999  $as_echo_n "(cached) " >&6
13000else
13001  case $DF in
13002  [\\/]* | ?:[\\/]*)
13003  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13004  ;;
13005  *)
13006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13007for as_dir in $PATH
13008do
13009  IFS=$as_save_IFS
13010  test -z "$as_dir" && as_dir=.
13011    for ac_exec_ext in '' $ac_executable_extensions; do
13012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13013    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13015    break 2
13016  fi
13017done
13018  done
13019IFS=$as_save_IFS
13020
13021  ;;
13022esac
13023fi
13024DF=$ac_cv_path_DF
13025if test -n "$DF"; then
13026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13027$as_echo "$DF" >&6; }
13028else
13029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13030$as_echo "no" >&6; }
13031fi
13032
13033
13034        if test "x$DF" = x; then
13035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13036        fi
13037      else
13038        # Otherwise we believe it is a complete path. Use it as it is.
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13040$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13042$as_echo_n "checking for DF... " >&6; }
13043        if test ! -x "$tool_specified"; then
13044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13045$as_echo "not found" >&6; }
13046          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13047        fi
13048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13049$as_echo "$tool_specified" >&6; }
13050      fi
13051    fi
13052  fi
13053
13054
13055
13056
13057  # Publish this variable in the help.
13058
13059
13060  if test "x$SETFILE" = x; then
13061    # The variable is not set by user, try to locate tool using the code snippet
13062    for ac_prog in SetFile
13063do
13064  # Extract the first word of "$ac_prog", so it can be a program name with args.
13065set dummy $ac_prog; 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; }
13068if ${ac_cv_path_SETFILE+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $SETFILE in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
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_SETFILE="$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
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094SETFILE=$ac_cv_path_SETFILE
13095if test -n "$SETFILE"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13097$as_echo "$SETFILE" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104  test -n "$SETFILE" && break
13105done
13106
13107  else
13108    # The variable is set, but is it from the command line or the environment?
13109
13110    # Try to remove the string !SETFILE! from our list.
13111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13113      # If it failed, the variable was not from the command line. Ignore it,
13114      # but warn the user (except for BASH, which is always set by the calling BASH).
13115      if test "xSETFILE" != xBASH; then
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13117$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13118      fi
13119      # Try to locate tool using the code snippet
13120      for ac_prog in SetFile
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_path_SETFILE+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  case $SETFILE in
13130  [\\/]* | ?:[\\/]*)
13131  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13132  ;;
13133  *)
13134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13135for as_dir in $PATH
13136do
13137  IFS=$as_save_IFS
13138  test -z "$as_dir" && as_dir=.
13139    for ac_exec_ext in '' $ac_executable_extensions; do
13140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13141    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13143    break 2
13144  fi
13145done
13146  done
13147IFS=$as_save_IFS
13148
13149  ;;
13150esac
13151fi
13152SETFILE=$ac_cv_path_SETFILE
13153if test -n "$SETFILE"; then
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13155$as_echo "$SETFILE" >&6; }
13156else
13157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13158$as_echo "no" >&6; }
13159fi
13160
13161
13162  test -n "$SETFILE" && break
13163done
13164
13165    else
13166      # If it succeeded, then it was overridden by the user. We will use it
13167      # for the tool.
13168
13169      # First remove it from the list of overridden variables, so we can test
13170      # for unknown variables in the end.
13171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13172
13173      # Check if the provided tool contains a complete path.
13174      tool_specified="$SETFILE"
13175      tool_basename="${tool_specified##*/}"
13176      if test "x$tool_basename" = "x$tool_specified"; then
13177        # A command without a complete path is provided, search $PATH.
13178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13179$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13180        # Extract the first word of "$tool_basename", so it can be a program name with args.
13181set dummy $tool_basename; ac_word=$2
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13183$as_echo_n "checking for $ac_word... " >&6; }
13184if ${ac_cv_path_SETFILE+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  case $SETFILE in
13188  [\\/]* | ?:[\\/]*)
13189  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13190  ;;
13191  *)
13192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13193for as_dir in $PATH
13194do
13195  IFS=$as_save_IFS
13196  test -z "$as_dir" && as_dir=.
13197    for ac_exec_ext in '' $ac_executable_extensions; do
13198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13199    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13201    break 2
13202  fi
13203done
13204  done
13205IFS=$as_save_IFS
13206
13207  ;;
13208esac
13209fi
13210SETFILE=$ac_cv_path_SETFILE
13211if test -n "$SETFILE"; then
13212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13213$as_echo "$SETFILE" >&6; }
13214else
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
13217fi
13218
13219
13220        if test "x$SETFILE" = x; then
13221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13222        fi
13223      else
13224        # Otherwise we believe it is a complete path. Use it as it is.
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13226$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13228$as_echo_n "checking for SETFILE... " >&6; }
13229        if test ! -x "$tool_specified"; then
13230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13231$as_echo "not found" >&6; }
13232          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13233        fi
13234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13235$as_echo "$tool_specified" >&6; }
13236      fi
13237    fi
13238  fi
13239
13240
13241
13242
13243  # Publish this variable in the help.
13244
13245
13246  if test "x$CPIO" = x; then
13247    # The variable is not set by user, try to locate tool using the code snippet
13248    for ac_prog in cpio bsdcpio
13249do
13250  # Extract the first word of "$ac_prog", so it can be a program name with args.
13251set dummy $ac_prog; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_CPIO+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $CPIO in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280CPIO=$ac_cv_path_CPIO
13281if test -n "$CPIO"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13283$as_echo "$CPIO" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$CPIO" && break
13291done
13292
13293  else
13294    # The variable is set, but is it from the command line or the environment?
13295
13296    # Try to remove the string !CPIO! from our list.
13297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13299      # If it failed, the variable was not from the command line. Ignore it,
13300      # but warn the user (except for BASH, which is always set by the calling BASH).
13301      if test "xCPIO" != xBASH; then
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13303$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13304      fi
13305      # Try to locate tool using the code snippet
13306      for ac_prog in cpio bsdcpio
13307do
13308  # Extract the first word of "$ac_prog", so it can be a program name with args.
13309set dummy $ac_prog; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_path_CPIO+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  case $CPIO in
13316  [\\/]* | ?:[\\/]*)
13317  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13318  ;;
13319  *)
13320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13321for as_dir in $PATH
13322do
13323  IFS=$as_save_IFS
13324  test -z "$as_dir" && as_dir=.
13325    for ac_exec_ext in '' $ac_executable_extensions; do
13326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13327    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13329    break 2
13330  fi
13331done
13332  done
13333IFS=$as_save_IFS
13334
13335  ;;
13336esac
13337fi
13338CPIO=$ac_cv_path_CPIO
13339if test -n "$CPIO"; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13341$as_echo "$CPIO" >&6; }
13342else
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
13345fi
13346
13347
13348  test -n "$CPIO" && break
13349done
13350
13351    else
13352      # If it succeeded, then it was overridden by the user. We will use it
13353      # for the tool.
13354
13355      # First remove it from the list of overridden variables, so we can test
13356      # for unknown variables in the end.
13357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13358
13359      # Check if the provided tool contains a complete path.
13360      tool_specified="$CPIO"
13361      tool_basename="${tool_specified##*/}"
13362      if test "x$tool_basename" = "x$tool_specified"; then
13363        # A command without a complete path is provided, search $PATH.
13364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13365$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13366        # Extract the first word of "$tool_basename", so it can be a program name with args.
13367set dummy $tool_basename; ac_word=$2
13368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13369$as_echo_n "checking for $ac_word... " >&6; }
13370if ${ac_cv_path_CPIO+:} false; then :
13371  $as_echo_n "(cached) " >&6
13372else
13373  case $CPIO in
13374  [\\/]* | ?:[\\/]*)
13375  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13376  ;;
13377  *)
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_exec_ext in '' $ac_executable_extensions; do
13384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13385    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13387    break 2
13388  fi
13389done
13390  done
13391IFS=$as_save_IFS
13392
13393  ;;
13394esac
13395fi
13396CPIO=$ac_cv_path_CPIO
13397if test -n "$CPIO"; then
13398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13399$as_echo "$CPIO" >&6; }
13400else
13401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13402$as_echo "no" >&6; }
13403fi
13404
13405
13406        if test "x$CPIO" = x; then
13407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13408        fi
13409      else
13410        # Otherwise we believe it is a complete path. Use it as it is.
13411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13412$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13414$as_echo_n "checking for CPIO... " >&6; }
13415        if test ! -x "$tool_specified"; then
13416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13417$as_echo "not found" >&6; }
13418          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13419        fi
13420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13421$as_echo "$tool_specified" >&6; }
13422      fi
13423    fi
13424  fi
13425
13426
13427
13428
13429# Now we can determine OpenJDK build and target platforms. This is required to
13430# have early on.
13431# Make sure we can run config.sub.
13432$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13433  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13434
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13436$as_echo_n "checking build system type... " >&6; }
13437if ${ac_cv_build+:} false; then :
13438  $as_echo_n "(cached) " >&6
13439else
13440  ac_build_alias=$build_alias
13441test "x$ac_build_alias" = x &&
13442  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13443test "x$ac_build_alias" = x &&
13444  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13445ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13446  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13450$as_echo "$ac_cv_build" >&6; }
13451case $ac_cv_build in
13452*-*-*) ;;
13453*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13454esac
13455build=$ac_cv_build
13456ac_save_IFS=$IFS; IFS='-'
13457set x $ac_cv_build
13458shift
13459build_cpu=$1
13460build_vendor=$2
13461shift; shift
13462# Remember, the first character of IFS is used to create $*,
13463# except with old shells:
13464build_os=$*
13465IFS=$ac_save_IFS
13466case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13467
13468
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13470$as_echo_n "checking host system type... " >&6; }
13471if ${ac_cv_host+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  if test "x$host_alias" = x; then
13475  ac_cv_host=$ac_cv_build
13476else
13477  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13478    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13483$as_echo "$ac_cv_host" >&6; }
13484case $ac_cv_host in
13485*-*-*) ;;
13486*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13487esac
13488host=$ac_cv_host
13489ac_save_IFS=$IFS; IFS='-'
13490set x $ac_cv_host
13491shift
13492host_cpu=$1
13493host_vendor=$2
13494shift; shift
13495# Remember, the first character of IFS is used to create $*,
13496# except with old shells:
13497host_os=$*
13498IFS=$ac_save_IFS
13499case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13500
13501
13502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13503$as_echo_n "checking target system type... " >&6; }
13504if ${ac_cv_target+:} false; then :
13505  $as_echo_n "(cached) " >&6
13506else
13507  if test "x$target_alias" = x; then
13508  ac_cv_target=$ac_cv_host
13509else
13510  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13511    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13512fi
13513
13514fi
13515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13516$as_echo "$ac_cv_target" >&6; }
13517case $ac_cv_target in
13518*-*-*) ;;
13519*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13520esac
13521target=$ac_cv_target
13522ac_save_IFS=$IFS; IFS='-'
13523set x $ac_cv_target
13524shift
13525target_cpu=$1
13526target_vendor=$2
13527shift; shift
13528# Remember, the first character of IFS is used to create $*,
13529# except with old shells:
13530target_os=$*
13531IFS=$ac_save_IFS
13532case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13533
13534
13535# The aliases save the names the user supplied, while $host etc.
13536# will get canonicalized.
13537test -n "$target_alias" &&
13538  test "$program_prefix$program_suffix$program_transform_name" = \
13539    NONENONEs,x,x, &&
13540  program_prefix=${target_alias}-
13541
13542  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13543  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13544  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13545  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13546  # to use the configure naming style.
13547
13548
13549
13550
13551
13552  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13553  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13554  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13555  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13556  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13557  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13558
13559
13560
13561  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13562
13563  case "$build_os" in
13564    *linux*)
13565      VAR_OS=linux
13566      VAR_OS_TYPE=unix
13567      ;;
13568    *solaris*)
13569      VAR_OS=solaris
13570      VAR_OS_TYPE=unix
13571      ;;
13572    *darwin*)
13573      VAR_OS=macosx
13574      VAR_OS_TYPE=unix
13575      ;;
13576    *bsd*)
13577      VAR_OS=bsd
13578      VAR_OS_TYPE=unix
13579      ;;
13580    *cygwin*)
13581      VAR_OS=windows
13582      VAR_OS_ENV=windows.cygwin
13583      ;;
13584    *mingw*)
13585      VAR_OS=windows
13586      VAR_OS_ENV=windows.msys
13587      ;;
13588    *aix*)
13589      VAR_OS=aix
13590      VAR_OS_TYPE=unix
13591      ;;
13592    *)
13593      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13594      ;;
13595  esac
13596
13597
13598  # First argument is the cpu name from the trip/quad
13599  case "$build_cpu" in
13600    x86_64)
13601      VAR_CPU=x86_64
13602      VAR_CPU_ARCH=x86
13603      VAR_CPU_BITS=64
13604      VAR_CPU_ENDIAN=little
13605      ;;
13606    i?86)
13607      VAR_CPU=x86
13608      VAR_CPU_ARCH=x86
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    arm*)
13613      VAR_CPU=arm
13614      VAR_CPU_ARCH=arm
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=little
13617      ;;
13618    aarch64)
13619      VAR_CPU=aarch64
13620      VAR_CPU_ARCH=aarch64
13621      VAR_CPU_BITS=64
13622      VAR_CPU_ENDIAN=little
13623      ;;
13624    powerpc)
13625      VAR_CPU=ppc
13626      VAR_CPU_ARCH=ppc
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=big
13629      ;;
13630    powerpc64)
13631      VAR_CPU=ppc64
13632      VAR_CPU_ARCH=ppc
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    powerpc64le)
13637      VAR_CPU=ppc64
13638      VAR_CPU_ARCH=ppc
13639      VAR_CPU_BITS=64
13640      VAR_CPU_ENDIAN=little
13641      ;;
13642    s390)
13643      VAR_CPU=s390
13644      VAR_CPU_ARCH=s390
13645      VAR_CPU_BITS=32
13646      VAR_CPU_ENDIAN=big
13647      ;;
13648    s390x)
13649      VAR_CPU=s390x
13650      VAR_CPU_ARCH=s390
13651      VAR_CPU_BITS=64
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    sparc)
13655      VAR_CPU=sparc
13656      VAR_CPU_ARCH=sparc
13657      VAR_CPU_BITS=32
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    sparcv9|sparc64)
13661      VAR_CPU=sparcv9
13662      VAR_CPU_ARCH=sparc
13663      VAR_CPU_BITS=64
13664      VAR_CPU_ENDIAN=big
13665      ;;
13666    *)
13667      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13668      ;;
13669  esac
13670
13671  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13672  OPENJDK_BUILD_OS="$VAR_OS"
13673  if test "x$VAR_OS_TYPE" != x; then
13674    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13675  else
13676    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13677  fi
13678  if test "x$VAR_OS_ENV" != x; then
13679    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13680  else
13681    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13682  fi
13683  OPENJDK_BUILD_CPU="$VAR_CPU"
13684  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13685  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13686  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13687
13688
13689
13690
13691
13692
13693
13694
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13696$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13698$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13699
13700  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13701
13702  case "$host_os" in
13703    *linux*)
13704      VAR_OS=linux
13705      VAR_OS_TYPE=unix
13706      ;;
13707    *solaris*)
13708      VAR_OS=solaris
13709      VAR_OS_TYPE=unix
13710      ;;
13711    *darwin*)
13712      VAR_OS=macosx
13713      VAR_OS_TYPE=unix
13714      ;;
13715    *bsd*)
13716      VAR_OS=bsd
13717      VAR_OS_TYPE=unix
13718      ;;
13719    *cygwin*)
13720      VAR_OS=windows
13721      VAR_OS_ENV=windows.cygwin
13722      ;;
13723    *mingw*)
13724      VAR_OS=windows
13725      VAR_OS_ENV=windows.msys
13726      ;;
13727    *aix*)
13728      VAR_OS=aix
13729      VAR_OS_TYPE=unix
13730      ;;
13731    *)
13732      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13733      ;;
13734  esac
13735
13736
13737  # First argument is the cpu name from the trip/quad
13738  case "$host_cpu" in
13739    x86_64)
13740      VAR_CPU=x86_64
13741      VAR_CPU_ARCH=x86
13742      VAR_CPU_BITS=64
13743      VAR_CPU_ENDIAN=little
13744      ;;
13745    i?86)
13746      VAR_CPU=x86
13747      VAR_CPU_ARCH=x86
13748      VAR_CPU_BITS=32
13749      VAR_CPU_ENDIAN=little
13750      ;;
13751    arm*)
13752      VAR_CPU=arm
13753      VAR_CPU_ARCH=arm
13754      VAR_CPU_BITS=32
13755      VAR_CPU_ENDIAN=little
13756      ;;
13757    aarch64)
13758      VAR_CPU=aarch64
13759      VAR_CPU_ARCH=aarch64
13760      VAR_CPU_BITS=64
13761      VAR_CPU_ENDIAN=little
13762      ;;
13763    powerpc)
13764      VAR_CPU=ppc
13765      VAR_CPU_ARCH=ppc
13766      VAR_CPU_BITS=32
13767      VAR_CPU_ENDIAN=big
13768      ;;
13769    powerpc64)
13770      VAR_CPU=ppc64
13771      VAR_CPU_ARCH=ppc
13772      VAR_CPU_BITS=64
13773      VAR_CPU_ENDIAN=big
13774      ;;
13775    powerpc64le)
13776      VAR_CPU=ppc64
13777      VAR_CPU_ARCH=ppc
13778      VAR_CPU_BITS=64
13779      VAR_CPU_ENDIAN=little
13780      ;;
13781    s390)
13782      VAR_CPU=s390
13783      VAR_CPU_ARCH=s390
13784      VAR_CPU_BITS=32
13785      VAR_CPU_ENDIAN=big
13786      ;;
13787    s390x)
13788      VAR_CPU=s390x
13789      VAR_CPU_ARCH=s390
13790      VAR_CPU_BITS=64
13791      VAR_CPU_ENDIAN=big
13792      ;;
13793    sparc)
13794      VAR_CPU=sparc
13795      VAR_CPU_ARCH=sparc
13796      VAR_CPU_BITS=32
13797      VAR_CPU_ENDIAN=big
13798      ;;
13799    sparcv9|sparc64)
13800      VAR_CPU=sparcv9
13801      VAR_CPU_ARCH=sparc
13802      VAR_CPU_BITS=64
13803      VAR_CPU_ENDIAN=big
13804      ;;
13805    *)
13806      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13807      ;;
13808  esac
13809
13810  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13811  OPENJDK_TARGET_OS="$VAR_OS"
13812  if test "x$VAR_OS_TYPE" != x; then
13813    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13814  else
13815    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13816  fi
13817  if test "x$VAR_OS_ENV" != x; then
13818    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13819  else
13820    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13821  fi
13822  OPENJDK_TARGET_CPU="$VAR_CPU"
13823  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13824  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13825  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13826
13827
13828
13829
13830
13831
13832
13833
13834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13835$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13837$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13838
13839
13840
13841# Check whether --with-target-bits was given.
13842if test "${with_target_bits+set}" = set; then :
13843  withval=$with_target_bits;
13844fi
13845
13846
13847  # We have three types of compiles:
13848  # native  == normal compilation, target system == build system
13849  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13850  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13851  #
13852  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13853    # We're doing a proper cross-compilation
13854    COMPILE_TYPE="cross"
13855  else
13856    COMPILE_TYPE="native"
13857  fi
13858
13859  if test "x$with_target_bits" != x; then
13860    if test "x$COMPILE_TYPE" = "xcross"; then
13861      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13862    fi
13863
13864    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13865      # A reduced build is requested
13866      COMPILE_TYPE="reduced"
13867      OPENJDK_TARGET_CPU_BITS=32
13868      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13869        OPENJDK_TARGET_CPU=x86
13870      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13871        OPENJDK_TARGET_CPU=sparc
13872      else
13873        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13874      fi
13875    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13876      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
13877    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13878      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13879$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13880    else
13881      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13882    fi
13883  fi
13884
13885
13886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13887$as_echo_n "checking compilation type... " >&6; }
13888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13889$as_echo "$COMPILE_TYPE" >&6; }
13890
13891
13892  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13893    REQUIRED_OS_NAME=SunOS
13894    REQUIRED_OS_VERSION=5.10
13895  fi
13896  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13897    REQUIRED_OS_NAME=Linux
13898    REQUIRED_OS_VERSION=2.6
13899  fi
13900  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13901    REQUIRED_OS_NAME=Windows
13902    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13903      REQUIRED_OS_VERSION=5.2
13904    else
13905      REQUIRED_OS_VERSION=5.1
13906    fi
13907  fi
13908  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13909    REQUIRED_OS_NAME=Darwin
13910    REQUIRED_OS_VERSION=11.2
13911  fi
13912
13913
13914
13915
13916
13917  # Also store the legacy naming of the cpu.
13918  # Ie i586 and amd64 instead of x86 and x86_64
13919  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13920  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13921    OPENJDK_TARGET_CPU_LEGACY="i586"
13922  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13923    # On all platforms except MacOSX replace x86_64 with amd64.
13924    OPENJDK_TARGET_CPU_LEGACY="amd64"
13925  fi
13926
13927
13928  # And the second legacy naming of the cpu.
13929  # Ie i386 and amd64 instead of x86 and x86_64.
13930  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13931  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13932    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13933  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13934    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13935  fi
13936
13937
13938  # This is the name of the cpu (but using i386 and amd64 instead of
13939  # x86 and x86_64, respectively), preceeded by a /, to be used when
13940  # locating libraries. On macosx, it's empty, though.
13941  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943    OPENJDK_TARGET_CPU_LIBDIR=""
13944  fi
13945
13946
13947  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13948  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13949  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13950  OPENJDK_TARGET_CPU_ISADIR=""
13951  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13952    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13953      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13954    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13955      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13956    fi
13957  fi
13958
13959
13960  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13961  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13962  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13963    # On linux only, we replace x86 with i386.
13964    OPENJDK_TARGET_CPU_OSARCH="i386"
13965  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13966    # On all platforms except macosx, we replace x86_64 with amd64.
13967    OPENJDK_TARGET_CPU_OSARCH="amd64"
13968  fi
13969
13970
13971  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13972  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13973    OPENJDK_TARGET_CPU_JLI="i386"
13974  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13975    # On all platforms except macosx, we replace x86_64 with amd64.
13976    OPENJDK_TARGET_CPU_JLI="amd64"
13977  fi
13978  # Now setup the -D flags for building libjli.
13979  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13980  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13981    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13982      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13983    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13984      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13985    fi
13986  fi
13987
13988
13989  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13990      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13991  else
13992      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13993  fi
13994
13995
13996  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13997    A_LP64="LP64:="
13998    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13999    # unpack200.exe
14000    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14001      ADD_LP64="-D_LP64=1"
14002    fi
14003  fi
14004  LP64=$A_LP64
14005
14006
14007  if test "x$COMPILE_TYPE" = "xcross"; then
14008    # FIXME: ... or should this include reduced builds..?
14009    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14010  else
14011    DEFINE_CROSS_COMPILE_ARCH=""
14012  fi
14013
14014
14015  # ZERO_ARCHDEF is used to enable architecture-specific code
14016  case "${OPENJDK_TARGET_CPU}" in
14017    ppc)     ZERO_ARCHDEF=PPC32 ;;
14018    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14019    s390*)   ZERO_ARCHDEF=S390  ;;
14020    sparc*)  ZERO_ARCHDEF=SPARC ;;
14021    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14022    x86)     ZERO_ARCHDEF=IA32  ;;
14023    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14024  esac
14025
14026
14027
14028
14029# Continue setting up basic stuff. Most remaining code require fundamental tools.
14030
14031  # Save the current directory this script was started from
14032  CURDIR="$PWD"
14033
14034  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14035    PATH_SEP=";"
14036
14037  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14038  if test $SRC_ROOT_LENGTH -gt 100; then
14039    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14040  fi
14041
14042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14044$as_echo_n "checking cygwin release... " >&6; }
14045    CYGWIN_VERSION=`$UNAME -r`
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14047$as_echo "$CYGWIN_VERSION" >&6; }
14048    WINDOWS_ENV_VENDOR='cygwin'
14049    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14050
14051    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14052    if test "x$CYGWIN_VERSION_OLD" != x; then
14053      { $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
14054$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;}
14055      as_fn_error $? "Cannot continue" "$LINENO" 5
14056    fi
14057    if test "x$CYGPATH" = x; then
14058      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14059    fi
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14061$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14062    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14063    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14064    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14065    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14067$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14068    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14069    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14070    if test "x$test_cygdrive_prefix" = x; then
14071      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14072    fi
14073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14075$as_echo_n "checking msys release... " >&6; }
14076    MSYS_VERSION=`$UNAME -r`
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14078$as_echo "$MSYS_VERSION" >&6; }
14079
14080    WINDOWS_ENV_VENDOR='msys'
14081    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14082
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14084$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14085    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14086    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14087
14088  windows_path="$MSYS_ROOT_PATH"
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090    unix_path=`$CYGPATH -u "$windows_path"`
14091    MSYS_ROOT_PATH="$unix_path"
14092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14094    MSYS_ROOT_PATH="$unix_path"
14095  fi
14096
14097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14098$as_echo "$MSYS_ROOT_PATH" >&6; }
14099    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14100  else
14101    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14102  fi
14103
14104  # Test if windows or unix (cygwin/msys) find is first in path.
14105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14106$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14107  FIND_BINARY_OUTPUT=`find --version 2>&1`
14108  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14110$as_echo "unix style" >&6; }
14111  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14113$as_echo "Windows" >&6; }
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14115$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14116    { $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
14117$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14118    as_fn_error $? "Cannot continue" "$LINENO" 5
14119  else
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14121$as_echo "unknown" >&6; }
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14123$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14124  fi
14125
14126  else
14127    PATH_SEP=":"
14128  fi
14129
14130
14131  # We get the top-level directory from the supporting wrappers.
14132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14133$as_echo_n "checking for top-level directory... " >&6; }
14134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14135$as_echo "$TOPDIR" >&6; }
14136
14137
14138  # Save the original version of TOPDIR for string comparisons
14139  ORIGINAL_TOPDIR="$TOPDIR"
14140
14141
14142  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14143
14144  # Only process if variable expands to non-empty
14145
14146  if test "x$CURDIR" != x; then
14147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14148
14149  # Input might be given as Windows format, start by converting to
14150  # unix format.
14151  path="$CURDIR"
14152  new_path=`$CYGPATH -u "$path"`
14153
14154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14157  # "foo.exe" is OK but "foo" is an error.
14158  #
14159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14160  # It is also a way to make sure we got the proper file name for the real test later on.
14161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14162  if test "x$test_shortpath" = x; then
14163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14164$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14165    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14166  fi
14167
14168  # Call helper function which possibly converts this using DOS-style short mode.
14169  # If so, the updated path is stored in $new_path.
14170
14171  input_path="$new_path"
14172  # Check if we need to convert this using DOS-style short mode. If the path
14173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14174  # take no chances and rewrite it.
14175  # Note: m4 eats our [], so we need to use [ and ] instead.
14176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14177  if test "x$has_forbidden_chars" != x; then
14178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14182      # Going to short mode and back again did indeed matter. Since short mode is
14183      # case insensitive, let's make it lowercase to improve readability.
14184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185      # Now convert it back to Unix-style (cygpath)
14186      input_path=`$CYGPATH -u "$shortmode_path"`
14187      new_path="$input_path"
14188    fi
14189  fi
14190
14191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14192  if test "x$test_cygdrive_prefix" = x; then
14193    # As a simple fix, exclude /usr/bin since it's not a real path.
14194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14196      # a path prefixed by /cygdrive for fixpath to work.
14197      new_path="$CYGWIN_ROOT_PATH$input_path"
14198    fi
14199  fi
14200
14201
14202  if test "x$path" != "x$new_path"; then
14203    CURDIR="$new_path"
14204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14205$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14206  fi
14207
14208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14209
14210  path="$CURDIR"
14211  has_colon=`$ECHO $path | $GREP ^.:`
14212  new_path="$path"
14213  if test "x$has_colon" = x; then
14214    # Not in mixed or Windows style, start by that.
14215    new_path=`cmd //c echo $path`
14216  fi
14217
14218
14219  input_path="$new_path"
14220  # Check if we need to convert this using DOS-style short mode. If the path
14221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14222  # take no chances and rewrite it.
14223  # Note: m4 eats our [], so we need to use [ and ] instead.
14224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14225  if test "x$has_forbidden_chars" != x; then
14226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14228  fi
14229
14230
14231  windows_path="$new_path"
14232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14233    unix_path=`$CYGPATH -u "$windows_path"`
14234    new_path="$unix_path"
14235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14237    new_path="$unix_path"
14238  fi
14239
14240  if test "x$path" != "x$new_path"; then
14241    CURDIR="$new_path"
14242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14243$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14244  fi
14245
14246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14248
14249    else
14250      # We're on a unix platform. Hooray! :)
14251      path="$CURDIR"
14252      has_space=`$ECHO "$path" | $GREP " "`
14253      if test "x$has_space" != x; then
14254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14255$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14257      fi
14258
14259      # Use eval to expand a potential ~
14260      eval path="$path"
14261      if test ! -f "$path" && test ! -d "$path"; then
14262        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14263      fi
14264
14265      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14266    fi
14267  fi
14268
14269
14270  # Only process if variable expands to non-empty
14271
14272  if test "x$TOPDIR" != x; then
14273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14274
14275  # Input might be given as Windows format, start by converting to
14276  # unix format.
14277  path="$TOPDIR"
14278  new_path=`$CYGPATH -u "$path"`
14279
14280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14283  # "foo.exe" is OK but "foo" is an error.
14284  #
14285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14286  # It is also a way to make sure we got the proper file name for the real test later on.
14287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14288  if test "x$test_shortpath" = x; then
14289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14290$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14291    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14292  fi
14293
14294  # Call helper function which possibly converts this using DOS-style short mode.
14295  # If so, the updated path is stored in $new_path.
14296
14297  input_path="$new_path"
14298  # Check if we need to convert this using DOS-style short mode. If the path
14299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14300  # take no chances and rewrite it.
14301  # Note: m4 eats our [], so we need to use [ and ] instead.
14302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14303  if test "x$has_forbidden_chars" != x; then
14304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14308      # Going to short mode and back again did indeed matter. Since short mode is
14309      # case insensitive, let's make it lowercase to improve readability.
14310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14311      # Now convert it back to Unix-style (cygpath)
14312      input_path=`$CYGPATH -u "$shortmode_path"`
14313      new_path="$input_path"
14314    fi
14315  fi
14316
14317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14318  if test "x$test_cygdrive_prefix" = x; then
14319    # As a simple fix, exclude /usr/bin since it's not a real path.
14320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14322      # a path prefixed by /cygdrive for fixpath to work.
14323      new_path="$CYGWIN_ROOT_PATH$input_path"
14324    fi
14325  fi
14326
14327
14328  if test "x$path" != "x$new_path"; then
14329    TOPDIR="$new_path"
14330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14331$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14332  fi
14333
14334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14335
14336  path="$TOPDIR"
14337  has_colon=`$ECHO $path | $GREP ^.:`
14338  new_path="$path"
14339  if test "x$has_colon" = x; then
14340    # Not in mixed or Windows style, start by that.
14341    new_path=`cmd //c echo $path`
14342  fi
14343
14344
14345  input_path="$new_path"
14346  # Check if we need to convert this using DOS-style short mode. If the path
14347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14348  # take no chances and rewrite it.
14349  # Note: m4 eats our [], so we need to use [ and ] instead.
14350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14351  if test "x$has_forbidden_chars" != x; then
14352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14354  fi
14355
14356
14357  windows_path="$new_path"
14358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14359    unix_path=`$CYGPATH -u "$windows_path"`
14360    new_path="$unix_path"
14361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14363    new_path="$unix_path"
14364  fi
14365
14366  if test "x$path" != "x$new_path"; then
14367    TOPDIR="$new_path"
14368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14369$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14370  fi
14371
14372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14374
14375    else
14376      # We're on a unix platform. Hooray! :)
14377      path="$TOPDIR"
14378      has_space=`$ECHO "$path" | $GREP " "`
14379      if test "x$has_space" != x; then
14380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14381$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14383      fi
14384
14385      # Use eval to expand a potential ~
14386      eval path="$path"
14387      if test ! -f "$path" && test ! -d "$path"; then
14388        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14389      fi
14390
14391      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14392    fi
14393  fi
14394
14395  # SRC_ROOT is a traditional alias for TOPDIR.
14396  SRC_ROOT=$TOPDIR
14397
14398  # Calculate a canonical version of TOPDIR for string comparisons
14399  CANONICAL_TOPDIR=$TOPDIR
14400
14401  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14402    # Follow a chain of symbolic links. Use readlink
14403    # where it exists, else fall back to horribly
14404    # complicated shell code.
14405    if test "x$READLINK_TESTED" != yes; then
14406      # On MacOSX there is a readlink tool with a different
14407      # purpose than the GNU readlink tool. Check the found readlink.
14408      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14409      if test "x$ISGNU" = x; then
14410        # A readlink that we do not know how to use.
14411        # Are there other non-GNU readlinks out there?
14412        READLINK_TESTED=yes
14413        READLINK=
14414      fi
14415    fi
14416
14417    if test "x$READLINK" != x; then
14418      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14419    else
14420      # Save the current directory for restoring afterwards
14421      STARTDIR=$PWD
14422      COUNTER=0
14423      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14424      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14425      cd $sym_link_dir
14426      # Use -P flag to resolve symlinks in directories.
14427      cd `$THEPWDCMD -P`
14428      sym_link_dir=`$THEPWDCMD -P`
14429      # Resolve file symlinks
14430      while test $COUNTER -lt 20; do
14431        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14432        if test "x$ISLINK" == x; then
14433          # This is not a symbolic link! We are done!
14434          break
14435        fi
14436        # Again resolve directory symlinks since the target of the just found
14437        # link could be in a different directory
14438        cd `$DIRNAME $ISLINK`
14439        sym_link_dir=`$THEPWDCMD -P`
14440        sym_link_file=`$BASENAME $ISLINK`
14441        let COUNTER=COUNTER+1
14442      done
14443      cd $STARTDIR
14444      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14445    fi
14446  fi
14447
14448
14449
14450  # Locate the directory of this script.
14451  AUTOCONF_DIR=$TOPDIR/common/autoconf
14452
14453
14454# Check if it's a pure open build or if custom sources are to be used.
14455
14456  # Check whether --enable-openjdk-only was given.
14457if test "${enable_openjdk_only+set}" = set; then :
14458  enableval=$enable_openjdk_only;
14459else
14460  enable_openjdk_only="no"
14461fi
14462
14463
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14465$as_echo_n "checking for presence of closed sources... " >&6; }
14466  if test -d "$SRC_ROOT/jdk/src/closed"; then
14467    CLOSED_SOURCE_PRESENT=yes
14468  else
14469    CLOSED_SOURCE_PRESENT=no
14470  fi
14471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14472$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14473
14474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14475$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14476  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14478$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14479
14480  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14481    OPENJDK=true
14482    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14483      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14484$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14485    fi
14486  else
14487    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14488      OPENJDK=true
14489    else
14490      OPENJDK=false
14491    fi
14492  fi
14493
14494  if test "x$OPENJDK" = "xtrue"; then
14495    SET_OPENJDK="OPENJDK=true"
14496  fi
14497
14498
14499
14500  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14501  # the IncludeCustomExtension macro.
14502
14503
14504# Check whether --with-custom-make-dir was given.
14505if test "${with_custom_make_dir+set}" = set; then :
14506  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
14507$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14508fi
14509
14510
14511
14512
14513# These are needed to be able to create a configuration name (and thus the output directory)
14514
14515  ###############################################################################
14516  #
14517  # Check which variant of the JDK that we want to build.
14518  # Currently we have:
14519  #    normal:   standard edition
14520  # but the custom make system may add other variants
14521  #
14522  # Effectively the JDK variant gives a name to a specific set of
14523  # modules to compile into the JDK. In the future, these modules
14524  # might even be Jigsaw modules.
14525  #
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14527$as_echo_n "checking which variant of the JDK to build... " >&6; }
14528
14529# Check whether --with-jdk-variant was given.
14530if test "${with_jdk_variant+set}" = set; then :
14531  withval=$with_jdk_variant;
14532fi
14533
14534
14535  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14536    JDK_VARIANT="normal"
14537  else
14538    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14539  fi
14540
14541
14542
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14544$as_echo "$JDK_VARIANT" >&6; }
14545
14546
14547###############################################################################
14548#
14549# Check which interpreter of the JVM we want to build.
14550# Currently we have:
14551#    template: Template interpreter (the default)
14552#    cpp     : C++ interpreter
14553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14554$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14555
14556# Check whether --with-jvm-interpreter was given.
14557if test "${with_jvm_interpreter+set}" = set; then :
14558  withval=$with_jvm_interpreter;
14559fi
14560
14561
14562if test "x$with_jvm_interpreter" = x; then
14563     with_jvm_interpreter="template"
14564fi
14565
14566JVM_INTERPRETER="$with_jvm_interpreter"
14567
14568if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14569   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14570fi
14571
14572
14573
14574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14575$as_echo "$with_jvm_interpreter" >&6; }
14576
14577
14578
14579  ###############################################################################
14580  #
14581  # Check which variants of the JVM that we want to build.
14582  # Currently we have:
14583  #    server: normal interpreter and a tiered C1/C2 compiler
14584  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14585  #    minimal1: reduced form of client with optional VM services and features stripped out
14586  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14587  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14588  #    zero: no machine code interpreter, no compiler
14589  #    zeroshark: zero interpreter and shark/llvm compiler backend
14590#    core: interpreter only, no compiler (only works on some platforms)
14591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14592$as_echo_n "checking which variants of the JVM to build... " >&6; }
14593
14594# Check whether --with-jvm-variants was given.
14595if test "${with_jvm_variants+set}" = set; then :
14596  withval=$with_jvm_variants;
14597fi
14598
14599
14600  if test "x$with_jvm_variants" = x; then
14601    with_jvm_variants="server"
14602  fi
14603
14604  JVM_VARIANTS=",$with_jvm_variants,"
14605  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14606
14607  if test "x$TEST_VARIANTS" != "x,"; then
14608     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14609  fi
14610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14611$as_echo "$with_jvm_variants" >&6; }
14612
14613  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14614  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14615  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14616  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14617  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14618  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14619  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14620
14621  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14622    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14623      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14624    fi
14625  fi
14626  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14627    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14628      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14629    fi
14630  fi
14631  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14632    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14633      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14634    fi
14635  fi
14636
14637  # Replace the commas with AND for use in the build directory name.
14638  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14639  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14640  if test "x$COUNT_VARIANTS" != "x,1"; then
14641    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14642  else
14643    BUILDING_MULTIPLE_JVM_VARIANTS=no
14644  fi
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655  INCLUDE_SA=true
14656  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14657    INCLUDE_SA=false
14658  fi
14659  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14660    INCLUDE_SA=false
14661  fi
14662  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14663    INCLUDE_SA=false
14664  fi
14665  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14666    INCLUDE_SA=false
14667  fi
14668
14669
14670  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14671    MACOSX_UNIVERSAL="true"
14672  fi
14673
14674
14675
14676
14677  ###############################################################################
14678  #
14679  # Set the debug level
14680  #    release: no debug information, all optimizations, no asserts.
14681  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14682  #    fastdebug: debug information (-g), all optimizations, all asserts
14683  #    slowdebug: debug information (-g), no optimizations, all asserts
14684  #
14685  DEBUG_LEVEL="release"
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14687$as_echo_n "checking which debug level to use... " >&6; }
14688  # Check whether --enable-debug was given.
14689if test "${enable_debug+set}" = set; then :
14690  enableval=$enable_debug;
14691        ENABLE_DEBUG="${enableval}"
14692        DEBUG_LEVEL="fastdebug"
14693
14694else
14695  ENABLE_DEBUG="no"
14696fi
14697
14698
14699
14700# Check whether --with-debug-level was given.
14701if test "${with_debug_level+set}" = set; then :
14702  withval=$with_debug_level;
14703        DEBUG_LEVEL="${withval}"
14704        if test "x$ENABLE_DEBUG" = xyes; then
14705          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14706        fi
14707
14708fi
14709
14710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14711$as_echo "$DEBUG_LEVEL" >&6; }
14712
14713  if test "x$DEBUG_LEVEL" != xrelease && \
14714      test "x$DEBUG_LEVEL" != xoptimized && \
14715      test "x$DEBUG_LEVEL" != xfastdebug && \
14716      test "x$DEBUG_LEVEL" != xslowdebug; then
14717    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14718  fi
14719
14720
14721  ###############################################################################
14722  #
14723  # Setup legacy vars/targets and new vars to deal with different debug levels.
14724  #
14725
14726  case $DEBUG_LEVEL in
14727    release )
14728      VARIANT="OPT"
14729      FASTDEBUG="false"
14730      DEBUG_CLASSFILES="false"
14731      BUILD_VARIANT_RELEASE=""
14732      HOTSPOT_DEBUG_LEVEL="product"
14733      HOTSPOT_EXPORT="product"
14734      ;;
14735    fastdebug )
14736      VARIANT="DBG"
14737      FASTDEBUG="true"
14738      DEBUG_CLASSFILES="true"
14739      BUILD_VARIANT_RELEASE="-fastdebug"
14740      HOTSPOT_DEBUG_LEVEL="fastdebug"
14741      HOTSPOT_EXPORT="fastdebug"
14742      ;;
14743    slowdebug )
14744      VARIANT="DBG"
14745      FASTDEBUG="false"
14746      DEBUG_CLASSFILES="true"
14747      BUILD_VARIANT_RELEASE="-debug"
14748      HOTSPOT_DEBUG_LEVEL="debug"
14749      HOTSPOT_EXPORT="debug"
14750      ;;
14751    optimized )
14752      VARIANT="OPT"
14753      FASTDEBUG="false"
14754      DEBUG_CLASSFILES="false"
14755      BUILD_VARIANT_RELEASE="-optimized"
14756      HOTSPOT_DEBUG_LEVEL="optimized"
14757      HOTSPOT_EXPORT="optimized"
14758      ;;
14759  esac
14760
14761  # The debug level 'optimized' is a little special because it is currently only
14762  # applicable to the HotSpot build where it means to build a completely
14763  # optimized version of the VM without any debugging code (like for the
14764  # 'release' debug level which is called 'product' in the HotSpot build) but
14765  # with the exception that it can contain additional code which is otherwise
14766  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14767  # test new and/or experimental features which are not intended for customer
14768  # shipment. Because these new features need to be tested and benchmarked in
14769  # real world scenarios, we want to build the containing JDK at the 'release'
14770  # debug level.
14771  if test "x$DEBUG_LEVEL" = xoptimized; then
14772    DEBUG_LEVEL="release"
14773  fi
14774
14775  #####
14776  # Generate the legacy makefile targets for hotspot.
14777  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14778  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14779  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14780  # But until then ...
14781  HOTSPOT_TARGET=""
14782
14783  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14785  fi
14786
14787  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14789  fi
14790
14791  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14793  fi
14794
14795  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14797  fi
14798
14799  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14801  fi
14802
14803  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14805  fi
14806
14807  if test "x$JVM_VARIANT_CORE" = xtrue; then
14808    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14809  fi
14810
14811  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14812
14813  # On Macosx universal binaries are produced, but they only contain
14814  # 64 bit intel. This invalidates control of which jvms are built
14815  # from configure, but only server is valid anyway. Fix this
14816  # when hotspot makefiles are rewritten.
14817  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14818    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14819  fi
14820
14821  #####
14822
14823
14824
14825
14826
14827
14828
14829
14830# With basic setup done, call the custom early hook.
14831
14832
14833# Check if we have devkits, extra paths or sysroot set.
14834
14835
14836# Check whether --with-devkit was given.
14837if test "${with_devkit+set}" = set; then :
14838  withval=$with_devkit;
14839
14840  # Only process if variable expands to non-empty
14841
14842  if test "x$with_devkit" != x; then
14843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14844
14845  # Input might be given as Windows format, start by converting to
14846  # unix format.
14847  path="$with_devkit"
14848  new_path=`$CYGPATH -u "$path"`
14849
14850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14853  # "foo.exe" is OK but "foo" is an error.
14854  #
14855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14856  # It is also a way to make sure we got the proper file name for the real test later on.
14857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14858  if test "x$test_shortpath" = x; then
14859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14860$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14861    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14862  fi
14863
14864  # Call helper function which possibly converts this using DOS-style short mode.
14865  # If so, the updated path is stored in $new_path.
14866
14867  input_path="$new_path"
14868  # Check if we need to convert this using DOS-style short mode. If the path
14869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870  # take no chances and rewrite it.
14871  # Note: m4 eats our [], so we need to use [ and ] instead.
14872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14873  if test "x$has_forbidden_chars" != x; then
14874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14878      # Going to short mode and back again did indeed matter. Since short mode is
14879      # case insensitive, let's make it lowercase to improve readability.
14880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881      # Now convert it back to Unix-style (cygpath)
14882      input_path=`$CYGPATH -u "$shortmode_path"`
14883      new_path="$input_path"
14884    fi
14885  fi
14886
14887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14888  if test "x$test_cygdrive_prefix" = x; then
14889    # As a simple fix, exclude /usr/bin since it's not a real path.
14890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14892      # a path prefixed by /cygdrive for fixpath to work.
14893      new_path="$CYGWIN_ROOT_PATH$input_path"
14894    fi
14895  fi
14896
14897
14898  if test "x$path" != "x$new_path"; then
14899    with_devkit="$new_path"
14900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14901$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14902  fi
14903
14904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14905
14906  path="$with_devkit"
14907  has_colon=`$ECHO $path | $GREP ^.:`
14908  new_path="$path"
14909  if test "x$has_colon" = x; then
14910    # Not in mixed or Windows style, start by that.
14911    new_path=`cmd //c echo $path`
14912  fi
14913
14914
14915  input_path="$new_path"
14916  # Check if we need to convert this using DOS-style short mode. If the path
14917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14918  # take no chances and rewrite it.
14919  # Note: m4 eats our [], so we need to use [ and ] instead.
14920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14921  if test "x$has_forbidden_chars" != x; then
14922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14924  fi
14925
14926
14927  windows_path="$new_path"
14928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14929    unix_path=`$CYGPATH -u "$windows_path"`
14930    new_path="$unix_path"
14931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14933    new_path="$unix_path"
14934  fi
14935
14936  if test "x$path" != "x$new_path"; then
14937    with_devkit="$new_path"
14938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14939$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14940  fi
14941
14942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14944
14945    else
14946      # We're on a unix platform. Hooray! :)
14947      path="$with_devkit"
14948      has_space=`$ECHO "$path" | $GREP " "`
14949      if test "x$has_space" != x; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14951$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14953      fi
14954
14955      # Use eval to expand a potential ~
14956      eval path="$path"
14957      if test ! -f "$path" && test ! -d "$path"; then
14958        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14959      fi
14960
14961      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14962    fi
14963  fi
14964
14965        DEVKIT_ROOT="$with_devkit"
14966        # Check for a meta data info file in the root of the devkit
14967        if test -f "$DEVKIT_ROOT/devkit.info"; then
14968          . $DEVKIT_ROOT/devkit.info
14969          # This potentially sets the following:
14970          # A descriptive name of the devkit
14971
14972  if test "x$DEVKIT_NAME" = x; then
14973    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14974  fi
14975
14976          # Corresponds to --with-extra-path
14977
14978  if test "x$DEVKIT_EXTRA_PATH" = x; then
14979    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14980  fi
14981
14982          # Corresponds to --with-toolchain-path
14983
14984  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14985    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14986  fi
14987
14988          # Corresponds to --with-sysroot
14989
14990  if test "x$DEVKIT_SYSROOT" = x; then
14991    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14992  fi
14993
14994
14995          # Identifies the Visual Studio version in the devkit
14996
14997  if test "x$DEVKIT_VS_VERSION" = x; then
14998    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14999  fi
15000
15001          # The Visual Studio include environment variable
15002
15003  if test "x$DEVKIT_VS_INCLUDE" = x; then
15004    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15005  fi
15006
15007          # The Visual Studio lib environment variable
15008
15009  if test "x$DEVKIT_VS_LIB" = x; then
15010    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15011  fi
15012
15013          # Corresponds to --with-msvcr-dll
15014
15015  if test "x$DEVKIT_MSVCR_DLL" = x; then
15016    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15017  fi
15018
15019          # Corresponds to --with-msvcp-dll
15020
15021  if test "x$DEVKIT_MSVCP_DLL" = x; then
15022    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15023  fi
15024
15025        fi
15026
15027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15028$as_echo_n "checking for devkit... " >&6; }
15029        if test "x$DEVKIT_NAME" != x; then
15030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15031$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15032        else
15033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15034$as_echo "$DEVKIT_ROOT" >&6; }
15035        fi
15036
15037
15038  if test "x$DEVKIT_EXTRA_PATH" != x; then
15039    if test "x$EXTRA_PATH" = x; then
15040      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15041    else
15042      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15043    fi
15044  fi
15045
15046
15047        # Fallback default of just /bin if DEVKIT_PATH is not defined
15048        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15049          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15050        fi
15051
15052  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15053    if test "x$TOOLCHAIN_PATH" = x; then
15054      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15055    else
15056      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15057    fi
15058  fi
15059
15060
15061        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15062        # places for backwards compatiblity.
15063        if test "x$DEVKIT_SYSROOT" != x; then
15064          SYSROOT="$DEVKIT_SYSROOT"
15065        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15066          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15067        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15068          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15069        fi
15070
15071
15072fi
15073
15074
15075  # You can force the sysroot if the sysroot encoded into the compiler tools
15076  # is not correct.
15077
15078# Check whether --with-sys-root was given.
15079if test "${with_sys_root+set}" = set; then :
15080  withval=$with_sys_root; SYSROOT=$with_sys_root
15081
15082fi
15083
15084
15085
15086# Check whether --with-sysroot was given.
15087if test "${with_sysroot+set}" = set; then :
15088  withval=$with_sysroot; SYSROOT=$with_sysroot
15089
15090fi
15091
15092
15093
15094# Check whether --with-tools-dir was given.
15095if test "${with_tools_dir+set}" = set; then :
15096  withval=$with_tools_dir;
15097  if test "x$with_tools_dir" != x; then
15098    if test "x$TOOLCHAIN_PATH" = x; then
15099      TOOLCHAIN_PATH="$with_tools_dir"
15100    else
15101      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15102    fi
15103  fi
15104
15105
15106fi
15107
15108
15109
15110# Check whether --with-toolchain-path was given.
15111if test "${with_toolchain_path+set}" = set; then :
15112  withval=$with_toolchain_path;
15113  if test "x$with_toolchain_path" != x; then
15114    if test "x$TOOLCHAIN_PATH" = x; then
15115      TOOLCHAIN_PATH="$with_toolchain_path"
15116    else
15117      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15118    fi
15119  fi
15120
15121
15122fi
15123
15124
15125
15126# Check whether --with-extra-path was given.
15127if test "${with_extra_path+set}" = set; then :
15128  withval=$with_extra_path;
15129  if test "x$with_extra_path" != x; then
15130    if test "x$EXTRA_PATH" = x; then
15131      EXTRA_PATH="$with_extra_path"
15132    else
15133      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15134    fi
15135  fi
15136
15137
15138fi
15139
15140
15141  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15142    # detect if Xcode is installed by running xcodebuild -version
15143    # if no Xcode installed, xcodebuild exits with 1
15144    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15145    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15146      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15147      # fall back on the stub binary in /usr/bin/xcodebuild
15148      # Extract the first word of "xcodebuild", so it can be a program name with args.
15149set dummy xcodebuild; ac_word=$2
15150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15151$as_echo_n "checking for $ac_word... " >&6; }
15152if ${ac_cv_path_XCODEBUILD+:} false; then :
15153  $as_echo_n "(cached) " >&6
15154else
15155  case $XCODEBUILD in
15156  [\\/]* | ?:[\\/]*)
15157  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15158  ;;
15159  *)
15160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15161for as_dir in $TOOLCHAIN_PATH
15162do
15163  IFS=$as_save_IFS
15164  test -z "$as_dir" && as_dir=.
15165    for ac_exec_ext in '' $ac_executable_extensions; do
15166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15167    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15169    break 2
15170  fi
15171done
15172  done
15173IFS=$as_save_IFS
15174
15175  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15176  ;;
15177esac
15178fi
15179XCODEBUILD=$ac_cv_path_XCODEBUILD
15180if test -n "$XCODEBUILD"; then
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15182$as_echo "$XCODEBUILD" >&6; }
15183else
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
15186fi
15187
15188
15189    else
15190      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15191      # when only the command line tools are installed there are no SDKs, so headers
15192      # are copied into the system frameworks
15193      XCODEBUILD=
15194
15195    fi
15196
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15198$as_echo_n "checking for sdk name... " >&6; }
15199
15200# Check whether --with-sdk-name was given.
15201if test "${with_sdk_name+set}" = set; then :
15202  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15203
15204fi
15205
15206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15207$as_echo "$SDKNAME" >&6; }
15208
15209    # if toolchain path is specified then don't rely on system headers, they may not compile
15210    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15211    test -z "$TOOLCHAIN_PATH" && \
15212      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15213
15214    if test -z "$SYSROOT"; then
15215      if test -n "$XCODEBUILD"; then
15216        # if we don't have system headers, use default SDK name (last resort)
15217        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15218          SDKNAME=${SDKNAME:-macosx}
15219        fi
15220
15221        if test -n "$SDKNAME"; then
15222          # Call xcodebuild to determine SYSROOT
15223          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15224        fi
15225      else
15226        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15227          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
15228        fi
15229      fi
15230    else
15231      # warn user if --with-sdk-name was also set
15232      if test -n "$with_sdk_name"; then
15233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15234$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15235      fi
15236    fi
15237
15238    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15239      # If no system framework headers, then SYSROOT must be set, or we won't build
15240      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
15241    fi
15242
15243    # Perform a basic sanity test
15244    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15245      if test -z "$SYSROOT"; then
15246        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
15247      else
15248        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15249      fi
15250    fi
15251
15252    # set SDKROOT too, Xcode tools will pick it up
15253    SDKROOT=$SYSROOT
15254
15255  fi
15256
15257  # Prepend the extra path to the global path
15258
15259  if test "x$EXTRA_PATH" != x; then
15260    if test "x$PATH" = x; then
15261      PATH="$EXTRA_PATH"
15262    else
15263      PATH="$EXTRA_PATH:$PATH"
15264    fi
15265  fi
15266
15267
15268  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15269    # Add extra search paths on solaris for utilities like ar and as etc...
15270    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15271  fi
15272
15273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15274$as_echo_n "checking for sysroot... " >&6; }
15275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15276$as_echo "$SYSROOT" >&6; }
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15278$as_echo_n "checking for toolchain path... " >&6; }
15279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15280$as_echo "$TOOLCHAIN_PATH" >&6; }
15281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15282$as_echo_n "checking for extra path... " >&6; }
15283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15284$as_echo "$EXTRA_PATH" >&6; }
15285
15286
15287# To properly create a configuration name, we need to have the OpenJDK target
15288# and options (variants and debug level) parsed.
15289
15290
15291
15292# Check whether --with-conf-name was given.
15293if test "${with_conf_name+set}" = set; then :
15294  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15295fi
15296
15297
15298  # Test from where we are running configure, in or outside of src root.
15299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15300$as_echo_n "checking where to store configuration... " >&6; }
15301  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15302      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15303      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15304    # We are running configure from the src root.
15305    # Create a default ./build/target-variant-debuglevel output root.
15306    if test "x${CONF_NAME}" = x; then
15307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15308$as_echo "in default location" >&6; }
15309      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15310    else
15311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15312$as_echo "in build directory with custom name" >&6; }
15313    fi
15314    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15315    $MKDIR -p "$OUTPUT_ROOT"
15316    if test ! -d "$OUTPUT_ROOT"; then
15317      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15318    fi
15319  else
15320    # We are running configure from outside of the src dir.
15321    # Then use the current directory as output dir!
15322    # If configuration is situated in normal build directory, just use the build
15323    # directory name as configuration name, otherwise use the complete path.
15324    if test "x${CONF_NAME}" = x; then
15325      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15326    fi
15327    OUTPUT_ROOT="$CURDIR"
15328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15329$as_echo "in current directory" >&6; }
15330
15331    # WARNING: This might be a bad thing to do. You need to be sure you want to
15332    # have a configuration in this directory. Do some sanity checks!
15333
15334    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15335      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15336      # other files
15337      files_present=`$LS $OUTPUT_ROOT`
15338      # Configure has already touched config.log and confdefs.h in the current dir when this check
15339      # is performed.
15340      filtered_files=`$ECHO "$files_present" \
15341          | $SED -e 's/config.log//g' \
15342	      -e 's/confdefs.h//g' \
15343	      -e 's/fixpath.exe//g' \
15344	      -e 's/ //g' \
15345          | $TR -d '\n'`
15346      if test "x$filtered_files" != x; then
15347        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15348$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15349        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15350$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15351        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15352$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15353        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15354$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15356$as_echo "$as_me: seriously mess up just about everything." >&6;}
15357        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15358$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15359        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15360$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15361        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15362      fi
15363    fi
15364  fi
15365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15366$as_echo_n "checking what configuration name to use... " >&6; }
15367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15368$as_echo "$CONF_NAME" >&6; }
15369
15370
15371  # Only process if variable expands to non-empty
15372
15373  if test "x$OUTPUT_ROOT" != x; then
15374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15375
15376  # Input might be given as Windows format, start by converting to
15377  # unix format.
15378  path="$OUTPUT_ROOT"
15379  new_path=`$CYGPATH -u "$path"`
15380
15381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15384  # "foo.exe" is OK but "foo" is an error.
15385  #
15386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15387  # It is also a way to make sure we got the proper file name for the real test later on.
15388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15389  if test "x$test_shortpath" = x; then
15390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15391$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15392    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15393  fi
15394
15395  # Call helper function which possibly converts this using DOS-style short mode.
15396  # If so, the updated path is stored in $new_path.
15397
15398  input_path="$new_path"
15399  # Check if we need to convert this using DOS-style short mode. If the path
15400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15401  # take no chances and rewrite it.
15402  # Note: m4 eats our [], so we need to use [ and ] instead.
15403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15404  if test "x$has_forbidden_chars" != x; then
15405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15409      # Going to short mode and back again did indeed matter. Since short mode is
15410      # case insensitive, let's make it lowercase to improve readability.
15411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15412      # Now convert it back to Unix-style (cygpath)
15413      input_path=`$CYGPATH -u "$shortmode_path"`
15414      new_path="$input_path"
15415    fi
15416  fi
15417
15418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15419  if test "x$test_cygdrive_prefix" = x; then
15420    # As a simple fix, exclude /usr/bin since it's not a real path.
15421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15423      # a path prefixed by /cygdrive for fixpath to work.
15424      new_path="$CYGWIN_ROOT_PATH$input_path"
15425    fi
15426  fi
15427
15428
15429  if test "x$path" != "x$new_path"; then
15430    OUTPUT_ROOT="$new_path"
15431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15432$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15433  fi
15434
15435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15436
15437  path="$OUTPUT_ROOT"
15438  has_colon=`$ECHO $path | $GREP ^.:`
15439  new_path="$path"
15440  if test "x$has_colon" = x; then
15441    # Not in mixed or Windows style, start by that.
15442    new_path=`cmd //c echo $path`
15443  fi
15444
15445
15446  input_path="$new_path"
15447  # Check if we need to convert this using DOS-style short mode. If the path
15448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15449  # take no chances and rewrite it.
15450  # Note: m4 eats our [], so we need to use [ and ] instead.
15451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15452  if test "x$has_forbidden_chars" != x; then
15453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15455  fi
15456
15457
15458  windows_path="$new_path"
15459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15460    unix_path=`$CYGPATH -u "$windows_path"`
15461    new_path="$unix_path"
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15464    new_path="$unix_path"
15465  fi
15466
15467  if test "x$path" != "x$new_path"; then
15468    OUTPUT_ROOT="$new_path"
15469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15470$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15471  fi
15472
15473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15475
15476    else
15477      # We're on a unix platform. Hooray! :)
15478      path="$OUTPUT_ROOT"
15479      has_space=`$ECHO "$path" | $GREP " "`
15480      if test "x$has_space" != x; then
15481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15482$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15484      fi
15485
15486      # Use eval to expand a potential ~
15487      eval path="$path"
15488      if test ! -f "$path" && test ! -d "$path"; then
15489        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15490      fi
15491
15492      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15493    fi
15494  fi
15495
15496
15497  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15498  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15499
15500  SPEC=$OUTPUT_ROOT/spec.gmk
15501
15502  CONF_NAME=$CONF_NAME
15503
15504  OUTPUT_ROOT=$OUTPUT_ROOT
15505
15506
15507
15508  # The spec.gmk file contains all variables for the make system.
15509  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15510
15511  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15512  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15513
15514  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15515  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15516
15517  # The compare.sh is used to compare the build output to other builds.
15518  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15519
15520  # The generated Makefile knows where the spec.gmk is and where the source is.
15521  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15522  # which will look for generated configurations
15523  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15524
15525
15526
15527# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15528
15529  for ac_prog in apt-get yum port pkgutil pkgadd
15530do
15531  # Extract the first word of "$ac_prog", so it can be a program name with args.
15532set dummy $ac_prog; ac_word=$2
15533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15534$as_echo_n "checking for $ac_word... " >&6; }
15535if ${ac_cv_prog_PKGHANDLER+:} false; then :
15536  $as_echo_n "(cached) " >&6
15537else
15538  if test -n "$PKGHANDLER"; then
15539  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15540else
15541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15542for as_dir in $PATH
15543do
15544  IFS=$as_save_IFS
15545  test -z "$as_dir" && as_dir=.
15546    for ac_exec_ext in '' $ac_executable_extensions; do
15547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15548    ac_cv_prog_PKGHANDLER="$ac_prog"
15549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15550    break 2
15551  fi
15552done
15553  done
15554IFS=$as_save_IFS
15555
15556fi
15557fi
15558PKGHANDLER=$ac_cv_prog_PKGHANDLER
15559if test -n "$PKGHANDLER"; then
15560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15561$as_echo "$PKGHANDLER" >&6; }
15562else
15563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15564$as_echo "no" >&6; }
15565fi
15566
15567
15568  test -n "$PKGHANDLER" && break
15569done
15570
15571
15572
15573# Setup tools that requires more complex handling, or that is not needed by the configure script.
15574
15575
15576  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15577  if test "x$MAKE" != x; then
15578    # User has supplied a make, test it.
15579    if test ! -f "$MAKE"; then
15580      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15581    fi
15582
15583  MAKE_CANDIDATE=""$MAKE""
15584  DESCRIPTION="user supplied MAKE=$MAKE"
15585
15586  # On Cygwin, we require a newer version of make than on other platforms
15587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15588    MAKE_VERSION_EXPR="-e 4\."
15589    MAKE_REQUIRED_VERSION="4.0"
15590   else
15591    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15592    MAKE_REQUIRED_VERSION="3.81"
15593  fi
15594
15595  if test "x$MAKE_CANDIDATE" != x; then
15596    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15597$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15598    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15599    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15600    if test "x$IS_GNU_MAKE" = x; then
15601      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15602$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15603    else
15604      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15605      if test "x$IS_MODERN_MAKE" = x; then
15606        { $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
15607$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;}
15608      else
15609        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15610          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15611            MAKE_EXPECTED_ENV='cygwin'
15612          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15613            MAKE_EXPECTED_ENV='msys'
15614          else
15615            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15616          fi
15617          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15618          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15619        else
15620          # Not relevant for non-Windows
15621          IS_MAKE_CORRECT_ENV=true
15622        fi
15623        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15624          { $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
15625$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;}
15626        else
15627          FOUND_MAKE=$MAKE_CANDIDATE
15628
15629  # Only process if variable expands to non-empty
15630
15631  if test "x$FOUND_MAKE" != x; then
15632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15633
15634  # First separate the path from the arguments. This will split at the first
15635  # space.
15636  complete="$FOUND_MAKE"
15637  path="${complete%% *}"
15638  tmp="$complete EOL"
15639  arguments="${tmp#* }"
15640
15641  # Input might be given as Windows format, start by converting to
15642  # unix format.
15643  new_path=`$CYGPATH -u "$path"`
15644
15645  # Now try to locate executable using which
15646  new_path=`$WHICH "$new_path" 2> /dev/null`
15647  # bat and cmd files are not always considered executable in cygwin causing which
15648  # to not find them
15649  if test "x$new_path" = x \
15650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15652    new_path=`$CYGPATH -u "$path"`
15653  fi
15654  if test "x$new_path" = x; then
15655    # Oops. Which didn't find the executable.
15656    # The splitting of arguments from the executable at a space might have been incorrect,
15657    # since paths with space are more likely in Windows. Give it another try with the whole
15658    # argument.
15659    path="$complete"
15660    arguments="EOL"
15661    new_path=`$CYGPATH -u "$path"`
15662    new_path=`$WHICH "$new_path" 2> /dev/null`
15663    # bat and cmd files are not always considered executable in cygwin causing which
15664    # to not find them
15665    if test "x$new_path" = x \
15666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15668      new_path=`$CYGPATH -u "$path"`
15669    fi
15670    if test "x$new_path" = x; then
15671      # It's still not found. Now this is an unrecoverable error.
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15673$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15674      has_space=`$ECHO "$complete" | $GREP " "`
15675      if test "x$has_space" != x; then
15676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15678      fi
15679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15680    fi
15681  fi
15682
15683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15686  # "foo.exe" is OK but "foo" is an error.
15687  #
15688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15689  # It is also a way to make sure we got the proper file name for the real test later on.
15690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15691  if test "x$test_shortpath" = x; then
15692    # Short path failed, file does not exist as specified.
15693    # Try adding .exe or .cmd
15694    if test -f "${new_path}.exe"; then
15695      input_to_shortpath="${new_path}.exe"
15696    elif test -f "${new_path}.cmd"; then
15697      input_to_shortpath="${new_path}.cmd"
15698    else
15699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15704    fi
15705  else
15706    input_to_shortpath="$new_path"
15707  fi
15708
15709  # Call helper function which possibly converts this using DOS-style short mode.
15710  # If so, the updated path is stored in $new_path.
15711  new_path="$input_to_shortpath"
15712
15713  input_path="$input_to_shortpath"
15714  # Check if we need to convert this using DOS-style short mode. If the path
15715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15716  # take no chances and rewrite it.
15717  # Note: m4 eats our [], so we need to use [ and ] instead.
15718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15719  if test "x$has_forbidden_chars" != x; then
15720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15724      # Going to short mode and back again did indeed matter. Since short mode is
15725      # case insensitive, let's make it lowercase to improve readability.
15726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15727      # Now convert it back to Unix-style (cygpath)
15728      input_path=`$CYGPATH -u "$shortmode_path"`
15729      new_path="$input_path"
15730    fi
15731  fi
15732
15733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15734  if test "x$test_cygdrive_prefix" = x; then
15735    # As a simple fix, exclude /usr/bin since it's not a real path.
15736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15738      # a path prefixed by /cygdrive for fixpath to work.
15739      new_path="$CYGWIN_ROOT_PATH$input_path"
15740    fi
15741  fi
15742
15743  # remove trailing .exe if any
15744  new_path="${new_path/%.exe/}"
15745
15746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15747
15748  # First separate the path from the arguments. This will split at the first
15749  # space.
15750  complete="$FOUND_MAKE"
15751  path="${complete%% *}"
15752  tmp="$complete EOL"
15753  arguments="${tmp#* }"
15754
15755  # Input might be given as Windows format, start by converting to
15756  # unix format.
15757  new_path="$path"
15758
15759  windows_path="$new_path"
15760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15761    unix_path=`$CYGPATH -u "$windows_path"`
15762    new_path="$unix_path"
15763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15765    new_path="$unix_path"
15766  fi
15767
15768
15769  # Now try to locate executable using which
15770  new_path=`$WHICH "$new_path" 2> /dev/null`
15771
15772  if test "x$new_path" = x; then
15773    # Oops. Which didn't find the executable.
15774    # The splitting of arguments from the executable at a space might have been incorrect,
15775    # since paths with space are more likely in Windows. Give it another try with the whole
15776    # argument.
15777    path="$complete"
15778    arguments="EOL"
15779    new_path="$path"
15780
15781  windows_path="$new_path"
15782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783    unix_path=`$CYGPATH -u "$windows_path"`
15784    new_path="$unix_path"
15785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15787    new_path="$unix_path"
15788  fi
15789
15790
15791    new_path=`$WHICH "$new_path" 2> /dev/null`
15792    # bat and cmd files are not always considered executable in MSYS causing which
15793    # to not find them
15794    if test "x$new_path" = x \
15795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15797      new_path="$path"
15798
15799  windows_path="$new_path"
15800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15801    unix_path=`$CYGPATH -u "$windows_path"`
15802    new_path="$unix_path"
15803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15805    new_path="$unix_path"
15806  fi
15807
15808    fi
15809
15810    if test "x$new_path" = x; then
15811      # It's still not found. Now this is an unrecoverable error.
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15813$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15814      has_space=`$ECHO "$complete" | $GREP " "`
15815      if test "x$has_space" != x; then
15816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15818      fi
15819      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15820    fi
15821  fi
15822
15823  # Now new_path has a complete unix path to the binary
15824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15825    # Keep paths in /bin as-is, but remove trailing .exe if any
15826    new_path="${new_path/%.exe/}"
15827    # Do not save /bin paths to all_fixpath_prefixes!
15828  else
15829    # Not in mixed or Windows style, start by that.
15830    new_path=`cmd //c echo $new_path`
15831
15832  input_path="$new_path"
15833  # Check if we need to convert this using DOS-style short mode. If the path
15834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15835  # take no chances and rewrite it.
15836  # Note: m4 eats our [], so we need to use [ and ] instead.
15837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15838  if test "x$has_forbidden_chars" != x; then
15839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15841  fi
15842
15843    # Output is in $new_path
15844
15845  windows_path="$new_path"
15846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15847    unix_path=`$CYGPATH -u "$windows_path"`
15848    new_path="$unix_path"
15849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15851    new_path="$unix_path"
15852  fi
15853
15854    # remove trailing .exe if any
15855    new_path="${new_path/%.exe/}"
15856
15857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15859  fi
15860
15861    else
15862      # We're on a unix platform. Hooray! :)
15863      # First separate the path from the arguments. This will split at the first
15864      # space.
15865      complete="$FOUND_MAKE"
15866      path="${complete%% *}"
15867      tmp="$complete EOL"
15868      arguments="${tmp#* }"
15869
15870      # Cannot rely on the command "which" here since it doesn't always work.
15871      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15872      if test -z "$is_absolute_path"; then
15873        # Path to executable is not absolute. Find it.
15874        IFS_save="$IFS"
15875        IFS=:
15876        for p in $PATH; do
15877          if test -f "$p/$path" && test -x "$p/$path"; then
15878            new_path="$p/$path"
15879            break
15880          fi
15881        done
15882        IFS="$IFS_save"
15883      else
15884        # This is an absolute path, we can use it without further modifications.
15885        new_path="$path"
15886      fi
15887
15888      if test "x$new_path" = x; then
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15891        has_space=`$ECHO "$complete" | $GREP " "`
15892        if test "x$has_space" != x; then
15893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15895        fi
15896        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15897      fi
15898    fi
15899
15900    # Now join together the path and the arguments once again
15901    if test "x$arguments" != xEOL; then
15902      new_complete="$new_path ${arguments% *}"
15903    else
15904      new_complete="$new_path"
15905    fi
15906
15907    if test "x$complete" != "x$new_complete"; then
15908      FOUND_MAKE="$new_complete"
15909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15910$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15911    fi
15912  fi
15913
15914        fi
15915      fi
15916    fi
15917  fi
15918
15919    if test "x$FOUND_MAKE" = x; then
15920      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15921    fi
15922  else
15923    # Try our hardest to locate a correct version of GNU make
15924    for ac_prog in gmake
15925do
15926  # Extract the first word of "$ac_prog", so it can be a program name with args.
15927set dummy $ac_prog; ac_word=$2
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15929$as_echo_n "checking for $ac_word... " >&6; }
15930if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15931  $as_echo_n "(cached) " >&6
15932else
15933  case $CHECK_GMAKE in
15934  [\\/]* | ?:[\\/]*)
15935  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15936  ;;
15937  *)
15938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15939for as_dir in $PATH
15940do
15941  IFS=$as_save_IFS
15942  test -z "$as_dir" && as_dir=.
15943    for ac_exec_ext in '' $ac_executable_extensions; do
15944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15945    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15947    break 2
15948  fi
15949done
15950  done
15951IFS=$as_save_IFS
15952
15953  ;;
15954esac
15955fi
15956CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15957if test -n "$CHECK_GMAKE"; then
15958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15959$as_echo "$CHECK_GMAKE" >&6; }
15960else
15961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15962$as_echo "no" >&6; }
15963fi
15964
15965
15966  test -n "$CHECK_GMAKE" && break
15967done
15968
15969
15970  MAKE_CANDIDATE=""$CHECK_GMAKE""
15971  DESCRIPTION="gmake in PATH"
15972
15973  # On Cygwin, we require a newer version of make than on other platforms
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    MAKE_VERSION_EXPR="-e 4\."
15976    MAKE_REQUIRED_VERSION="4.0"
15977   else
15978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15979    MAKE_REQUIRED_VERSION="3.81"
15980  fi
15981
15982  if test "x$MAKE_CANDIDATE" != x; then
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15987    if test "x$IS_GNU_MAKE" = x; then
15988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15990    else
15991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15992      if test "x$IS_MODERN_MAKE" = x; then
15993        { $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
15994$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;}
15995      else
15996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998            MAKE_EXPECTED_ENV='cygwin'
15999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16000            MAKE_EXPECTED_ENV='msys'
16001          else
16002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16003          fi
16004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16006        else
16007          # Not relevant for non-Windows
16008          IS_MAKE_CORRECT_ENV=true
16009        fi
16010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16011          { $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
16012$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;}
16013        else
16014          FOUND_MAKE=$MAKE_CANDIDATE
16015
16016  # Only process if variable expands to non-empty
16017
16018  if test "x$FOUND_MAKE" != x; then
16019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16020
16021  # First separate the path from the arguments. This will split at the first
16022  # space.
16023  complete="$FOUND_MAKE"
16024  path="${complete%% *}"
16025  tmp="$complete EOL"
16026  arguments="${tmp#* }"
16027
16028  # Input might be given as Windows format, start by converting to
16029  # unix format.
16030  new_path=`$CYGPATH -u "$path"`
16031
16032  # Now try to locate executable using which
16033  new_path=`$WHICH "$new_path" 2> /dev/null`
16034  # bat and cmd files are not always considered executable in cygwin causing which
16035  # to not find them
16036  if test "x$new_path" = x \
16037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16039    new_path=`$CYGPATH -u "$path"`
16040  fi
16041  if test "x$new_path" = x; then
16042    # Oops. Which didn't find the executable.
16043    # The splitting of arguments from the executable at a space might have been incorrect,
16044    # since paths with space are more likely in Windows. Give it another try with the whole
16045    # argument.
16046    path="$complete"
16047    arguments="EOL"
16048    new_path=`$CYGPATH -u "$path"`
16049    new_path=`$WHICH "$new_path" 2> /dev/null`
16050    # bat and cmd files are not always considered executable in cygwin causing which
16051    # to not find them
16052    if test "x$new_path" = x \
16053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16055      new_path=`$CYGPATH -u "$path"`
16056    fi
16057    if test "x$new_path" = x; then
16058      # It's still not found. Now this is an unrecoverable error.
16059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16061      has_space=`$ECHO "$complete" | $GREP " "`
16062      if test "x$has_space" != x; then
16063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16065      fi
16066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16067    fi
16068  fi
16069
16070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16073  # "foo.exe" is OK but "foo" is an error.
16074  #
16075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16076  # It is also a way to make sure we got the proper file name for the real test later on.
16077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16078  if test "x$test_shortpath" = x; then
16079    # Short path failed, file does not exist as specified.
16080    # Try adding .exe or .cmd
16081    if test -f "${new_path}.exe"; then
16082      input_to_shortpath="${new_path}.exe"
16083    elif test -f "${new_path}.cmd"; then
16084      input_to_shortpath="${new_path}.cmd"
16085    else
16086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16091    fi
16092  else
16093    input_to_shortpath="$new_path"
16094  fi
16095
16096  # Call helper function which possibly converts this using DOS-style short mode.
16097  # If so, the updated path is stored in $new_path.
16098  new_path="$input_to_shortpath"
16099
16100  input_path="$input_to_shortpath"
16101  # Check if we need to convert this using DOS-style short mode. If the path
16102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16103  # take no chances and rewrite it.
16104  # Note: m4 eats our [], so we need to use [ and ] instead.
16105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16106  if test "x$has_forbidden_chars" != x; then
16107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16111      # Going to short mode and back again did indeed matter. Since short mode is
16112      # case insensitive, let's make it lowercase to improve readability.
16113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16114      # Now convert it back to Unix-style (cygpath)
16115      input_path=`$CYGPATH -u "$shortmode_path"`
16116      new_path="$input_path"
16117    fi
16118  fi
16119
16120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16121  if test "x$test_cygdrive_prefix" = x; then
16122    # As a simple fix, exclude /usr/bin since it's not a real path.
16123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16125      # a path prefixed by /cygdrive for fixpath to work.
16126      new_path="$CYGWIN_ROOT_PATH$input_path"
16127    fi
16128  fi
16129
16130  # remove trailing .exe if any
16131  new_path="${new_path/%.exe/}"
16132
16133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16134
16135  # First separate the path from the arguments. This will split at the first
16136  # space.
16137  complete="$FOUND_MAKE"
16138  path="${complete%% *}"
16139  tmp="$complete EOL"
16140  arguments="${tmp#* }"
16141
16142  # Input might be given as Windows format, start by converting to
16143  # unix format.
16144  new_path="$path"
16145
16146  windows_path="$new_path"
16147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148    unix_path=`$CYGPATH -u "$windows_path"`
16149    new_path="$unix_path"
16150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16152    new_path="$unix_path"
16153  fi
16154
16155
16156  # Now try to locate executable using which
16157  new_path=`$WHICH "$new_path" 2> /dev/null`
16158
16159  if test "x$new_path" = x; then
16160    # Oops. Which didn't find the executable.
16161    # The splitting of arguments from the executable at a space might have been incorrect,
16162    # since paths with space are more likely in Windows. Give it another try with the whole
16163    # argument.
16164    path="$complete"
16165    arguments="EOL"
16166    new_path="$path"
16167
16168  windows_path="$new_path"
16169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170    unix_path=`$CYGPATH -u "$windows_path"`
16171    new_path="$unix_path"
16172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16174    new_path="$unix_path"
16175  fi
16176
16177
16178    new_path=`$WHICH "$new_path" 2> /dev/null`
16179    # bat and cmd files are not always considered executable in MSYS causing which
16180    # to not find them
16181    if test "x$new_path" = x \
16182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16184      new_path="$path"
16185
16186  windows_path="$new_path"
16187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16188    unix_path=`$CYGPATH -u "$windows_path"`
16189    new_path="$unix_path"
16190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16192    new_path="$unix_path"
16193  fi
16194
16195    fi
16196
16197    if test "x$new_path" = x; then
16198      # It's still not found. Now this is an unrecoverable error.
16199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16201      has_space=`$ECHO "$complete" | $GREP " "`
16202      if test "x$has_space" != x; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16205      fi
16206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16207    fi
16208  fi
16209
16210  # Now new_path has a complete unix path to the binary
16211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16212    # Keep paths in /bin as-is, but remove trailing .exe if any
16213    new_path="${new_path/%.exe/}"
16214    # Do not save /bin paths to all_fixpath_prefixes!
16215  else
16216    # Not in mixed or Windows style, start by that.
16217    new_path=`cmd //c echo $new_path`
16218
16219  input_path="$new_path"
16220  # Check if we need to convert this using DOS-style short mode. If the path
16221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16222  # take no chances and rewrite it.
16223  # Note: m4 eats our [], so we need to use [ and ] instead.
16224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16225  if test "x$has_forbidden_chars" != x; then
16226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16228  fi
16229
16230    # Output is in $new_path
16231
16232  windows_path="$new_path"
16233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16234    unix_path=`$CYGPATH -u "$windows_path"`
16235    new_path="$unix_path"
16236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16238    new_path="$unix_path"
16239  fi
16240
16241    # remove trailing .exe if any
16242    new_path="${new_path/%.exe/}"
16243
16244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16246  fi
16247
16248    else
16249      # We're on a unix platform. Hooray! :)
16250      # First separate the path from the arguments. This will split at the first
16251      # space.
16252      complete="$FOUND_MAKE"
16253      path="${complete%% *}"
16254      tmp="$complete EOL"
16255      arguments="${tmp#* }"
16256
16257      # Cannot rely on the command "which" here since it doesn't always work.
16258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16259      if test -z "$is_absolute_path"; then
16260        # Path to executable is not absolute. Find it.
16261        IFS_save="$IFS"
16262        IFS=:
16263        for p in $PATH; do
16264          if test -f "$p/$path" && test -x "$p/$path"; then
16265            new_path="$p/$path"
16266            break
16267          fi
16268        done
16269        IFS="$IFS_save"
16270      else
16271        # This is an absolute path, we can use it without further modifications.
16272        new_path="$path"
16273      fi
16274
16275      if test "x$new_path" = x; then
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16278        has_space=`$ECHO "$complete" | $GREP " "`
16279        if test "x$has_space" != x; then
16280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16282        fi
16283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16284      fi
16285    fi
16286
16287    # Now join together the path and the arguments once again
16288    if test "x$arguments" != xEOL; then
16289      new_complete="$new_path ${arguments% *}"
16290    else
16291      new_complete="$new_path"
16292    fi
16293
16294    if test "x$complete" != "x$new_complete"; then
16295      FOUND_MAKE="$new_complete"
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16298    fi
16299  fi
16300
16301        fi
16302      fi
16303    fi
16304  fi
16305
16306
16307    if test "x$FOUND_MAKE" = x; then
16308      for ac_prog in make
16309do
16310  # Extract the first word of "$ac_prog", so it can be a program name with args.
16311set dummy $ac_prog; ac_word=$2
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16313$as_echo_n "checking for $ac_word... " >&6; }
16314if ${ac_cv_path_CHECK_MAKE+:} false; then :
16315  $as_echo_n "(cached) " >&6
16316else
16317  case $CHECK_MAKE in
16318  [\\/]* | ?:[\\/]*)
16319  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16320  ;;
16321  *)
16322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16323for as_dir in $PATH
16324do
16325  IFS=$as_save_IFS
16326  test -z "$as_dir" && as_dir=.
16327    for ac_exec_ext in '' $ac_executable_extensions; do
16328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16329    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16331    break 2
16332  fi
16333done
16334  done
16335IFS=$as_save_IFS
16336
16337  ;;
16338esac
16339fi
16340CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16341if test -n "$CHECK_MAKE"; then
16342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16343$as_echo "$CHECK_MAKE" >&6; }
16344else
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16346$as_echo "no" >&6; }
16347fi
16348
16349
16350  test -n "$CHECK_MAKE" && break
16351done
16352
16353
16354  MAKE_CANDIDATE=""$CHECK_MAKE""
16355  DESCRIPTION="make in PATH"
16356
16357  # On Cygwin, we require a newer version of make than on other platforms
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    MAKE_VERSION_EXPR="-e 4\."
16360    MAKE_REQUIRED_VERSION="4.0"
16361   else
16362    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16363    MAKE_REQUIRED_VERSION="3.81"
16364  fi
16365
16366  if test "x$MAKE_CANDIDATE" != x; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16368$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16369    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16370    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16371    if test "x$IS_GNU_MAKE" = x; then
16372      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16373$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16374    else
16375      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16376      if test "x$IS_MODERN_MAKE" = x; then
16377        { $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
16378$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;}
16379      else
16380        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16381          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16382            MAKE_EXPECTED_ENV='cygwin'
16383          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16384            MAKE_EXPECTED_ENV='msys'
16385          else
16386            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16387          fi
16388          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16389          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16390        else
16391          # Not relevant for non-Windows
16392          IS_MAKE_CORRECT_ENV=true
16393        fi
16394        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16395          { $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
16396$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;}
16397        else
16398          FOUND_MAKE=$MAKE_CANDIDATE
16399
16400  # Only process if variable expands to non-empty
16401
16402  if test "x$FOUND_MAKE" != x; then
16403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404
16405  # First separate the path from the arguments. This will split at the first
16406  # space.
16407  complete="$FOUND_MAKE"
16408  path="${complete%% *}"
16409  tmp="$complete EOL"
16410  arguments="${tmp#* }"
16411
16412  # Input might be given as Windows format, start by converting to
16413  # unix format.
16414  new_path=`$CYGPATH -u "$path"`
16415
16416  # Now try to locate executable using which
16417  new_path=`$WHICH "$new_path" 2> /dev/null`
16418  # bat and cmd files are not always considered executable in cygwin causing which
16419  # to not find them
16420  if test "x$new_path" = x \
16421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16423    new_path=`$CYGPATH -u "$path"`
16424  fi
16425  if test "x$new_path" = x; then
16426    # Oops. Which didn't find the executable.
16427    # The splitting of arguments from the executable at a space might have been incorrect,
16428    # since paths with space are more likely in Windows. Give it another try with the whole
16429    # argument.
16430    path="$complete"
16431    arguments="EOL"
16432    new_path=`$CYGPATH -u "$path"`
16433    new_path=`$WHICH "$new_path" 2> /dev/null`
16434    # bat and cmd files are not always considered executable in cygwin causing which
16435    # to not find them
16436    if test "x$new_path" = x \
16437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16439      new_path=`$CYGPATH -u "$path"`
16440    fi
16441    if test "x$new_path" = x; then
16442      # It's still not found. Now this is an unrecoverable error.
16443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16445      has_space=`$ECHO "$complete" | $GREP " "`
16446      if test "x$has_space" != x; then
16447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16449      fi
16450      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16451    fi
16452  fi
16453
16454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16457  # "foo.exe" is OK but "foo" is an error.
16458  #
16459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16460  # It is also a way to make sure we got the proper file name for the real test later on.
16461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16462  if test "x$test_shortpath" = x; then
16463    # Short path failed, file does not exist as specified.
16464    # Try adding .exe or .cmd
16465    if test -f "${new_path}.exe"; then
16466      input_to_shortpath="${new_path}.exe"
16467    elif test -f "${new_path}.cmd"; then
16468      input_to_shortpath="${new_path}.cmd"
16469    else
16470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16471$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16475    fi
16476  else
16477    input_to_shortpath="$new_path"
16478  fi
16479
16480  # Call helper function which possibly converts this using DOS-style short mode.
16481  # If so, the updated path is stored in $new_path.
16482  new_path="$input_to_shortpath"
16483
16484  input_path="$input_to_shortpath"
16485  # Check if we need to convert this using DOS-style short mode. If the path
16486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16487  # take no chances and rewrite it.
16488  # Note: m4 eats our [], so we need to use [ and ] instead.
16489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16490  if test "x$has_forbidden_chars" != x; then
16491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16495      # Going to short mode and back again did indeed matter. Since short mode is
16496      # case insensitive, let's make it lowercase to improve readability.
16497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16498      # Now convert it back to Unix-style (cygpath)
16499      input_path=`$CYGPATH -u "$shortmode_path"`
16500      new_path="$input_path"
16501    fi
16502  fi
16503
16504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16505  if test "x$test_cygdrive_prefix" = x; then
16506    # As a simple fix, exclude /usr/bin since it's not a real path.
16507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16509      # a path prefixed by /cygdrive for fixpath to work.
16510      new_path="$CYGWIN_ROOT_PATH$input_path"
16511    fi
16512  fi
16513
16514  # remove trailing .exe if any
16515  new_path="${new_path/%.exe/}"
16516
16517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518
16519  # First separate the path from the arguments. This will split at the first
16520  # space.
16521  complete="$FOUND_MAKE"
16522  path="${complete%% *}"
16523  tmp="$complete EOL"
16524  arguments="${tmp#* }"
16525
16526  # Input might be given as Windows format, start by converting to
16527  # unix format.
16528  new_path="$path"
16529
16530  windows_path="$new_path"
16531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16532    unix_path=`$CYGPATH -u "$windows_path"`
16533    new_path="$unix_path"
16534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16536    new_path="$unix_path"
16537  fi
16538
16539
16540  # Now try to locate executable using which
16541  new_path=`$WHICH "$new_path" 2> /dev/null`
16542
16543  if test "x$new_path" = x; then
16544    # Oops. Which didn't find the executable.
16545    # The splitting of arguments from the executable at a space might have been incorrect,
16546    # since paths with space are more likely in Windows. Give it another try with the whole
16547    # argument.
16548    path="$complete"
16549    arguments="EOL"
16550    new_path="$path"
16551
16552  windows_path="$new_path"
16553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16554    unix_path=`$CYGPATH -u "$windows_path"`
16555    new_path="$unix_path"
16556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16558    new_path="$unix_path"
16559  fi
16560
16561
16562    new_path=`$WHICH "$new_path" 2> /dev/null`
16563    # bat and cmd files are not always considered executable in MSYS causing which
16564    # to not find them
16565    if test "x$new_path" = x \
16566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16568      new_path="$path"
16569
16570  windows_path="$new_path"
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572    unix_path=`$CYGPATH -u "$windows_path"`
16573    new_path="$unix_path"
16574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16576    new_path="$unix_path"
16577  fi
16578
16579    fi
16580
16581    if test "x$new_path" = x; then
16582      # It's still not found. Now this is an unrecoverable error.
16583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16585      has_space=`$ECHO "$complete" | $GREP " "`
16586      if test "x$has_space" != x; then
16587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16589      fi
16590      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16591    fi
16592  fi
16593
16594  # Now new_path has a complete unix path to the binary
16595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16596    # Keep paths in /bin as-is, but remove trailing .exe if any
16597    new_path="${new_path/%.exe/}"
16598    # Do not save /bin paths to all_fixpath_prefixes!
16599  else
16600    # Not in mixed or Windows style, start by that.
16601    new_path=`cmd //c echo $new_path`
16602
16603  input_path="$new_path"
16604  # Check if we need to convert this using DOS-style short mode. If the path
16605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16606  # take no chances and rewrite it.
16607  # Note: m4 eats our [], so we need to use [ and ] instead.
16608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16609  if test "x$has_forbidden_chars" != x; then
16610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16612  fi
16613
16614    # Output is in $new_path
16615
16616  windows_path="$new_path"
16617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618    unix_path=`$CYGPATH -u "$windows_path"`
16619    new_path="$unix_path"
16620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622    new_path="$unix_path"
16623  fi
16624
16625    # remove trailing .exe if any
16626    new_path="${new_path/%.exe/}"
16627
16628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16630  fi
16631
16632    else
16633      # We're on a unix platform. Hooray! :)
16634      # First separate the path from the arguments. This will split at the first
16635      # space.
16636      complete="$FOUND_MAKE"
16637      path="${complete%% *}"
16638      tmp="$complete EOL"
16639      arguments="${tmp#* }"
16640
16641      # Cannot rely on the command "which" here since it doesn't always work.
16642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16643      if test -z "$is_absolute_path"; then
16644        # Path to executable is not absolute. Find it.
16645        IFS_save="$IFS"
16646        IFS=:
16647        for p in $PATH; do
16648          if test -f "$p/$path" && test -x "$p/$path"; then
16649            new_path="$p/$path"
16650            break
16651          fi
16652        done
16653        IFS="$IFS_save"
16654      else
16655        # This is an absolute path, we can use it without further modifications.
16656        new_path="$path"
16657      fi
16658
16659      if test "x$new_path" = x; then
16660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16662        has_space=`$ECHO "$complete" | $GREP " "`
16663        if test "x$has_space" != x; then
16664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16666        fi
16667        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16668      fi
16669    fi
16670
16671    # Now join together the path and the arguments once again
16672    if test "x$arguments" != xEOL; then
16673      new_complete="$new_path ${arguments% *}"
16674    else
16675      new_complete="$new_path"
16676    fi
16677
16678    if test "x$complete" != "x$new_complete"; then
16679      FOUND_MAKE="$new_complete"
16680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16681$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16682    fi
16683  fi
16684
16685        fi
16686      fi
16687    fi
16688  fi
16689
16690    fi
16691
16692    if test "x$FOUND_MAKE" = x; then
16693      if test "x$TOOLCHAIN_PATH" != x; then
16694        # We have a toolchain path, check that as well before giving up.
16695        OLD_PATH=$PATH
16696        PATH=$TOOLCHAIN_PATH:$PATH
16697        for ac_prog in gmake
16698do
16699  # Extract the first word of "$ac_prog", so it can be a program name with args.
16700set dummy $ac_prog; ac_word=$2
16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16702$as_echo_n "checking for $ac_word... " >&6; }
16703if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16704  $as_echo_n "(cached) " >&6
16705else
16706  case $CHECK_TOOLSDIR_GMAKE in
16707  [\\/]* | ?:[\\/]*)
16708  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16709  ;;
16710  *)
16711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16712for as_dir in $PATH
16713do
16714  IFS=$as_save_IFS
16715  test -z "$as_dir" && as_dir=.
16716    for ac_exec_ext in '' $ac_executable_extensions; do
16717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16718    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16720    break 2
16721  fi
16722done
16723  done
16724IFS=$as_save_IFS
16725
16726  ;;
16727esac
16728fi
16729CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16730if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16732$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16733else
16734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16735$as_echo "no" >&6; }
16736fi
16737
16738
16739  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16740done
16741
16742
16743  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16744  DESCRIPTION="gmake in tools-dir"
16745
16746  # On Cygwin, we require a newer version of make than on other platforms
16747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16748    MAKE_VERSION_EXPR="-e 4\."
16749    MAKE_REQUIRED_VERSION="4.0"
16750   else
16751    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16752    MAKE_REQUIRED_VERSION="3.81"
16753  fi
16754
16755  if test "x$MAKE_CANDIDATE" != x; then
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16757$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16758    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16759    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16760    if test "x$IS_GNU_MAKE" = x; then
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16762$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16763    else
16764      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16765      if test "x$IS_MODERN_MAKE" = x; then
16766        { $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
16767$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;}
16768      else
16769        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16770          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16771            MAKE_EXPECTED_ENV='cygwin'
16772          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16773            MAKE_EXPECTED_ENV='msys'
16774          else
16775            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16776          fi
16777          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16778          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16779        else
16780          # Not relevant for non-Windows
16781          IS_MAKE_CORRECT_ENV=true
16782        fi
16783        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16784          { $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
16785$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;}
16786        else
16787          FOUND_MAKE=$MAKE_CANDIDATE
16788
16789  # Only process if variable expands to non-empty
16790
16791  if test "x$FOUND_MAKE" != x; then
16792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16793
16794  # First separate the path from the arguments. This will split at the first
16795  # space.
16796  complete="$FOUND_MAKE"
16797  path="${complete%% *}"
16798  tmp="$complete EOL"
16799  arguments="${tmp#* }"
16800
16801  # Input might be given as Windows format, start by converting to
16802  # unix format.
16803  new_path=`$CYGPATH -u "$path"`
16804
16805  # Now try to locate executable using which
16806  new_path=`$WHICH "$new_path" 2> /dev/null`
16807  # bat and cmd files are not always considered executable in cygwin causing which
16808  # to not find them
16809  if test "x$new_path" = x \
16810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16812    new_path=`$CYGPATH -u "$path"`
16813  fi
16814  if test "x$new_path" = x; then
16815    # Oops. Which didn't find the executable.
16816    # The splitting of arguments from the executable at a space might have been incorrect,
16817    # since paths with space are more likely in Windows. Give it another try with the whole
16818    # argument.
16819    path="$complete"
16820    arguments="EOL"
16821    new_path=`$CYGPATH -u "$path"`
16822    new_path=`$WHICH "$new_path" 2> /dev/null`
16823    # bat and cmd files are not always considered executable in cygwin causing which
16824    # to not find them
16825    if test "x$new_path" = x \
16826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16828      new_path=`$CYGPATH -u "$path"`
16829    fi
16830    if test "x$new_path" = x; then
16831      # It's still not found. Now this is an unrecoverable error.
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16834      has_space=`$ECHO "$complete" | $GREP " "`
16835      if test "x$has_space" != x; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16838      fi
16839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16840    fi
16841  fi
16842
16843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16846  # "foo.exe" is OK but "foo" is an error.
16847  #
16848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16849  # It is also a way to make sure we got the proper file name for the real test later on.
16850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16851  if test "x$test_shortpath" = x; then
16852    # Short path failed, file does not exist as specified.
16853    # Try adding .exe or .cmd
16854    if test -f "${new_path}.exe"; then
16855      input_to_shortpath="${new_path}.exe"
16856    elif test -f "${new_path}.cmd"; then
16857      input_to_shortpath="${new_path}.cmd"
16858    else
16859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16864    fi
16865  else
16866    input_to_shortpath="$new_path"
16867  fi
16868
16869  # Call helper function which possibly converts this using DOS-style short mode.
16870  # If so, the updated path is stored in $new_path.
16871  new_path="$input_to_shortpath"
16872
16873  input_path="$input_to_shortpath"
16874  # Check if we need to convert this using DOS-style short mode. If the path
16875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16876  # take no chances and rewrite it.
16877  # Note: m4 eats our [], so we need to use [ and ] instead.
16878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16879  if test "x$has_forbidden_chars" != x; then
16880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16884      # Going to short mode and back again did indeed matter. Since short mode is
16885      # case insensitive, let's make it lowercase to improve readability.
16886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16887      # Now convert it back to Unix-style (cygpath)
16888      input_path=`$CYGPATH -u "$shortmode_path"`
16889      new_path="$input_path"
16890    fi
16891  fi
16892
16893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16894  if test "x$test_cygdrive_prefix" = x; then
16895    # As a simple fix, exclude /usr/bin since it's not a real path.
16896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16898      # a path prefixed by /cygdrive for fixpath to work.
16899      new_path="$CYGWIN_ROOT_PATH$input_path"
16900    fi
16901  fi
16902
16903  # remove trailing .exe if any
16904  new_path="${new_path/%.exe/}"
16905
16906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16907
16908  # First separate the path from the arguments. This will split at the first
16909  # space.
16910  complete="$FOUND_MAKE"
16911  path="${complete%% *}"
16912  tmp="$complete EOL"
16913  arguments="${tmp#* }"
16914
16915  # Input might be given as Windows format, start by converting to
16916  # unix format.
16917  new_path="$path"
16918
16919  windows_path="$new_path"
16920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16921    unix_path=`$CYGPATH -u "$windows_path"`
16922    new_path="$unix_path"
16923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16925    new_path="$unix_path"
16926  fi
16927
16928
16929  # Now try to locate executable using which
16930  new_path=`$WHICH "$new_path" 2> /dev/null`
16931
16932  if test "x$new_path" = x; then
16933    # Oops. Which didn't find the executable.
16934    # The splitting of arguments from the executable at a space might have been incorrect,
16935    # since paths with space are more likely in Windows. Give it another try with the whole
16936    # argument.
16937    path="$complete"
16938    arguments="EOL"
16939    new_path="$path"
16940
16941  windows_path="$new_path"
16942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16943    unix_path=`$CYGPATH -u "$windows_path"`
16944    new_path="$unix_path"
16945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16947    new_path="$unix_path"
16948  fi
16949
16950
16951    new_path=`$WHICH "$new_path" 2> /dev/null`
16952    # bat and cmd files are not always considered executable in MSYS causing which
16953    # to not find them
16954    if test "x$new_path" = x \
16955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16957      new_path="$path"
16958
16959  windows_path="$new_path"
16960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16961    unix_path=`$CYGPATH -u "$windows_path"`
16962    new_path="$unix_path"
16963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16965    new_path="$unix_path"
16966  fi
16967
16968    fi
16969
16970    if test "x$new_path" = x; then
16971      # It's still not found. Now this is an unrecoverable error.
16972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16974      has_space=`$ECHO "$complete" | $GREP " "`
16975      if test "x$has_space" != x; then
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16978      fi
16979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16980    fi
16981  fi
16982
16983  # Now new_path has a complete unix path to the binary
16984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16985    # Keep paths in /bin as-is, but remove trailing .exe if any
16986    new_path="${new_path/%.exe/}"
16987    # Do not save /bin paths to all_fixpath_prefixes!
16988  else
16989    # Not in mixed or Windows style, start by that.
16990    new_path=`cmd //c echo $new_path`
16991
16992  input_path="$new_path"
16993  # Check if we need to convert this using DOS-style short mode. If the path
16994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16995  # take no chances and rewrite it.
16996  # Note: m4 eats our [], so we need to use [ and ] instead.
16997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16998  if test "x$has_forbidden_chars" != x; then
16999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17001  fi
17002
17003    # Output is in $new_path
17004
17005  windows_path="$new_path"
17006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17007    unix_path=`$CYGPATH -u "$windows_path"`
17008    new_path="$unix_path"
17009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17011    new_path="$unix_path"
17012  fi
17013
17014    # remove trailing .exe if any
17015    new_path="${new_path/%.exe/}"
17016
17017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17019  fi
17020
17021    else
17022      # We're on a unix platform. Hooray! :)
17023      # First separate the path from the arguments. This will split at the first
17024      # space.
17025      complete="$FOUND_MAKE"
17026      path="${complete%% *}"
17027      tmp="$complete EOL"
17028      arguments="${tmp#* }"
17029
17030      # Cannot rely on the command "which" here since it doesn't always work.
17031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17032      if test -z "$is_absolute_path"; then
17033        # Path to executable is not absolute. Find it.
17034        IFS_save="$IFS"
17035        IFS=:
17036        for p in $PATH; do
17037          if test -f "$p/$path" && test -x "$p/$path"; then
17038            new_path="$p/$path"
17039            break
17040          fi
17041        done
17042        IFS="$IFS_save"
17043      else
17044        # This is an absolute path, we can use it without further modifications.
17045        new_path="$path"
17046      fi
17047
17048      if test "x$new_path" = x; then
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17051        has_space=`$ECHO "$complete" | $GREP " "`
17052        if test "x$has_space" != x; then
17053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17055        fi
17056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17057      fi
17058    fi
17059
17060    # Now join together the path and the arguments once again
17061    if test "x$arguments" != xEOL; then
17062      new_complete="$new_path ${arguments% *}"
17063    else
17064      new_complete="$new_path"
17065    fi
17066
17067    if test "x$complete" != "x$new_complete"; then
17068      FOUND_MAKE="$new_complete"
17069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17071    fi
17072  fi
17073
17074        fi
17075      fi
17076    fi
17077  fi
17078
17079        if test "x$FOUND_MAKE" = x; then
17080          for ac_prog in make
17081do
17082  # Extract the first word of "$ac_prog", so it can be a program name with args.
17083set dummy $ac_prog; ac_word=$2
17084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17085$as_echo_n "checking for $ac_word... " >&6; }
17086if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17087  $as_echo_n "(cached) " >&6
17088else
17089  case $CHECK_TOOLSDIR_MAKE in
17090  [\\/]* | ?:[\\/]*)
17091  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17092  ;;
17093  *)
17094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17095for as_dir in $PATH
17096do
17097  IFS=$as_save_IFS
17098  test -z "$as_dir" && as_dir=.
17099    for ac_exec_ext in '' $ac_executable_extensions; do
17100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17101    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17103    break 2
17104  fi
17105done
17106  done
17107IFS=$as_save_IFS
17108
17109  ;;
17110esac
17111fi
17112CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17113if test -n "$CHECK_TOOLSDIR_MAKE"; then
17114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17115$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17116else
17117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17118$as_echo "no" >&6; }
17119fi
17120
17121
17122  test -n "$CHECK_TOOLSDIR_MAKE" && break
17123done
17124
17125
17126  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17127  DESCRIPTION="make in tools-dir"
17128
17129  # On Cygwin, we require a newer version of make than on other platforms
17130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17131    MAKE_VERSION_EXPR="-e 4\."
17132    MAKE_REQUIRED_VERSION="4.0"
17133   else
17134    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17135    MAKE_REQUIRED_VERSION="3.81"
17136  fi
17137
17138  if test "x$MAKE_CANDIDATE" != x; then
17139    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17140$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17141    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17142    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17143    if test "x$IS_GNU_MAKE" = x; then
17144      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17145$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17146    else
17147      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17148      if test "x$IS_MODERN_MAKE" = x; then
17149        { $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
17150$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;}
17151      else
17152        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17153          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17154            MAKE_EXPECTED_ENV='cygwin'
17155          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156            MAKE_EXPECTED_ENV='msys'
17157          else
17158            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17159          fi
17160          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17161          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17162        else
17163          # Not relevant for non-Windows
17164          IS_MAKE_CORRECT_ENV=true
17165        fi
17166        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17167          { $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
17168$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;}
17169        else
17170          FOUND_MAKE=$MAKE_CANDIDATE
17171
17172  # Only process if variable expands to non-empty
17173
17174  if test "x$FOUND_MAKE" != x; then
17175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176
17177  # First separate the path from the arguments. This will split at the first
17178  # space.
17179  complete="$FOUND_MAKE"
17180  path="${complete%% *}"
17181  tmp="$complete EOL"
17182  arguments="${tmp#* }"
17183
17184  # Input might be given as Windows format, start by converting to
17185  # unix format.
17186  new_path=`$CYGPATH -u "$path"`
17187
17188  # Now try to locate executable using which
17189  new_path=`$WHICH "$new_path" 2> /dev/null`
17190  # bat and cmd files are not always considered executable in cygwin causing which
17191  # to not find them
17192  if test "x$new_path" = x \
17193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17195    new_path=`$CYGPATH -u "$path"`
17196  fi
17197  if test "x$new_path" = x; then
17198    # Oops. Which didn't find the executable.
17199    # The splitting of arguments from the executable at a space might have been incorrect,
17200    # since paths with space are more likely in Windows. Give it another try with the whole
17201    # argument.
17202    path="$complete"
17203    arguments="EOL"
17204    new_path=`$CYGPATH -u "$path"`
17205    new_path=`$WHICH "$new_path" 2> /dev/null`
17206    # bat and cmd files are not always considered executable in cygwin causing which
17207    # to not find them
17208    if test "x$new_path" = x \
17209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17211      new_path=`$CYGPATH -u "$path"`
17212    fi
17213    if test "x$new_path" = x; then
17214      # It's still not found. Now this is an unrecoverable error.
17215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17217      has_space=`$ECHO "$complete" | $GREP " "`
17218      if test "x$has_space" != x; then
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17221      fi
17222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17223    fi
17224  fi
17225
17226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17229  # "foo.exe" is OK but "foo" is an error.
17230  #
17231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17232  # It is also a way to make sure we got the proper file name for the real test later on.
17233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17234  if test "x$test_shortpath" = x; then
17235    # Short path failed, file does not exist as specified.
17236    # Try adding .exe or .cmd
17237    if test -f "${new_path}.exe"; then
17238      input_to_shortpath="${new_path}.exe"
17239    elif test -f "${new_path}.cmd"; then
17240      input_to_shortpath="${new_path}.cmd"
17241    else
17242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17247    fi
17248  else
17249    input_to_shortpath="$new_path"
17250  fi
17251
17252  # Call helper function which possibly converts this using DOS-style short mode.
17253  # If so, the updated path is stored in $new_path.
17254  new_path="$input_to_shortpath"
17255
17256  input_path="$input_to_shortpath"
17257  # Check if we need to convert this using DOS-style short mode. If the path
17258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17259  # take no chances and rewrite it.
17260  # Note: m4 eats our [], so we need to use [ and ] instead.
17261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17262  if test "x$has_forbidden_chars" != x; then
17263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17267      # Going to short mode and back again did indeed matter. Since short mode is
17268      # case insensitive, let's make it lowercase to improve readability.
17269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17270      # Now convert it back to Unix-style (cygpath)
17271      input_path=`$CYGPATH -u "$shortmode_path"`
17272      new_path="$input_path"
17273    fi
17274  fi
17275
17276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17277  if test "x$test_cygdrive_prefix" = x; then
17278    # As a simple fix, exclude /usr/bin since it's not a real path.
17279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17281      # a path prefixed by /cygdrive for fixpath to work.
17282      new_path="$CYGWIN_ROOT_PATH$input_path"
17283    fi
17284  fi
17285
17286  # remove trailing .exe if any
17287  new_path="${new_path/%.exe/}"
17288
17289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290
17291  # First separate the path from the arguments. This will split at the first
17292  # space.
17293  complete="$FOUND_MAKE"
17294  path="${complete%% *}"
17295  tmp="$complete EOL"
17296  arguments="${tmp#* }"
17297
17298  # Input might be given as Windows format, start by converting to
17299  # unix format.
17300  new_path="$path"
17301
17302  windows_path="$new_path"
17303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17304    unix_path=`$CYGPATH -u "$windows_path"`
17305    new_path="$unix_path"
17306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17308    new_path="$unix_path"
17309  fi
17310
17311
17312  # Now try to locate executable using which
17313  new_path=`$WHICH "$new_path" 2> /dev/null`
17314
17315  if test "x$new_path" = x; then
17316    # Oops. Which didn't find the executable.
17317    # The splitting of arguments from the executable at a space might have been incorrect,
17318    # since paths with space are more likely in Windows. Give it another try with the whole
17319    # argument.
17320    path="$complete"
17321    arguments="EOL"
17322    new_path="$path"
17323
17324  windows_path="$new_path"
17325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17326    unix_path=`$CYGPATH -u "$windows_path"`
17327    new_path="$unix_path"
17328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17330    new_path="$unix_path"
17331  fi
17332
17333
17334    new_path=`$WHICH "$new_path" 2> /dev/null`
17335    # bat and cmd files are not always considered executable in MSYS causing which
17336    # to not find them
17337    if test "x$new_path" = x \
17338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17340      new_path="$path"
17341
17342  windows_path="$new_path"
17343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17344    unix_path=`$CYGPATH -u "$windows_path"`
17345    new_path="$unix_path"
17346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17348    new_path="$unix_path"
17349  fi
17350
17351    fi
17352
17353    if test "x$new_path" = x; then
17354      # It's still not found. Now this is an unrecoverable error.
17355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17357      has_space=`$ECHO "$complete" | $GREP " "`
17358      if test "x$has_space" != x; then
17359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17361      fi
17362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17363    fi
17364  fi
17365
17366  # Now new_path has a complete unix path to the binary
17367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17368    # Keep paths in /bin as-is, but remove trailing .exe if any
17369    new_path="${new_path/%.exe/}"
17370    # Do not save /bin paths to all_fixpath_prefixes!
17371  else
17372    # Not in mixed or Windows style, start by that.
17373    new_path=`cmd //c echo $new_path`
17374
17375  input_path="$new_path"
17376  # Check if we need to convert this using DOS-style short mode. If the path
17377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17378  # take no chances and rewrite it.
17379  # Note: m4 eats our [], so we need to use [ and ] instead.
17380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17381  if test "x$has_forbidden_chars" != x; then
17382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384  fi
17385
17386    # Output is in $new_path
17387
17388  windows_path="$new_path"
17389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390    unix_path=`$CYGPATH -u "$windows_path"`
17391    new_path="$unix_path"
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394    new_path="$unix_path"
17395  fi
17396
17397    # remove trailing .exe if any
17398    new_path="${new_path/%.exe/}"
17399
17400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17402  fi
17403
17404    else
17405      # We're on a unix platform. Hooray! :)
17406      # First separate the path from the arguments. This will split at the first
17407      # space.
17408      complete="$FOUND_MAKE"
17409      path="${complete%% *}"
17410      tmp="$complete EOL"
17411      arguments="${tmp#* }"
17412
17413      # Cannot rely on the command "which" here since it doesn't always work.
17414      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17415      if test -z "$is_absolute_path"; then
17416        # Path to executable is not absolute. Find it.
17417        IFS_save="$IFS"
17418        IFS=:
17419        for p in $PATH; do
17420          if test -f "$p/$path" && test -x "$p/$path"; then
17421            new_path="$p/$path"
17422            break
17423          fi
17424        done
17425        IFS="$IFS_save"
17426      else
17427        # This is an absolute path, we can use it without further modifications.
17428        new_path="$path"
17429      fi
17430
17431      if test "x$new_path" = x; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17434        has_space=`$ECHO "$complete" | $GREP " "`
17435        if test "x$has_space" != x; then
17436          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17438        fi
17439        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17440      fi
17441    fi
17442
17443    # Now join together the path and the arguments once again
17444    if test "x$arguments" != xEOL; then
17445      new_complete="$new_path ${arguments% *}"
17446    else
17447      new_complete="$new_path"
17448    fi
17449
17450    if test "x$complete" != "x$new_complete"; then
17451      FOUND_MAKE="$new_complete"
17452      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17453$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17454    fi
17455  fi
17456
17457        fi
17458      fi
17459    fi
17460  fi
17461
17462        fi
17463        PATH=$OLD_PATH
17464      fi
17465    fi
17466
17467    if test "x$FOUND_MAKE" = x; then
17468      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
17469    fi
17470  fi
17471
17472  MAKE=$FOUND_MAKE
17473
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17475$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17476
17477
17478  # Check if make supports the output sync option and if so, setup using it.
17479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17480$as_echo_n "checking if make --output-sync is supported... " >&6; }
17481  if $MAKE --version -O > /dev/null 2>&1; then
17482    OUTPUT_SYNC_SUPPORTED=true
17483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17484$as_echo "yes" >&6; }
17485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17486$as_echo_n "checking for output-sync value... " >&6; }
17487
17488# Check whether --with-output-sync was given.
17489if test "${with_output_sync+set}" = set; then :
17490  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17491fi
17492
17493    if test "x$OUTPUT_SYNC" = "x"; then
17494      OUTPUT_SYNC=none
17495    fi
17496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17497$as_echo "$OUTPUT_SYNC" >&6; }
17498    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17499      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17500    fi
17501  else
17502    OUTPUT_SYNC_SUPPORTED=false
17503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17504$as_echo "no" >&6; }
17505  fi
17506
17507
17508
17509
17510
17511
17512  # Test if find supports -delete
17513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17514$as_echo_n "checking if find supports -delete... " >&6; }
17515  FIND_DELETE="-delete"
17516
17517  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17518
17519  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17520
17521  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17522  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17523    # No, it does not.
17524    rm $DELETEDIR/TestIfFindSupportsDelete
17525    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17526      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17527      FIND_DELETE="-print | xargs rm"
17528    else
17529      FIND_DELETE="-exec rm \{\} \+"
17530    fi
17531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17532$as_echo "no" >&6; }
17533  else
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17535$as_echo "yes" >&6; }
17536  fi
17537  rmdir $DELETEDIR
17538
17539
17540
17541  # These tools might not be installed by default,
17542  # need hint on how to install them.
17543
17544
17545
17546  # Publish this variable in the help.
17547
17548
17549  if test "x$UNZIP" = x; then
17550    # The variable is not set by user, try to locate tool using the code snippet
17551    for ac_prog in unzip
17552do
17553  # Extract the first word of "$ac_prog", so it can be a program name with args.
17554set dummy $ac_prog; ac_word=$2
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17556$as_echo_n "checking for $ac_word... " >&6; }
17557if ${ac_cv_path_UNZIP+:} false; then :
17558  $as_echo_n "(cached) " >&6
17559else
17560  case $UNZIP in
17561  [\\/]* | ?:[\\/]*)
17562  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17563  ;;
17564  *)
17565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17566for as_dir in $PATH
17567do
17568  IFS=$as_save_IFS
17569  test -z "$as_dir" && as_dir=.
17570    for ac_exec_ext in '' $ac_executable_extensions; do
17571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17572    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17574    break 2
17575  fi
17576done
17577  done
17578IFS=$as_save_IFS
17579
17580  ;;
17581esac
17582fi
17583UNZIP=$ac_cv_path_UNZIP
17584if test -n "$UNZIP"; then
17585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17586$as_echo "$UNZIP" >&6; }
17587else
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589$as_echo "no" >&6; }
17590fi
17591
17592
17593  test -n "$UNZIP" && break
17594done
17595
17596  else
17597    # The variable is set, but is it from the command line or the environment?
17598
17599    # Try to remove the string !UNZIP! from our list.
17600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17602      # If it failed, the variable was not from the command line. Ignore it,
17603      # but warn the user (except for BASH, which is always set by the calling BASH).
17604      if test "xUNZIP" != xBASH; then
17605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17606$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17607      fi
17608      # Try to locate tool using the code snippet
17609      for ac_prog in unzip
17610do
17611  # Extract the first word of "$ac_prog", so it can be a program name with args.
17612set dummy $ac_prog; ac_word=$2
17613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17614$as_echo_n "checking for $ac_word... " >&6; }
17615if ${ac_cv_path_UNZIP+:} false; then :
17616  $as_echo_n "(cached) " >&6
17617else
17618  case $UNZIP in
17619  [\\/]* | ?:[\\/]*)
17620  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17621  ;;
17622  *)
17623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17624for as_dir in $PATH
17625do
17626  IFS=$as_save_IFS
17627  test -z "$as_dir" && as_dir=.
17628    for ac_exec_ext in '' $ac_executable_extensions; do
17629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17630    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17632    break 2
17633  fi
17634done
17635  done
17636IFS=$as_save_IFS
17637
17638  ;;
17639esac
17640fi
17641UNZIP=$ac_cv_path_UNZIP
17642if test -n "$UNZIP"; then
17643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17644$as_echo "$UNZIP" >&6; }
17645else
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17647$as_echo "no" >&6; }
17648fi
17649
17650
17651  test -n "$UNZIP" && break
17652done
17653
17654    else
17655      # If it succeeded, then it was overridden by the user. We will use it
17656      # for the tool.
17657
17658      # First remove it from the list of overridden variables, so we can test
17659      # for unknown variables in the end.
17660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17661
17662      # Check if the provided tool contains a complete path.
17663      tool_specified="$UNZIP"
17664      tool_basename="${tool_specified##*/}"
17665      if test "x$tool_basename" = "x$tool_specified"; then
17666        # A command without a complete path is provided, search $PATH.
17667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17668$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17669        # Extract the first word of "$tool_basename", so it can be a program name with args.
17670set dummy $tool_basename; ac_word=$2
17671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17672$as_echo_n "checking for $ac_word... " >&6; }
17673if ${ac_cv_path_UNZIP+:} false; then :
17674  $as_echo_n "(cached) " >&6
17675else
17676  case $UNZIP in
17677  [\\/]* | ?:[\\/]*)
17678  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17679  ;;
17680  *)
17681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17682for as_dir in $PATH
17683do
17684  IFS=$as_save_IFS
17685  test -z "$as_dir" && as_dir=.
17686    for ac_exec_ext in '' $ac_executable_extensions; do
17687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17688    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17690    break 2
17691  fi
17692done
17693  done
17694IFS=$as_save_IFS
17695
17696  ;;
17697esac
17698fi
17699UNZIP=$ac_cv_path_UNZIP
17700if test -n "$UNZIP"; then
17701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17702$as_echo "$UNZIP" >&6; }
17703else
17704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17705$as_echo "no" >&6; }
17706fi
17707
17708
17709        if test "x$UNZIP" = x; then
17710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17711        fi
17712      else
17713        # Otherwise we believe it is a complete path. Use it as it is.
17714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17715$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17717$as_echo_n "checking for UNZIP... " >&6; }
17718        if test ! -x "$tool_specified"; then
17719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17720$as_echo "not found" >&6; }
17721          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17722        fi
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17724$as_echo "$tool_specified" >&6; }
17725      fi
17726    fi
17727  fi
17728
17729
17730
17731  if test "x$UNZIP" = x; then
17732    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17733  fi
17734
17735
17736
17737
17738
17739  # Publish this variable in the help.
17740
17741
17742  if test "x$ZIP" = x; then
17743    # The variable is not set by user, try to locate tool using the code snippet
17744    for ac_prog in zip
17745do
17746  # Extract the first word of "$ac_prog", so it can be a program name with args.
17747set dummy $ac_prog; ac_word=$2
17748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17749$as_echo_n "checking for $ac_word... " >&6; }
17750if ${ac_cv_path_ZIP+:} false; then :
17751  $as_echo_n "(cached) " >&6
17752else
17753  case $ZIP in
17754  [\\/]* | ?:[\\/]*)
17755  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17756  ;;
17757  *)
17758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17759for as_dir in $PATH
17760do
17761  IFS=$as_save_IFS
17762  test -z "$as_dir" && as_dir=.
17763    for ac_exec_ext in '' $ac_executable_extensions; do
17764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17765    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17767    break 2
17768  fi
17769done
17770  done
17771IFS=$as_save_IFS
17772
17773  ;;
17774esac
17775fi
17776ZIP=$ac_cv_path_ZIP
17777if test -n "$ZIP"; then
17778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17779$as_echo "$ZIP" >&6; }
17780else
17781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782$as_echo "no" >&6; }
17783fi
17784
17785
17786  test -n "$ZIP" && break
17787done
17788
17789  else
17790    # The variable is set, but is it from the command line or the environment?
17791
17792    # Try to remove the string !ZIP! from our list.
17793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17795      # If it failed, the variable was not from the command line. Ignore it,
17796      # but warn the user (except for BASH, which is always set by the calling BASH).
17797      if test "xZIP" != xBASH; then
17798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17799$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17800      fi
17801      # Try to locate tool using the code snippet
17802      for ac_prog in zip
17803do
17804  # Extract the first word of "$ac_prog", so it can be a program name with args.
17805set dummy $ac_prog; ac_word=$2
17806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17807$as_echo_n "checking for $ac_word... " >&6; }
17808if ${ac_cv_path_ZIP+:} false; then :
17809  $as_echo_n "(cached) " >&6
17810else
17811  case $ZIP in
17812  [\\/]* | ?:[\\/]*)
17813  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17814  ;;
17815  *)
17816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17817for as_dir in $PATH
17818do
17819  IFS=$as_save_IFS
17820  test -z "$as_dir" && as_dir=.
17821    for ac_exec_ext in '' $ac_executable_extensions; do
17822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17823    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17825    break 2
17826  fi
17827done
17828  done
17829IFS=$as_save_IFS
17830
17831  ;;
17832esac
17833fi
17834ZIP=$ac_cv_path_ZIP
17835if test -n "$ZIP"; then
17836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17837$as_echo "$ZIP" >&6; }
17838else
17839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17840$as_echo "no" >&6; }
17841fi
17842
17843
17844  test -n "$ZIP" && break
17845done
17846
17847    else
17848      # If it succeeded, then it was overridden by the user. We will use it
17849      # for the tool.
17850
17851      # First remove it from the list of overridden variables, so we can test
17852      # for unknown variables in the end.
17853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17854
17855      # Check if the provided tool contains a complete path.
17856      tool_specified="$ZIP"
17857      tool_basename="${tool_specified##*/}"
17858      if test "x$tool_basename" = "x$tool_specified"; then
17859        # A command without a complete path is provided, search $PATH.
17860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17861$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17862        # Extract the first word of "$tool_basename", so it can be a program name with args.
17863set dummy $tool_basename; ac_word=$2
17864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17865$as_echo_n "checking for $ac_word... " >&6; }
17866if ${ac_cv_path_ZIP+:} false; then :
17867  $as_echo_n "(cached) " >&6
17868else
17869  case $ZIP in
17870  [\\/]* | ?:[\\/]*)
17871  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17872  ;;
17873  *)
17874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17875for as_dir in $PATH
17876do
17877  IFS=$as_save_IFS
17878  test -z "$as_dir" && as_dir=.
17879    for ac_exec_ext in '' $ac_executable_extensions; do
17880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17881    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17883    break 2
17884  fi
17885done
17886  done
17887IFS=$as_save_IFS
17888
17889  ;;
17890esac
17891fi
17892ZIP=$ac_cv_path_ZIP
17893if test -n "$ZIP"; then
17894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17895$as_echo "$ZIP" >&6; }
17896else
17897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17898$as_echo "no" >&6; }
17899fi
17900
17901
17902        if test "x$ZIP" = x; then
17903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17904        fi
17905      else
17906        # Otherwise we believe it is a complete path. Use it as it is.
17907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17908$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17910$as_echo_n "checking for ZIP... " >&6; }
17911        if test ! -x "$tool_specified"; then
17912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17913$as_echo "not found" >&6; }
17914          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17915        fi
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17917$as_echo "$tool_specified" >&6; }
17918      fi
17919    fi
17920  fi
17921
17922
17923
17924  if test "x$ZIP" = x; then
17925    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17926  fi
17927
17928
17929
17930  # Non-required basic tools
17931
17932
17933
17934  # Publish this variable in the help.
17935
17936
17937  if test "x$LDD" = x; then
17938    # The variable is not set by user, try to locate tool using the code snippet
17939    for ac_prog in ldd
17940do
17941  # Extract the first word of "$ac_prog", so it can be a program name with args.
17942set dummy $ac_prog; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_path_LDD+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  case $LDD in
17949  [\\/]* | ?:[\\/]*)
17950  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17951  ;;
17952  *)
17953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17954for as_dir in $PATH
17955do
17956  IFS=$as_save_IFS
17957  test -z "$as_dir" && as_dir=.
17958    for ac_exec_ext in '' $ac_executable_extensions; do
17959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17960    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17962    break 2
17963  fi
17964done
17965  done
17966IFS=$as_save_IFS
17967
17968  ;;
17969esac
17970fi
17971LDD=$ac_cv_path_LDD
17972if test -n "$LDD"; then
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17974$as_echo "$LDD" >&6; }
17975else
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977$as_echo "no" >&6; }
17978fi
17979
17980
17981  test -n "$LDD" && break
17982done
17983
17984  else
17985    # The variable is set, but is it from the command line or the environment?
17986
17987    # Try to remove the string !LDD! from our list.
17988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17990      # If it failed, the variable was not from the command line. Ignore it,
17991      # but warn the user (except for BASH, which is always set by the calling BASH).
17992      if test "xLDD" != xBASH; then
17993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17994$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17995      fi
17996      # Try to locate tool using the code snippet
17997      for ac_prog in ldd
17998do
17999  # Extract the first word of "$ac_prog", so it can be a program name with args.
18000set dummy $ac_prog; ac_word=$2
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18002$as_echo_n "checking for $ac_word... " >&6; }
18003if ${ac_cv_path_LDD+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  case $LDD in
18007  [\\/]* | ?:[\\/]*)
18008  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18009  ;;
18010  *)
18011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18012for as_dir in $PATH
18013do
18014  IFS=$as_save_IFS
18015  test -z "$as_dir" && as_dir=.
18016    for ac_exec_ext in '' $ac_executable_extensions; do
18017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18018    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18020    break 2
18021  fi
18022done
18023  done
18024IFS=$as_save_IFS
18025
18026  ;;
18027esac
18028fi
18029LDD=$ac_cv_path_LDD
18030if test -n "$LDD"; then
18031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18032$as_echo "$LDD" >&6; }
18033else
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18035$as_echo "no" >&6; }
18036fi
18037
18038
18039  test -n "$LDD" && break
18040done
18041
18042    else
18043      # If it succeeded, then it was overridden by the user. We will use it
18044      # for the tool.
18045
18046      # First remove it from the list of overridden variables, so we can test
18047      # for unknown variables in the end.
18048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18049
18050      # Check if the provided tool contains a complete path.
18051      tool_specified="$LDD"
18052      tool_basename="${tool_specified##*/}"
18053      if test "x$tool_basename" = "x$tool_specified"; then
18054        # A command without a complete path is provided, search $PATH.
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18056$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18057        # Extract the first word of "$tool_basename", so it can be a program name with args.
18058set dummy $tool_basename; ac_word=$2
18059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18060$as_echo_n "checking for $ac_word... " >&6; }
18061if ${ac_cv_path_LDD+:} false; then :
18062  $as_echo_n "(cached) " >&6
18063else
18064  case $LDD in
18065  [\\/]* | ?:[\\/]*)
18066  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18067  ;;
18068  *)
18069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18070for as_dir in $PATH
18071do
18072  IFS=$as_save_IFS
18073  test -z "$as_dir" && as_dir=.
18074    for ac_exec_ext in '' $ac_executable_extensions; do
18075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18076    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18078    break 2
18079  fi
18080done
18081  done
18082IFS=$as_save_IFS
18083
18084  ;;
18085esac
18086fi
18087LDD=$ac_cv_path_LDD
18088if test -n "$LDD"; then
18089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18090$as_echo "$LDD" >&6; }
18091else
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18093$as_echo "no" >&6; }
18094fi
18095
18096
18097        if test "x$LDD" = x; then
18098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18099        fi
18100      else
18101        # Otherwise we believe it is a complete path. Use it as it is.
18102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18103$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18105$as_echo_n "checking for LDD... " >&6; }
18106        if test ! -x "$tool_specified"; then
18107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18108$as_echo "not found" >&6; }
18109          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18110        fi
18111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18112$as_echo "$tool_specified" >&6; }
18113      fi
18114    fi
18115  fi
18116
18117
18118  if test "x$LDD" = "x"; then
18119    # List shared lib dependencies is used for
18120    # debug output and checking for forbidden dependencies.
18121    # We can build without it.
18122    LDD="true"
18123  fi
18124
18125
18126  # Publish this variable in the help.
18127
18128
18129  if test "x$OTOOL" = x; then
18130    # The variable is not set by user, try to locate tool using the code snippet
18131    for ac_prog in otool
18132do
18133  # Extract the first word of "$ac_prog", so it can be a program name with args.
18134set dummy $ac_prog; ac_word=$2
18135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18136$as_echo_n "checking for $ac_word... " >&6; }
18137if ${ac_cv_path_OTOOL+:} false; then :
18138  $as_echo_n "(cached) " >&6
18139else
18140  case $OTOOL in
18141  [\\/]* | ?:[\\/]*)
18142  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18143  ;;
18144  *)
18145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146for as_dir in $PATH
18147do
18148  IFS=$as_save_IFS
18149  test -z "$as_dir" && as_dir=.
18150    for ac_exec_ext in '' $ac_executable_extensions; do
18151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18152    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18154    break 2
18155  fi
18156done
18157  done
18158IFS=$as_save_IFS
18159
18160  ;;
18161esac
18162fi
18163OTOOL=$ac_cv_path_OTOOL
18164if test -n "$OTOOL"; then
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18166$as_echo "$OTOOL" >&6; }
18167else
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18169$as_echo "no" >&6; }
18170fi
18171
18172
18173  test -n "$OTOOL" && break
18174done
18175
18176  else
18177    # The variable is set, but is it from the command line or the environment?
18178
18179    # Try to remove the string !OTOOL! from our list.
18180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18182      # If it failed, the variable was not from the command line. Ignore it,
18183      # but warn the user (except for BASH, which is always set by the calling BASH).
18184      if test "xOTOOL" != xBASH; then
18185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18186$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18187      fi
18188      # Try to locate tool using the code snippet
18189      for ac_prog in otool
18190do
18191  # Extract the first word of "$ac_prog", so it can be a program name with args.
18192set dummy $ac_prog; ac_word=$2
18193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18194$as_echo_n "checking for $ac_word... " >&6; }
18195if ${ac_cv_path_OTOOL+:} false; then :
18196  $as_echo_n "(cached) " >&6
18197else
18198  case $OTOOL in
18199  [\\/]* | ?:[\\/]*)
18200  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18201  ;;
18202  *)
18203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18204for as_dir in $PATH
18205do
18206  IFS=$as_save_IFS
18207  test -z "$as_dir" && as_dir=.
18208    for ac_exec_ext in '' $ac_executable_extensions; do
18209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18210    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18212    break 2
18213  fi
18214done
18215  done
18216IFS=$as_save_IFS
18217
18218  ;;
18219esac
18220fi
18221OTOOL=$ac_cv_path_OTOOL
18222if test -n "$OTOOL"; then
18223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18224$as_echo "$OTOOL" >&6; }
18225else
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18227$as_echo "no" >&6; }
18228fi
18229
18230
18231  test -n "$OTOOL" && break
18232done
18233
18234    else
18235      # If it succeeded, then it was overridden by the user. We will use it
18236      # for the tool.
18237
18238      # First remove it from the list of overridden variables, so we can test
18239      # for unknown variables in the end.
18240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18241
18242      # Check if the provided tool contains a complete path.
18243      tool_specified="$OTOOL"
18244      tool_basename="${tool_specified##*/}"
18245      if test "x$tool_basename" = "x$tool_specified"; then
18246        # A command without a complete path is provided, search $PATH.
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18248$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18249        # Extract the first word of "$tool_basename", so it can be a program name with args.
18250set dummy $tool_basename; ac_word=$2
18251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18252$as_echo_n "checking for $ac_word... " >&6; }
18253if ${ac_cv_path_OTOOL+:} false; then :
18254  $as_echo_n "(cached) " >&6
18255else
18256  case $OTOOL in
18257  [\\/]* | ?:[\\/]*)
18258  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18259  ;;
18260  *)
18261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18262for as_dir in $PATH
18263do
18264  IFS=$as_save_IFS
18265  test -z "$as_dir" && as_dir=.
18266    for ac_exec_ext in '' $ac_executable_extensions; do
18267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18268    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18270    break 2
18271  fi
18272done
18273  done
18274IFS=$as_save_IFS
18275
18276  ;;
18277esac
18278fi
18279OTOOL=$ac_cv_path_OTOOL
18280if test -n "$OTOOL"; then
18281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18282$as_echo "$OTOOL" >&6; }
18283else
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285$as_echo "no" >&6; }
18286fi
18287
18288
18289        if test "x$OTOOL" = x; then
18290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18291        fi
18292      else
18293        # Otherwise we believe it is a complete path. Use it as it is.
18294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18295$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18297$as_echo_n "checking for OTOOL... " >&6; }
18298        if test ! -x "$tool_specified"; then
18299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18300$as_echo "not found" >&6; }
18301          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18302        fi
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18304$as_echo "$tool_specified" >&6; }
18305      fi
18306    fi
18307  fi
18308
18309
18310  if test "x$OTOOL" = "x"; then
18311    OTOOL="true"
18312  fi
18313
18314
18315  # Publish this variable in the help.
18316
18317
18318  if test "x$READELF" = x; then
18319    # The variable is not set by user, try to locate tool using the code snippet
18320    for ac_prog in greadelf readelf
18321do
18322  # Extract the first word of "$ac_prog", so it can be a program name with args.
18323set dummy $ac_prog; ac_word=$2
18324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18325$as_echo_n "checking for $ac_word... " >&6; }
18326if ${ac_cv_path_READELF+:} false; then :
18327  $as_echo_n "(cached) " >&6
18328else
18329  case $READELF in
18330  [\\/]* | ?:[\\/]*)
18331  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18332  ;;
18333  *)
18334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18335for as_dir in $PATH
18336do
18337  IFS=$as_save_IFS
18338  test -z "$as_dir" && as_dir=.
18339    for ac_exec_ext in '' $ac_executable_extensions; do
18340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18341    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18343    break 2
18344  fi
18345done
18346  done
18347IFS=$as_save_IFS
18348
18349  ;;
18350esac
18351fi
18352READELF=$ac_cv_path_READELF
18353if test -n "$READELF"; then
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18355$as_echo "$READELF" >&6; }
18356else
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18358$as_echo "no" >&6; }
18359fi
18360
18361
18362  test -n "$READELF" && break
18363done
18364
18365  else
18366    # The variable is set, but is it from the command line or the environment?
18367
18368    # Try to remove the string !READELF! from our list.
18369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18371      # If it failed, the variable was not from the command line. Ignore it,
18372      # but warn the user (except for BASH, which is always set by the calling BASH).
18373      if test "xREADELF" != xBASH; then
18374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18375$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18376      fi
18377      # Try to locate tool using the code snippet
18378      for ac_prog in greadelf readelf
18379do
18380  # Extract the first word of "$ac_prog", so it can be a program name with args.
18381set dummy $ac_prog; ac_word=$2
18382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18383$as_echo_n "checking for $ac_word... " >&6; }
18384if ${ac_cv_path_READELF+:} false; then :
18385  $as_echo_n "(cached) " >&6
18386else
18387  case $READELF in
18388  [\\/]* | ?:[\\/]*)
18389  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18390  ;;
18391  *)
18392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18393for as_dir in $PATH
18394do
18395  IFS=$as_save_IFS
18396  test -z "$as_dir" && as_dir=.
18397    for ac_exec_ext in '' $ac_executable_extensions; do
18398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18399    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18401    break 2
18402  fi
18403done
18404  done
18405IFS=$as_save_IFS
18406
18407  ;;
18408esac
18409fi
18410READELF=$ac_cv_path_READELF
18411if test -n "$READELF"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18413$as_echo "$READELF" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420  test -n "$READELF" && break
18421done
18422
18423    else
18424      # If it succeeded, then it was overridden by the user. We will use it
18425      # for the tool.
18426
18427      # First remove it from the list of overridden variables, so we can test
18428      # for unknown variables in the end.
18429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18430
18431      # Check if the provided tool contains a complete path.
18432      tool_specified="$READELF"
18433      tool_basename="${tool_specified##*/}"
18434      if test "x$tool_basename" = "x$tool_specified"; then
18435        # A command without a complete path is provided, search $PATH.
18436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18437$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18438        # Extract the first word of "$tool_basename", so it can be a program name with args.
18439set dummy $tool_basename; ac_word=$2
18440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18441$as_echo_n "checking for $ac_word... " >&6; }
18442if ${ac_cv_path_READELF+:} false; then :
18443  $as_echo_n "(cached) " >&6
18444else
18445  case $READELF in
18446  [\\/]* | ?:[\\/]*)
18447  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18448  ;;
18449  *)
18450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18451for as_dir in $PATH
18452do
18453  IFS=$as_save_IFS
18454  test -z "$as_dir" && as_dir=.
18455    for ac_exec_ext in '' $ac_executable_extensions; do
18456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18457    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18459    break 2
18460  fi
18461done
18462  done
18463IFS=$as_save_IFS
18464
18465  ;;
18466esac
18467fi
18468READELF=$ac_cv_path_READELF
18469if test -n "$READELF"; then
18470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18471$as_echo "$READELF" >&6; }
18472else
18473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18474$as_echo "no" >&6; }
18475fi
18476
18477
18478        if test "x$READELF" = x; then
18479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18480        fi
18481      else
18482        # Otherwise we believe it is a complete path. Use it as it is.
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18484$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18486$as_echo_n "checking for READELF... " >&6; }
18487        if test ! -x "$tool_specified"; then
18488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18489$as_echo "not found" >&6; }
18490          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18491        fi
18492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18493$as_echo "$tool_specified" >&6; }
18494      fi
18495    fi
18496  fi
18497
18498
18499
18500
18501  # Publish this variable in the help.
18502
18503
18504  if test "x$HG" = x; then
18505    # The variable is not set by user, try to locate tool using the code snippet
18506    for ac_prog in hg
18507do
18508  # Extract the first word of "$ac_prog", so it can be a program name with args.
18509set dummy $ac_prog; ac_word=$2
18510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18511$as_echo_n "checking for $ac_word... " >&6; }
18512if ${ac_cv_path_HG+:} false; then :
18513  $as_echo_n "(cached) " >&6
18514else
18515  case $HG in
18516  [\\/]* | ?:[\\/]*)
18517  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18518  ;;
18519  *)
18520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18521for as_dir in $PATH
18522do
18523  IFS=$as_save_IFS
18524  test -z "$as_dir" && as_dir=.
18525    for ac_exec_ext in '' $ac_executable_extensions; do
18526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18527    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18529    break 2
18530  fi
18531done
18532  done
18533IFS=$as_save_IFS
18534
18535  ;;
18536esac
18537fi
18538HG=$ac_cv_path_HG
18539if test -n "$HG"; then
18540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18541$as_echo "$HG" >&6; }
18542else
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18544$as_echo "no" >&6; }
18545fi
18546
18547
18548  test -n "$HG" && break
18549done
18550
18551  else
18552    # The variable is set, but is it from the command line or the environment?
18553
18554    # Try to remove the string !HG! from our list.
18555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18557      # If it failed, the variable was not from the command line. Ignore it,
18558      # but warn the user (except for BASH, which is always set by the calling BASH).
18559      if test "xHG" != xBASH; then
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18561$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18562      fi
18563      # Try to locate tool using the code snippet
18564      for ac_prog in hg
18565do
18566  # Extract the first word of "$ac_prog", so it can be a program name with args.
18567set dummy $ac_prog; ac_word=$2
18568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18569$as_echo_n "checking for $ac_word... " >&6; }
18570if ${ac_cv_path_HG+:} false; then :
18571  $as_echo_n "(cached) " >&6
18572else
18573  case $HG in
18574  [\\/]* | ?:[\\/]*)
18575  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18576  ;;
18577  *)
18578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18579for as_dir in $PATH
18580do
18581  IFS=$as_save_IFS
18582  test -z "$as_dir" && as_dir=.
18583    for ac_exec_ext in '' $ac_executable_extensions; do
18584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18585    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18587    break 2
18588  fi
18589done
18590  done
18591IFS=$as_save_IFS
18592
18593  ;;
18594esac
18595fi
18596HG=$ac_cv_path_HG
18597if test -n "$HG"; then
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18599$as_echo "$HG" >&6; }
18600else
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602$as_echo "no" >&6; }
18603fi
18604
18605
18606  test -n "$HG" && break
18607done
18608
18609    else
18610      # If it succeeded, then it was overridden by the user. We will use it
18611      # for the tool.
18612
18613      # First remove it from the list of overridden variables, so we can test
18614      # for unknown variables in the end.
18615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18616
18617      # Check if the provided tool contains a complete path.
18618      tool_specified="$HG"
18619      tool_basename="${tool_specified##*/}"
18620      if test "x$tool_basename" = "x$tool_specified"; then
18621        # A command without a complete path is provided, search $PATH.
18622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18623$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18624        # Extract the first word of "$tool_basename", so it can be a program name with args.
18625set dummy $tool_basename; ac_word=$2
18626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18627$as_echo_n "checking for $ac_word... " >&6; }
18628if ${ac_cv_path_HG+:} false; then :
18629  $as_echo_n "(cached) " >&6
18630else
18631  case $HG in
18632  [\\/]* | ?:[\\/]*)
18633  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18634  ;;
18635  *)
18636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18637for as_dir in $PATH
18638do
18639  IFS=$as_save_IFS
18640  test -z "$as_dir" && as_dir=.
18641    for ac_exec_ext in '' $ac_executable_extensions; do
18642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18643    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18645    break 2
18646  fi
18647done
18648  done
18649IFS=$as_save_IFS
18650
18651  ;;
18652esac
18653fi
18654HG=$ac_cv_path_HG
18655if test -n "$HG"; then
18656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18657$as_echo "$HG" >&6; }
18658else
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18660$as_echo "no" >&6; }
18661fi
18662
18663
18664        if test "x$HG" = x; then
18665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18666        fi
18667      else
18668        # Otherwise we believe it is a complete path. Use it as it is.
18669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18670$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18672$as_echo_n "checking for HG... " >&6; }
18673        if test ! -x "$tool_specified"; then
18674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18675$as_echo "not found" >&6; }
18676          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18677        fi
18678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18679$as_echo "$tool_specified" >&6; }
18680      fi
18681    fi
18682  fi
18683
18684
18685
18686
18687  # Publish this variable in the help.
18688
18689
18690  if test "x$STAT" = x; then
18691    # The variable is not set by user, try to locate tool using the code snippet
18692    for ac_prog in stat
18693do
18694  # Extract the first word of "$ac_prog", so it can be a program name with args.
18695set dummy $ac_prog; ac_word=$2
18696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18697$as_echo_n "checking for $ac_word... " >&6; }
18698if ${ac_cv_path_STAT+:} false; then :
18699  $as_echo_n "(cached) " >&6
18700else
18701  case $STAT in
18702  [\\/]* | ?:[\\/]*)
18703  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18704  ;;
18705  *)
18706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18707for as_dir in $PATH
18708do
18709  IFS=$as_save_IFS
18710  test -z "$as_dir" && as_dir=.
18711    for ac_exec_ext in '' $ac_executable_extensions; do
18712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18713    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18715    break 2
18716  fi
18717done
18718  done
18719IFS=$as_save_IFS
18720
18721  ;;
18722esac
18723fi
18724STAT=$ac_cv_path_STAT
18725if test -n "$STAT"; then
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18727$as_echo "$STAT" >&6; }
18728else
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730$as_echo "no" >&6; }
18731fi
18732
18733
18734  test -n "$STAT" && break
18735done
18736
18737  else
18738    # The variable is set, but is it from the command line or the environment?
18739
18740    # Try to remove the string !STAT! from our list.
18741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18743      # If it failed, the variable was not from the command line. Ignore it,
18744      # but warn the user (except for BASH, which is always set by the calling BASH).
18745      if test "xSTAT" != xBASH; then
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18747$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18748      fi
18749      # Try to locate tool using the code snippet
18750      for ac_prog in stat
18751do
18752  # Extract the first word of "$ac_prog", so it can be a program name with args.
18753set dummy $ac_prog; ac_word=$2
18754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18755$as_echo_n "checking for $ac_word... " >&6; }
18756if ${ac_cv_path_STAT+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  case $STAT in
18760  [\\/]* | ?:[\\/]*)
18761  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18762  ;;
18763  *)
18764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18765for as_dir in $PATH
18766do
18767  IFS=$as_save_IFS
18768  test -z "$as_dir" && as_dir=.
18769    for ac_exec_ext in '' $ac_executable_extensions; do
18770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18771    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18773    break 2
18774  fi
18775done
18776  done
18777IFS=$as_save_IFS
18778
18779  ;;
18780esac
18781fi
18782STAT=$ac_cv_path_STAT
18783if test -n "$STAT"; then
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18785$as_echo "$STAT" >&6; }
18786else
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788$as_echo "no" >&6; }
18789fi
18790
18791
18792  test -n "$STAT" && break
18793done
18794
18795    else
18796      # If it succeeded, then it was overridden by the user. We will use it
18797      # for the tool.
18798
18799      # First remove it from the list of overridden variables, so we can test
18800      # for unknown variables in the end.
18801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18802
18803      # Check if the provided tool contains a complete path.
18804      tool_specified="$STAT"
18805      tool_basename="${tool_specified##*/}"
18806      if test "x$tool_basename" = "x$tool_specified"; then
18807        # A command without a complete path is provided, search $PATH.
18808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18809$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18810        # Extract the first word of "$tool_basename", so it can be a program name with args.
18811set dummy $tool_basename; ac_word=$2
18812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18813$as_echo_n "checking for $ac_word... " >&6; }
18814if ${ac_cv_path_STAT+:} false; then :
18815  $as_echo_n "(cached) " >&6
18816else
18817  case $STAT in
18818  [\\/]* | ?:[\\/]*)
18819  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18820  ;;
18821  *)
18822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18823for as_dir in $PATH
18824do
18825  IFS=$as_save_IFS
18826  test -z "$as_dir" && as_dir=.
18827    for ac_exec_ext in '' $ac_executable_extensions; do
18828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18829    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18831    break 2
18832  fi
18833done
18834  done
18835IFS=$as_save_IFS
18836
18837  ;;
18838esac
18839fi
18840STAT=$ac_cv_path_STAT
18841if test -n "$STAT"; then
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18843$as_echo "$STAT" >&6; }
18844else
18845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18846$as_echo "no" >&6; }
18847fi
18848
18849
18850        if test "x$STAT" = x; then
18851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18852        fi
18853      else
18854        # Otherwise we believe it is a complete path. Use it as it is.
18855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18856$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18858$as_echo_n "checking for STAT... " >&6; }
18859        if test ! -x "$tool_specified"; then
18860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18861$as_echo "not found" >&6; }
18862          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18863        fi
18864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18865$as_echo "$tool_specified" >&6; }
18866      fi
18867    fi
18868  fi
18869
18870
18871
18872
18873  # Publish this variable in the help.
18874
18875
18876  if test "x$TIME" = x; then
18877    # The variable is not set by user, try to locate tool using the code snippet
18878    for ac_prog in time
18879do
18880  # Extract the first word of "$ac_prog", so it can be a program name with args.
18881set dummy $ac_prog; ac_word=$2
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18883$as_echo_n "checking for $ac_word... " >&6; }
18884if ${ac_cv_path_TIME+:} false; then :
18885  $as_echo_n "(cached) " >&6
18886else
18887  case $TIME in
18888  [\\/]* | ?:[\\/]*)
18889  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18890  ;;
18891  *)
18892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18893for as_dir in $PATH
18894do
18895  IFS=$as_save_IFS
18896  test -z "$as_dir" && as_dir=.
18897    for ac_exec_ext in '' $ac_executable_extensions; do
18898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18899    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18901    break 2
18902  fi
18903done
18904  done
18905IFS=$as_save_IFS
18906
18907  ;;
18908esac
18909fi
18910TIME=$ac_cv_path_TIME
18911if test -n "$TIME"; then
18912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18913$as_echo "$TIME" >&6; }
18914else
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916$as_echo "no" >&6; }
18917fi
18918
18919
18920  test -n "$TIME" && break
18921done
18922
18923  else
18924    # The variable is set, but is it from the command line or the environment?
18925
18926    # Try to remove the string !TIME! from our list.
18927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18929      # If it failed, the variable was not from the command line. Ignore it,
18930      # but warn the user (except for BASH, which is always set by the calling BASH).
18931      if test "xTIME" != xBASH; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18933$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18934      fi
18935      # Try to locate tool using the code snippet
18936      for ac_prog in time
18937do
18938  # Extract the first word of "$ac_prog", so it can be a program name with args.
18939set dummy $ac_prog; ac_word=$2
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18941$as_echo_n "checking for $ac_word... " >&6; }
18942if ${ac_cv_path_TIME+:} false; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  case $TIME in
18946  [\\/]* | ?:[\\/]*)
18947  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18948  ;;
18949  *)
18950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18951for as_dir in $PATH
18952do
18953  IFS=$as_save_IFS
18954  test -z "$as_dir" && as_dir=.
18955    for ac_exec_ext in '' $ac_executable_extensions; do
18956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18957    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18959    break 2
18960  fi
18961done
18962  done
18963IFS=$as_save_IFS
18964
18965  ;;
18966esac
18967fi
18968TIME=$ac_cv_path_TIME
18969if test -n "$TIME"; then
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18971$as_echo "$TIME" >&6; }
18972else
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18974$as_echo "no" >&6; }
18975fi
18976
18977
18978  test -n "$TIME" && break
18979done
18980
18981    else
18982      # If it succeeded, then it was overridden by the user. We will use it
18983      # for the tool.
18984
18985      # First remove it from the list of overridden variables, so we can test
18986      # for unknown variables in the end.
18987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18988
18989      # Check if the provided tool contains a complete path.
18990      tool_specified="$TIME"
18991      tool_basename="${tool_specified##*/}"
18992      if test "x$tool_basename" = "x$tool_specified"; then
18993        # A command without a complete path is provided, search $PATH.
18994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18995$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18996        # Extract the first word of "$tool_basename", so it can be a program name with args.
18997set dummy $tool_basename; ac_word=$2
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18999$as_echo_n "checking for $ac_word... " >&6; }
19000if ${ac_cv_path_TIME+:} false; then :
19001  $as_echo_n "(cached) " >&6
19002else
19003  case $TIME in
19004  [\\/]* | ?:[\\/]*)
19005  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19006  ;;
19007  *)
19008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19009for as_dir in $PATH
19010do
19011  IFS=$as_save_IFS
19012  test -z "$as_dir" && as_dir=.
19013    for ac_exec_ext in '' $ac_executable_extensions; do
19014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19015    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19017    break 2
19018  fi
19019done
19020  done
19021IFS=$as_save_IFS
19022
19023  ;;
19024esac
19025fi
19026TIME=$ac_cv_path_TIME
19027if test -n "$TIME"; then
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19029$as_echo "$TIME" >&6; }
19030else
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032$as_echo "no" >&6; }
19033fi
19034
19035
19036        if test "x$TIME" = x; then
19037          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19038        fi
19039      else
19040        # Otherwise we believe it is a complete path. Use it as it is.
19041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19042$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19044$as_echo_n "checking for TIME... " >&6; }
19045        if test ! -x "$tool_specified"; then
19046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19047$as_echo "not found" >&6; }
19048          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19049        fi
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19051$as_echo "$tool_specified" >&6; }
19052      fi
19053    fi
19054  fi
19055
19056
19057  # Check if it's GNU time
19058  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19059  if test "x$IS_GNU_TIME" != x; then
19060    IS_GNU_TIME=yes
19061  else
19062    IS_GNU_TIME=no
19063  fi
19064
19065
19066  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19067
19068
19069
19070  # Publish this variable in the help.
19071
19072
19073  if test "x$DSYMUTIL" = x; then
19074    # The variable is not set by user, try to locate tool using the code snippet
19075    for ac_prog in dsymutil
19076do
19077  # Extract the first word of "$ac_prog", so it can be a program name with args.
19078set dummy $ac_prog; ac_word=$2
19079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19080$as_echo_n "checking for $ac_word... " >&6; }
19081if ${ac_cv_path_DSYMUTIL+:} false; then :
19082  $as_echo_n "(cached) " >&6
19083else
19084  case $DSYMUTIL in
19085  [\\/]* | ?:[\\/]*)
19086  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19087  ;;
19088  *)
19089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19090for as_dir in $PATH
19091do
19092  IFS=$as_save_IFS
19093  test -z "$as_dir" && as_dir=.
19094    for ac_exec_ext in '' $ac_executable_extensions; do
19095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19096    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19098    break 2
19099  fi
19100done
19101  done
19102IFS=$as_save_IFS
19103
19104  ;;
19105esac
19106fi
19107DSYMUTIL=$ac_cv_path_DSYMUTIL
19108if test -n "$DSYMUTIL"; then
19109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19110$as_echo "$DSYMUTIL" >&6; }
19111else
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19113$as_echo "no" >&6; }
19114fi
19115
19116
19117  test -n "$DSYMUTIL" && break
19118done
19119
19120  else
19121    # The variable is set, but is it from the command line or the environment?
19122
19123    # Try to remove the string !DSYMUTIL! from our list.
19124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19126      # If it failed, the variable was not from the command line. Ignore it,
19127      # but warn the user (except for BASH, which is always set by the calling BASH).
19128      if test "xDSYMUTIL" != xBASH; then
19129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19130$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19131      fi
19132      # Try to locate tool using the code snippet
19133      for ac_prog in dsymutil
19134do
19135  # Extract the first word of "$ac_prog", so it can be a program name with args.
19136set dummy $ac_prog; ac_word=$2
19137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19138$as_echo_n "checking for $ac_word... " >&6; }
19139if ${ac_cv_path_DSYMUTIL+:} false; then :
19140  $as_echo_n "(cached) " >&6
19141else
19142  case $DSYMUTIL in
19143  [\\/]* | ?:[\\/]*)
19144  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19145  ;;
19146  *)
19147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19148for as_dir in $PATH
19149do
19150  IFS=$as_save_IFS
19151  test -z "$as_dir" && as_dir=.
19152    for ac_exec_ext in '' $ac_executable_extensions; do
19153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19154    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19156    break 2
19157  fi
19158done
19159  done
19160IFS=$as_save_IFS
19161
19162  ;;
19163esac
19164fi
19165DSYMUTIL=$ac_cv_path_DSYMUTIL
19166if test -n "$DSYMUTIL"; then
19167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19168$as_echo "$DSYMUTIL" >&6; }
19169else
19170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19171$as_echo "no" >&6; }
19172fi
19173
19174
19175  test -n "$DSYMUTIL" && break
19176done
19177
19178    else
19179      # If it succeeded, then it was overridden by the user. We will use it
19180      # for the tool.
19181
19182      # First remove it from the list of overridden variables, so we can test
19183      # for unknown variables in the end.
19184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19185
19186      # Check if the provided tool contains a complete path.
19187      tool_specified="$DSYMUTIL"
19188      tool_basename="${tool_specified##*/}"
19189      if test "x$tool_basename" = "x$tool_specified"; then
19190        # A command without a complete path is provided, search $PATH.
19191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19192$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19193        # Extract the first word of "$tool_basename", so it can be a program name with args.
19194set dummy $tool_basename; ac_word=$2
19195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19196$as_echo_n "checking for $ac_word... " >&6; }
19197if ${ac_cv_path_DSYMUTIL+:} false; then :
19198  $as_echo_n "(cached) " >&6
19199else
19200  case $DSYMUTIL in
19201  [\\/]* | ?:[\\/]*)
19202  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19203  ;;
19204  *)
19205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19206for as_dir in $PATH
19207do
19208  IFS=$as_save_IFS
19209  test -z "$as_dir" && as_dir=.
19210    for ac_exec_ext in '' $ac_executable_extensions; do
19211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19212    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19214    break 2
19215  fi
19216done
19217  done
19218IFS=$as_save_IFS
19219
19220  ;;
19221esac
19222fi
19223DSYMUTIL=$ac_cv_path_DSYMUTIL
19224if test -n "$DSYMUTIL"; then
19225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19226$as_echo "$DSYMUTIL" >&6; }
19227else
19228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19229$as_echo "no" >&6; }
19230fi
19231
19232
19233        if test "x$DSYMUTIL" = x; then
19234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19235        fi
19236      else
19237        # Otherwise we believe it is a complete path. Use it as it is.
19238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19239$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19241$as_echo_n "checking for DSYMUTIL... " >&6; }
19242        if test ! -x "$tool_specified"; then
19243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19244$as_echo "not found" >&6; }
19245          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19246        fi
19247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19248$as_echo "$tool_specified" >&6; }
19249      fi
19250    fi
19251  fi
19252
19253
19254
19255  if test "x$DSYMUTIL" = x; then
19256    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19257  fi
19258
19259
19260
19261
19262
19263  # Publish this variable in the help.
19264
19265
19266  if test "x$XATTR" = x; then
19267    # The variable is not set by user, try to locate tool using the code snippet
19268    for ac_prog in xattr
19269do
19270  # Extract the first word of "$ac_prog", so it can be a program name with args.
19271set dummy $ac_prog; ac_word=$2
19272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19273$as_echo_n "checking for $ac_word... " >&6; }
19274if ${ac_cv_path_XATTR+:} false; then :
19275  $as_echo_n "(cached) " >&6
19276else
19277  case $XATTR in
19278  [\\/]* | ?:[\\/]*)
19279  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19280  ;;
19281  *)
19282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19283for as_dir in $PATH
19284do
19285  IFS=$as_save_IFS
19286  test -z "$as_dir" && as_dir=.
19287    for ac_exec_ext in '' $ac_executable_extensions; do
19288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19289    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19291    break 2
19292  fi
19293done
19294  done
19295IFS=$as_save_IFS
19296
19297  ;;
19298esac
19299fi
19300XATTR=$ac_cv_path_XATTR
19301if test -n "$XATTR"; then
19302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19303$as_echo "$XATTR" >&6; }
19304else
19305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19306$as_echo "no" >&6; }
19307fi
19308
19309
19310  test -n "$XATTR" && break
19311done
19312
19313  else
19314    # The variable is set, but is it from the command line or the environment?
19315
19316    # Try to remove the string !XATTR! from our list.
19317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19319      # If it failed, the variable was not from the command line. Ignore it,
19320      # but warn the user (except for BASH, which is always set by the calling BASH).
19321      if test "xXATTR" != xBASH; then
19322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19323$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19324      fi
19325      # Try to locate tool using the code snippet
19326      for ac_prog in xattr
19327do
19328  # Extract the first word of "$ac_prog", so it can be a program name with args.
19329set dummy $ac_prog; ac_word=$2
19330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19331$as_echo_n "checking for $ac_word... " >&6; }
19332if ${ac_cv_path_XATTR+:} false; then :
19333  $as_echo_n "(cached) " >&6
19334else
19335  case $XATTR in
19336  [\\/]* | ?:[\\/]*)
19337  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19338  ;;
19339  *)
19340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19341for as_dir in $PATH
19342do
19343  IFS=$as_save_IFS
19344  test -z "$as_dir" && as_dir=.
19345    for ac_exec_ext in '' $ac_executable_extensions; do
19346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19347    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19349    break 2
19350  fi
19351done
19352  done
19353IFS=$as_save_IFS
19354
19355  ;;
19356esac
19357fi
19358XATTR=$ac_cv_path_XATTR
19359if test -n "$XATTR"; then
19360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19361$as_echo "$XATTR" >&6; }
19362else
19363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19364$as_echo "no" >&6; }
19365fi
19366
19367
19368  test -n "$XATTR" && break
19369done
19370
19371    else
19372      # If it succeeded, then it was overridden by the user. We will use it
19373      # for the tool.
19374
19375      # First remove it from the list of overridden variables, so we can test
19376      # for unknown variables in the end.
19377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19378
19379      # Check if the provided tool contains a complete path.
19380      tool_specified="$XATTR"
19381      tool_basename="${tool_specified##*/}"
19382      if test "x$tool_basename" = "x$tool_specified"; then
19383        # A command without a complete path is provided, search $PATH.
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19385$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19386        # Extract the first word of "$tool_basename", so it can be a program name with args.
19387set dummy $tool_basename; ac_word=$2
19388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19389$as_echo_n "checking for $ac_word... " >&6; }
19390if ${ac_cv_path_XATTR+:} false; then :
19391  $as_echo_n "(cached) " >&6
19392else
19393  case $XATTR in
19394  [\\/]* | ?:[\\/]*)
19395  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19396  ;;
19397  *)
19398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19399for as_dir in $PATH
19400do
19401  IFS=$as_save_IFS
19402  test -z "$as_dir" && as_dir=.
19403    for ac_exec_ext in '' $ac_executable_extensions; do
19404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19405    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19407    break 2
19408  fi
19409done
19410  done
19411IFS=$as_save_IFS
19412
19413  ;;
19414esac
19415fi
19416XATTR=$ac_cv_path_XATTR
19417if test -n "$XATTR"; then
19418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19419$as_echo "$XATTR" >&6; }
19420else
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19422$as_echo "no" >&6; }
19423fi
19424
19425
19426        if test "x$XATTR" = x; then
19427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19428        fi
19429      else
19430        # Otherwise we believe it is a complete path. Use it as it is.
19431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19432$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19434$as_echo_n "checking for XATTR... " >&6; }
19435        if test ! -x "$tool_specified"; then
19436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19437$as_echo "not found" >&6; }
19438          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19439        fi
19440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19441$as_echo "$tool_specified" >&6; }
19442      fi
19443    fi
19444  fi
19445
19446
19447
19448  if test "x$XATTR" = x; then
19449    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19450  fi
19451
19452
19453
19454
19455  # Publish this variable in the help.
19456
19457
19458  if test "x$CODESIGN" = x; then
19459    # The variable is not set by user, try to locate tool using the code snippet
19460    for ac_prog in codesign
19461do
19462  # Extract the first word of "$ac_prog", so it can be a program name with args.
19463set dummy $ac_prog; ac_word=$2
19464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19465$as_echo_n "checking for $ac_word... " >&6; }
19466if ${ac_cv_path_CODESIGN+:} false; then :
19467  $as_echo_n "(cached) " >&6
19468else
19469  case $CODESIGN in
19470  [\\/]* | ?:[\\/]*)
19471  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19472  ;;
19473  *)
19474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19475for as_dir in $PATH
19476do
19477  IFS=$as_save_IFS
19478  test -z "$as_dir" && as_dir=.
19479    for ac_exec_ext in '' $ac_executable_extensions; do
19480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19481    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19483    break 2
19484  fi
19485done
19486  done
19487IFS=$as_save_IFS
19488
19489  ;;
19490esac
19491fi
19492CODESIGN=$ac_cv_path_CODESIGN
19493if test -n "$CODESIGN"; then
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19495$as_echo "$CODESIGN" >&6; }
19496else
19497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19498$as_echo "no" >&6; }
19499fi
19500
19501
19502  test -n "$CODESIGN" && break
19503done
19504
19505  else
19506    # The variable is set, but is it from the command line or the environment?
19507
19508    # Try to remove the string !CODESIGN! from our list.
19509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19511      # If it failed, the variable was not from the command line. Ignore it,
19512      # but warn the user (except for BASH, which is always set by the calling BASH).
19513      if test "xCODESIGN" != xBASH; then
19514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19515$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19516      fi
19517      # Try to locate tool using the code snippet
19518      for ac_prog in codesign
19519do
19520  # Extract the first word of "$ac_prog", so it can be a program name with args.
19521set dummy $ac_prog; ac_word=$2
19522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19523$as_echo_n "checking for $ac_word... " >&6; }
19524if ${ac_cv_path_CODESIGN+:} false; then :
19525  $as_echo_n "(cached) " >&6
19526else
19527  case $CODESIGN in
19528  [\\/]* | ?:[\\/]*)
19529  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19530  ;;
19531  *)
19532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19533for as_dir in $PATH
19534do
19535  IFS=$as_save_IFS
19536  test -z "$as_dir" && as_dir=.
19537    for ac_exec_ext in '' $ac_executable_extensions; do
19538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19539    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19541    break 2
19542  fi
19543done
19544  done
19545IFS=$as_save_IFS
19546
19547  ;;
19548esac
19549fi
19550CODESIGN=$ac_cv_path_CODESIGN
19551if test -n "$CODESIGN"; then
19552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19553$as_echo "$CODESIGN" >&6; }
19554else
19555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19556$as_echo "no" >&6; }
19557fi
19558
19559
19560  test -n "$CODESIGN" && break
19561done
19562
19563    else
19564      # If it succeeded, then it was overridden by the user. We will use it
19565      # for the tool.
19566
19567      # First remove it from the list of overridden variables, so we can test
19568      # for unknown variables in the end.
19569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19570
19571      # Check if the provided tool contains a complete path.
19572      tool_specified="$CODESIGN"
19573      tool_basename="${tool_specified##*/}"
19574      if test "x$tool_basename" = "x$tool_specified"; then
19575        # A command without a complete path is provided, search $PATH.
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19577$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19578        # Extract the first word of "$tool_basename", so it can be a program name with args.
19579set dummy $tool_basename; ac_word=$2
19580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19581$as_echo_n "checking for $ac_word... " >&6; }
19582if ${ac_cv_path_CODESIGN+:} false; then :
19583  $as_echo_n "(cached) " >&6
19584else
19585  case $CODESIGN in
19586  [\\/]* | ?:[\\/]*)
19587  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19588  ;;
19589  *)
19590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19591for as_dir in $PATH
19592do
19593  IFS=$as_save_IFS
19594  test -z "$as_dir" && as_dir=.
19595    for ac_exec_ext in '' $ac_executable_extensions; do
19596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19597    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19599    break 2
19600  fi
19601done
19602  done
19603IFS=$as_save_IFS
19604
19605  ;;
19606esac
19607fi
19608CODESIGN=$ac_cv_path_CODESIGN
19609if test -n "$CODESIGN"; then
19610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19611$as_echo "$CODESIGN" >&6; }
19612else
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19614$as_echo "no" >&6; }
19615fi
19616
19617
19618        if test "x$CODESIGN" = x; then
19619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19620        fi
19621      else
19622        # Otherwise we believe it is a complete path. Use it as it is.
19623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19624$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19626$as_echo_n "checking for CODESIGN... " >&6; }
19627        if test ! -x "$tool_specified"; then
19628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19629$as_echo "not found" >&6; }
19630          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19631        fi
19632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19633$as_echo "$tool_specified" >&6; }
19634      fi
19635    fi
19636  fi
19637
19638
19639    if test "x$CODESIGN" != "x"; then
19640      # Verify that the openjdk_codesign certificate is present
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19642$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19643      rm -f codesign-testfile
19644      touch codesign-testfile
19645      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19646      rm -f codesign-testfile
19647      if test "x$CODESIGN" = x; then
19648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19649$as_echo "no" >&6; }
19650      else
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19652$as_echo "yes" >&6; }
19653      fi
19654    fi
19655  fi
19656
19657
19658  # Test if bash supports pipefail.
19659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19660$as_echo_n "checking if bash supports pipefail... " >&6; }
19661  if ${BASH} -c 'set -o pipefail'; then
19662    BASH_ARGS="$BASH_ARGS -o pipefail"
19663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19664$as_echo "yes" >&6; }
19665  else
19666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19667$as_echo "no" >&6; }
19668  fi
19669
19670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19671$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19672  if ${BASH} -e -c 'true'; then
19673    BASH_ARGS="$BASH_ARGS -e"
19674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19675$as_echo "yes" >&6; }
19676  else
19677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19678$as_echo "no" >&6; }
19679  fi
19680
19681
19682
19683
19684# Check if pkg-config is available.
19685
19686
19687if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19688	if test -n "$ac_tool_prefix"; then
19689  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19690set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19692$as_echo_n "checking for $ac_word... " >&6; }
19693if ${ac_cv_path_PKG_CONFIG+:} false; then :
19694  $as_echo_n "(cached) " >&6
19695else
19696  case $PKG_CONFIG in
19697  [\\/]* | ?:[\\/]*)
19698  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19699  ;;
19700  *)
19701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19702for as_dir in $PATH
19703do
19704  IFS=$as_save_IFS
19705  test -z "$as_dir" && as_dir=.
19706    for ac_exec_ext in '' $ac_executable_extensions; do
19707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19708    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19710    break 2
19711  fi
19712done
19713  done
19714IFS=$as_save_IFS
19715
19716  ;;
19717esac
19718fi
19719PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19720if test -n "$PKG_CONFIG"; then
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19722$as_echo "$PKG_CONFIG" >&6; }
19723else
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725$as_echo "no" >&6; }
19726fi
19727
19728
19729fi
19730if test -z "$ac_cv_path_PKG_CONFIG"; then
19731  ac_pt_PKG_CONFIG=$PKG_CONFIG
19732  # Extract the first word of "pkg-config", so it can be a program name with args.
19733set dummy pkg-config; ac_word=$2
19734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19735$as_echo_n "checking for $ac_word... " >&6; }
19736if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19737  $as_echo_n "(cached) " >&6
19738else
19739  case $ac_pt_PKG_CONFIG in
19740  [\\/]* | ?:[\\/]*)
19741  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19742  ;;
19743  *)
19744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19745for as_dir in $PATH
19746do
19747  IFS=$as_save_IFS
19748  test -z "$as_dir" && as_dir=.
19749    for ac_exec_ext in '' $ac_executable_extensions; do
19750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19751    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19753    break 2
19754  fi
19755done
19756  done
19757IFS=$as_save_IFS
19758
19759  ;;
19760esac
19761fi
19762ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19763if test -n "$ac_pt_PKG_CONFIG"; then
19764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19765$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19766else
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19768$as_echo "no" >&6; }
19769fi
19770
19771  if test "x$ac_pt_PKG_CONFIG" = x; then
19772    PKG_CONFIG=""
19773  else
19774    case $cross_compiling:$ac_tool_warned in
19775yes:)
19776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19778ac_tool_warned=yes ;;
19779esac
19780    PKG_CONFIG=$ac_pt_PKG_CONFIG
19781  fi
19782else
19783  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19784fi
19785
19786fi
19787if test -n "$PKG_CONFIG"; then
19788	_pkg_min_version=0.9.0
19789	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19790$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19791	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19792		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19793$as_echo "yes" >&6; }
19794	else
19795		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19796$as_echo "no" >&6; }
19797		PKG_CONFIG=""
19798	fi
19799
19800fi
19801
19802# After basic tools have been setup, we can check build os specific details.
19803
19804  ###############################################################################
19805
19806  # Note that this is the build platform OS version!
19807
19808  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19809  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19810  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19811  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19812
19813
19814
19815
19816
19817# Setup builddeps, for automatic downloading of tools we need.
19818# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19819# boot-jdk setup, but we need to have basic tools setup first.
19820
19821
19822# Check whether --with-builddeps-conf was given.
19823if test "${with_builddeps_conf+set}" = set; then :
19824  withval=$with_builddeps_conf;
19825fi
19826
19827
19828
19829# Check whether --with-builddeps-server was given.
19830if test "${with_builddeps_server+set}" = set; then :
19831  withval=$with_builddeps_server;
19832fi
19833
19834
19835
19836# Check whether --with-builddeps-dir was given.
19837if test "${with_builddeps_dir+set}" = set; then :
19838  withval=$with_builddeps_dir;
19839else
19840  with_builddeps_dir=/localhome/builddeps
19841fi
19842
19843
19844
19845# Check whether --with-builddeps-group was given.
19846if test "${with_builddeps_group+set}" = set; then :
19847  withval=$with_builddeps_group;
19848fi
19849
19850
19851
19852
19853  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19854    if test "x$with_builddeps_conf" != x; then
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19856$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19857      builddepsfile=$with_builddeps_conf
19858      if test -s $builddepsfile; then
19859        . $builddepsfile
19860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19861$as_echo "loaded!" >&6; }
19862      else
19863        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19864      fi
19865    else
19866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19867$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19868      builddepsfile=`mktemp`
19869      touch $builddepsfile
19870      # Put all found confs into a single file.
19871      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19872      # Source the file to acquire the variables
19873      if test -s $builddepsfile; then
19874        . $builddepsfile
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19876$as_echo "found at least one!" >&6; }
19877      else
19878        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19879      fi
19880    fi
19881    # Create build and target names that use _ instead of "-" and ".".
19882    # This is necessary to use them in variable names.
19883    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19884    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19885    # Extract rewrite information for build and target
19886    eval rewritten_build=\${REWRITE_${build_var}}
19887    if test "x$rewritten_build" = x; then
19888      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19889      echo Build stays the same $rewritten_build
19890    else
19891      echo Rewriting build for builddeps into $rewritten_build
19892    fi
19893    eval rewritten_target=\${REWRITE_${target_var}}
19894    if test "x$rewritten_target" = x; then
19895      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19896      echo Target stays the same $rewritten_target
19897    else
19898      echo Rewriting target for builddeps into $rewritten_target
19899    fi
19900    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19901    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19902  fi
19903  for ac_prog in 7z unzip
19904do
19905  # Extract the first word of "$ac_prog", so it can be a program name with args.
19906set dummy $ac_prog; ac_word=$2
19907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19908$as_echo_n "checking for $ac_word... " >&6; }
19909if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19910  $as_echo_n "(cached) " >&6
19911else
19912  if test -n "$BDEPS_UNZIP"; then
19913  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19914else
19915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19916for as_dir in $PATH
19917do
19918  IFS=$as_save_IFS
19919  test -z "$as_dir" && as_dir=.
19920    for ac_exec_ext in '' $ac_executable_extensions; do
19921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19922    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19924    break 2
19925  fi
19926done
19927  done
19928IFS=$as_save_IFS
19929
19930fi
19931fi
19932BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19933if test -n "$BDEPS_UNZIP"; then
19934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19935$as_echo "$BDEPS_UNZIP" >&6; }
19936else
19937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19938$as_echo "no" >&6; }
19939fi
19940
19941
19942  test -n "$BDEPS_UNZIP" && break
19943done
19944
19945  if test "x$BDEPS_UNZIP" = x7z; then
19946    BDEPS_UNZIP="7z x"
19947  fi
19948
19949  for ac_prog in wget lftp ftp
19950do
19951  # Extract the first word of "$ac_prog", so it can be a program name with args.
19952set dummy $ac_prog; ac_word=$2
19953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19954$as_echo_n "checking for $ac_word... " >&6; }
19955if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19956  $as_echo_n "(cached) " >&6
19957else
19958  if test -n "$BDEPS_FTP"; then
19959  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19960else
19961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19962for as_dir in $PATH
19963do
19964  IFS=$as_save_IFS
19965  test -z "$as_dir" && as_dir=.
19966    for ac_exec_ext in '' $ac_executable_extensions; do
19967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19968    ac_cv_prog_BDEPS_FTP="$ac_prog"
19969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19970    break 2
19971  fi
19972done
19973  done
19974IFS=$as_save_IFS
19975
19976fi
19977fi
19978BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19979if test -n "$BDEPS_FTP"; then
19980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19981$as_echo "$BDEPS_FTP" >&6; }
19982else
19983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19984$as_echo "no" >&6; }
19985fi
19986
19987
19988  test -n "$BDEPS_FTP" && break
19989done
19990
19991
19992
19993###############################################################################
19994#
19995# Determine OpenJDK variants, options and version numbers.
19996#
19997###############################################################################
19998
19999# We need build & target for this.
20000
20001
20002  ###############################################################################
20003  #
20004  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20005  # We always build headless support.
20006  #
20007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20008$as_echo_n "checking headful support... " >&6; }
20009  # Check whether --enable-headful was given.
20010if test "${enable_headful+set}" = set; then :
20011  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20012else
20013  SUPPORT_HEADFUL=yes
20014fi
20015
20016
20017  SUPPORT_HEADLESS=yes
20018  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20019
20020  if test "x$SUPPORT_HEADFUL" = xyes; then
20021    # We are building both headful and headless.
20022    headful_msg="include support for both headful and headless"
20023  fi
20024
20025  if test "x$SUPPORT_HEADFUL" = xno; then
20026    # Thus we are building headless only.
20027    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20028    headful_msg="headless only"
20029  fi
20030
20031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20032$as_echo "$headful_msg" >&6; }
20033
20034
20035
20036
20037
20038  # Control wether Hotspot runs Queens test after build.
20039  # Check whether --enable-hotspot-test-in-build was given.
20040if test "${enable_hotspot_test_in_build+set}" = set; then :
20041  enableval=$enable_hotspot_test_in_build;
20042else
20043  enable_hotspot_test_in_build=no
20044fi
20045
20046  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20047    TEST_IN_BUILD=true
20048  else
20049    TEST_IN_BUILD=false
20050  fi
20051
20052
20053  ###############################################################################
20054  #
20055  # Choose cacerts source file
20056  #
20057
20058# Check whether --with-cacerts-file was given.
20059if test "${with_cacerts_file+set}" = set; then :
20060  withval=$with_cacerts_file;
20061fi
20062
20063  if test "x$with_cacerts_file" != x; then
20064    CACERTS_FILE=$with_cacerts_file
20065  fi
20066
20067
20068  ###############################################################################
20069  #
20070  # Enable or disable unlimited crypto
20071  #
20072  # Check whether --enable-unlimited-crypto was given.
20073if test "${enable_unlimited_crypto+set}" = set; then :
20074  enableval=$enable_unlimited_crypto;
20075else
20076  enable_unlimited_crypto=no
20077fi
20078
20079  if test "x$enable_unlimited_crypto" = "xyes"; then
20080    UNLIMITED_CRYPTO=true
20081  else
20082    UNLIMITED_CRYPTO=false
20083  fi
20084
20085
20086  ###############################################################################
20087  #
20088  # Enable or disable the elliptic curve crypto implementation
20089  #
20090
20091
20092  ###############################################################################
20093  #
20094  # --enable-rmiconnector-iiop
20095  #
20096  # Check whether --enable-rmiconnector-iiop was given.
20097if test "${enable_rmiconnector_iiop+set}" = set; then :
20098  enableval=$enable_rmiconnector_iiop;
20099fi
20100
20101  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20102    RMICONNECTOR_IIOP=true
20103  else
20104    RMICONNECTOR_IIOP=false
20105  fi
20106
20107
20108  ###############################################################################
20109  #
20110  # Compress jars
20111  #
20112  COMPRESS_JARS=false
20113
20114
20115
20116
20117  # Source the version numbers
20118  . $AUTOCONF_DIR/version-numbers
20119
20120  # Get the settings from parameters
20121
20122# Check whether --with-milestone was given.
20123if test "${with_milestone+set}" = set; then :
20124  withval=$with_milestone;
20125fi
20126
20127  if test "x$with_milestone" = xyes; then
20128    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20129  elif test "x$with_milestone" != x; then
20130    MILESTONE="$with_milestone"
20131  fi
20132  if test "x$MILESTONE" = x; then
20133    MILESTONE=internal
20134  fi
20135
20136
20137# Check whether --with-update-version was given.
20138if test "${with_update_version+set}" = set; then :
20139  withval=$with_update_version;
20140fi
20141
20142  if test "x$with_update_version" = xyes; then
20143    as_fn_error $? "Update version must have a value" "$LINENO" 5
20144  elif test "x$with_update_version" != x; then
20145    JDK_UPDATE_VERSION="$with_update_version"
20146    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20147    # to a bug in expr (which reduces it to just X). To work around this, we
20148    # always add a 0 to one digit update versions.
20149    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20150      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20151    fi
20152  fi
20153
20154
20155# Check whether --with-user-release-suffix was given.
20156if test "${with_user_release_suffix+set}" = set; then :
20157  withval=$with_user_release_suffix;
20158fi
20159
20160  if test "x$with_user_release_suffix" = xyes; then
20161    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20162  elif test "x$with_user_release_suffix" != x; then
20163    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20164  fi
20165
20166
20167# Check whether --with-build-number was given.
20168if test "${with_build_number+set}" = set; then :
20169  withval=$with_build_number;
20170fi
20171
20172  if test "x$with_build_number" = xyes; then
20173    as_fn_error $? "Build number must have a value" "$LINENO" 5
20174  elif test "x$with_build_number" != x; then
20175    JDK_BUILD_NUMBER="$with_build_number"
20176  fi
20177  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20178  if test "x$JDK_BUILD_NUMBER" = x; then
20179    JDK_BUILD_NUMBER=b00
20180    if test "x$USER_RELEASE_SUFFIX" = x; then
20181      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20182      # Avoid [:alnum:] since it depends on the locale.
20183      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20184      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20185    fi
20186  fi
20187
20188  # Now set the JDK version, milestone, build number etc.
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205# Check whether --with-copyright-year was given.
20206if test "${with_copyright_year+set}" = set; then :
20207  withval=$with_copyright_year;
20208fi
20209
20210  if test "x$with_copyright_year" = xyes; then
20211    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20212  elif test "x$with_copyright_year" != x; then
20213    COPYRIGHT_YEAR="$with_copyright_year"
20214  else
20215    COPYRIGHT_YEAR=`date +'%Y'`
20216  fi
20217
20218
20219  if test "x$JDK_UPDATE_VERSION" != x; then
20220    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20221  else
20222    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20223  fi
20224
20225
20226  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20227
20228
20229
20230###############################################################################
20231#
20232# Setup BootJDK, used to bootstrap the build.
20233#
20234###############################################################################
20235
20236
20237  BOOT_JDK_FOUND=no
20238
20239# Check whether --with-boot-jdk was given.
20240if test "${with_boot_jdk+set}" = set; then :
20241  withval=$with_boot_jdk;
20242fi
20243
20244
20245  # We look for the Boot JDK through various means, going from more certain to
20246  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20247  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20248  # must check if this is indeed valid; otherwise we'll continue looking.
20249
20250  # Test: Is bootjdk explicitely set by command line arguments?
20251
20252  if test "x$BOOT_JDK_FOUND" = xno; then
20253    # Now execute the test
20254
20255  if test "x$with_boot_jdk" != x; then
20256    BOOT_JDK=$with_boot_jdk
20257    BOOT_JDK_FOUND=maybe
20258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20259$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20260  fi
20261
20262
20263    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20264    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20265      # Do we have a bin/java?
20266      if test ! -x "$BOOT_JDK/bin/java"; then
20267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20269        BOOT_JDK_FOUND=no
20270      else
20271        # Do we have a bin/javac?
20272        if test ! -x "$BOOT_JDK/bin/javac"; then
20273          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20275          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20276$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20277          BOOT_JDK_FOUND=no
20278        else
20279          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20280          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20281
20282          # Extra M4 quote needed to protect [] in grep expression.
20283          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20284          if test "x$FOUND_CORRECT_VERSION" = x; then
20285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20287            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20288$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20289            BOOT_JDK_FOUND=no
20290          else
20291            # We're done! :-)
20292            BOOT_JDK_FOUND=yes
20293
20294  # Only process if variable expands to non-empty
20295
20296  if test "x$BOOT_JDK" != x; then
20297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20298
20299  # Input might be given as Windows format, start by converting to
20300  # unix format.
20301  path="$BOOT_JDK"
20302  new_path=`$CYGPATH -u "$path"`
20303
20304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20307  # "foo.exe" is OK but "foo" is an error.
20308  #
20309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20310  # It is also a way to make sure we got the proper file name for the real test later on.
20311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20312  if test "x$test_shortpath" = x; then
20313    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20315    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20316  fi
20317
20318  # Call helper function which possibly converts this using DOS-style short mode.
20319  # If so, the updated path is stored in $new_path.
20320
20321  input_path="$new_path"
20322  # Check if we need to convert this using DOS-style short mode. If the path
20323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20324  # take no chances and rewrite it.
20325  # Note: m4 eats our [], so we need to use [ and ] instead.
20326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20327  if test "x$has_forbidden_chars" != x; then
20328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20332      # Going to short mode and back again did indeed matter. Since short mode is
20333      # case insensitive, let's make it lowercase to improve readability.
20334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20335      # Now convert it back to Unix-style (cygpath)
20336      input_path=`$CYGPATH -u "$shortmode_path"`
20337      new_path="$input_path"
20338    fi
20339  fi
20340
20341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20342  if test "x$test_cygdrive_prefix" = x; then
20343    # As a simple fix, exclude /usr/bin since it's not a real path.
20344    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20346      # a path prefixed by /cygdrive for fixpath to work.
20347      new_path="$CYGWIN_ROOT_PATH$input_path"
20348    fi
20349  fi
20350
20351
20352  if test "x$path" != "x$new_path"; then
20353    BOOT_JDK="$new_path"
20354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20355$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20356  fi
20357
20358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359
20360  path="$BOOT_JDK"
20361  has_colon=`$ECHO $path | $GREP ^.:`
20362  new_path="$path"
20363  if test "x$has_colon" = x; then
20364    # Not in mixed or Windows style, start by that.
20365    new_path=`cmd //c echo $path`
20366  fi
20367
20368
20369  input_path="$new_path"
20370  # Check if we need to convert this using DOS-style short mode. If the path
20371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20372  # take no chances and rewrite it.
20373  # Note: m4 eats our [], so we need to use [ and ] instead.
20374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20375  if test "x$has_forbidden_chars" != x; then
20376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20378  fi
20379
20380
20381  windows_path="$new_path"
20382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20383    unix_path=`$CYGPATH -u "$windows_path"`
20384    new_path="$unix_path"
20385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20387    new_path="$unix_path"
20388  fi
20389
20390  if test "x$path" != "x$new_path"; then
20391    BOOT_JDK="$new_path"
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20394  fi
20395
20396  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20397  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20398
20399    else
20400      # We're on a unix platform. Hooray! :)
20401      path="$BOOT_JDK"
20402      has_space=`$ECHO "$path" | $GREP " "`
20403      if test "x$has_space" != x; then
20404        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20406        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20407      fi
20408
20409      # Use eval to expand a potential ~
20410      eval path="$path"
20411      if test ! -f "$path" && test ! -d "$path"; then
20412        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20413      fi
20414
20415      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20416    fi
20417  fi
20418
20419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20420$as_echo_n "checking for Boot JDK... " >&6; }
20421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20422$as_echo "$BOOT_JDK" >&6; }
20423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20424$as_echo_n "checking Boot JDK version... " >&6; }
20425            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20427$as_echo "$BOOT_JDK_VERSION" >&6; }
20428          fi # end check jdk version
20429        fi # end check javac
20430      fi # end check java
20431    fi # end check boot jdk found
20432  fi
20433
20434  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20435    # Having specified an argument which is incorrect will produce an instant failure;
20436    # we should not go on looking
20437    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20438  fi
20439
20440  # Test: Is bootjdk available from builddeps?
20441
20442  if test "x$BOOT_JDK_FOUND" = xno; then
20443    # Now execute the test
20444
20445
20446
20447  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20448    # Source the builddeps file again, to make sure it uses the latest variables!
20449    . $builddepsfile
20450    # Look for a target and build machine specific resource!
20451    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20452    if test "x$resource" = x; then
20453      # Ok, lets instead look for a target specific resource
20454      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20455    fi
20456    if test "x$resource" = x; then
20457      # Ok, lets instead look for a build specific resource
20458      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20459    fi
20460    if test "x$resource" = x; then
20461      # Ok, lets instead look for a generic resource
20462      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20463      resource=${builddep_bootjdk}
20464    fi
20465    if test "x$resource" != x; then
20466      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20467$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20468      # If the resource in the builddeps.conf file is an existing directory,
20469      # for example /java/linux/cups
20470      if test -d ${resource}; then
20471        depdir=${resource}
20472      else
20473
20474  # bootjdk is for example mymodule
20475  # $resource is for example libs/general/libmymod_1_2_3.zip
20476  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20477  # $with_builddeps_dir is for example /localhome/builddeps
20478  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20479  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20480  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20481  filename=`basename $resource`
20482  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20483  filebase=${filename%%.*}
20484  extension=${filename#*.}
20485  installdir=$with_builddeps_dir/$filebase
20486  if test ! -f $installdir/$filename.unpacked; then
20487    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20488$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20489    if test ! -d $installdir; then
20490      mkdir -p $installdir
20491    fi
20492    if test ! -d $installdir; then
20493      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20494    fi
20495    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20496    touch $tmpfile
20497    if test ! -f $tmpfile; then
20498      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20499    fi
20500
20501  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20502  # $tmpfile is the local file name for the downloaded file.
20503  VALID_TOOL=no
20504  if test "x$BDEPS_FTP" = xwget; then
20505    VALID_TOOL=yes
20506    wget -O $tmpfile $with_builddeps_server/$resource
20507  fi
20508  if test "x$BDEPS_FTP" = xlftp; then
20509    VALID_TOOL=yes
20510    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20511  fi
20512  if test "x$BDEPS_FTP" = xftp; then
20513    VALID_TOOL=yes
20514    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20515    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20516    FTPUSERPWD=${FTPSERVER%%@*}
20517    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20518      FTPUSER=${userpwd%%:*}
20519      FTPPWD=${userpwd#*@}
20520      FTPSERVER=${FTPSERVER#*@}
20521    else
20522      FTPUSER=ftp
20523      FTPPWD=ftp
20524    fi
20525    # the "pass" command does not work on some
20526    # ftp clients (read ftp.exe) but if it works,
20527    # passive mode is better!
20528    ( \
20529        echo "user $FTPUSER $FTPPWD"        ; \
20530        echo "pass"                         ; \
20531        echo "bin"                          ; \
20532        echo "get $FTPPATH $tmpfile"              ; \
20533    ) | ftp -in $FTPSERVER
20534  fi
20535  if test "x$VALID_TOOL" != xyes; then
20536    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20537  fi
20538
20539    mv $tmpfile $installdir/$filename
20540    if test ! -s $installdir/$filename; then
20541      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20542    fi
20543    case "$extension" in
20544      zip)  echo "Unzipping $installdir/$filename..."
20545        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20546        ;;
20547      tar.gz) echo "Untaring $installdir/$filename..."
20548        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20549        ;;
20550      tgz) echo "Untaring $installdir/$filename..."
20551        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20552        ;;
20553      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20554        ;;
20555    esac
20556  fi
20557  if test -f $installdir/$filename.unpacked; then
20558    depdir=$installdir
20559  fi
20560
20561      fi
20562      # Source the builddeps file again, because in the previous command, the depdir
20563      # was updated to point at the current build dependency install directory.
20564      . $builddepsfile
20565      # Now extract variables from the builddeps.conf files.
20566      theroot=${builddep_bootjdk_ROOT}
20567      thecflags=${builddep_bootjdk_CFLAGS}
20568      thelibs=${builddep_bootjdk_LIBS}
20569      if test "x$depdir" = x; then
20570        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20571      fi
20572      BOOT_JDK=$depdir
20573      if test "x$theroot" != x; then
20574        BOOT_JDK="$theroot"
20575      fi
20576      if test "x$thecflags" != x; then
20577        BOOT_JDK_CFLAGS="$thecflags"
20578      fi
20579      if test "x$thelibs" != x; then
20580        BOOT_JDK_LIBS="$thelibs"
20581      fi
20582      BOOT_JDK_FOUND=maybe
20583      else BOOT_JDK_FOUND=no
20584
20585    fi
20586    else BOOT_JDK_FOUND=no
20587
20588  fi
20589
20590
20591
20592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20594      # Do we have a bin/java?
20595      if test ! -x "$BOOT_JDK/bin/java"; then
20596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20598        BOOT_JDK_FOUND=no
20599      else
20600        # Do we have a bin/javac?
20601        if test ! -x "$BOOT_JDK/bin/javac"; then
20602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20606          BOOT_JDK_FOUND=no
20607        else
20608          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20609          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20610
20611          # Extra M4 quote needed to protect [] in grep expression.
20612          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20613          if test "x$FOUND_CORRECT_VERSION" = x; then
20614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20616            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20617$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20618            BOOT_JDK_FOUND=no
20619          else
20620            # We're done! :-)
20621            BOOT_JDK_FOUND=yes
20622
20623  # Only process if variable expands to non-empty
20624
20625  if test "x$BOOT_JDK" != x; then
20626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20627
20628  # Input might be given as Windows format, start by converting to
20629  # unix format.
20630  path="$BOOT_JDK"
20631  new_path=`$CYGPATH -u "$path"`
20632
20633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20636  # "foo.exe" is OK but "foo" is an error.
20637  #
20638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20639  # It is also a way to make sure we got the proper file name for the real test later on.
20640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20641  if test "x$test_shortpath" = x; then
20642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20644    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20645  fi
20646
20647  # Call helper function which possibly converts this using DOS-style short mode.
20648  # If so, the updated path is stored in $new_path.
20649
20650  input_path="$new_path"
20651  # Check if we need to convert this using DOS-style short mode. If the path
20652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20653  # take no chances and rewrite it.
20654  # Note: m4 eats our [], so we need to use [ and ] instead.
20655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20656  if test "x$has_forbidden_chars" != x; then
20657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20661      # Going to short mode and back again did indeed matter. Since short mode is
20662      # case insensitive, let's make it lowercase to improve readability.
20663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20664      # Now convert it back to Unix-style (cygpath)
20665      input_path=`$CYGPATH -u "$shortmode_path"`
20666      new_path="$input_path"
20667    fi
20668  fi
20669
20670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20671  if test "x$test_cygdrive_prefix" = x; then
20672    # As a simple fix, exclude /usr/bin since it's not a real path.
20673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20675      # a path prefixed by /cygdrive for fixpath to work.
20676      new_path="$CYGWIN_ROOT_PATH$input_path"
20677    fi
20678  fi
20679
20680
20681  if test "x$path" != "x$new_path"; then
20682    BOOT_JDK="$new_path"
20683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20685  fi
20686
20687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20688
20689  path="$BOOT_JDK"
20690  has_colon=`$ECHO $path | $GREP ^.:`
20691  new_path="$path"
20692  if test "x$has_colon" = x; then
20693    # Not in mixed or Windows style, start by that.
20694    new_path=`cmd //c echo $path`
20695  fi
20696
20697
20698  input_path="$new_path"
20699  # Check if we need to convert this using DOS-style short mode. If the path
20700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20701  # take no chances and rewrite it.
20702  # Note: m4 eats our [], so we need to use [ and ] instead.
20703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20704  if test "x$has_forbidden_chars" != x; then
20705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707  fi
20708
20709
20710  windows_path="$new_path"
20711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20712    unix_path=`$CYGPATH -u "$windows_path"`
20713    new_path="$unix_path"
20714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20716    new_path="$unix_path"
20717  fi
20718
20719  if test "x$path" != "x$new_path"; then
20720    BOOT_JDK="$new_path"
20721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20723  fi
20724
20725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20727
20728    else
20729      # We're on a unix platform. Hooray! :)
20730      path="$BOOT_JDK"
20731      has_space=`$ECHO "$path" | $GREP " "`
20732      if test "x$has_space" != x; then
20733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20736      fi
20737
20738      # Use eval to expand a potential ~
20739      eval path="$path"
20740      if test ! -f "$path" && test ! -d "$path"; then
20741        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20742      fi
20743
20744      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20745    fi
20746  fi
20747
20748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20749$as_echo_n "checking for Boot JDK... " >&6; }
20750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20751$as_echo "$BOOT_JDK" >&6; }
20752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20753$as_echo_n "checking Boot JDK version... " >&6; }
20754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20756$as_echo "$BOOT_JDK_VERSION" >&6; }
20757          fi # end check jdk version
20758        fi # end check javac
20759      fi # end check java
20760    fi # end check boot jdk found
20761  fi
20762
20763
20764  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20765
20766  if test "x$BOOT_JDK_FOUND" = xno; then
20767    # Now execute the test
20768
20769  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20770    # First check at user selected default
20771
20772  if test "x$BOOT_JDK_FOUND" = xno; then
20773    # Now execute the test
20774
20775  if test -x /usr/libexec/java_home; then
20776    BOOT_JDK=`/usr/libexec/java_home `
20777    BOOT_JDK_FOUND=maybe
20778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20779$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20780  fi
20781
20782
20783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20785      # Do we have a bin/java?
20786      if test ! -x "$BOOT_JDK/bin/java"; then
20787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20789        BOOT_JDK_FOUND=no
20790      else
20791        # Do we have a bin/javac?
20792        if test ! -x "$BOOT_JDK/bin/javac"; then
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20797          BOOT_JDK_FOUND=no
20798        else
20799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20801
20802          # Extra M4 quote needed to protect [] in grep expression.
20803          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20804          if test "x$FOUND_CORRECT_VERSION" = x; then
20805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20809            BOOT_JDK_FOUND=no
20810          else
20811            # We're done! :-)
20812            BOOT_JDK_FOUND=yes
20813
20814  # Only process if variable expands to non-empty
20815
20816  if test "x$BOOT_JDK" != x; then
20817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20818
20819  # Input might be given as Windows format, start by converting to
20820  # unix format.
20821  path="$BOOT_JDK"
20822  new_path=`$CYGPATH -u "$path"`
20823
20824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20827  # "foo.exe" is OK but "foo" is an error.
20828  #
20829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20830  # It is also a way to make sure we got the proper file name for the real test later on.
20831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20832  if test "x$test_shortpath" = x; then
20833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20836  fi
20837
20838  # Call helper function which possibly converts this using DOS-style short mode.
20839  # If so, the updated path is stored in $new_path.
20840
20841  input_path="$new_path"
20842  # Check if we need to convert this using DOS-style short mode. If the path
20843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20844  # take no chances and rewrite it.
20845  # Note: m4 eats our [], so we need to use [ and ] instead.
20846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20847  if test "x$has_forbidden_chars" != x; then
20848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20852      # Going to short mode and back again did indeed matter. Since short mode is
20853      # case insensitive, let's make it lowercase to improve readability.
20854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20855      # Now convert it back to Unix-style (cygpath)
20856      input_path=`$CYGPATH -u "$shortmode_path"`
20857      new_path="$input_path"
20858    fi
20859  fi
20860
20861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20862  if test "x$test_cygdrive_prefix" = x; then
20863    # As a simple fix, exclude /usr/bin since it's not a real path.
20864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20866      # a path prefixed by /cygdrive for fixpath to work.
20867      new_path="$CYGWIN_ROOT_PATH$input_path"
20868    fi
20869  fi
20870
20871
20872  if test "x$path" != "x$new_path"; then
20873    BOOT_JDK="$new_path"
20874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20876  fi
20877
20878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20879
20880  path="$BOOT_JDK"
20881  has_colon=`$ECHO $path | $GREP ^.:`
20882  new_path="$path"
20883  if test "x$has_colon" = x; then
20884    # Not in mixed or Windows style, start by that.
20885    new_path=`cmd //c echo $path`
20886  fi
20887
20888
20889  input_path="$new_path"
20890  # Check if we need to convert this using DOS-style short mode. If the path
20891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20892  # take no chances and rewrite it.
20893  # Note: m4 eats our [], so we need to use [ and ] instead.
20894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20895  if test "x$has_forbidden_chars" != x; then
20896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20898  fi
20899
20900
20901  windows_path="$new_path"
20902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20903    unix_path=`$CYGPATH -u "$windows_path"`
20904    new_path="$unix_path"
20905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20907    new_path="$unix_path"
20908  fi
20909
20910  if test "x$path" != "x$new_path"; then
20911    BOOT_JDK="$new_path"
20912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20914  fi
20915
20916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20918
20919    else
20920      # We're on a unix platform. Hooray! :)
20921      path="$BOOT_JDK"
20922      has_space=`$ECHO "$path" | $GREP " "`
20923      if test "x$has_space" != x; then
20924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20927      fi
20928
20929      # Use eval to expand a potential ~
20930      eval path="$path"
20931      if test ! -f "$path" && test ! -d "$path"; then
20932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20933      fi
20934
20935      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20936    fi
20937  fi
20938
20939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20940$as_echo_n "checking for Boot JDK... " >&6; }
20941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20942$as_echo "$BOOT_JDK" >&6; }
20943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20944$as_echo_n "checking Boot JDK version... " >&6; }
20945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20947$as_echo "$BOOT_JDK_VERSION" >&6; }
20948          fi # end check jdk version
20949        fi # end check javac
20950      fi # end check java
20951    fi # end check boot jdk found
20952  fi
20953
20954    # If that did not work out (e.g. too old), try explicit versions instead
20955
20956  if test "x$BOOT_JDK_FOUND" = xno; then
20957    # Now execute the test
20958
20959  if test -x /usr/libexec/java_home; then
20960    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20961    BOOT_JDK_FOUND=maybe
20962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20963$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20964  fi
20965
20966
20967    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20968    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20969      # Do we have a bin/java?
20970      if test ! -x "$BOOT_JDK/bin/java"; then
20971        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20973        BOOT_JDK_FOUND=no
20974      else
20975        # Do we have a bin/javac?
20976        if test ! -x "$BOOT_JDK/bin/javac"; then
20977          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20979          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20980$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20981          BOOT_JDK_FOUND=no
20982        else
20983          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20984          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20985
20986          # Extra M4 quote needed to protect [] in grep expression.
20987          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20988          if test "x$FOUND_CORRECT_VERSION" = x; then
20989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20991            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20992$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20993            BOOT_JDK_FOUND=no
20994          else
20995            # We're done! :-)
20996            BOOT_JDK_FOUND=yes
20997
20998  # Only process if variable expands to non-empty
20999
21000  if test "x$BOOT_JDK" != x; then
21001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002
21003  # Input might be given as Windows format, start by converting to
21004  # unix format.
21005  path="$BOOT_JDK"
21006  new_path=`$CYGPATH -u "$path"`
21007
21008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21011  # "foo.exe" is OK but "foo" is an error.
21012  #
21013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21014  # It is also a way to make sure we got the proper file name for the real test later on.
21015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21016  if test "x$test_shortpath" = x; then
21017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21019    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21020  fi
21021
21022  # Call helper function which possibly converts this using DOS-style short mode.
21023  # If so, the updated path is stored in $new_path.
21024
21025  input_path="$new_path"
21026  # Check if we need to convert this using DOS-style short mode. If the path
21027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21028  # take no chances and rewrite it.
21029  # Note: m4 eats our [], so we need to use [ and ] instead.
21030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21031  if test "x$has_forbidden_chars" != x; then
21032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21036      # Going to short mode and back again did indeed matter. Since short mode is
21037      # case insensitive, let's make it lowercase to improve readability.
21038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21039      # Now convert it back to Unix-style (cygpath)
21040      input_path=`$CYGPATH -u "$shortmode_path"`
21041      new_path="$input_path"
21042    fi
21043  fi
21044
21045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21046  if test "x$test_cygdrive_prefix" = x; then
21047    # As a simple fix, exclude /usr/bin since it's not a real path.
21048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21050      # a path prefixed by /cygdrive for fixpath to work.
21051      new_path="$CYGWIN_ROOT_PATH$input_path"
21052    fi
21053  fi
21054
21055
21056  if test "x$path" != "x$new_path"; then
21057    BOOT_JDK="$new_path"
21058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21060  fi
21061
21062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21063
21064  path="$BOOT_JDK"
21065  has_colon=`$ECHO $path | $GREP ^.:`
21066  new_path="$path"
21067  if test "x$has_colon" = x; then
21068    # Not in mixed or Windows style, start by that.
21069    new_path=`cmd //c echo $path`
21070  fi
21071
21072
21073  input_path="$new_path"
21074  # Check if we need to convert this using DOS-style short mode. If the path
21075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21076  # take no chances and rewrite it.
21077  # Note: m4 eats our [], so we need to use [ and ] instead.
21078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21079  if test "x$has_forbidden_chars" != x; then
21080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21082  fi
21083
21084
21085  windows_path="$new_path"
21086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21087    unix_path=`$CYGPATH -u "$windows_path"`
21088    new_path="$unix_path"
21089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21091    new_path="$unix_path"
21092  fi
21093
21094  if test "x$path" != "x$new_path"; then
21095    BOOT_JDK="$new_path"
21096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21098  fi
21099
21100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21102
21103    else
21104      # We're on a unix platform. Hooray! :)
21105      path="$BOOT_JDK"
21106      has_space=`$ECHO "$path" | $GREP " "`
21107      if test "x$has_space" != x; then
21108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21111      fi
21112
21113      # Use eval to expand a potential ~
21114      eval path="$path"
21115      if test ! -f "$path" && test ! -d "$path"; then
21116        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21117      fi
21118
21119      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21120    fi
21121  fi
21122
21123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21124$as_echo_n "checking for Boot JDK... " >&6; }
21125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21126$as_echo "$BOOT_JDK" >&6; }
21127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21128$as_echo_n "checking Boot JDK version... " >&6; }
21129            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21131$as_echo "$BOOT_JDK_VERSION" >&6; }
21132          fi # end check jdk version
21133        fi # end check javac
21134      fi # end check java
21135    fi # end check boot jdk found
21136  fi
21137
21138
21139  if test "x$BOOT_JDK_FOUND" = xno; then
21140    # Now execute the test
21141
21142  if test -x /usr/libexec/java_home; then
21143    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21144    BOOT_JDK_FOUND=maybe
21145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21146$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21147  fi
21148
21149
21150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21152      # Do we have a bin/java?
21153      if test ! -x "$BOOT_JDK/bin/java"; then
21154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21156        BOOT_JDK_FOUND=no
21157      else
21158        # Do we have a bin/javac?
21159        if test ! -x "$BOOT_JDK/bin/javac"; then
21160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21164          BOOT_JDK_FOUND=no
21165        else
21166          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21167          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21168
21169          # Extra M4 quote needed to protect [] in grep expression.
21170          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21171          if test "x$FOUND_CORRECT_VERSION" = x; then
21172            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21174            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21175$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21176            BOOT_JDK_FOUND=no
21177          else
21178            # We're done! :-)
21179            BOOT_JDK_FOUND=yes
21180
21181  # Only process if variable expands to non-empty
21182
21183  if test "x$BOOT_JDK" != x; then
21184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21185
21186  # Input might be given as Windows format, start by converting to
21187  # unix format.
21188  path="$BOOT_JDK"
21189  new_path=`$CYGPATH -u "$path"`
21190
21191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21194  # "foo.exe" is OK but "foo" is an error.
21195  #
21196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21197  # It is also a way to make sure we got the proper file name for the real test later on.
21198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21199  if test "x$test_shortpath" = x; then
21200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21203  fi
21204
21205  # Call helper function which possibly converts this using DOS-style short mode.
21206  # If so, the updated path is stored in $new_path.
21207
21208  input_path="$new_path"
21209  # Check if we need to convert this using DOS-style short mode. If the path
21210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21211  # take no chances and rewrite it.
21212  # Note: m4 eats our [], so we need to use [ and ] instead.
21213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21214  if test "x$has_forbidden_chars" != x; then
21215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21219      # Going to short mode and back again did indeed matter. Since short mode is
21220      # case insensitive, let's make it lowercase to improve readability.
21221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21222      # Now convert it back to Unix-style (cygpath)
21223      input_path=`$CYGPATH -u "$shortmode_path"`
21224      new_path="$input_path"
21225    fi
21226  fi
21227
21228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21229  if test "x$test_cygdrive_prefix" = x; then
21230    # As a simple fix, exclude /usr/bin since it's not a real path.
21231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21233      # a path prefixed by /cygdrive for fixpath to work.
21234      new_path="$CYGWIN_ROOT_PATH$input_path"
21235    fi
21236  fi
21237
21238
21239  if test "x$path" != "x$new_path"; then
21240    BOOT_JDK="$new_path"
21241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21243  fi
21244
21245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21246
21247  path="$BOOT_JDK"
21248  has_colon=`$ECHO $path | $GREP ^.:`
21249  new_path="$path"
21250  if test "x$has_colon" = x; then
21251    # Not in mixed or Windows style, start by that.
21252    new_path=`cmd //c echo $path`
21253  fi
21254
21255
21256  input_path="$new_path"
21257  # Check if we need to convert this using DOS-style short mode. If the path
21258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21259  # take no chances and rewrite it.
21260  # Note: m4 eats our [], so we need to use [ and ] instead.
21261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21262  if test "x$has_forbidden_chars" != x; then
21263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21265  fi
21266
21267
21268  windows_path="$new_path"
21269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21270    unix_path=`$CYGPATH -u "$windows_path"`
21271    new_path="$unix_path"
21272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21274    new_path="$unix_path"
21275  fi
21276
21277  if test "x$path" != "x$new_path"; then
21278    BOOT_JDK="$new_path"
21279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21281  fi
21282
21283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21285
21286    else
21287      # We're on a unix platform. Hooray! :)
21288      path="$BOOT_JDK"
21289      has_space=`$ECHO "$path" | $GREP " "`
21290      if test "x$has_space" != x; then
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21294      fi
21295
21296      # Use eval to expand a potential ~
21297      eval path="$path"
21298      if test ! -f "$path" && test ! -d "$path"; then
21299        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21300      fi
21301
21302      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21303    fi
21304  fi
21305
21306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21307$as_echo_n "checking for Boot JDK... " >&6; }
21308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21309$as_echo "$BOOT_JDK" >&6; }
21310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21311$as_echo_n "checking Boot JDK version... " >&6; }
21312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21314$as_echo "$BOOT_JDK_VERSION" >&6; }
21315          fi # end check jdk version
21316        fi # end check javac
21317      fi # end check java
21318    fi # end check boot jdk found
21319  fi
21320
21321
21322  if test "x$BOOT_JDK_FOUND" = xno; then
21323    # Now execute the test
21324
21325  if test -x /usr/libexec/java_home; then
21326    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21327    BOOT_JDK_FOUND=maybe
21328    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21329$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21330  fi
21331
21332
21333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21335      # Do we have a bin/java?
21336      if test ! -x "$BOOT_JDK/bin/java"; then
21337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21339        BOOT_JDK_FOUND=no
21340      else
21341        # Do we have a bin/javac?
21342        if test ! -x "$BOOT_JDK/bin/javac"; then
21343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21347          BOOT_JDK_FOUND=no
21348        else
21349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21351
21352          # Extra M4 quote needed to protect [] in grep expression.
21353          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21354          if test "x$FOUND_CORRECT_VERSION" = x; then
21355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21359            BOOT_JDK_FOUND=no
21360          else
21361            # We're done! :-)
21362            BOOT_JDK_FOUND=yes
21363
21364  # Only process if variable expands to non-empty
21365
21366  if test "x$BOOT_JDK" != x; then
21367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21368
21369  # Input might be given as Windows format, start by converting to
21370  # unix format.
21371  path="$BOOT_JDK"
21372  new_path=`$CYGPATH -u "$path"`
21373
21374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21377  # "foo.exe" is OK but "foo" is an error.
21378  #
21379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21380  # It is also a way to make sure we got the proper file name for the real test later on.
21381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21382  if test "x$test_shortpath" = x; then
21383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21386  fi
21387
21388  # Call helper function which possibly converts this using DOS-style short mode.
21389  # If so, the updated path is stored in $new_path.
21390
21391  input_path="$new_path"
21392  # Check if we need to convert this using DOS-style short mode. If the path
21393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21394  # take no chances and rewrite it.
21395  # Note: m4 eats our [], so we need to use [ and ] instead.
21396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21397  if test "x$has_forbidden_chars" != x; then
21398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21402      # Going to short mode and back again did indeed matter. Since short mode is
21403      # case insensitive, let's make it lowercase to improve readability.
21404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21405      # Now convert it back to Unix-style (cygpath)
21406      input_path=`$CYGPATH -u "$shortmode_path"`
21407      new_path="$input_path"
21408    fi
21409  fi
21410
21411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21412  if test "x$test_cygdrive_prefix" = x; then
21413    # As a simple fix, exclude /usr/bin since it's not a real path.
21414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21416      # a path prefixed by /cygdrive for fixpath to work.
21417      new_path="$CYGWIN_ROOT_PATH$input_path"
21418    fi
21419  fi
21420
21421
21422  if test "x$path" != "x$new_path"; then
21423    BOOT_JDK="$new_path"
21424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21426  fi
21427
21428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21429
21430  path="$BOOT_JDK"
21431  has_colon=`$ECHO $path | $GREP ^.:`
21432  new_path="$path"
21433  if test "x$has_colon" = x; then
21434    # Not in mixed or Windows style, start by that.
21435    new_path=`cmd //c echo $path`
21436  fi
21437
21438
21439  input_path="$new_path"
21440  # Check if we need to convert this using DOS-style short mode. If the path
21441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21442  # take no chances and rewrite it.
21443  # Note: m4 eats our [], so we need to use [ and ] instead.
21444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21445  if test "x$has_forbidden_chars" != x; then
21446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21448  fi
21449
21450
21451  windows_path="$new_path"
21452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21453    unix_path=`$CYGPATH -u "$windows_path"`
21454    new_path="$unix_path"
21455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21457    new_path="$unix_path"
21458  fi
21459
21460  if test "x$path" != "x$new_path"; then
21461    BOOT_JDK="$new_path"
21462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21464  fi
21465
21466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21468
21469    else
21470      # We're on a unix platform. Hooray! :)
21471      path="$BOOT_JDK"
21472      has_space=`$ECHO "$path" | $GREP " "`
21473      if test "x$has_space" != x; then
21474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21477      fi
21478
21479      # Use eval to expand a potential ~
21480      eval path="$path"
21481      if test ! -f "$path" && test ! -d "$path"; then
21482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21483      fi
21484
21485      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21486    fi
21487  fi
21488
21489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21490$as_echo_n "checking for Boot JDK... " >&6; }
21491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21492$as_echo "$BOOT_JDK" >&6; }
21493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21494$as_echo_n "checking Boot JDK version... " >&6; }
21495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21497$as_echo "$BOOT_JDK_VERSION" >&6; }
21498          fi # end check jdk version
21499        fi # end check javac
21500      fi # end check java
21501    fi # end check boot jdk found
21502  fi
21503
21504  fi
21505
21506
21507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21509      # Do we have a bin/java?
21510      if test ! -x "$BOOT_JDK/bin/java"; then
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21513        BOOT_JDK_FOUND=no
21514      else
21515        # Do we have a bin/javac?
21516        if test ! -x "$BOOT_JDK/bin/javac"; then
21517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21521          BOOT_JDK_FOUND=no
21522        else
21523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21525
21526          # Extra M4 quote needed to protect [] in grep expression.
21527          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21528          if test "x$FOUND_CORRECT_VERSION" = x; then
21529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21533            BOOT_JDK_FOUND=no
21534          else
21535            # We're done! :-)
21536            BOOT_JDK_FOUND=yes
21537
21538  # Only process if variable expands to non-empty
21539
21540  if test "x$BOOT_JDK" != x; then
21541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21542
21543  # Input might be given as Windows format, start by converting to
21544  # unix format.
21545  path="$BOOT_JDK"
21546  new_path=`$CYGPATH -u "$path"`
21547
21548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21551  # "foo.exe" is OK but "foo" is an error.
21552  #
21553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21554  # It is also a way to make sure we got the proper file name for the real test later on.
21555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21556  if test "x$test_shortpath" = x; then
21557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21560  fi
21561
21562  # Call helper function which possibly converts this using DOS-style short mode.
21563  # If so, the updated path is stored in $new_path.
21564
21565  input_path="$new_path"
21566  # Check if we need to convert this using DOS-style short mode. If the path
21567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21568  # take no chances and rewrite it.
21569  # Note: m4 eats our [], so we need to use [ and ] instead.
21570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21571  if test "x$has_forbidden_chars" != x; then
21572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21576      # Going to short mode and back again did indeed matter. Since short mode is
21577      # case insensitive, let's make it lowercase to improve readability.
21578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21579      # Now convert it back to Unix-style (cygpath)
21580      input_path=`$CYGPATH -u "$shortmode_path"`
21581      new_path="$input_path"
21582    fi
21583  fi
21584
21585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21586  if test "x$test_cygdrive_prefix" = x; then
21587    # As a simple fix, exclude /usr/bin since it's not a real path.
21588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21590      # a path prefixed by /cygdrive for fixpath to work.
21591      new_path="$CYGWIN_ROOT_PATH$input_path"
21592    fi
21593  fi
21594
21595
21596  if test "x$path" != "x$new_path"; then
21597    BOOT_JDK="$new_path"
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21600  fi
21601
21602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21603
21604  path="$BOOT_JDK"
21605  has_colon=`$ECHO $path | $GREP ^.:`
21606  new_path="$path"
21607  if test "x$has_colon" = x; then
21608    # Not in mixed or Windows style, start by that.
21609    new_path=`cmd //c echo $path`
21610  fi
21611
21612
21613  input_path="$new_path"
21614  # Check if we need to convert this using DOS-style short mode. If the path
21615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21616  # take no chances and rewrite it.
21617  # Note: m4 eats our [], so we need to use [ and ] instead.
21618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21619  if test "x$has_forbidden_chars" != x; then
21620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622  fi
21623
21624
21625  windows_path="$new_path"
21626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21627    unix_path=`$CYGPATH -u "$windows_path"`
21628    new_path="$unix_path"
21629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21631    new_path="$unix_path"
21632  fi
21633
21634  if test "x$path" != "x$new_path"; then
21635    BOOT_JDK="$new_path"
21636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21638  fi
21639
21640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21642
21643    else
21644      # We're on a unix platform. Hooray! :)
21645      path="$BOOT_JDK"
21646      has_space=`$ECHO "$path" | $GREP " "`
21647      if test "x$has_space" != x; then
21648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21651      fi
21652
21653      # Use eval to expand a potential ~
21654      eval path="$path"
21655      if test ! -f "$path" && test ! -d "$path"; then
21656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21657      fi
21658
21659      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21660    fi
21661  fi
21662
21663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21664$as_echo_n "checking for Boot JDK... " >&6; }
21665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21666$as_echo "$BOOT_JDK" >&6; }
21667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21668$as_echo_n "checking Boot JDK version... " >&6; }
21669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21671$as_echo "$BOOT_JDK_VERSION" >&6; }
21672          fi # end check jdk version
21673        fi # end check javac
21674      fi # end check java
21675    fi # end check boot jdk found
21676  fi
21677
21678
21679  # Test: Is $JAVA_HOME set?
21680
21681  if test "x$BOOT_JDK_FOUND" = xno; then
21682    # Now execute the test
21683
21684  if test "x$JAVA_HOME" != x; then
21685    JAVA_HOME_PROCESSED="$JAVA_HOME"
21686
21687  # Only process if variable expands to non-empty
21688
21689  if test "x$JAVA_HOME_PROCESSED" != x; then
21690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21691
21692  # Input might be given as Windows format, start by converting to
21693  # unix format.
21694  path="$JAVA_HOME_PROCESSED"
21695  new_path=`$CYGPATH -u "$path"`
21696
21697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21700  # "foo.exe" is OK but "foo" is an error.
21701  #
21702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21703  # It is also a way to make sure we got the proper file name for the real test later on.
21704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21705  if test "x$test_shortpath" = x; then
21706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21707$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21708    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21709  fi
21710
21711  # Call helper function which possibly converts this using DOS-style short mode.
21712  # If so, the updated path is stored in $new_path.
21713
21714  input_path="$new_path"
21715  # Check if we need to convert this using DOS-style short mode. If the path
21716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21717  # take no chances and rewrite it.
21718  # Note: m4 eats our [], so we need to use [ and ] instead.
21719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21720  if test "x$has_forbidden_chars" != x; then
21721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21725      # Going to short mode and back again did indeed matter. Since short mode is
21726      # case insensitive, let's make it lowercase to improve readability.
21727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21728      # Now convert it back to Unix-style (cygpath)
21729      input_path=`$CYGPATH -u "$shortmode_path"`
21730      new_path="$input_path"
21731    fi
21732  fi
21733
21734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21735  if test "x$test_cygdrive_prefix" = x; then
21736    # As a simple fix, exclude /usr/bin since it's not a real path.
21737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21739      # a path prefixed by /cygdrive for fixpath to work.
21740      new_path="$CYGWIN_ROOT_PATH$input_path"
21741    fi
21742  fi
21743
21744
21745  if test "x$path" != "x$new_path"; then
21746    JAVA_HOME_PROCESSED="$new_path"
21747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21748$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21749  fi
21750
21751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752
21753  path="$JAVA_HOME_PROCESSED"
21754  has_colon=`$ECHO $path | $GREP ^.:`
21755  new_path="$path"
21756  if test "x$has_colon" = x; then
21757    # Not in mixed or Windows style, start by that.
21758    new_path=`cmd //c echo $path`
21759  fi
21760
21761
21762  input_path="$new_path"
21763  # Check if we need to convert this using DOS-style short mode. If the path
21764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21765  # take no chances and rewrite it.
21766  # Note: m4 eats our [], so we need to use [ and ] instead.
21767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21768  if test "x$has_forbidden_chars" != x; then
21769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21771  fi
21772
21773
21774  windows_path="$new_path"
21775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21776    unix_path=`$CYGPATH -u "$windows_path"`
21777    new_path="$unix_path"
21778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21780    new_path="$unix_path"
21781  fi
21782
21783  if test "x$path" != "x$new_path"; then
21784    JAVA_HOME_PROCESSED="$new_path"
21785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21786$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21787  fi
21788
21789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21791
21792    else
21793      # We're on a unix platform. Hooray! :)
21794      path="$JAVA_HOME_PROCESSED"
21795      has_space=`$ECHO "$path" | $GREP " "`
21796      if test "x$has_space" != x; then
21797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21798$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21800      fi
21801
21802      # Use eval to expand a potential ~
21803      eval path="$path"
21804      if test ! -f "$path" && test ! -d "$path"; then
21805        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21806      fi
21807
21808      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21809    fi
21810  fi
21811
21812    if test ! -d "$JAVA_HOME_PROCESSED"; then
21813      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21814$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21815    else
21816      # Aha, the user has set a JAVA_HOME
21817      # let us use that as the Boot JDK.
21818      BOOT_JDK="$JAVA_HOME_PROCESSED"
21819      BOOT_JDK_FOUND=maybe
21820      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21821$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21822    fi
21823  fi
21824
21825
21826    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21827    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21828      # Do we have a bin/java?
21829      if test ! -x "$BOOT_JDK/bin/java"; then
21830        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21832        BOOT_JDK_FOUND=no
21833      else
21834        # Do we have a bin/javac?
21835        if test ! -x "$BOOT_JDK/bin/javac"; then
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21839$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21840          BOOT_JDK_FOUND=no
21841        else
21842          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21843          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21844
21845          # Extra M4 quote needed to protect [] in grep expression.
21846          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21847          if test "x$FOUND_CORRECT_VERSION" = x; then
21848            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21850            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21851$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21852            BOOT_JDK_FOUND=no
21853          else
21854            # We're done! :-)
21855            BOOT_JDK_FOUND=yes
21856
21857  # Only process if variable expands to non-empty
21858
21859  if test "x$BOOT_JDK" != x; then
21860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21861
21862  # Input might be given as Windows format, start by converting to
21863  # unix format.
21864  path="$BOOT_JDK"
21865  new_path=`$CYGPATH -u "$path"`
21866
21867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21870  # "foo.exe" is OK but "foo" is an error.
21871  #
21872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21873  # It is also a way to make sure we got the proper file name for the real test later on.
21874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21875  if test "x$test_shortpath" = x; then
21876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21878    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21879  fi
21880
21881  # Call helper function which possibly converts this using DOS-style short mode.
21882  # If so, the updated path is stored in $new_path.
21883
21884  input_path="$new_path"
21885  # Check if we need to convert this using DOS-style short mode. If the path
21886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21887  # take no chances and rewrite it.
21888  # Note: m4 eats our [], so we need to use [ and ] instead.
21889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21890  if test "x$has_forbidden_chars" != x; then
21891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21895      # Going to short mode and back again did indeed matter. Since short mode is
21896      # case insensitive, let's make it lowercase to improve readability.
21897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21898      # Now convert it back to Unix-style (cygpath)
21899      input_path=`$CYGPATH -u "$shortmode_path"`
21900      new_path="$input_path"
21901    fi
21902  fi
21903
21904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21905  if test "x$test_cygdrive_prefix" = x; then
21906    # As a simple fix, exclude /usr/bin since it's not a real path.
21907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21909      # a path prefixed by /cygdrive for fixpath to work.
21910      new_path="$CYGWIN_ROOT_PATH$input_path"
21911    fi
21912  fi
21913
21914
21915  if test "x$path" != "x$new_path"; then
21916    BOOT_JDK="$new_path"
21917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21919  fi
21920
21921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21922
21923  path="$BOOT_JDK"
21924  has_colon=`$ECHO $path | $GREP ^.:`
21925  new_path="$path"
21926  if test "x$has_colon" = x; then
21927    # Not in mixed or Windows style, start by that.
21928    new_path=`cmd //c echo $path`
21929  fi
21930
21931
21932  input_path="$new_path"
21933  # Check if we need to convert this using DOS-style short mode. If the path
21934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21935  # take no chances and rewrite it.
21936  # Note: m4 eats our [], so we need to use [ and ] instead.
21937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21938  if test "x$has_forbidden_chars" != x; then
21939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21941  fi
21942
21943
21944  windows_path="$new_path"
21945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21946    unix_path=`$CYGPATH -u "$windows_path"`
21947    new_path="$unix_path"
21948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21950    new_path="$unix_path"
21951  fi
21952
21953  if test "x$path" != "x$new_path"; then
21954    BOOT_JDK="$new_path"
21955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21957  fi
21958
21959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21961
21962    else
21963      # We're on a unix platform. Hooray! :)
21964      path="$BOOT_JDK"
21965      has_space=`$ECHO "$path" | $GREP " "`
21966      if test "x$has_space" != x; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21970      fi
21971
21972      # Use eval to expand a potential ~
21973      eval path="$path"
21974      if test ! -f "$path" && test ! -d "$path"; then
21975        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21976      fi
21977
21978      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21979    fi
21980  fi
21981
21982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21983$as_echo_n "checking for Boot JDK... " >&6; }
21984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21985$as_echo "$BOOT_JDK" >&6; }
21986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21987$as_echo_n "checking Boot JDK version... " >&6; }
21988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21990$as_echo "$BOOT_JDK_VERSION" >&6; }
21991          fi # end check jdk version
21992        fi # end check javac
21993      fi # end check java
21994    fi # end check boot jdk found
21995  fi
21996
21997
21998  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21999
22000  if test "x$BOOT_JDK_FOUND" = xno; then
22001    # Now execute the test
22002
22003  # Extract the first word of "javac", so it can be a program name with args.
22004set dummy javac; ac_word=$2
22005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22006$as_echo_n "checking for $ac_word... " >&6; }
22007if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22008  $as_echo_n "(cached) " >&6
22009else
22010  case $JAVAC_CHECK in
22011  [\\/]* | ?:[\\/]*)
22012  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22013  ;;
22014  *)
22015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22016for as_dir in $PATH
22017do
22018  IFS=$as_save_IFS
22019  test -z "$as_dir" && as_dir=.
22020    for ac_exec_ext in '' $ac_executable_extensions; do
22021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22022    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22024    break 2
22025  fi
22026done
22027  done
22028IFS=$as_save_IFS
22029
22030  ;;
22031esac
22032fi
22033JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22034if test -n "$JAVAC_CHECK"; then
22035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22036$as_echo "$JAVAC_CHECK" >&6; }
22037else
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22039$as_echo "no" >&6; }
22040fi
22041
22042
22043  # Extract the first word of "java", so it can be a program name with args.
22044set dummy java; ac_word=$2
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22046$as_echo_n "checking for $ac_word... " >&6; }
22047if ${ac_cv_path_JAVA_CHECK+:} false; then :
22048  $as_echo_n "(cached) " >&6
22049else
22050  case $JAVA_CHECK in
22051  [\\/]* | ?:[\\/]*)
22052  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22053  ;;
22054  *)
22055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22056for as_dir in $PATH
22057do
22058  IFS=$as_save_IFS
22059  test -z "$as_dir" && as_dir=.
22060    for ac_exec_ext in '' $ac_executable_extensions; do
22061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22062    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22064    break 2
22065  fi
22066done
22067  done
22068IFS=$as_save_IFS
22069
22070  ;;
22071esac
22072fi
22073JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22074if test -n "$JAVA_CHECK"; then
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22076$as_echo "$JAVA_CHECK" >&6; }
22077else
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079$as_echo "no" >&6; }
22080fi
22081
22082
22083  BINARY="$JAVAC_CHECK"
22084  if test "x$JAVAC_CHECK" = x; then
22085    BINARY="$JAVA_CHECK"
22086  fi
22087  if test "x$BINARY" != x; then
22088    # So there is a java(c) binary, it might be part of a JDK.
22089    # Lets find the JDK/JRE directory by following symbolic links.
22090    # Linux/GNU systems often have links from /usr/bin/java to
22091    # /etc/alternatives/java to the real JDK binary.
22092
22093  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22094    # Follow a chain of symbolic links. Use readlink
22095    # where it exists, else fall back to horribly
22096    # complicated shell code.
22097    if test "x$READLINK_TESTED" != yes; then
22098      # On MacOSX there is a readlink tool with a different
22099      # purpose than the GNU readlink tool. Check the found readlink.
22100      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22101      if test "x$ISGNU" = x; then
22102        # A readlink that we do not know how to use.
22103        # Are there other non-GNU readlinks out there?
22104        READLINK_TESTED=yes
22105        READLINK=
22106      fi
22107    fi
22108
22109    if test "x$READLINK" != x; then
22110      BINARY=`$READLINK -f $BINARY`
22111    else
22112      # Save the current directory for restoring afterwards
22113      STARTDIR=$PWD
22114      COUNTER=0
22115      sym_link_dir=`$DIRNAME $BINARY`
22116      sym_link_file=`$BASENAME $BINARY`
22117      cd $sym_link_dir
22118      # Use -P flag to resolve symlinks in directories.
22119      cd `$THEPWDCMD -P`
22120      sym_link_dir=`$THEPWDCMD -P`
22121      # Resolve file symlinks
22122      while test $COUNTER -lt 20; do
22123        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22124        if test "x$ISLINK" == x; then
22125          # This is not a symbolic link! We are done!
22126          break
22127        fi
22128        # Again resolve directory symlinks since the target of the just found
22129        # link could be in a different directory
22130        cd `$DIRNAME $ISLINK`
22131        sym_link_dir=`$THEPWDCMD -P`
22132        sym_link_file=`$BASENAME $ISLINK`
22133        let COUNTER=COUNTER+1
22134      done
22135      cd $STARTDIR
22136      BINARY=$sym_link_dir/$sym_link_file
22137    fi
22138  fi
22139
22140    BOOT_JDK=`dirname "$BINARY"`
22141    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22142    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22143      # Looks like we found ourselves an JDK
22144      BOOT_JDK_FOUND=maybe
22145      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22146$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22147    fi
22148  fi
22149
22150
22151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22153      # Do we have a bin/java?
22154      if test ! -x "$BOOT_JDK/bin/java"; then
22155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22157        BOOT_JDK_FOUND=no
22158      else
22159        # Do we have a bin/javac?
22160        if test ! -x "$BOOT_JDK/bin/javac"; then
22161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22165          BOOT_JDK_FOUND=no
22166        else
22167          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22168          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22169
22170          # Extra M4 quote needed to protect [] in grep expression.
22171          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22172          if test "x$FOUND_CORRECT_VERSION" = x; then
22173            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22175            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22176$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22177            BOOT_JDK_FOUND=no
22178          else
22179            # We're done! :-)
22180            BOOT_JDK_FOUND=yes
22181
22182  # Only process if variable expands to non-empty
22183
22184  if test "x$BOOT_JDK" != x; then
22185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22186
22187  # Input might be given as Windows format, start by converting to
22188  # unix format.
22189  path="$BOOT_JDK"
22190  new_path=`$CYGPATH -u "$path"`
22191
22192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22195  # "foo.exe" is OK but "foo" is an error.
22196  #
22197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22198  # It is also a way to make sure we got the proper file name for the real test later on.
22199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22200  if test "x$test_shortpath" = x; then
22201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22204  fi
22205
22206  # Call helper function which possibly converts this using DOS-style short mode.
22207  # If so, the updated path is stored in $new_path.
22208
22209  input_path="$new_path"
22210  # Check if we need to convert this using DOS-style short mode. If the path
22211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22212  # take no chances and rewrite it.
22213  # Note: m4 eats our [], so we need to use [ and ] instead.
22214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22215  if test "x$has_forbidden_chars" != x; then
22216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22220      # Going to short mode and back again did indeed matter. Since short mode is
22221      # case insensitive, let's make it lowercase to improve readability.
22222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22223      # Now convert it back to Unix-style (cygpath)
22224      input_path=`$CYGPATH -u "$shortmode_path"`
22225      new_path="$input_path"
22226    fi
22227  fi
22228
22229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22230  if test "x$test_cygdrive_prefix" = x; then
22231    # As a simple fix, exclude /usr/bin since it's not a real path.
22232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22234      # a path prefixed by /cygdrive for fixpath to work.
22235      new_path="$CYGWIN_ROOT_PATH$input_path"
22236    fi
22237  fi
22238
22239
22240  if test "x$path" != "x$new_path"; then
22241    BOOT_JDK="$new_path"
22242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22244  fi
22245
22246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22247
22248  path="$BOOT_JDK"
22249  has_colon=`$ECHO $path | $GREP ^.:`
22250  new_path="$path"
22251  if test "x$has_colon" = x; then
22252    # Not in mixed or Windows style, start by that.
22253    new_path=`cmd //c echo $path`
22254  fi
22255
22256
22257  input_path="$new_path"
22258  # Check if we need to convert this using DOS-style short mode. If the path
22259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22260  # take no chances and rewrite it.
22261  # Note: m4 eats our [], so we need to use [ and ] instead.
22262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22263  if test "x$has_forbidden_chars" != x; then
22264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22266  fi
22267
22268
22269  windows_path="$new_path"
22270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22271    unix_path=`$CYGPATH -u "$windows_path"`
22272    new_path="$unix_path"
22273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22275    new_path="$unix_path"
22276  fi
22277
22278  if test "x$path" != "x$new_path"; then
22279    BOOT_JDK="$new_path"
22280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22282  fi
22283
22284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22286
22287    else
22288      # We're on a unix platform. Hooray! :)
22289      path="$BOOT_JDK"
22290      has_space=`$ECHO "$path" | $GREP " "`
22291      if test "x$has_space" != x; then
22292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22295      fi
22296
22297      # Use eval to expand a potential ~
22298      eval path="$path"
22299      if test ! -f "$path" && test ! -d "$path"; then
22300        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22301      fi
22302
22303      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22304    fi
22305  fi
22306
22307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22308$as_echo_n "checking for Boot JDK... " >&6; }
22309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22310$as_echo "$BOOT_JDK" >&6; }
22311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22312$as_echo_n "checking Boot JDK version... " >&6; }
22313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22315$as_echo "$BOOT_JDK_VERSION" >&6; }
22316          fi # end check jdk version
22317        fi # end check javac
22318      fi # end check java
22319    fi # end check boot jdk found
22320  fi
22321
22322
22323  # Test: Is there a JDK installed in default, well-known locations?
22324
22325  if test "x$BOOT_JDK_FOUND" = xno; then
22326    # Now execute the test
22327
22328  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22329
22330  if test "x$BOOT_JDK_FOUND" = xno; then
22331    # Now execute the test
22332
22333  if test "x$ProgramW6432" != x; then
22334    VIRTUAL_DIR="$ProgramW6432/Java"
22335
22336  windows_path="$VIRTUAL_DIR"
22337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22338    unix_path=`$CYGPATH -u "$windows_path"`
22339    VIRTUAL_DIR="$unix_path"
22340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22342    VIRTUAL_DIR="$unix_path"
22343  fi
22344
22345
22346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22347  BOOT_JDK_SUFFIX=""
22348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22349  if test "x$ALL_JDKS_FOUND" != x; then
22350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22351
22352  if test "x$BOOT_JDK_FOUND" = xno; then
22353    # Now execute the test
22354
22355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22356        if test -d "$BOOT_JDK"; then
22357          BOOT_JDK_FOUND=maybe
22358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22360        fi
22361
22362
22363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22365      # Do we have a bin/java?
22366      if test ! -x "$BOOT_JDK/bin/java"; then
22367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22369        BOOT_JDK_FOUND=no
22370      else
22371        # Do we have a bin/javac?
22372        if test ! -x "$BOOT_JDK/bin/javac"; then
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22377          BOOT_JDK_FOUND=no
22378        else
22379          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22380          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22381
22382          # Extra M4 quote needed to protect [] in grep expression.
22383          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22384          if test "x$FOUND_CORRECT_VERSION" = x; then
22385            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22387            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22389            BOOT_JDK_FOUND=no
22390          else
22391            # We're done! :-)
22392            BOOT_JDK_FOUND=yes
22393
22394  # Only process if variable expands to non-empty
22395
22396  if test "x$BOOT_JDK" != x; then
22397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398
22399  # Input might be given as Windows format, start by converting to
22400  # unix format.
22401  path="$BOOT_JDK"
22402  new_path=`$CYGPATH -u "$path"`
22403
22404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22407  # "foo.exe" is OK but "foo" is an error.
22408  #
22409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22410  # It is also a way to make sure we got the proper file name for the real test later on.
22411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22412  if test "x$test_shortpath" = x; then
22413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22416  fi
22417
22418  # Call helper function which possibly converts this using DOS-style short mode.
22419  # If so, the updated path is stored in $new_path.
22420
22421  input_path="$new_path"
22422  # Check if we need to convert this using DOS-style short mode. If the path
22423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22424  # take no chances and rewrite it.
22425  # Note: m4 eats our [], so we need to use [ and ] instead.
22426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22427  if test "x$has_forbidden_chars" != x; then
22428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22432      # Going to short mode and back again did indeed matter. Since short mode is
22433      # case insensitive, let's make it lowercase to improve readability.
22434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22435      # Now convert it back to Unix-style (cygpath)
22436      input_path=`$CYGPATH -u "$shortmode_path"`
22437      new_path="$input_path"
22438    fi
22439  fi
22440
22441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22442  if test "x$test_cygdrive_prefix" = x; then
22443    # As a simple fix, exclude /usr/bin since it's not a real path.
22444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22446      # a path prefixed by /cygdrive for fixpath to work.
22447      new_path="$CYGWIN_ROOT_PATH$input_path"
22448    fi
22449  fi
22450
22451
22452  if test "x$path" != "x$new_path"; then
22453    BOOT_JDK="$new_path"
22454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22456  fi
22457
22458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22459
22460  path="$BOOT_JDK"
22461  has_colon=`$ECHO $path | $GREP ^.:`
22462  new_path="$path"
22463  if test "x$has_colon" = x; then
22464    # Not in mixed or Windows style, start by that.
22465    new_path=`cmd //c echo $path`
22466  fi
22467
22468
22469  input_path="$new_path"
22470  # Check if we need to convert this using DOS-style short mode. If the path
22471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22472  # take no chances and rewrite it.
22473  # Note: m4 eats our [], so we need to use [ and ] instead.
22474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22475  if test "x$has_forbidden_chars" != x; then
22476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22478  fi
22479
22480
22481  windows_path="$new_path"
22482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22483    unix_path=`$CYGPATH -u "$windows_path"`
22484    new_path="$unix_path"
22485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22487    new_path="$unix_path"
22488  fi
22489
22490  if test "x$path" != "x$new_path"; then
22491    BOOT_JDK="$new_path"
22492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22494  fi
22495
22496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22498
22499    else
22500      # We're on a unix platform. Hooray! :)
22501      path="$BOOT_JDK"
22502      has_space=`$ECHO "$path" | $GREP " "`
22503      if test "x$has_space" != x; then
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22507      fi
22508
22509      # Use eval to expand a potential ~
22510      eval path="$path"
22511      if test ! -f "$path" && test ! -d "$path"; then
22512        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22513      fi
22514
22515      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22516    fi
22517  fi
22518
22519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22520$as_echo_n "checking for Boot JDK... " >&6; }
22521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22522$as_echo "$BOOT_JDK" >&6; }
22523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22524$as_echo_n "checking Boot JDK version... " >&6; }
22525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22527$as_echo "$BOOT_JDK_VERSION" >&6; }
22528          fi # end check jdk version
22529        fi # end check javac
22530      fi # end check java
22531    fi # end check boot jdk found
22532  fi
22533
22534    done
22535  fi
22536
22537  fi
22538
22539
22540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22542      # Do we have a bin/java?
22543      if test ! -x "$BOOT_JDK/bin/java"; then
22544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22546        BOOT_JDK_FOUND=no
22547      else
22548        # Do we have a bin/javac?
22549        if test ! -x "$BOOT_JDK/bin/javac"; then
22550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22554          BOOT_JDK_FOUND=no
22555        else
22556          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22557          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22558
22559          # Extra M4 quote needed to protect [] in grep expression.
22560          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22561          if test "x$FOUND_CORRECT_VERSION" = x; then
22562            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22564            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22565$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22566            BOOT_JDK_FOUND=no
22567          else
22568            # We're done! :-)
22569            BOOT_JDK_FOUND=yes
22570
22571  # Only process if variable expands to non-empty
22572
22573  if test "x$BOOT_JDK" != x; then
22574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22575
22576  # Input might be given as Windows format, start by converting to
22577  # unix format.
22578  path="$BOOT_JDK"
22579  new_path=`$CYGPATH -u "$path"`
22580
22581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22584  # "foo.exe" is OK but "foo" is an error.
22585  #
22586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22587  # It is also a way to make sure we got the proper file name for the real test later on.
22588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22589  if test "x$test_shortpath" = x; then
22590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22592    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22593  fi
22594
22595  # Call helper function which possibly converts this using DOS-style short mode.
22596  # If so, the updated path is stored in $new_path.
22597
22598  input_path="$new_path"
22599  # Check if we need to convert this using DOS-style short mode. If the path
22600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22601  # take no chances and rewrite it.
22602  # Note: m4 eats our [], so we need to use [ and ] instead.
22603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22604  if test "x$has_forbidden_chars" != x; then
22605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22609      # Going to short mode and back again did indeed matter. Since short mode is
22610      # case insensitive, let's make it lowercase to improve readability.
22611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22612      # Now convert it back to Unix-style (cygpath)
22613      input_path=`$CYGPATH -u "$shortmode_path"`
22614      new_path="$input_path"
22615    fi
22616  fi
22617
22618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22619  if test "x$test_cygdrive_prefix" = x; then
22620    # As a simple fix, exclude /usr/bin since it's not a real path.
22621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22623      # a path prefixed by /cygdrive for fixpath to work.
22624      new_path="$CYGWIN_ROOT_PATH$input_path"
22625    fi
22626  fi
22627
22628
22629  if test "x$path" != "x$new_path"; then
22630    BOOT_JDK="$new_path"
22631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22633  fi
22634
22635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22636
22637  path="$BOOT_JDK"
22638  has_colon=`$ECHO $path | $GREP ^.:`
22639  new_path="$path"
22640  if test "x$has_colon" = x; then
22641    # Not in mixed or Windows style, start by that.
22642    new_path=`cmd //c echo $path`
22643  fi
22644
22645
22646  input_path="$new_path"
22647  # Check if we need to convert this using DOS-style short mode. If the path
22648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22649  # take no chances and rewrite it.
22650  # Note: m4 eats our [], so we need to use [ and ] instead.
22651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22652  if test "x$has_forbidden_chars" != x; then
22653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22655  fi
22656
22657
22658  windows_path="$new_path"
22659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22660    unix_path=`$CYGPATH -u "$windows_path"`
22661    new_path="$unix_path"
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22664    new_path="$unix_path"
22665  fi
22666
22667  if test "x$path" != "x$new_path"; then
22668    BOOT_JDK="$new_path"
22669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22671  fi
22672
22673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22675
22676    else
22677      # We're on a unix platform. Hooray! :)
22678      path="$BOOT_JDK"
22679      has_space=`$ECHO "$path" | $GREP " "`
22680      if test "x$has_space" != x; then
22681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22684      fi
22685
22686      # Use eval to expand a potential ~
22687      eval path="$path"
22688      if test ! -f "$path" && test ! -d "$path"; then
22689        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22690      fi
22691
22692      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22693    fi
22694  fi
22695
22696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22697$as_echo_n "checking for Boot JDK... " >&6; }
22698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22699$as_echo "$BOOT_JDK" >&6; }
22700            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22701$as_echo_n "checking Boot JDK version... " >&6; }
22702            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22704$as_echo "$BOOT_JDK_VERSION" >&6; }
22705          fi # end check jdk version
22706        fi # end check javac
22707      fi # end check java
22708    fi # end check boot jdk found
22709  fi
22710
22711
22712  if test "x$BOOT_JDK_FOUND" = xno; then
22713    # Now execute the test
22714
22715  if test "x$PROGRAMW6432" != x; then
22716    VIRTUAL_DIR="$PROGRAMW6432/Java"
22717
22718  windows_path="$VIRTUAL_DIR"
22719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22720    unix_path=`$CYGPATH -u "$windows_path"`
22721    VIRTUAL_DIR="$unix_path"
22722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22724    VIRTUAL_DIR="$unix_path"
22725  fi
22726
22727
22728  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22729  BOOT_JDK_SUFFIX=""
22730  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22731  if test "x$ALL_JDKS_FOUND" != x; then
22732    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22733
22734  if test "x$BOOT_JDK_FOUND" = xno; then
22735    # Now execute the test
22736
22737        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22738        if test -d "$BOOT_JDK"; then
22739          BOOT_JDK_FOUND=maybe
22740          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22741$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22742        fi
22743
22744
22745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22747      # Do we have a bin/java?
22748      if test ! -x "$BOOT_JDK/bin/java"; then
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22751        BOOT_JDK_FOUND=no
22752      else
22753        # Do we have a bin/javac?
22754        if test ! -x "$BOOT_JDK/bin/javac"; then
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22759          BOOT_JDK_FOUND=no
22760        else
22761          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22762          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22763
22764          # Extra M4 quote needed to protect [] in grep expression.
22765          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22766          if test "x$FOUND_CORRECT_VERSION" = x; then
22767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22769            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22770$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22771            BOOT_JDK_FOUND=no
22772          else
22773            # We're done! :-)
22774            BOOT_JDK_FOUND=yes
22775
22776  # Only process if variable expands to non-empty
22777
22778  if test "x$BOOT_JDK" != x; then
22779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22780
22781  # Input might be given as Windows format, start by converting to
22782  # unix format.
22783  path="$BOOT_JDK"
22784  new_path=`$CYGPATH -u "$path"`
22785
22786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22789  # "foo.exe" is OK but "foo" is an error.
22790  #
22791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22792  # It is also a way to make sure we got the proper file name for the real test later on.
22793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22794  if test "x$test_shortpath" = x; then
22795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22797    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22798  fi
22799
22800  # Call helper function which possibly converts this using DOS-style short mode.
22801  # If so, the updated path is stored in $new_path.
22802
22803  input_path="$new_path"
22804  # Check if we need to convert this using DOS-style short mode. If the path
22805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22806  # take no chances and rewrite it.
22807  # Note: m4 eats our [], so we need to use [ and ] instead.
22808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22809  if test "x$has_forbidden_chars" != x; then
22810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22814      # Going to short mode and back again did indeed matter. Since short mode is
22815      # case insensitive, let's make it lowercase to improve readability.
22816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22817      # Now convert it back to Unix-style (cygpath)
22818      input_path=`$CYGPATH -u "$shortmode_path"`
22819      new_path="$input_path"
22820    fi
22821  fi
22822
22823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22824  if test "x$test_cygdrive_prefix" = x; then
22825    # As a simple fix, exclude /usr/bin since it's not a real path.
22826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22828      # a path prefixed by /cygdrive for fixpath to work.
22829      new_path="$CYGWIN_ROOT_PATH$input_path"
22830    fi
22831  fi
22832
22833
22834  if test "x$path" != "x$new_path"; then
22835    BOOT_JDK="$new_path"
22836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22838  fi
22839
22840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841
22842  path="$BOOT_JDK"
22843  has_colon=`$ECHO $path | $GREP ^.:`
22844  new_path="$path"
22845  if test "x$has_colon" = x; then
22846    # Not in mixed or Windows style, start by that.
22847    new_path=`cmd //c echo $path`
22848  fi
22849
22850
22851  input_path="$new_path"
22852  # Check if we need to convert this using DOS-style short mode. If the path
22853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22854  # take no chances and rewrite it.
22855  # Note: m4 eats our [], so we need to use [ and ] instead.
22856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22857  if test "x$has_forbidden_chars" != x; then
22858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22860  fi
22861
22862
22863  windows_path="$new_path"
22864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22865    unix_path=`$CYGPATH -u "$windows_path"`
22866    new_path="$unix_path"
22867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22869    new_path="$unix_path"
22870  fi
22871
22872  if test "x$path" != "x$new_path"; then
22873    BOOT_JDK="$new_path"
22874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22876  fi
22877
22878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22880
22881    else
22882      # We're on a unix platform. Hooray! :)
22883      path="$BOOT_JDK"
22884      has_space=`$ECHO "$path" | $GREP " "`
22885      if test "x$has_space" != x; then
22886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22887$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22889      fi
22890
22891      # Use eval to expand a potential ~
22892      eval path="$path"
22893      if test ! -f "$path" && test ! -d "$path"; then
22894        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22895      fi
22896
22897      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22898    fi
22899  fi
22900
22901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22902$as_echo_n "checking for Boot JDK... " >&6; }
22903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22904$as_echo "$BOOT_JDK" >&6; }
22905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22906$as_echo_n "checking Boot JDK version... " >&6; }
22907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22909$as_echo "$BOOT_JDK_VERSION" >&6; }
22910          fi # end check jdk version
22911        fi # end check javac
22912      fi # end check java
22913    fi # end check boot jdk found
22914  fi
22915
22916    done
22917  fi
22918
22919  fi
22920
22921
22922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22924      # Do we have a bin/java?
22925      if test ! -x "$BOOT_JDK/bin/java"; then
22926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22928        BOOT_JDK_FOUND=no
22929      else
22930        # Do we have a bin/javac?
22931        if test ! -x "$BOOT_JDK/bin/javac"; then
22932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22936          BOOT_JDK_FOUND=no
22937        else
22938          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22939          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22940
22941          # Extra M4 quote needed to protect [] in grep expression.
22942          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22943          if test "x$FOUND_CORRECT_VERSION" = x; then
22944            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22946            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22947$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22948            BOOT_JDK_FOUND=no
22949          else
22950            # We're done! :-)
22951            BOOT_JDK_FOUND=yes
22952
22953  # Only process if variable expands to non-empty
22954
22955  if test "x$BOOT_JDK" != x; then
22956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22957
22958  # Input might be given as Windows format, start by converting to
22959  # unix format.
22960  path="$BOOT_JDK"
22961  new_path=`$CYGPATH -u "$path"`
22962
22963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22966  # "foo.exe" is OK but "foo" is an error.
22967  #
22968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22969  # It is also a way to make sure we got the proper file name for the real test later on.
22970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22971  if test "x$test_shortpath" = x; then
22972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22974    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22975  fi
22976
22977  # Call helper function which possibly converts this using DOS-style short mode.
22978  # If so, the updated path is stored in $new_path.
22979
22980  input_path="$new_path"
22981  # Check if we need to convert this using DOS-style short mode. If the path
22982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22983  # take no chances and rewrite it.
22984  # Note: m4 eats our [], so we need to use [ and ] instead.
22985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22986  if test "x$has_forbidden_chars" != x; then
22987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22991      # Going to short mode and back again did indeed matter. Since short mode is
22992      # case insensitive, let's make it lowercase to improve readability.
22993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22994      # Now convert it back to Unix-style (cygpath)
22995      input_path=`$CYGPATH -u "$shortmode_path"`
22996      new_path="$input_path"
22997    fi
22998  fi
22999
23000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23001  if test "x$test_cygdrive_prefix" = x; then
23002    # As a simple fix, exclude /usr/bin since it's not a real path.
23003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23005      # a path prefixed by /cygdrive for fixpath to work.
23006      new_path="$CYGWIN_ROOT_PATH$input_path"
23007    fi
23008  fi
23009
23010
23011  if test "x$path" != "x$new_path"; then
23012    BOOT_JDK="$new_path"
23013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23015  fi
23016
23017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23018
23019  path="$BOOT_JDK"
23020  has_colon=`$ECHO $path | $GREP ^.:`
23021  new_path="$path"
23022  if test "x$has_colon" = x; then
23023    # Not in mixed or Windows style, start by that.
23024    new_path=`cmd //c echo $path`
23025  fi
23026
23027
23028  input_path="$new_path"
23029  # Check if we need to convert this using DOS-style short mode. If the path
23030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23031  # take no chances and rewrite it.
23032  # Note: m4 eats our [], so we need to use [ and ] instead.
23033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23034  if test "x$has_forbidden_chars" != x; then
23035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23037  fi
23038
23039
23040  windows_path="$new_path"
23041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23042    unix_path=`$CYGPATH -u "$windows_path"`
23043    new_path="$unix_path"
23044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23046    new_path="$unix_path"
23047  fi
23048
23049  if test "x$path" != "x$new_path"; then
23050    BOOT_JDK="$new_path"
23051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23053  fi
23054
23055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23057
23058    else
23059      # We're on a unix platform. Hooray! :)
23060      path="$BOOT_JDK"
23061      has_space=`$ECHO "$path" | $GREP " "`
23062      if test "x$has_space" != x; then
23063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23066      fi
23067
23068      # Use eval to expand a potential ~
23069      eval path="$path"
23070      if test ! -f "$path" && test ! -d "$path"; then
23071        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23072      fi
23073
23074      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23075    fi
23076  fi
23077
23078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23079$as_echo_n "checking for Boot JDK... " >&6; }
23080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23081$as_echo "$BOOT_JDK" >&6; }
23082            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23083$as_echo_n "checking Boot JDK version... " >&6; }
23084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23086$as_echo "$BOOT_JDK_VERSION" >&6; }
23087          fi # end check jdk version
23088        fi # end check javac
23089      fi # end check java
23090    fi # end check boot jdk found
23091  fi
23092
23093
23094  if test "x$BOOT_JDK_FOUND" = xno; then
23095    # Now execute the test
23096
23097  if test "x$PROGRAMFILES" != x; then
23098    VIRTUAL_DIR="$PROGRAMFILES/Java"
23099
23100  windows_path="$VIRTUAL_DIR"
23101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23102    unix_path=`$CYGPATH -u "$windows_path"`
23103    VIRTUAL_DIR="$unix_path"
23104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23106    VIRTUAL_DIR="$unix_path"
23107  fi
23108
23109
23110  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23111  BOOT_JDK_SUFFIX=""
23112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23113  if test "x$ALL_JDKS_FOUND" != x; then
23114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23115
23116  if test "x$BOOT_JDK_FOUND" = xno; then
23117    # Now execute the test
23118
23119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23120        if test -d "$BOOT_JDK"; then
23121          BOOT_JDK_FOUND=maybe
23122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23124        fi
23125
23126
23127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23129      # Do we have a bin/java?
23130      if test ! -x "$BOOT_JDK/bin/java"; then
23131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23133        BOOT_JDK_FOUND=no
23134      else
23135        # Do we have a bin/javac?
23136        if test ! -x "$BOOT_JDK/bin/javac"; then
23137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23141          BOOT_JDK_FOUND=no
23142        else
23143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23145
23146          # Extra M4 quote needed to protect [] in grep expression.
23147          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23148          if test "x$FOUND_CORRECT_VERSION" = x; then
23149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23153            BOOT_JDK_FOUND=no
23154          else
23155            # We're done! :-)
23156            BOOT_JDK_FOUND=yes
23157
23158  # Only process if variable expands to non-empty
23159
23160  if test "x$BOOT_JDK" != x; then
23161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23162
23163  # Input might be given as Windows format, start by converting to
23164  # unix format.
23165  path="$BOOT_JDK"
23166  new_path=`$CYGPATH -u "$path"`
23167
23168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23171  # "foo.exe" is OK but "foo" is an error.
23172  #
23173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23174  # It is also a way to make sure we got the proper file name for the real test later on.
23175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23176  if test "x$test_shortpath" = x; then
23177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23180  fi
23181
23182  # Call helper function which possibly converts this using DOS-style short mode.
23183  # If so, the updated path is stored in $new_path.
23184
23185  input_path="$new_path"
23186  # Check if we need to convert this using DOS-style short mode. If the path
23187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23188  # take no chances and rewrite it.
23189  # Note: m4 eats our [], so we need to use [ and ] instead.
23190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23191  if test "x$has_forbidden_chars" != x; then
23192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23196      # Going to short mode and back again did indeed matter. Since short mode is
23197      # case insensitive, let's make it lowercase to improve readability.
23198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23199      # Now convert it back to Unix-style (cygpath)
23200      input_path=`$CYGPATH -u "$shortmode_path"`
23201      new_path="$input_path"
23202    fi
23203  fi
23204
23205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23206  if test "x$test_cygdrive_prefix" = x; then
23207    # As a simple fix, exclude /usr/bin since it's not a real path.
23208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23210      # a path prefixed by /cygdrive for fixpath to work.
23211      new_path="$CYGWIN_ROOT_PATH$input_path"
23212    fi
23213  fi
23214
23215
23216  if test "x$path" != "x$new_path"; then
23217    BOOT_JDK="$new_path"
23218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23220  fi
23221
23222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23223
23224  path="$BOOT_JDK"
23225  has_colon=`$ECHO $path | $GREP ^.:`
23226  new_path="$path"
23227  if test "x$has_colon" = x; then
23228    # Not in mixed or Windows style, start by that.
23229    new_path=`cmd //c echo $path`
23230  fi
23231
23232
23233  input_path="$new_path"
23234  # Check if we need to convert this using DOS-style short mode. If the path
23235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23236  # take no chances and rewrite it.
23237  # Note: m4 eats our [], so we need to use [ and ] instead.
23238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23239  if test "x$has_forbidden_chars" != x; then
23240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23242  fi
23243
23244
23245  windows_path="$new_path"
23246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23247    unix_path=`$CYGPATH -u "$windows_path"`
23248    new_path="$unix_path"
23249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23251    new_path="$unix_path"
23252  fi
23253
23254  if test "x$path" != "x$new_path"; then
23255    BOOT_JDK="$new_path"
23256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23258  fi
23259
23260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23262
23263    else
23264      # We're on a unix platform. Hooray! :)
23265      path="$BOOT_JDK"
23266      has_space=`$ECHO "$path" | $GREP " "`
23267      if test "x$has_space" != x; then
23268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23271      fi
23272
23273      # Use eval to expand a potential ~
23274      eval path="$path"
23275      if test ! -f "$path" && test ! -d "$path"; then
23276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23277      fi
23278
23279      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23280    fi
23281  fi
23282
23283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23284$as_echo_n "checking for Boot JDK... " >&6; }
23285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23286$as_echo "$BOOT_JDK" >&6; }
23287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23288$as_echo_n "checking Boot JDK version... " >&6; }
23289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23291$as_echo "$BOOT_JDK_VERSION" >&6; }
23292          fi # end check jdk version
23293        fi # end check javac
23294      fi # end check java
23295    fi # end check boot jdk found
23296  fi
23297
23298    done
23299  fi
23300
23301  fi
23302
23303
23304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23306      # Do we have a bin/java?
23307      if test ! -x "$BOOT_JDK/bin/java"; then
23308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23310        BOOT_JDK_FOUND=no
23311      else
23312        # Do we have a bin/javac?
23313        if test ! -x "$BOOT_JDK/bin/javac"; then
23314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23318          BOOT_JDK_FOUND=no
23319        else
23320          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23321          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23322
23323          # Extra M4 quote needed to protect [] in grep expression.
23324          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23325          if test "x$FOUND_CORRECT_VERSION" = x; then
23326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23328            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23329$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23330            BOOT_JDK_FOUND=no
23331          else
23332            # We're done! :-)
23333            BOOT_JDK_FOUND=yes
23334
23335  # Only process if variable expands to non-empty
23336
23337  if test "x$BOOT_JDK" != x; then
23338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23339
23340  # Input might be given as Windows format, start by converting to
23341  # unix format.
23342  path="$BOOT_JDK"
23343  new_path=`$CYGPATH -u "$path"`
23344
23345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23348  # "foo.exe" is OK but "foo" is an error.
23349  #
23350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23351  # It is also a way to make sure we got the proper file name for the real test later on.
23352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23353  if test "x$test_shortpath" = x; then
23354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23357  fi
23358
23359  # Call helper function which possibly converts this using DOS-style short mode.
23360  # If so, the updated path is stored in $new_path.
23361
23362  input_path="$new_path"
23363  # Check if we need to convert this using DOS-style short mode. If the path
23364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23365  # take no chances and rewrite it.
23366  # Note: m4 eats our [], so we need to use [ and ] instead.
23367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23368  if test "x$has_forbidden_chars" != x; then
23369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23373      # Going to short mode and back again did indeed matter. Since short mode is
23374      # case insensitive, let's make it lowercase to improve readability.
23375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23376      # Now convert it back to Unix-style (cygpath)
23377      input_path=`$CYGPATH -u "$shortmode_path"`
23378      new_path="$input_path"
23379    fi
23380  fi
23381
23382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23383  if test "x$test_cygdrive_prefix" = x; then
23384    # As a simple fix, exclude /usr/bin since it's not a real path.
23385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23387      # a path prefixed by /cygdrive for fixpath to work.
23388      new_path="$CYGWIN_ROOT_PATH$input_path"
23389    fi
23390  fi
23391
23392
23393  if test "x$path" != "x$new_path"; then
23394    BOOT_JDK="$new_path"
23395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23397  fi
23398
23399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23400
23401  path="$BOOT_JDK"
23402  has_colon=`$ECHO $path | $GREP ^.:`
23403  new_path="$path"
23404  if test "x$has_colon" = x; then
23405    # Not in mixed or Windows style, start by that.
23406    new_path=`cmd //c echo $path`
23407  fi
23408
23409
23410  input_path="$new_path"
23411  # Check if we need to convert this using DOS-style short mode. If the path
23412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23413  # take no chances and rewrite it.
23414  # Note: m4 eats our [], so we need to use [ and ] instead.
23415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23416  if test "x$has_forbidden_chars" != x; then
23417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23419  fi
23420
23421
23422  windows_path="$new_path"
23423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23424    unix_path=`$CYGPATH -u "$windows_path"`
23425    new_path="$unix_path"
23426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23428    new_path="$unix_path"
23429  fi
23430
23431  if test "x$path" != "x$new_path"; then
23432    BOOT_JDK="$new_path"
23433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23435  fi
23436
23437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23439
23440    else
23441      # We're on a unix platform. Hooray! :)
23442      path="$BOOT_JDK"
23443      has_space=`$ECHO "$path" | $GREP " "`
23444      if test "x$has_space" != x; then
23445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23448      fi
23449
23450      # Use eval to expand a potential ~
23451      eval path="$path"
23452      if test ! -f "$path" && test ! -d "$path"; then
23453        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23454      fi
23455
23456      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23457    fi
23458  fi
23459
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23461$as_echo_n "checking for Boot JDK... " >&6; }
23462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23463$as_echo "$BOOT_JDK" >&6; }
23464            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23465$as_echo_n "checking Boot JDK version... " >&6; }
23466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23468$as_echo "$BOOT_JDK_VERSION" >&6; }
23469          fi # end check jdk version
23470        fi # end check javac
23471      fi # end check java
23472    fi # end check boot jdk found
23473  fi
23474
23475
23476  if test "x$BOOT_JDK_FOUND" = xno; then
23477    # Now execute the test
23478
23479  if test "x$ProgramFiles" != x; then
23480    VIRTUAL_DIR="$ProgramFiles/Java"
23481
23482  windows_path="$VIRTUAL_DIR"
23483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23484    unix_path=`$CYGPATH -u "$windows_path"`
23485    VIRTUAL_DIR="$unix_path"
23486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23488    VIRTUAL_DIR="$unix_path"
23489  fi
23490
23491
23492  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23493  BOOT_JDK_SUFFIX=""
23494  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23495  if test "x$ALL_JDKS_FOUND" != x; then
23496    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23497
23498  if test "x$BOOT_JDK_FOUND" = xno; then
23499    # Now execute the test
23500
23501        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23502        if test -d "$BOOT_JDK"; then
23503          BOOT_JDK_FOUND=maybe
23504          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23505$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23506        fi
23507
23508
23509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23511      # Do we have a bin/java?
23512      if test ! -x "$BOOT_JDK/bin/java"; then
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23515        BOOT_JDK_FOUND=no
23516      else
23517        # Do we have a bin/javac?
23518        if test ! -x "$BOOT_JDK/bin/javac"; then
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23523          BOOT_JDK_FOUND=no
23524        else
23525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23527
23528          # Extra M4 quote needed to protect [] in grep expression.
23529          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23530          if test "x$FOUND_CORRECT_VERSION" = x; then
23531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23535            BOOT_JDK_FOUND=no
23536          else
23537            # We're done! :-)
23538            BOOT_JDK_FOUND=yes
23539
23540  # Only process if variable expands to non-empty
23541
23542  if test "x$BOOT_JDK" != x; then
23543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23544
23545  # Input might be given as Windows format, start by converting to
23546  # unix format.
23547  path="$BOOT_JDK"
23548  new_path=`$CYGPATH -u "$path"`
23549
23550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23553  # "foo.exe" is OK but "foo" is an error.
23554  #
23555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23556  # It is also a way to make sure we got the proper file name for the real test later on.
23557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23558  if test "x$test_shortpath" = x; then
23559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23562  fi
23563
23564  # Call helper function which possibly converts this using DOS-style short mode.
23565  # If so, the updated path is stored in $new_path.
23566
23567  input_path="$new_path"
23568  # Check if we need to convert this using DOS-style short mode. If the path
23569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23570  # take no chances and rewrite it.
23571  # Note: m4 eats our [], so we need to use [ and ] instead.
23572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23573  if test "x$has_forbidden_chars" != x; then
23574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23578      # Going to short mode and back again did indeed matter. Since short mode is
23579      # case insensitive, let's make it lowercase to improve readability.
23580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23581      # Now convert it back to Unix-style (cygpath)
23582      input_path=`$CYGPATH -u "$shortmode_path"`
23583      new_path="$input_path"
23584    fi
23585  fi
23586
23587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23588  if test "x$test_cygdrive_prefix" = x; then
23589    # As a simple fix, exclude /usr/bin since it's not a real path.
23590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23592      # a path prefixed by /cygdrive for fixpath to work.
23593      new_path="$CYGWIN_ROOT_PATH$input_path"
23594    fi
23595  fi
23596
23597
23598  if test "x$path" != "x$new_path"; then
23599    BOOT_JDK="$new_path"
23600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23602  fi
23603
23604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23605
23606  path="$BOOT_JDK"
23607  has_colon=`$ECHO $path | $GREP ^.:`
23608  new_path="$path"
23609  if test "x$has_colon" = x; then
23610    # Not in mixed or Windows style, start by that.
23611    new_path=`cmd //c echo $path`
23612  fi
23613
23614
23615  input_path="$new_path"
23616  # Check if we need to convert this using DOS-style short mode. If the path
23617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23618  # take no chances and rewrite it.
23619  # Note: m4 eats our [], so we need to use [ and ] instead.
23620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23621  if test "x$has_forbidden_chars" != x; then
23622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23624  fi
23625
23626
23627  windows_path="$new_path"
23628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23629    unix_path=`$CYGPATH -u "$windows_path"`
23630    new_path="$unix_path"
23631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23633    new_path="$unix_path"
23634  fi
23635
23636  if test "x$path" != "x$new_path"; then
23637    BOOT_JDK="$new_path"
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23640  fi
23641
23642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23644
23645    else
23646      # We're on a unix platform. Hooray! :)
23647      path="$BOOT_JDK"
23648      has_space=`$ECHO "$path" | $GREP " "`
23649      if test "x$has_space" != x; then
23650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23653      fi
23654
23655      # Use eval to expand a potential ~
23656      eval path="$path"
23657      if test ! -f "$path" && test ! -d "$path"; then
23658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23659      fi
23660
23661      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23662    fi
23663  fi
23664
23665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23666$as_echo_n "checking for Boot JDK... " >&6; }
23667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23668$as_echo "$BOOT_JDK" >&6; }
23669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23670$as_echo_n "checking Boot JDK version... " >&6; }
23671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23673$as_echo "$BOOT_JDK_VERSION" >&6; }
23674          fi # end check jdk version
23675        fi # end check javac
23676      fi # end check java
23677    fi # end check boot jdk found
23678  fi
23679
23680    done
23681  fi
23682
23683  fi
23684
23685
23686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23688      # Do we have a bin/java?
23689      if test ! -x "$BOOT_JDK/bin/java"; then
23690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23692        BOOT_JDK_FOUND=no
23693      else
23694        # Do we have a bin/javac?
23695        if test ! -x "$BOOT_JDK/bin/javac"; then
23696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23700          BOOT_JDK_FOUND=no
23701        else
23702          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23703          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23704
23705          # Extra M4 quote needed to protect [] in grep expression.
23706          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23707          if test "x$FOUND_CORRECT_VERSION" = x; then
23708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23710            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23711$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23712            BOOT_JDK_FOUND=no
23713          else
23714            # We're done! :-)
23715            BOOT_JDK_FOUND=yes
23716
23717  # Only process if variable expands to non-empty
23718
23719  if test "x$BOOT_JDK" != x; then
23720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23721
23722  # Input might be given as Windows format, start by converting to
23723  # unix format.
23724  path="$BOOT_JDK"
23725  new_path=`$CYGPATH -u "$path"`
23726
23727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23730  # "foo.exe" is OK but "foo" is an error.
23731  #
23732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23733  # It is also a way to make sure we got the proper file name for the real test later on.
23734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23735  if test "x$test_shortpath" = x; then
23736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23739  fi
23740
23741  # Call helper function which possibly converts this using DOS-style short mode.
23742  # If so, the updated path is stored in $new_path.
23743
23744  input_path="$new_path"
23745  # Check if we need to convert this using DOS-style short mode. If the path
23746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23747  # take no chances and rewrite it.
23748  # Note: m4 eats our [], so we need to use [ and ] instead.
23749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23750  if test "x$has_forbidden_chars" != x; then
23751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23755      # Going to short mode and back again did indeed matter. Since short mode is
23756      # case insensitive, let's make it lowercase to improve readability.
23757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23758      # Now convert it back to Unix-style (cygpath)
23759      input_path=`$CYGPATH -u "$shortmode_path"`
23760      new_path="$input_path"
23761    fi
23762  fi
23763
23764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23765  if test "x$test_cygdrive_prefix" = x; then
23766    # As a simple fix, exclude /usr/bin since it's not a real path.
23767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23769      # a path prefixed by /cygdrive for fixpath to work.
23770      new_path="$CYGWIN_ROOT_PATH$input_path"
23771    fi
23772  fi
23773
23774
23775  if test "x$path" != "x$new_path"; then
23776    BOOT_JDK="$new_path"
23777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23779  fi
23780
23781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23782
23783  path="$BOOT_JDK"
23784  has_colon=`$ECHO $path | $GREP ^.:`
23785  new_path="$path"
23786  if test "x$has_colon" = x; then
23787    # Not in mixed or Windows style, start by that.
23788    new_path=`cmd //c echo $path`
23789  fi
23790
23791
23792  input_path="$new_path"
23793  # Check if we need to convert this using DOS-style short mode. If the path
23794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23795  # take no chances and rewrite it.
23796  # Note: m4 eats our [], so we need to use [ and ] instead.
23797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23798  if test "x$has_forbidden_chars" != x; then
23799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23801  fi
23802
23803
23804  windows_path="$new_path"
23805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23806    unix_path=`$CYGPATH -u "$windows_path"`
23807    new_path="$unix_path"
23808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23810    new_path="$unix_path"
23811  fi
23812
23813  if test "x$path" != "x$new_path"; then
23814    BOOT_JDK="$new_path"
23815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23817  fi
23818
23819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23821
23822    else
23823      # We're on a unix platform. Hooray! :)
23824      path="$BOOT_JDK"
23825      has_space=`$ECHO "$path" | $GREP " "`
23826      if test "x$has_space" != x; then
23827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23830      fi
23831
23832      # Use eval to expand a potential ~
23833      eval path="$path"
23834      if test ! -f "$path" && test ! -d "$path"; then
23835        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23836      fi
23837
23838      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23839    fi
23840  fi
23841
23842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23843$as_echo_n "checking for Boot JDK... " >&6; }
23844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23845$as_echo "$BOOT_JDK" >&6; }
23846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23847$as_echo_n "checking Boot JDK version... " >&6; }
23848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23850$as_echo "$BOOT_JDK_VERSION" >&6; }
23851          fi # end check jdk version
23852        fi # end check javac
23853      fi # end check java
23854    fi # end check boot jdk found
23855  fi
23856
23857
23858  if test "x$BOOT_JDK_FOUND" = xno; then
23859    # Now execute the test
23860
23861  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23862  BOOT_JDK_SUFFIX=""
23863  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23864  if test "x$ALL_JDKS_FOUND" != x; then
23865    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23866
23867  if test "x$BOOT_JDK_FOUND" = xno; then
23868    # Now execute the test
23869
23870        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23871        if test -d "$BOOT_JDK"; then
23872          BOOT_JDK_FOUND=maybe
23873          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23874$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23875        fi
23876
23877
23878    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23879    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23880      # Do we have a bin/java?
23881      if test ! -x "$BOOT_JDK/bin/java"; then
23882        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23884        BOOT_JDK_FOUND=no
23885      else
23886        # Do we have a bin/javac?
23887        if test ! -x "$BOOT_JDK/bin/javac"; then
23888          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23890          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23891$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23892          BOOT_JDK_FOUND=no
23893        else
23894          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23895          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23896
23897          # Extra M4 quote needed to protect [] in grep expression.
23898          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23899          if test "x$FOUND_CORRECT_VERSION" = x; then
23900            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23902            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23903$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23904            BOOT_JDK_FOUND=no
23905          else
23906            # We're done! :-)
23907            BOOT_JDK_FOUND=yes
23908
23909  # Only process if variable expands to non-empty
23910
23911  if test "x$BOOT_JDK" != x; then
23912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23913
23914  # Input might be given as Windows format, start by converting to
23915  # unix format.
23916  path="$BOOT_JDK"
23917  new_path=`$CYGPATH -u "$path"`
23918
23919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23922  # "foo.exe" is OK but "foo" is an error.
23923  #
23924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23925  # It is also a way to make sure we got the proper file name for the real test later on.
23926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23927  if test "x$test_shortpath" = x; then
23928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23930    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23931  fi
23932
23933  # Call helper function which possibly converts this using DOS-style short mode.
23934  # If so, the updated path is stored in $new_path.
23935
23936  input_path="$new_path"
23937  # Check if we need to convert this using DOS-style short mode. If the path
23938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23939  # take no chances and rewrite it.
23940  # Note: m4 eats our [], so we need to use [ and ] instead.
23941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23942  if test "x$has_forbidden_chars" != x; then
23943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23947      # Going to short mode and back again did indeed matter. Since short mode is
23948      # case insensitive, let's make it lowercase to improve readability.
23949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23950      # Now convert it back to Unix-style (cygpath)
23951      input_path=`$CYGPATH -u "$shortmode_path"`
23952      new_path="$input_path"
23953    fi
23954  fi
23955
23956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23957  if test "x$test_cygdrive_prefix" = x; then
23958    # As a simple fix, exclude /usr/bin since it's not a real path.
23959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23961      # a path prefixed by /cygdrive for fixpath to work.
23962      new_path="$CYGWIN_ROOT_PATH$input_path"
23963    fi
23964  fi
23965
23966
23967  if test "x$path" != "x$new_path"; then
23968    BOOT_JDK="$new_path"
23969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23971  fi
23972
23973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23974
23975  path="$BOOT_JDK"
23976  has_colon=`$ECHO $path | $GREP ^.:`
23977  new_path="$path"
23978  if test "x$has_colon" = x; then
23979    # Not in mixed or Windows style, start by that.
23980    new_path=`cmd //c echo $path`
23981  fi
23982
23983
23984  input_path="$new_path"
23985  # Check if we need to convert this using DOS-style short mode. If the path
23986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23987  # take no chances and rewrite it.
23988  # Note: m4 eats our [], so we need to use [ and ] instead.
23989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23990  if test "x$has_forbidden_chars" != x; then
23991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23993  fi
23994
23995
23996  windows_path="$new_path"
23997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23998    unix_path=`$CYGPATH -u "$windows_path"`
23999    new_path="$unix_path"
24000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24002    new_path="$unix_path"
24003  fi
24004
24005  if test "x$path" != "x$new_path"; then
24006    BOOT_JDK="$new_path"
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24009  fi
24010
24011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24013
24014    else
24015      # We're on a unix platform. Hooray! :)
24016      path="$BOOT_JDK"
24017      has_space=`$ECHO "$path" | $GREP " "`
24018      if test "x$has_space" != x; then
24019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24022      fi
24023
24024      # Use eval to expand a potential ~
24025      eval path="$path"
24026      if test ! -f "$path" && test ! -d "$path"; then
24027        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24028      fi
24029
24030      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24031    fi
24032  fi
24033
24034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24035$as_echo_n "checking for Boot JDK... " >&6; }
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24037$as_echo "$BOOT_JDK" >&6; }
24038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24039$as_echo_n "checking Boot JDK version... " >&6; }
24040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24042$as_echo "$BOOT_JDK_VERSION" >&6; }
24043          fi # end check jdk version
24044        fi # end check javac
24045      fi # end check java
24046    fi # end check boot jdk found
24047  fi
24048
24049    done
24050  fi
24051
24052
24053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24055      # Do we have a bin/java?
24056      if test ! -x "$BOOT_JDK/bin/java"; then
24057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24059        BOOT_JDK_FOUND=no
24060      else
24061        # Do we have a bin/javac?
24062        if test ! -x "$BOOT_JDK/bin/javac"; then
24063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24067          BOOT_JDK_FOUND=no
24068        else
24069          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24070          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24071
24072          # Extra M4 quote needed to protect [] in grep expression.
24073          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24074          if test "x$FOUND_CORRECT_VERSION" = x; then
24075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24077            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24079            BOOT_JDK_FOUND=no
24080          else
24081            # We're done! :-)
24082            BOOT_JDK_FOUND=yes
24083
24084  # Only process if variable expands to non-empty
24085
24086  if test "x$BOOT_JDK" != x; then
24087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24088
24089  # Input might be given as Windows format, start by converting to
24090  # unix format.
24091  path="$BOOT_JDK"
24092  new_path=`$CYGPATH -u "$path"`
24093
24094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24097  # "foo.exe" is OK but "foo" is an error.
24098  #
24099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24100  # It is also a way to make sure we got the proper file name for the real test later on.
24101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24102  if test "x$test_shortpath" = x; then
24103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24106  fi
24107
24108  # Call helper function which possibly converts this using DOS-style short mode.
24109  # If so, the updated path is stored in $new_path.
24110
24111  input_path="$new_path"
24112  # Check if we need to convert this using DOS-style short mode. If the path
24113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24114  # take no chances and rewrite it.
24115  # Note: m4 eats our [], so we need to use [ and ] instead.
24116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24117  if test "x$has_forbidden_chars" != x; then
24118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24122      # Going to short mode and back again did indeed matter. Since short mode is
24123      # case insensitive, let's make it lowercase to improve readability.
24124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24125      # Now convert it back to Unix-style (cygpath)
24126      input_path=`$CYGPATH -u "$shortmode_path"`
24127      new_path="$input_path"
24128    fi
24129  fi
24130
24131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24132  if test "x$test_cygdrive_prefix" = x; then
24133    # As a simple fix, exclude /usr/bin since it's not a real path.
24134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24136      # a path prefixed by /cygdrive for fixpath to work.
24137      new_path="$CYGWIN_ROOT_PATH$input_path"
24138    fi
24139  fi
24140
24141
24142  if test "x$path" != "x$new_path"; then
24143    BOOT_JDK="$new_path"
24144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24146  fi
24147
24148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24149
24150  path="$BOOT_JDK"
24151  has_colon=`$ECHO $path | $GREP ^.:`
24152  new_path="$path"
24153  if test "x$has_colon" = x; then
24154    # Not in mixed or Windows style, start by that.
24155    new_path=`cmd //c echo $path`
24156  fi
24157
24158
24159  input_path="$new_path"
24160  # Check if we need to convert this using DOS-style short mode. If the path
24161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24162  # take no chances and rewrite it.
24163  # Note: m4 eats our [], so we need to use [ and ] instead.
24164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24165  if test "x$has_forbidden_chars" != x; then
24166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24168  fi
24169
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180  if test "x$path" != "x$new_path"; then
24181    BOOT_JDK="$new_path"
24182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24184  fi
24185
24186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24188
24189    else
24190      # We're on a unix platform. Hooray! :)
24191      path="$BOOT_JDK"
24192      has_space=`$ECHO "$path" | $GREP " "`
24193      if test "x$has_space" != x; then
24194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24197      fi
24198
24199      # Use eval to expand a potential ~
24200      eval path="$path"
24201      if test ! -f "$path" && test ! -d "$path"; then
24202        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24203      fi
24204
24205      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24206    fi
24207  fi
24208
24209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24210$as_echo_n "checking for Boot JDK... " >&6; }
24211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24212$as_echo "$BOOT_JDK" >&6; }
24213            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24214$as_echo_n "checking Boot JDK version... " >&6; }
24215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24217$as_echo "$BOOT_JDK_VERSION" >&6; }
24218          fi # end check jdk version
24219        fi # end check javac
24220      fi # end check java
24221    fi # end check boot jdk found
24222  fi
24223
24224  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24225
24226  if test "x$BOOT_JDK_FOUND" = xno; then
24227    # Now execute the test
24228
24229  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24230  BOOT_JDK_SUFFIX="/Contents/Home"
24231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24232  if test "x$ALL_JDKS_FOUND" != x; then
24233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24234
24235  if test "x$BOOT_JDK_FOUND" = xno; then
24236    # Now execute the test
24237
24238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24239        if test -d "$BOOT_JDK"; then
24240          BOOT_JDK_FOUND=maybe
24241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24243        fi
24244
24245
24246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24248      # Do we have a bin/java?
24249      if test ! -x "$BOOT_JDK/bin/java"; then
24250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24252        BOOT_JDK_FOUND=no
24253      else
24254        # Do we have a bin/javac?
24255        if test ! -x "$BOOT_JDK/bin/javac"; then
24256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24260          BOOT_JDK_FOUND=no
24261        else
24262          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24263          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24264
24265          # Extra M4 quote needed to protect [] in grep expression.
24266          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24267          if test "x$FOUND_CORRECT_VERSION" = x; then
24268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24270            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24271$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24272            BOOT_JDK_FOUND=no
24273          else
24274            # We're done! :-)
24275            BOOT_JDK_FOUND=yes
24276
24277  # Only process if variable expands to non-empty
24278
24279  if test "x$BOOT_JDK" != x; then
24280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24281
24282  # Input might be given as Windows format, start by converting to
24283  # unix format.
24284  path="$BOOT_JDK"
24285  new_path=`$CYGPATH -u "$path"`
24286
24287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24290  # "foo.exe" is OK but "foo" is an error.
24291  #
24292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24293  # It is also a way to make sure we got the proper file name for the real test later on.
24294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24295  if test "x$test_shortpath" = x; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24299  fi
24300
24301  # Call helper function which possibly converts this using DOS-style short mode.
24302  # If so, the updated path is stored in $new_path.
24303
24304  input_path="$new_path"
24305  # Check if we need to convert this using DOS-style short mode. If the path
24306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24307  # take no chances and rewrite it.
24308  # Note: m4 eats our [], so we need to use [ and ] instead.
24309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24310  if test "x$has_forbidden_chars" != x; then
24311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24315      # Going to short mode and back again did indeed matter. Since short mode is
24316      # case insensitive, let's make it lowercase to improve readability.
24317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24318      # Now convert it back to Unix-style (cygpath)
24319      input_path=`$CYGPATH -u "$shortmode_path"`
24320      new_path="$input_path"
24321    fi
24322  fi
24323
24324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24325  if test "x$test_cygdrive_prefix" = x; then
24326    # As a simple fix, exclude /usr/bin since it's not a real path.
24327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24329      # a path prefixed by /cygdrive for fixpath to work.
24330      new_path="$CYGWIN_ROOT_PATH$input_path"
24331    fi
24332  fi
24333
24334
24335  if test "x$path" != "x$new_path"; then
24336    BOOT_JDK="$new_path"
24337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24339  fi
24340
24341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24342
24343  path="$BOOT_JDK"
24344  has_colon=`$ECHO $path | $GREP ^.:`
24345  new_path="$path"
24346  if test "x$has_colon" = x; then
24347    # Not in mixed or Windows style, start by that.
24348    new_path=`cmd //c echo $path`
24349  fi
24350
24351
24352  input_path="$new_path"
24353  # Check if we need to convert this using DOS-style short mode. If the path
24354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24355  # take no chances and rewrite it.
24356  # Note: m4 eats our [], so we need to use [ and ] instead.
24357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24358  if test "x$has_forbidden_chars" != x; then
24359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24361  fi
24362
24363
24364  windows_path="$new_path"
24365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24366    unix_path=`$CYGPATH -u "$windows_path"`
24367    new_path="$unix_path"
24368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24370    new_path="$unix_path"
24371  fi
24372
24373  if test "x$path" != "x$new_path"; then
24374    BOOT_JDK="$new_path"
24375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24377  fi
24378
24379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24381
24382    else
24383      # We're on a unix platform. Hooray! :)
24384      path="$BOOT_JDK"
24385      has_space=`$ECHO "$path" | $GREP " "`
24386      if test "x$has_space" != x; then
24387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24390      fi
24391
24392      # Use eval to expand a potential ~
24393      eval path="$path"
24394      if test ! -f "$path" && test ! -d "$path"; then
24395        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24396      fi
24397
24398      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24399    fi
24400  fi
24401
24402            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24403$as_echo_n "checking for Boot JDK... " >&6; }
24404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24405$as_echo "$BOOT_JDK" >&6; }
24406            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24407$as_echo_n "checking Boot JDK version... " >&6; }
24408            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24410$as_echo "$BOOT_JDK_VERSION" >&6; }
24411          fi # end check jdk version
24412        fi # end check javac
24413      fi # end check java
24414    fi # end check boot jdk found
24415  fi
24416
24417    done
24418  fi
24419
24420
24421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24423      # Do we have a bin/java?
24424      if test ! -x "$BOOT_JDK/bin/java"; then
24425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24427        BOOT_JDK_FOUND=no
24428      else
24429        # Do we have a bin/javac?
24430        if test ! -x "$BOOT_JDK/bin/javac"; then
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24435          BOOT_JDK_FOUND=no
24436        else
24437          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24438          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24439
24440          # Extra M4 quote needed to protect [] in grep expression.
24441          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24442          if test "x$FOUND_CORRECT_VERSION" = x; then
24443            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24445            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24446$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24447            BOOT_JDK_FOUND=no
24448          else
24449            # We're done! :-)
24450            BOOT_JDK_FOUND=yes
24451
24452  # Only process if variable expands to non-empty
24453
24454  if test "x$BOOT_JDK" != x; then
24455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24456
24457  # Input might be given as Windows format, start by converting to
24458  # unix format.
24459  path="$BOOT_JDK"
24460  new_path=`$CYGPATH -u "$path"`
24461
24462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24465  # "foo.exe" is OK but "foo" is an error.
24466  #
24467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24468  # It is also a way to make sure we got the proper file name for the real test later on.
24469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24470  if test "x$test_shortpath" = x; then
24471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24473    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24474  fi
24475
24476  # Call helper function which possibly converts this using DOS-style short mode.
24477  # If so, the updated path is stored in $new_path.
24478
24479  input_path="$new_path"
24480  # Check if we need to convert this using DOS-style short mode. If the path
24481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24482  # take no chances and rewrite it.
24483  # Note: m4 eats our [], so we need to use [ and ] instead.
24484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24485  if test "x$has_forbidden_chars" != x; then
24486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24490      # Going to short mode and back again did indeed matter. Since short mode is
24491      # case insensitive, let's make it lowercase to improve readability.
24492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24493      # Now convert it back to Unix-style (cygpath)
24494      input_path=`$CYGPATH -u "$shortmode_path"`
24495      new_path="$input_path"
24496    fi
24497  fi
24498
24499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24500  if test "x$test_cygdrive_prefix" = x; then
24501    # As a simple fix, exclude /usr/bin since it's not a real path.
24502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24504      # a path prefixed by /cygdrive for fixpath to work.
24505      new_path="$CYGWIN_ROOT_PATH$input_path"
24506    fi
24507  fi
24508
24509
24510  if test "x$path" != "x$new_path"; then
24511    BOOT_JDK="$new_path"
24512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24514  fi
24515
24516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24517
24518  path="$BOOT_JDK"
24519  has_colon=`$ECHO $path | $GREP ^.:`
24520  new_path="$path"
24521  if test "x$has_colon" = x; then
24522    # Not in mixed or Windows style, start by that.
24523    new_path=`cmd //c echo $path`
24524  fi
24525
24526
24527  input_path="$new_path"
24528  # Check if we need to convert this using DOS-style short mode. If the path
24529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24530  # take no chances and rewrite it.
24531  # Note: m4 eats our [], so we need to use [ and ] instead.
24532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24533  if test "x$has_forbidden_chars" != x; then
24534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24536  fi
24537
24538
24539  windows_path="$new_path"
24540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24541    unix_path=`$CYGPATH -u "$windows_path"`
24542    new_path="$unix_path"
24543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24545    new_path="$unix_path"
24546  fi
24547
24548  if test "x$path" != "x$new_path"; then
24549    BOOT_JDK="$new_path"
24550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24551$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24552  fi
24553
24554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24556
24557    else
24558      # We're on a unix platform. Hooray! :)
24559      path="$BOOT_JDK"
24560      has_space=`$ECHO "$path" | $GREP " "`
24561      if test "x$has_space" != x; then
24562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24565      fi
24566
24567      # Use eval to expand a potential ~
24568      eval path="$path"
24569      if test ! -f "$path" && test ! -d "$path"; then
24570        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24571      fi
24572
24573      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24574    fi
24575  fi
24576
24577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24578$as_echo_n "checking for Boot JDK... " >&6; }
24579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24580$as_echo "$BOOT_JDK" >&6; }
24581            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24582$as_echo_n "checking Boot JDK version... " >&6; }
24583            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24585$as_echo "$BOOT_JDK_VERSION" >&6; }
24586          fi # end check jdk version
24587        fi # end check javac
24588      fi # end check java
24589    fi # end check boot jdk found
24590  fi
24591
24592
24593  if test "x$BOOT_JDK_FOUND" = xno; then
24594    # Now execute the test
24595
24596  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24597  BOOT_JDK_SUFFIX="/Contents/Home"
24598  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24599  if test "x$ALL_JDKS_FOUND" != x; then
24600    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24601
24602  if test "x$BOOT_JDK_FOUND" = xno; then
24603    # Now execute the test
24604
24605        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24606        if test -d "$BOOT_JDK"; then
24607          BOOT_JDK_FOUND=maybe
24608          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24609$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24610        fi
24611
24612
24613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24615      # Do we have a bin/java?
24616      if test ! -x "$BOOT_JDK/bin/java"; then
24617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24619        BOOT_JDK_FOUND=no
24620      else
24621        # Do we have a bin/javac?
24622        if test ! -x "$BOOT_JDK/bin/javac"; then
24623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24627          BOOT_JDK_FOUND=no
24628        else
24629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24631
24632          # Extra M4 quote needed to protect [] in grep expression.
24633          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24634          if test "x$FOUND_CORRECT_VERSION" = x; then
24635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24639            BOOT_JDK_FOUND=no
24640          else
24641            # We're done! :-)
24642            BOOT_JDK_FOUND=yes
24643
24644  # Only process if variable expands to non-empty
24645
24646  if test "x$BOOT_JDK" != x; then
24647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24648
24649  # Input might be given as Windows format, start by converting to
24650  # unix format.
24651  path="$BOOT_JDK"
24652  new_path=`$CYGPATH -u "$path"`
24653
24654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24657  # "foo.exe" is OK but "foo" is an error.
24658  #
24659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24660  # It is also a way to make sure we got the proper file name for the real test later on.
24661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24662  if test "x$test_shortpath" = x; then
24663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24666  fi
24667
24668  # Call helper function which possibly converts this using DOS-style short mode.
24669  # If so, the updated path is stored in $new_path.
24670
24671  input_path="$new_path"
24672  # Check if we need to convert this using DOS-style short mode. If the path
24673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24674  # take no chances and rewrite it.
24675  # Note: m4 eats our [], so we need to use [ and ] instead.
24676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24677  if test "x$has_forbidden_chars" != x; then
24678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24682      # Going to short mode and back again did indeed matter. Since short mode is
24683      # case insensitive, let's make it lowercase to improve readability.
24684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24685      # Now convert it back to Unix-style (cygpath)
24686      input_path=`$CYGPATH -u "$shortmode_path"`
24687      new_path="$input_path"
24688    fi
24689  fi
24690
24691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24692  if test "x$test_cygdrive_prefix" = x; then
24693    # As a simple fix, exclude /usr/bin since it's not a real path.
24694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24696      # a path prefixed by /cygdrive for fixpath to work.
24697      new_path="$CYGWIN_ROOT_PATH$input_path"
24698    fi
24699  fi
24700
24701
24702  if test "x$path" != "x$new_path"; then
24703    BOOT_JDK="$new_path"
24704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24706  fi
24707
24708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24709
24710  path="$BOOT_JDK"
24711  has_colon=`$ECHO $path | $GREP ^.:`
24712  new_path="$path"
24713  if test "x$has_colon" = x; then
24714    # Not in mixed or Windows style, start by that.
24715    new_path=`cmd //c echo $path`
24716  fi
24717
24718
24719  input_path="$new_path"
24720  # Check if we need to convert this using DOS-style short mode. If the path
24721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24722  # take no chances and rewrite it.
24723  # Note: m4 eats our [], so we need to use [ and ] instead.
24724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24725  if test "x$has_forbidden_chars" != x; then
24726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24728  fi
24729
24730
24731  windows_path="$new_path"
24732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24733    unix_path=`$CYGPATH -u "$windows_path"`
24734    new_path="$unix_path"
24735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24737    new_path="$unix_path"
24738  fi
24739
24740  if test "x$path" != "x$new_path"; then
24741    BOOT_JDK="$new_path"
24742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24744  fi
24745
24746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24748
24749    else
24750      # We're on a unix platform. Hooray! :)
24751      path="$BOOT_JDK"
24752      has_space=`$ECHO "$path" | $GREP " "`
24753      if test "x$has_space" != x; then
24754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24757      fi
24758
24759      # Use eval to expand a potential ~
24760      eval path="$path"
24761      if test ! -f "$path" && test ! -d "$path"; then
24762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24763      fi
24764
24765      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24766    fi
24767  fi
24768
24769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24770$as_echo_n "checking for Boot JDK... " >&6; }
24771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24772$as_echo "$BOOT_JDK" >&6; }
24773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24774$as_echo_n "checking Boot JDK version... " >&6; }
24775            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24777$as_echo "$BOOT_JDK_VERSION" >&6; }
24778          fi # end check jdk version
24779        fi # end check javac
24780      fi # end check java
24781    fi # end check boot jdk found
24782  fi
24783
24784    done
24785  fi
24786
24787
24788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24790      # Do we have a bin/java?
24791      if test ! -x "$BOOT_JDK/bin/java"; then
24792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24794        BOOT_JDK_FOUND=no
24795      else
24796        # Do we have a bin/javac?
24797        if test ! -x "$BOOT_JDK/bin/javac"; then
24798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24802          BOOT_JDK_FOUND=no
24803        else
24804          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24805          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24806
24807          # Extra M4 quote needed to protect [] in grep expression.
24808          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24809          if test "x$FOUND_CORRECT_VERSION" = x; then
24810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24813$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24814            BOOT_JDK_FOUND=no
24815          else
24816            # We're done! :-)
24817            BOOT_JDK_FOUND=yes
24818
24819  # Only process if variable expands to non-empty
24820
24821  if test "x$BOOT_JDK" != x; then
24822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24823
24824  # Input might be given as Windows format, start by converting to
24825  # unix format.
24826  path="$BOOT_JDK"
24827  new_path=`$CYGPATH -u "$path"`
24828
24829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24832  # "foo.exe" is OK but "foo" is an error.
24833  #
24834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24835  # It is also a way to make sure we got the proper file name for the real test later on.
24836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24837  if test "x$test_shortpath" = x; then
24838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24841  fi
24842
24843  # Call helper function which possibly converts this using DOS-style short mode.
24844  # If so, the updated path is stored in $new_path.
24845
24846  input_path="$new_path"
24847  # Check if we need to convert this using DOS-style short mode. If the path
24848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24849  # take no chances and rewrite it.
24850  # Note: m4 eats our [], so we need to use [ and ] instead.
24851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24852  if test "x$has_forbidden_chars" != x; then
24853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24857      # Going to short mode and back again did indeed matter. Since short mode is
24858      # case insensitive, let's make it lowercase to improve readability.
24859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24860      # Now convert it back to Unix-style (cygpath)
24861      input_path=`$CYGPATH -u "$shortmode_path"`
24862      new_path="$input_path"
24863    fi
24864  fi
24865
24866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24867  if test "x$test_cygdrive_prefix" = x; then
24868    # As a simple fix, exclude /usr/bin since it's not a real path.
24869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24871      # a path prefixed by /cygdrive for fixpath to work.
24872      new_path="$CYGWIN_ROOT_PATH$input_path"
24873    fi
24874  fi
24875
24876
24877  if test "x$path" != "x$new_path"; then
24878    BOOT_JDK="$new_path"
24879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24881  fi
24882
24883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884
24885  path="$BOOT_JDK"
24886  has_colon=`$ECHO $path | $GREP ^.:`
24887  new_path="$path"
24888  if test "x$has_colon" = x; then
24889    # Not in mixed or Windows style, start by that.
24890    new_path=`cmd //c echo $path`
24891  fi
24892
24893
24894  input_path="$new_path"
24895  # Check if we need to convert this using DOS-style short mode. If the path
24896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24897  # take no chances and rewrite it.
24898  # Note: m4 eats our [], so we need to use [ and ] instead.
24899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24900  if test "x$has_forbidden_chars" != x; then
24901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24903  fi
24904
24905
24906  windows_path="$new_path"
24907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908    unix_path=`$CYGPATH -u "$windows_path"`
24909    new_path="$unix_path"
24910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24912    new_path="$unix_path"
24913  fi
24914
24915  if test "x$path" != "x$new_path"; then
24916    BOOT_JDK="$new_path"
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24919  fi
24920
24921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24923
24924    else
24925      # We're on a unix platform. Hooray! :)
24926      path="$BOOT_JDK"
24927      has_space=`$ECHO "$path" | $GREP " "`
24928      if test "x$has_space" != x; then
24929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24932      fi
24933
24934      # Use eval to expand a potential ~
24935      eval path="$path"
24936      if test ! -f "$path" && test ! -d "$path"; then
24937        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24938      fi
24939
24940      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24941    fi
24942  fi
24943
24944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24945$as_echo_n "checking for Boot JDK... " >&6; }
24946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24947$as_echo "$BOOT_JDK" >&6; }
24948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24949$as_echo_n "checking Boot JDK version... " >&6; }
24950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24952$as_echo "$BOOT_JDK_VERSION" >&6; }
24953          fi # end check jdk version
24954        fi # end check javac
24955      fi # end check java
24956    fi # end check boot jdk found
24957  fi
24958
24959  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24960
24961  if test "x$BOOT_JDK_FOUND" = xno; then
24962    # Now execute the test
24963
24964  BOOT_JDK_PREFIX="/usr/lib/jvm"
24965  BOOT_JDK_SUFFIX=""
24966  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24967  if test "x$ALL_JDKS_FOUND" != x; then
24968    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24974        if test -d "$BOOT_JDK"; then
24975          BOOT_JDK_FOUND=maybe
24976          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24977$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24978        fi
24979
24980
24981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24983      # Do we have a bin/java?
24984      if test ! -x "$BOOT_JDK/bin/java"; then
24985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24987        BOOT_JDK_FOUND=no
24988      else
24989        # Do we have a bin/javac?
24990        if test ! -x "$BOOT_JDK/bin/javac"; then
24991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24995          BOOT_JDK_FOUND=no
24996        else
24997          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24998          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24999
25000          # Extra M4 quote needed to protect [] in grep expression.
25001          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25002          if test "x$FOUND_CORRECT_VERSION" = x; then
25003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25006$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25007            BOOT_JDK_FOUND=no
25008          else
25009            # We're done! :-)
25010            BOOT_JDK_FOUND=yes
25011
25012  # Only process if variable expands to non-empty
25013
25014  if test "x$BOOT_JDK" != x; then
25015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25016
25017  # Input might be given as Windows format, start by converting to
25018  # unix format.
25019  path="$BOOT_JDK"
25020  new_path=`$CYGPATH -u "$path"`
25021
25022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25025  # "foo.exe" is OK but "foo" is an error.
25026  #
25027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25028  # It is also a way to make sure we got the proper file name for the real test later on.
25029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25030  if test "x$test_shortpath" = x; then
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25033    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25034  fi
25035
25036  # Call helper function which possibly converts this using DOS-style short mode.
25037  # If so, the updated path is stored in $new_path.
25038
25039  input_path="$new_path"
25040  # Check if we need to convert this using DOS-style short mode. If the path
25041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25042  # take no chances and rewrite it.
25043  # Note: m4 eats our [], so we need to use [ and ] instead.
25044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25045  if test "x$has_forbidden_chars" != x; then
25046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25050      # Going to short mode and back again did indeed matter. Since short mode is
25051      # case insensitive, let's make it lowercase to improve readability.
25052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25053      # Now convert it back to Unix-style (cygpath)
25054      input_path=`$CYGPATH -u "$shortmode_path"`
25055      new_path="$input_path"
25056    fi
25057  fi
25058
25059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25060  if test "x$test_cygdrive_prefix" = x; then
25061    # As a simple fix, exclude /usr/bin since it's not a real path.
25062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25064      # a path prefixed by /cygdrive for fixpath to work.
25065      new_path="$CYGWIN_ROOT_PATH$input_path"
25066    fi
25067  fi
25068
25069
25070  if test "x$path" != "x$new_path"; then
25071    BOOT_JDK="$new_path"
25072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25074  fi
25075
25076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25077
25078  path="$BOOT_JDK"
25079  has_colon=`$ECHO $path | $GREP ^.:`
25080  new_path="$path"
25081  if test "x$has_colon" = x; then
25082    # Not in mixed or Windows style, start by that.
25083    new_path=`cmd //c echo $path`
25084  fi
25085
25086
25087  input_path="$new_path"
25088  # Check if we need to convert this using DOS-style short mode. If the path
25089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25090  # take no chances and rewrite it.
25091  # Note: m4 eats our [], so we need to use [ and ] instead.
25092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25093  if test "x$has_forbidden_chars" != x; then
25094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25096  fi
25097
25098
25099  windows_path="$new_path"
25100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101    unix_path=`$CYGPATH -u "$windows_path"`
25102    new_path="$unix_path"
25103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25105    new_path="$unix_path"
25106  fi
25107
25108  if test "x$path" != "x$new_path"; then
25109    BOOT_JDK="$new_path"
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25112  fi
25113
25114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25116
25117    else
25118      # We're on a unix platform. Hooray! :)
25119      path="$BOOT_JDK"
25120      has_space=`$ECHO "$path" | $GREP " "`
25121      if test "x$has_space" != x; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25125      fi
25126
25127      # Use eval to expand a potential ~
25128      eval path="$path"
25129      if test ! -f "$path" && test ! -d "$path"; then
25130        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25131      fi
25132
25133      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25134    fi
25135  fi
25136
25137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25138$as_echo_n "checking for Boot JDK... " >&6; }
25139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25140$as_echo "$BOOT_JDK" >&6; }
25141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25142$as_echo_n "checking Boot JDK version... " >&6; }
25143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25145$as_echo "$BOOT_JDK_VERSION" >&6; }
25146          fi # end check jdk version
25147        fi # end check javac
25148      fi # end check java
25149    fi # end check boot jdk found
25150  fi
25151
25152    done
25153  fi
25154
25155
25156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25158      # Do we have a bin/java?
25159      if test ! -x "$BOOT_JDK/bin/java"; then
25160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25162        BOOT_JDK_FOUND=no
25163      else
25164        # Do we have a bin/javac?
25165        if test ! -x "$BOOT_JDK/bin/javac"; then
25166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25170          BOOT_JDK_FOUND=no
25171        else
25172          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25173          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25174
25175          # Extra M4 quote needed to protect [] in grep expression.
25176          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25177          if test "x$FOUND_CORRECT_VERSION" = x; then
25178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25180            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25181$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25182            BOOT_JDK_FOUND=no
25183          else
25184            # We're done! :-)
25185            BOOT_JDK_FOUND=yes
25186
25187  # Only process if variable expands to non-empty
25188
25189  if test "x$BOOT_JDK" != x; then
25190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25191
25192  # Input might be given as Windows format, start by converting to
25193  # unix format.
25194  path="$BOOT_JDK"
25195  new_path=`$CYGPATH -u "$path"`
25196
25197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25200  # "foo.exe" is OK but "foo" is an error.
25201  #
25202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25203  # It is also a way to make sure we got the proper file name for the real test later on.
25204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25205  if test "x$test_shortpath" = x; then
25206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25208    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25209  fi
25210
25211  # Call helper function which possibly converts this using DOS-style short mode.
25212  # If so, the updated path is stored in $new_path.
25213
25214  input_path="$new_path"
25215  # Check if we need to convert this using DOS-style short mode. If the path
25216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25217  # take no chances and rewrite it.
25218  # Note: m4 eats our [], so we need to use [ and ] instead.
25219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25220  if test "x$has_forbidden_chars" != x; then
25221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25225      # Going to short mode and back again did indeed matter. Since short mode is
25226      # case insensitive, let's make it lowercase to improve readability.
25227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25228      # Now convert it back to Unix-style (cygpath)
25229      input_path=`$CYGPATH -u "$shortmode_path"`
25230      new_path="$input_path"
25231    fi
25232  fi
25233
25234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25235  if test "x$test_cygdrive_prefix" = x; then
25236    # As a simple fix, exclude /usr/bin since it's not a real path.
25237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25239      # a path prefixed by /cygdrive for fixpath to work.
25240      new_path="$CYGWIN_ROOT_PATH$input_path"
25241    fi
25242  fi
25243
25244
25245  if test "x$path" != "x$new_path"; then
25246    BOOT_JDK="$new_path"
25247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25249  fi
25250
25251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25252
25253  path="$BOOT_JDK"
25254  has_colon=`$ECHO $path | $GREP ^.:`
25255  new_path="$path"
25256  if test "x$has_colon" = x; then
25257    # Not in mixed or Windows style, start by that.
25258    new_path=`cmd //c echo $path`
25259  fi
25260
25261
25262  input_path="$new_path"
25263  # Check if we need to convert this using DOS-style short mode. If the path
25264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25265  # take no chances and rewrite it.
25266  # Note: m4 eats our [], so we need to use [ and ] instead.
25267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25268  if test "x$has_forbidden_chars" != x; then
25269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25271  fi
25272
25273
25274  windows_path="$new_path"
25275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25276    unix_path=`$CYGPATH -u "$windows_path"`
25277    new_path="$unix_path"
25278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25280    new_path="$unix_path"
25281  fi
25282
25283  if test "x$path" != "x$new_path"; then
25284    BOOT_JDK="$new_path"
25285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25287  fi
25288
25289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25291
25292    else
25293      # We're on a unix platform. Hooray! :)
25294      path="$BOOT_JDK"
25295      has_space=`$ECHO "$path" | $GREP " "`
25296      if test "x$has_space" != x; then
25297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25300      fi
25301
25302      # Use eval to expand a potential ~
25303      eval path="$path"
25304      if test ! -f "$path" && test ! -d "$path"; then
25305        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25306      fi
25307
25308      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25309    fi
25310  fi
25311
25312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25313$as_echo_n "checking for Boot JDK... " >&6; }
25314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25315$as_echo "$BOOT_JDK" >&6; }
25316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25317$as_echo_n "checking Boot JDK version... " >&6; }
25318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25320$as_echo "$BOOT_JDK_VERSION" >&6; }
25321          fi # end check jdk version
25322        fi # end check javac
25323      fi # end check java
25324    fi # end check boot jdk found
25325  fi
25326
25327  fi
25328
25329
25330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25332      # Do we have a bin/java?
25333      if test ! -x "$BOOT_JDK/bin/java"; then
25334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25336        BOOT_JDK_FOUND=no
25337      else
25338        # Do we have a bin/javac?
25339        if test ! -x "$BOOT_JDK/bin/javac"; then
25340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25344          BOOT_JDK_FOUND=no
25345        else
25346          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25347          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25348
25349          # Extra M4 quote needed to protect [] in grep expression.
25350          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25351          if test "x$FOUND_CORRECT_VERSION" = x; then
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25354            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25355$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25356            BOOT_JDK_FOUND=no
25357          else
25358            # We're done! :-)
25359            BOOT_JDK_FOUND=yes
25360
25361  # Only process if variable expands to non-empty
25362
25363  if test "x$BOOT_JDK" != x; then
25364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25365
25366  # Input might be given as Windows format, start by converting to
25367  # unix format.
25368  path="$BOOT_JDK"
25369  new_path=`$CYGPATH -u "$path"`
25370
25371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25374  # "foo.exe" is OK but "foo" is an error.
25375  #
25376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25377  # It is also a way to make sure we got the proper file name for the real test later on.
25378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25379  if test "x$test_shortpath" = x; then
25380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25383  fi
25384
25385  # Call helper function which possibly converts this using DOS-style short mode.
25386  # If so, the updated path is stored in $new_path.
25387
25388  input_path="$new_path"
25389  # Check if we need to convert this using DOS-style short mode. If the path
25390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25391  # take no chances and rewrite it.
25392  # Note: m4 eats our [], so we need to use [ and ] instead.
25393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25394  if test "x$has_forbidden_chars" != x; then
25395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25399      # Going to short mode and back again did indeed matter. Since short mode is
25400      # case insensitive, let's make it lowercase to improve readability.
25401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25402      # Now convert it back to Unix-style (cygpath)
25403      input_path=`$CYGPATH -u "$shortmode_path"`
25404      new_path="$input_path"
25405    fi
25406  fi
25407
25408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25409  if test "x$test_cygdrive_prefix" = x; then
25410    # As a simple fix, exclude /usr/bin since it's not a real path.
25411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25413      # a path prefixed by /cygdrive for fixpath to work.
25414      new_path="$CYGWIN_ROOT_PATH$input_path"
25415    fi
25416  fi
25417
25418
25419  if test "x$path" != "x$new_path"; then
25420    BOOT_JDK="$new_path"
25421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25423  fi
25424
25425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25426
25427  path="$BOOT_JDK"
25428  has_colon=`$ECHO $path | $GREP ^.:`
25429  new_path="$path"
25430  if test "x$has_colon" = x; then
25431    # Not in mixed or Windows style, start by that.
25432    new_path=`cmd //c echo $path`
25433  fi
25434
25435
25436  input_path="$new_path"
25437  # Check if we need to convert this using DOS-style short mode. If the path
25438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25439  # take no chances and rewrite it.
25440  # Note: m4 eats our [], so we need to use [ and ] instead.
25441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25442  if test "x$has_forbidden_chars" != x; then
25443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445  fi
25446
25447
25448  windows_path="$new_path"
25449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25450    unix_path=`$CYGPATH -u "$windows_path"`
25451    new_path="$unix_path"
25452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25454    new_path="$unix_path"
25455  fi
25456
25457  if test "x$path" != "x$new_path"; then
25458    BOOT_JDK="$new_path"
25459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25461  fi
25462
25463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25465
25466    else
25467      # We're on a unix platform. Hooray! :)
25468      path="$BOOT_JDK"
25469      has_space=`$ECHO "$path" | $GREP " "`
25470      if test "x$has_space" != x; then
25471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25474      fi
25475
25476      # Use eval to expand a potential ~
25477      eval path="$path"
25478      if test ! -f "$path" && test ! -d "$path"; then
25479        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25480      fi
25481
25482      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25483    fi
25484  fi
25485
25486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25487$as_echo_n "checking for Boot JDK... " >&6; }
25488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25489$as_echo "$BOOT_JDK" >&6; }
25490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25491$as_echo_n "checking Boot JDK version... " >&6; }
25492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25494$as_echo "$BOOT_JDK_VERSION" >&6; }
25495          fi # end check jdk version
25496        fi # end check javac
25497      fi # end check java
25498    fi # end check boot jdk found
25499  fi
25500
25501
25502  # If we haven't found anything yet, we've truly lost. Give up.
25503  if test "x$BOOT_JDK_FOUND" = xno; then
25504
25505  # Print a helpful message on how to acquire the necessary build dependency.
25506  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25507  MISSING_DEPENDENCY=openjdk
25508
25509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510    cygwin_help $MISSING_DEPENDENCY
25511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512    msys_help $MISSING_DEPENDENCY
25513  else
25514    PKGHANDLER_COMMAND=
25515
25516    case $PKGHANDLER in
25517      apt-get)
25518        apt_help     $MISSING_DEPENDENCY ;;
25519      yum)
25520        yum_help     $MISSING_DEPENDENCY ;;
25521      port)
25522        port_help    $MISSING_DEPENDENCY ;;
25523      pkgutil)
25524        pkgutil_help $MISSING_DEPENDENCY ;;
25525      pkgadd)
25526        pkgadd_help  $MISSING_DEPENDENCY ;;
25527    esac
25528
25529    if test "x$PKGHANDLER_COMMAND" != x; then
25530      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25531    fi
25532  fi
25533
25534    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25535$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25536    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25537$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25538    as_fn_error $? "Cannot continue" "$LINENO" 5
25539  fi
25540
25541
25542
25543  # Setup tools from the Boot JDK.
25544
25545  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25546
25547  # Publish this variable in the help.
25548
25549
25550  if test "x$JAVA" = x; then
25551    # The variable is not set by user, try to locate tool using the code snippet
25552
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25554$as_echo_n "checking for java in Boot JDK... " >&6; }
25555      JAVA=$BOOT_JDK/bin/java
25556      if test ! -x $JAVA; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25558$as_echo "not found" >&6; }
25559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25561        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25562      fi
25563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25564$as_echo "ok" >&6; }
25565
25566
25567  else
25568    # The variable is set, but is it from the command line or the environment?
25569
25570    # Try to remove the string !JAVA! from our list.
25571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25573      # If it failed, the variable was not from the command line. Ignore it,
25574      # but warn the user (except for BASH, which is always set by the calling BASH).
25575      if test "xJAVA" != xBASH; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25577$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25578      fi
25579      # Try to locate tool using the code snippet
25580
25581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25582$as_echo_n "checking for java in Boot JDK... " >&6; }
25583      JAVA=$BOOT_JDK/bin/java
25584      if test ! -x $JAVA; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25586$as_echo "not found" >&6; }
25587        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25588$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25589        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25590      fi
25591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25592$as_echo "ok" >&6; }
25593
25594
25595    else
25596      # If it succeeded, then it was overridden by the user. We will use it
25597      # for the tool.
25598
25599      # First remove it from the list of overridden variables, so we can test
25600      # for unknown variables in the end.
25601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25602
25603      # Check if the provided tool contains a complete path.
25604      tool_specified="$JAVA"
25605      tool_basename="${tool_specified##*/}"
25606      if test "x$tool_basename" = "x$tool_specified"; then
25607        # A command without a complete path is provided, search $PATH.
25608        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25609$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25610        # Extract the first word of "$tool_basename", so it can be a program name with args.
25611set dummy $tool_basename; ac_word=$2
25612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25613$as_echo_n "checking for $ac_word... " >&6; }
25614if ${ac_cv_path_JAVA+:} false; then :
25615  $as_echo_n "(cached) " >&6
25616else
25617  case $JAVA in
25618  [\\/]* | ?:[\\/]*)
25619  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25620  ;;
25621  *)
25622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25623for as_dir in $PATH
25624do
25625  IFS=$as_save_IFS
25626  test -z "$as_dir" && as_dir=.
25627    for ac_exec_ext in '' $ac_executable_extensions; do
25628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25629    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25631    break 2
25632  fi
25633done
25634  done
25635IFS=$as_save_IFS
25636
25637  ;;
25638esac
25639fi
25640JAVA=$ac_cv_path_JAVA
25641if test -n "$JAVA"; then
25642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25643$as_echo "$JAVA" >&6; }
25644else
25645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25646$as_echo "no" >&6; }
25647fi
25648
25649
25650        if test "x$JAVA" = x; then
25651          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25652        fi
25653      else
25654        # Otherwise we believe it is a complete path. Use it as it is.
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25656$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25658$as_echo_n "checking for JAVA... " >&6; }
25659        if test ! -x "$tool_specified"; then
25660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25661$as_echo "not found" >&6; }
25662          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25663        fi
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25665$as_echo "$tool_specified" >&6; }
25666      fi
25667    fi
25668  fi
25669
25670
25671
25672  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25673
25674  # Publish this variable in the help.
25675
25676
25677  if test "x$JAVAC" = x; then
25678    # The variable is not set by user, try to locate tool using the code snippet
25679
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25681$as_echo_n "checking for javac in Boot JDK... " >&6; }
25682      JAVAC=$BOOT_JDK/bin/javac
25683      if test ! -x $JAVAC; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25685$as_echo "not found" >&6; }
25686        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25688        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25689      fi
25690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25691$as_echo "ok" >&6; }
25692
25693
25694  else
25695    # The variable is set, but is it from the command line or the environment?
25696
25697    # Try to remove the string !JAVAC! from our list.
25698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25700      # If it failed, the variable was not from the command line. Ignore it,
25701      # but warn the user (except for BASH, which is always set by the calling BASH).
25702      if test "xJAVAC" != xBASH; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25704$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25705      fi
25706      # Try to locate tool using the code snippet
25707
25708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25709$as_echo_n "checking for javac in Boot JDK... " >&6; }
25710      JAVAC=$BOOT_JDK/bin/javac
25711      if test ! -x $JAVAC; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25713$as_echo "not found" >&6; }
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25715$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25716        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25717      fi
25718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25719$as_echo "ok" >&6; }
25720
25721
25722    else
25723      # If it succeeded, then it was overridden by the user. We will use it
25724      # for the tool.
25725
25726      # First remove it from the list of overridden variables, so we can test
25727      # for unknown variables in the end.
25728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25729
25730      # Check if the provided tool contains a complete path.
25731      tool_specified="$JAVAC"
25732      tool_basename="${tool_specified##*/}"
25733      if test "x$tool_basename" = "x$tool_specified"; then
25734        # A command without a complete path is provided, search $PATH.
25735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25736$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25737        # Extract the first word of "$tool_basename", so it can be a program name with args.
25738set dummy $tool_basename; ac_word=$2
25739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25740$as_echo_n "checking for $ac_word... " >&6; }
25741if ${ac_cv_path_JAVAC+:} false; then :
25742  $as_echo_n "(cached) " >&6
25743else
25744  case $JAVAC in
25745  [\\/]* | ?:[\\/]*)
25746  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25747  ;;
25748  *)
25749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25750for as_dir in $PATH
25751do
25752  IFS=$as_save_IFS
25753  test -z "$as_dir" && as_dir=.
25754    for ac_exec_ext in '' $ac_executable_extensions; do
25755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25756    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25758    break 2
25759  fi
25760done
25761  done
25762IFS=$as_save_IFS
25763
25764  ;;
25765esac
25766fi
25767JAVAC=$ac_cv_path_JAVAC
25768if test -n "$JAVAC"; then
25769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25770$as_echo "$JAVAC" >&6; }
25771else
25772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25773$as_echo "no" >&6; }
25774fi
25775
25776
25777        if test "x$JAVAC" = x; then
25778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25779        fi
25780      else
25781        # Otherwise we believe it is a complete path. Use it as it is.
25782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25783$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25785$as_echo_n "checking for JAVAC... " >&6; }
25786        if test ! -x "$tool_specified"; then
25787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25788$as_echo "not found" >&6; }
25789          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25790        fi
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25792$as_echo "$tool_specified" >&6; }
25793      fi
25794    fi
25795  fi
25796
25797
25798
25799  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25800
25801  # Publish this variable in the help.
25802
25803
25804  if test "x$JAVAH" = x; then
25805    # The variable is not set by user, try to locate tool using the code snippet
25806
25807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25808$as_echo_n "checking for javah in Boot JDK... " >&6; }
25809      JAVAH=$BOOT_JDK/bin/javah
25810      if test ! -x $JAVAH; then
25811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25812$as_echo "not found" >&6; }
25813        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25814$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25815        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25816      fi
25817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25818$as_echo "ok" >&6; }
25819
25820
25821  else
25822    # The variable is set, but is it from the command line or the environment?
25823
25824    # Try to remove the string !JAVAH! from our list.
25825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25827      # If it failed, the variable was not from the command line. Ignore it,
25828      # but warn the user (except for BASH, which is always set by the calling BASH).
25829      if test "xJAVAH" != xBASH; then
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25831$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25832      fi
25833      # Try to locate tool using the code snippet
25834
25835      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25836$as_echo_n "checking for javah in Boot JDK... " >&6; }
25837      JAVAH=$BOOT_JDK/bin/javah
25838      if test ! -x $JAVAH; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25840$as_echo "not found" >&6; }
25841        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25842$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25843        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25844      fi
25845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25846$as_echo "ok" >&6; }
25847
25848
25849    else
25850      # If it succeeded, then it was overridden by the user. We will use it
25851      # for the tool.
25852
25853      # First remove it from the list of overridden variables, so we can test
25854      # for unknown variables in the end.
25855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25856
25857      # Check if the provided tool contains a complete path.
25858      tool_specified="$JAVAH"
25859      tool_basename="${tool_specified##*/}"
25860      if test "x$tool_basename" = "x$tool_specified"; then
25861        # A command without a complete path is provided, search $PATH.
25862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25863$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25864        # Extract the first word of "$tool_basename", so it can be a program name with args.
25865set dummy $tool_basename; ac_word=$2
25866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25867$as_echo_n "checking for $ac_word... " >&6; }
25868if ${ac_cv_path_JAVAH+:} false; then :
25869  $as_echo_n "(cached) " >&6
25870else
25871  case $JAVAH in
25872  [\\/]* | ?:[\\/]*)
25873  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25874  ;;
25875  *)
25876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25877for as_dir in $PATH
25878do
25879  IFS=$as_save_IFS
25880  test -z "$as_dir" && as_dir=.
25881    for ac_exec_ext in '' $ac_executable_extensions; do
25882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25883    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25885    break 2
25886  fi
25887done
25888  done
25889IFS=$as_save_IFS
25890
25891  ;;
25892esac
25893fi
25894JAVAH=$ac_cv_path_JAVAH
25895if test -n "$JAVAH"; then
25896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25897$as_echo "$JAVAH" >&6; }
25898else
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25900$as_echo "no" >&6; }
25901fi
25902
25903
25904        if test "x$JAVAH" = x; then
25905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25906        fi
25907      else
25908        # Otherwise we believe it is a complete path. Use it as it is.
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25910$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25912$as_echo_n "checking for JAVAH... " >&6; }
25913        if test ! -x "$tool_specified"; then
25914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25915$as_echo "not found" >&6; }
25916          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25917        fi
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25919$as_echo "$tool_specified" >&6; }
25920      fi
25921    fi
25922  fi
25923
25924
25925
25926  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25927
25928  # Publish this variable in the help.
25929
25930
25931  if test "x$JAR" = x; then
25932    # The variable is not set by user, try to locate tool using the code snippet
25933
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25935$as_echo_n "checking for jar in Boot JDK... " >&6; }
25936      JAR=$BOOT_JDK/bin/jar
25937      if test ! -x $JAR; then
25938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25939$as_echo "not found" >&6; }
25940        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25941$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25942        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25943      fi
25944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25945$as_echo "ok" >&6; }
25946
25947
25948  else
25949    # The variable is set, but is it from the command line or the environment?
25950
25951    # Try to remove the string !JAR! from our list.
25952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25954      # If it failed, the variable was not from the command line. Ignore it,
25955      # but warn the user (except for BASH, which is always set by the calling BASH).
25956      if test "xJAR" != xBASH; then
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25958$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25959      fi
25960      # Try to locate tool using the code snippet
25961
25962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25963$as_echo_n "checking for jar in Boot JDK... " >&6; }
25964      JAR=$BOOT_JDK/bin/jar
25965      if test ! -x $JAR; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25967$as_echo "not found" >&6; }
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25969$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25970        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25971      fi
25972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25973$as_echo "ok" >&6; }
25974
25975
25976    else
25977      # If it succeeded, then it was overridden by the user. We will use it
25978      # for the tool.
25979
25980      # First remove it from the list of overridden variables, so we can test
25981      # for unknown variables in the end.
25982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25983
25984      # Check if the provided tool contains a complete path.
25985      tool_specified="$JAR"
25986      tool_basename="${tool_specified##*/}"
25987      if test "x$tool_basename" = "x$tool_specified"; then
25988        # A command without a complete path is provided, search $PATH.
25989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25990$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25991        # Extract the first word of "$tool_basename", so it can be a program name with args.
25992set dummy $tool_basename; ac_word=$2
25993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25994$as_echo_n "checking for $ac_word... " >&6; }
25995if ${ac_cv_path_JAR+:} false; then :
25996  $as_echo_n "(cached) " >&6
25997else
25998  case $JAR in
25999  [\\/]* | ?:[\\/]*)
26000  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26001  ;;
26002  *)
26003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26004for as_dir in $PATH
26005do
26006  IFS=$as_save_IFS
26007  test -z "$as_dir" && as_dir=.
26008    for ac_exec_ext in '' $ac_executable_extensions; do
26009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26010    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26012    break 2
26013  fi
26014done
26015  done
26016IFS=$as_save_IFS
26017
26018  ;;
26019esac
26020fi
26021JAR=$ac_cv_path_JAR
26022if test -n "$JAR"; then
26023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26024$as_echo "$JAR" >&6; }
26025else
26026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26027$as_echo "no" >&6; }
26028fi
26029
26030
26031        if test "x$JAR" = x; then
26032          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26033        fi
26034      else
26035        # Otherwise we believe it is a complete path. Use it as it is.
26036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26037$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26039$as_echo_n "checking for JAR... " >&6; }
26040        if test ! -x "$tool_specified"; then
26041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26042$as_echo "not found" >&6; }
26043          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26044        fi
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26046$as_echo "$tool_specified" >&6; }
26047      fi
26048    fi
26049  fi
26050
26051
26052
26053  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26054
26055  # Publish this variable in the help.
26056
26057
26058  if test "x$JARSIGNER" = x; then
26059    # The variable is not set by user, try to locate tool using the code snippet
26060
26061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26062$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26063      JARSIGNER=$BOOT_JDK/bin/jarsigner
26064      if test ! -x $JARSIGNER; then
26065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26066$as_echo "not found" >&6; }
26067        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26068$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26069        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26070      fi
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26072$as_echo "ok" >&6; }
26073
26074
26075  else
26076    # The variable is set, but is it from the command line or the environment?
26077
26078    # Try to remove the string !JARSIGNER! from our list.
26079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26081      # If it failed, the variable was not from the command line. Ignore it,
26082      # but warn the user (except for BASH, which is always set by the calling BASH).
26083      if test "xJARSIGNER" != xBASH; then
26084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26085$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26086      fi
26087      # Try to locate tool using the code snippet
26088
26089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26090$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26091      JARSIGNER=$BOOT_JDK/bin/jarsigner
26092      if test ! -x $JARSIGNER; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26094$as_echo "not found" >&6; }
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26096$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26097        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26098      fi
26099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26100$as_echo "ok" >&6; }
26101
26102
26103    else
26104      # If it succeeded, then it was overridden by the user. We will use it
26105      # for the tool.
26106
26107      # First remove it from the list of overridden variables, so we can test
26108      # for unknown variables in the end.
26109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26110
26111      # Check if the provided tool contains a complete path.
26112      tool_specified="$JARSIGNER"
26113      tool_basename="${tool_specified##*/}"
26114      if test "x$tool_basename" = "x$tool_specified"; then
26115        # A command without a complete path is provided, search $PATH.
26116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26117$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26118        # Extract the first word of "$tool_basename", so it can be a program name with args.
26119set dummy $tool_basename; ac_word=$2
26120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26121$as_echo_n "checking for $ac_word... " >&6; }
26122if ${ac_cv_path_JARSIGNER+:} false; then :
26123  $as_echo_n "(cached) " >&6
26124else
26125  case $JARSIGNER in
26126  [\\/]* | ?:[\\/]*)
26127  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26128  ;;
26129  *)
26130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26131for as_dir in $PATH
26132do
26133  IFS=$as_save_IFS
26134  test -z "$as_dir" && as_dir=.
26135    for ac_exec_ext in '' $ac_executable_extensions; do
26136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26137    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26139    break 2
26140  fi
26141done
26142  done
26143IFS=$as_save_IFS
26144
26145  ;;
26146esac
26147fi
26148JARSIGNER=$ac_cv_path_JARSIGNER
26149if test -n "$JARSIGNER"; then
26150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26151$as_echo "$JARSIGNER" >&6; }
26152else
26153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26154$as_echo "no" >&6; }
26155fi
26156
26157
26158        if test "x$JARSIGNER" = x; then
26159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26160        fi
26161      else
26162        # Otherwise we believe it is a complete path. Use it as it is.
26163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26164$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26166$as_echo_n "checking for JARSIGNER... " >&6; }
26167        if test ! -x "$tool_specified"; then
26168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26169$as_echo "not found" >&6; }
26170          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26171        fi
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26173$as_echo "$tool_specified" >&6; }
26174      fi
26175    fi
26176  fi
26177
26178
26179
26180  # Finally, set some other options...
26181
26182  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26183  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26184
26185
26186
26187
26188###############################################################################
26189#
26190# Configure the sources to use. We can add or override individual directories.
26191#
26192###############################################################################
26193
26194
26195  # Where are the sources. Any of these can be overridden
26196  # using --with-override-corba and the likes.
26197  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26198  CORBA_TOPDIR="$SRC_ROOT/corba"
26199  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26200  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26201  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26202  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26203  JDK_TOPDIR="$SRC_ROOT/jdk"
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214  ###############################################################################
26215  #
26216  # Pickup additional source for a component from outside of the source root
26217  # or override source for a component.
26218  #
26219
26220# Check whether --with-add-source-root was given.
26221if test "${with_add_source_root+set}" = set; then :
26222  withval=$with_add_source_root;
26223fi
26224
26225
26226
26227# Check whether --with-override-source-root was given.
26228if test "${with_override_source_root+set}" = set; then :
26229  withval=$with_override_source_root;
26230fi
26231
26232
26233
26234# Check whether --with-adds-and-overrides was given.
26235if test "${with_adds_and_overrides+set}" = set; then :
26236  withval=$with_adds_and_overrides;
26237fi
26238
26239
26240  if test "x$with_adds_and_overrides" != x; then
26241    with_add_source_root="$with_adds_and_overrides/adds"
26242    with_override_source_root="$with_adds_and_overrides/overrides"
26243  fi
26244
26245  if test "x$with_add_source_root" != x; then
26246    if ! test -d $with_add_source_root; then
26247      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26248    fi
26249    CURDIR="$PWD"
26250    cd "$with_add_source_root"
26251    ADD_SRC_ROOT="`pwd`"
26252    cd "$CURDIR"
26253    # Verify that the addon source root does not have any root makefiles.
26254    # If it does, then it is usually an error, prevent this.
26255    if test -f $with_add_source_root/langtools/make/Makefile; then
26256      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26257    fi
26258    if test -f $with_add_source_root/corba/make/Makefile; then
26259      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26260    fi
26261    if test -f $with_add_source_root/jaxp/make/Makefile; then
26262      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26263    fi
26264    if test -f $with_add_source_root/jaxws/make/Makefile; then
26265      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26266    fi
26267    if test -f $with_add_source_root/hotspot/make/Makefile; then
26268      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26269    fi
26270    if test -f $with_add_source_root/nashorn/make/Makefile; then
26271      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26272    fi
26273    if test -f $with_add_source_root/jdk/make/Makefile; then
26274      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26275    fi
26276  fi
26277
26278
26279  if test "x$with_override_source_root" != x; then
26280    if ! test -d $with_override_source_root; then
26281      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26282    fi
26283    CURDIR="$PWD"
26284    cd "$with_override_source_root"
26285    OVERRIDE_SRC_ROOT="`pwd`"
26286    cd "$CURDIR"
26287    if test -f $with_override_source_root/langtools/make/Makefile; then
26288      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26289    fi
26290    if test -f $with_override_source_root/corba/make/Makefile; then
26291      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26292    fi
26293    if test -f $with_override_source_root/jaxp/make/Makefile; then
26294      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26295    fi
26296    if test -f $with_override_source_root/jaxws/make/Makefile; then
26297      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26298    fi
26299    if test -f $with_override_source_root/hotspot/make/Makefile; then
26300      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26301    fi
26302    if test -f $with_override_source_root/nashorn/make/Makefile; then
26303      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26304    fi
26305    if test -f $with_override_source_root/jdk/make/Makefile; then
26306      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26307    fi
26308  fi
26309
26310
26311  ###############################################################################
26312  #
26313  # Override a repo completely, this is used for example when you have 3 small
26314  # development sandboxes of the langtools sources and want to avoid having 3 full
26315  # OpenJDK sources checked out on disk.
26316  #
26317  # Assuming that the 3 langtools sandboxes are located here:
26318  # /home/fredrik/sandbox1/langtools
26319  # /home/fredrik/sandbox2/langtools
26320  # /home/fredrik/sandbox3/langtools
26321  #
26322  # From the source root you create build subdirs manually:
26323  #     mkdir -p build1 build2 build3
26324  # in each build directory run:
26325  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26326  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26327  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26328  #
26329
26330
26331# Check whether --with-override-langtools was given.
26332if test "${with_override_langtools+set}" = set; then :
26333  withval=$with_override_langtools;
26334fi
26335
26336
26337
26338# Check whether --with-override-corba was given.
26339if test "${with_override_corba+set}" = set; then :
26340  withval=$with_override_corba;
26341fi
26342
26343
26344
26345# Check whether --with-override-jaxp was given.
26346if test "${with_override_jaxp+set}" = set; then :
26347  withval=$with_override_jaxp;
26348fi
26349
26350
26351
26352# Check whether --with-override-jaxws was given.
26353if test "${with_override_jaxws+set}" = set; then :
26354  withval=$with_override_jaxws;
26355fi
26356
26357
26358
26359# Check whether --with-override-hotspot was given.
26360if test "${with_override_hotspot+set}" = set; then :
26361  withval=$with_override_hotspot;
26362fi
26363
26364
26365
26366# Check whether --with-override-nashorn was given.
26367if test "${with_override_nashorn+set}" = set; then :
26368  withval=$with_override_nashorn;
26369fi
26370
26371
26372
26373# Check whether --with-override-jdk was given.
26374if test "${with_override_jdk+set}" = set; then :
26375  withval=$with_override_jdk;
26376fi
26377
26378
26379  if test "x$with_override_langtools" != x; then
26380    CURDIR="$PWD"
26381    cd "$with_override_langtools"
26382    LANGTOOLS_TOPDIR="`pwd`"
26383    cd "$CURDIR"
26384    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26385      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26386    fi
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26388$as_echo_n "checking if langtools should be overridden... " >&6; }
26389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26390$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26391  fi
26392  if test "x$with_override_corba" != x; then
26393    CURDIR="$PWD"
26394    cd "$with_override_corba"
26395    CORBA_TOPDIR="`pwd`"
26396    cd "$CURDIR"
26397    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26398      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26399    fi
26400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26401$as_echo_n "checking if corba should be overridden... " >&6; }
26402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26403$as_echo "yes with $CORBA_TOPDIR" >&6; }
26404  fi
26405  if test "x$with_override_jaxp" != x; then
26406    CURDIR="$PWD"
26407    cd "$with_override_jaxp"
26408    JAXP_TOPDIR="`pwd`"
26409    cd "$CURDIR"
26410    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26411      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26412    fi
26413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26414$as_echo_n "checking if jaxp should be overridden... " >&6; }
26415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26416$as_echo "yes with $JAXP_TOPDIR" >&6; }
26417  fi
26418  if test "x$with_override_jaxws" != x; then
26419    CURDIR="$PWD"
26420    cd "$with_override_jaxws"
26421    JAXWS_TOPDIR="`pwd`"
26422    cd "$CURDIR"
26423    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26424      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26425    fi
26426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26427$as_echo_n "checking if jaxws should be overridden... " >&6; }
26428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26429$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26430  fi
26431  if test "x$with_override_hotspot" != x; then
26432    CURDIR="$PWD"
26433    cd "$with_override_hotspot"
26434    HOTSPOT_TOPDIR="`pwd`"
26435    cd "$CURDIR"
26436    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26437      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26438    fi
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26440$as_echo_n "checking if hotspot should be overridden... " >&6; }
26441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26442$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26443  fi
26444  if test "x$with_override_nashorn" != x; then
26445    CURDIR="$PWD"
26446    cd "$with_override_nashorn"
26447    NASHORN_TOPDIR="`pwd`"
26448    cd "$CURDIR"
26449    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26450      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26451    fi
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26453$as_echo_n "checking if nashorn should be overridden... " >&6; }
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26455$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26456  fi
26457  if test "x$with_override_jdk" != x; then
26458    CURDIR="$PWD"
26459    cd "$with_override_jdk"
26460    JDK_TOPDIR="`pwd`"
26461    cd "$CURDIR"
26462    if ! test -f $JDK_TOPDIR/make/Makefile; then
26463      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26464    fi
26465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26466$as_echo_n "checking if JDK should be overridden... " >&6; }
26467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26468$as_echo "yes with $JDK_TOPDIR" >&6; }
26469  fi
26470
26471
26472  BUILD_OUTPUT="$OUTPUT_ROOT"
26473
26474
26475  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26476  BUILD_HOTSPOT=true
26477
26478
26479
26480# Check whether --with-import-hotspot was given.
26481if test "${with_import_hotspot+set}" = set; then :
26482  withval=$with_import_hotspot;
26483fi
26484
26485  if test "x$with_import_hotspot" != x; then
26486    CURDIR="$PWD"
26487    cd "$with_import_hotspot"
26488    HOTSPOT_DIST="`pwd`"
26489    cd "$CURDIR"
26490    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26491      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26492    fi
26493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26494$as_echo_n "checking if hotspot should be imported... " >&6; }
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26496$as_echo "yes from $HOTSPOT_DIST" >&6; }
26497    BUILD_HOTSPOT=false
26498  fi
26499
26500  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26501
26502
26503###############################################################################
26504#
26505# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26506# native code.
26507#
26508###############################################################################
26509
26510# First determine the toolchain type (compiler family)
26511
26512
26513# Check whether --with-toolchain-type was given.
26514if test "${with_toolchain_type+set}" = set; then :
26515  withval=$with_toolchain_type;
26516fi
26517
26518
26519  # Use indirect variable referencing
26520  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26521  VALID_TOOLCHAINS=${!toolchain_var_name}
26522
26523  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26524    if test -n "$XCODEBUILD"; then
26525      # On Mac OS X, default toolchain to clang after Xcode 5
26526      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26527      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26528      if test $? -ne 0; then
26529        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26530      fi
26531      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26532          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26533          $CUT -f 1 -d .`
26534      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26535$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26536      if test $XCODE_MAJOR_VERSION -ge 5; then
26537          DEFAULT_TOOLCHAIN="clang"
26538      else
26539          DEFAULT_TOOLCHAIN="gcc"
26540      fi
26541    else
26542      # If Xcode is not installed, but the command line tools are
26543      # then we can't run xcodebuild. On these systems we should
26544      # default to clang
26545      DEFAULT_TOOLCHAIN="clang"
26546    fi
26547  else
26548    # First toolchain type in the list is the default
26549    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26550  fi
26551
26552  if test "x$with_toolchain_type" = xlist; then
26553    # List all toolchains
26554    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26555$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26556    for toolchain in $VALID_TOOLCHAINS; do
26557      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26558      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26559      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26560    done
26561
26562    exit 0
26563  elif test "x$with_toolchain_type" != x; then
26564    # User override; check that it is valid
26565    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26566      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26567$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26568      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26569$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26570      as_fn_error $? "Cannot continue." "$LINENO" 5
26571    fi
26572    TOOLCHAIN_TYPE=$with_toolchain_type
26573  else
26574    # No flag given, use default
26575    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26576  fi
26577
26578
26579  TOOLCHAIN_CC_BINARY_clang="clang"
26580  TOOLCHAIN_CC_BINARY_gcc="gcc"
26581  TOOLCHAIN_CC_BINARY_microsoft="cl"
26582  TOOLCHAIN_CC_BINARY_solstudio="cc"
26583  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26584
26585  TOOLCHAIN_CXX_BINARY_clang="clang++"
26586  TOOLCHAIN_CXX_BINARY_gcc="g++"
26587  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26588  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26589  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26590
26591  # Use indirect variable referencing
26592  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26593  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26594  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26595  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26596  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26597  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26598
26599
26600  # Define filename patterns
26601  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26602    LIBRARY_PREFIX=
26603    SHARED_LIBRARY_SUFFIX='.dll'
26604    STATIC_LIBRARY_SUFFIX='.lib'
26605    SHARED_LIBRARY='$1.dll'
26606    STATIC_LIBRARY='$1.lib'
26607    OBJ_SUFFIX='.obj'
26608    EXE_SUFFIX='.exe'
26609  else
26610    LIBRARY_PREFIX=lib
26611    SHARED_LIBRARY_SUFFIX='.so'
26612    STATIC_LIBRARY_SUFFIX='.a'
26613    SHARED_LIBRARY='lib$1.so'
26614    STATIC_LIBRARY='lib$1.a'
26615    OBJ_SUFFIX='.o'
26616    EXE_SUFFIX=''
26617    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26618      SHARED_LIBRARY='lib$1.dylib'
26619      SHARED_LIBRARY_SUFFIX='.dylib'
26620    fi
26621  fi
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26633    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26634$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26635  else
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26637$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26638  fi
26639
26640
26641# Then detect the actual binaries needed
26642
26643  # FIXME: Is this needed?
26644  ac_ext=cpp
26645ac_cpp='$CXXCPP $CPPFLAGS'
26646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26649
26650
26651  # Store the CFLAGS etc passed to the configure script.
26652  ORG_CFLAGS="$CFLAGS"
26653  ORG_CXXFLAGS="$CXXFLAGS"
26654
26655  # autoconf magic only relies on PATH, so update it if tools dir is specified
26656  OLD_PATH="$PATH"
26657
26658  # On Windows, we need to detect the visual studio installation first.
26659  # This will change the PATH, but we need to keep that new PATH even
26660  # after toolchain detection is done, since the compiler (on x86) uses
26661  # it for DLL resolution in runtime.
26662  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26663      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26664
26665  # Store path to cygwin link.exe to help excluding it when searching for
26666  # VS linker. This must be done before changing the PATH when looking for VS.
26667  # Extract the first word of "link", so it can be a program name with args.
26668set dummy link; ac_word=$2
26669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670$as_echo_n "checking for $ac_word... " >&6; }
26671if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26672  $as_echo_n "(cached) " >&6
26673else
26674  case $CYGWIN_LINK in
26675  [\\/]* | ?:[\\/]*)
26676  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26677  ;;
26678  *)
26679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680for as_dir in $PATH
26681do
26682  IFS=$as_save_IFS
26683  test -z "$as_dir" && as_dir=.
26684    for ac_exec_ext in '' $ac_executable_extensions; do
26685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26686    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688    break 2
26689  fi
26690done
26691  done
26692IFS=$as_save_IFS
26693
26694  ;;
26695esac
26696fi
26697CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26698if test -n "$CYGWIN_LINK"; then
26699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26700$as_echo "$CYGWIN_LINK" >&6; }
26701else
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703$as_echo "no" >&6; }
26704fi
26705
26706
26707  if test "x$CYGWIN_LINK" != x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26709$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26710    "$CYGWIN_LINK" --version > /dev/null
26711    if test $? -eq 0 ; then
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26713$as_echo "yes" >&6; }
26714    else
26715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716$as_echo "no" >&6; }
26717      # This might be the VS linker. Don't exclude it later on.
26718      CYGWIN_LINK=""
26719    fi
26720  fi
26721
26722  # First-hand choice is to locate and run the vsvars bat file.
26723
26724
26725# Check whether --with-toolchain-version was given.
26726if test "${with_toolchain_version+set}" = set; then :
26727  withval=$with_toolchain_version;
26728fi
26729
26730
26731  if test "x$with_toolchain_version" = xlist; then
26732    # List all toolchains
26733    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26734$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26735    for version in $VALID_VS_VERSIONS; do
26736      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26737      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26738    done
26739
26740    exit 0
26741  elif test "x$DEVKIT_VS_VERSION" != x; then
26742    VS_VERSION=$DEVKIT_VS_VERSION
26743    TOOLCHAIN_VERSION=$VS_VERSION
26744    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26745    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26746    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26747    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26748    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26749    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26750
26751    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26752    # can still be exported as INCLUDE for compiler invocations without
26753    # SYSROOT_CFLAGS
26754    OLDIFS="$IFS"
26755    IFS=";"
26756    for i in $DEVKIT_VS_INCLUDE; do
26757      ipath=$i
26758
26759  unix_path="$ipath"
26760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761    windows_path=`$CYGPATH -m "$unix_path"`
26762    ipath="$windows_path"
26763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26764    windows_path=`cmd //c echo $unix_path`
26765    ipath="$windows_path"
26766  fi
26767
26768      VS_INCLUDE="$VS_INCLUDE;$ipath"
26769    done
26770    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26771    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26772    for i in $DEVKIT_VS_LIB; do
26773      libpath=$i
26774
26775  unix_path="$libpath"
26776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777    windows_path=`$CYGPATH -m "$unix_path"`
26778    libpath="$windows_path"
26779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26780    windows_path=`cmd //c echo $unix_path`
26781    libpath="$windows_path"
26782  fi
26783
26784      VS_LIB="$VS_LIB;$libpath"
26785    done
26786    IFS="$OLDIFS"
26787
26788    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26789$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26790
26791  elif test "x$with_toolchain_version" != x; then
26792    # User override; check that it is valid
26793    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26794      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26795$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26796      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26797$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26798      as_fn_error $? "Cannot continue." "$LINENO" 5
26799    fi
26800    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26801  else
26802    # No flag given, use default
26803    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26804  fi
26805
26806  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26807
26808  VS_VERSION="$VS_VERSION"
26809  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26810  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26811  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26812  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26813
26814  # When using --with-tools-dir, assume it points to the correct and default
26815  # version of Visual Studio or that --with-toolchain-version was also set.
26816  if test "x$with_tools_dir" != x; then
26817
26818  if test "x$VS_ENV_CMD" = x; then
26819    VS_VERSION="${VS_VERSION}"
26820    VS_BASE="$with_tools_dir/../.."
26821    METHOD="--with-tools-dir"
26822
26823    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26824      VCVARSFILE="vc/bin/vcvars32.bat"
26825    else
26826      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26827    fi
26828
26829
26830  windows_path="$VS_BASE"
26831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26832    unix_path=`$CYGPATH -u "$windows_path"`
26833    VS_BASE="$unix_path"
26834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26836    VS_BASE="$unix_path"
26837  fi
26838
26839    if test -d "$VS_BASE"; then
26840      if test -f "$VS_BASE/$VCVARSFILE"; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26843        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26844        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26845        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26846        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26847      else
26848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26849$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26851$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26852      fi
26853    fi
26854  fi
26855
26856
26857  if test "x$VS_ENV_CMD" = x; then
26858    VS_VERSION="${VS_VERSION}"
26859    VS_BASE="$with_tools_dir/../../.."
26860    METHOD="--with-tools-dir"
26861
26862    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26863      VCVARSFILE="vc/bin/vcvars32.bat"
26864    else
26865      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26866    fi
26867
26868
26869  windows_path="$VS_BASE"
26870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26871    unix_path=`$CYGPATH -u "$windows_path"`
26872    VS_BASE="$unix_path"
26873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26875    VS_BASE="$unix_path"
26876  fi
26877
26878    if test -d "$VS_BASE"; then
26879      if test -f "$VS_BASE/$VCVARSFILE"; then
26880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26881$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26882        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26883        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26884        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26885        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26886      else
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26890$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26891      fi
26892    fi
26893  fi
26894
26895    if test "x$VS_ENV_CMD" = x; then
26896      # Having specified an argument which is incorrect will produce an instant failure;
26897      # we should not go on looking
26898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26899$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26900      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26901$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26903$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26904      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26905    fi
26906  fi
26907
26908  VS_ENV_CMD=""
26909  VS_ENV_ARGS=""
26910
26911  if test "x$VS_COMNTOOLS" != x; then
26912
26913  if test "x$VS_ENV_CMD" = x; then
26914    VS_VERSION="${VS_VERSION}"
26915    VS_BASE="$VS_COMNTOOLS/../.."
26916    METHOD="$VS_COMNTOOLS_VAR variable"
26917
26918    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26919      VCVARSFILE="vc/bin/vcvars32.bat"
26920    else
26921      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26922    fi
26923
26924
26925  windows_path="$VS_BASE"
26926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927    unix_path=`$CYGPATH -u "$windows_path"`
26928    VS_BASE="$unix_path"
26929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26931    VS_BASE="$unix_path"
26932  fi
26933
26934    if test -d "$VS_BASE"; then
26935      if test -f "$VS_BASE/$VCVARSFILE"; then
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26937$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26938        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26939        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26940        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26941        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26942      else
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26944$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26946$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26947      fi
26948    fi
26949  fi
26950
26951  fi
26952  if test "x$PROGRAMFILES" != x; then
26953
26954  if test "x$VS_ENV_CMD" = x; then
26955    VS_VERSION="${VS_VERSION}"
26956    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26957    METHOD="well-known name"
26958
26959    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26960      VCVARSFILE="vc/bin/vcvars32.bat"
26961    else
26962      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26963    fi
26964
26965
26966  windows_path="$VS_BASE"
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968    unix_path=`$CYGPATH -u "$windows_path"`
26969    VS_BASE="$unix_path"
26970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26972    VS_BASE="$unix_path"
26973  fi
26974
26975    if test -d "$VS_BASE"; then
26976      if test -f "$VS_BASE/$VCVARSFILE"; then
26977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26978$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26979        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26980        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26981        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26982        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26983      else
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26987$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26988      fi
26989    fi
26990  fi
26991
26992  fi
26993  # Work around the insanely named ProgramFiles(x86) env variable
26994  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26995  if test "x$PROGRAMFILES_X86" != x; then
26996
26997  if test "x$VS_ENV_CMD" = x; then
26998    VS_VERSION="${VS_VERSION}"
26999    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27000    METHOD="well-known name"
27001
27002    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27003      VCVARSFILE="vc/bin/vcvars32.bat"
27004    else
27005      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27006    fi
27007
27008
27009  windows_path="$VS_BASE"
27010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27011    unix_path=`$CYGPATH -u "$windows_path"`
27012    VS_BASE="$unix_path"
27013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27015    VS_BASE="$unix_path"
27016  fi
27017
27018    if test -d "$VS_BASE"; then
27019      if test -f "$VS_BASE/$VCVARSFILE"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27021$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27022        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27023        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27024        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27025        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27026      else
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27028$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27030$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27031      fi
27032    fi
27033  fi
27034
27035  fi
27036
27037  if test "x$VS_ENV_CMD" = x; then
27038    VS_VERSION="${VS_VERSION}"
27039    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27040    METHOD="well-known name"
27041
27042    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27043      VCVARSFILE="vc/bin/vcvars32.bat"
27044    else
27045      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27046    fi
27047
27048
27049  windows_path="$VS_BASE"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    VS_BASE="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    VS_BASE="$unix_path"
27056  fi
27057
27058    if test -d "$VS_BASE"; then
27059      if test -f "$VS_BASE/$VCVARSFILE"; then
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27061$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27062        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27065        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27066      else
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27070$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27071      fi
27072    fi
27073  fi
27074
27075
27076  if test "x$VS_ENV_CMD" = x; then
27077    VS_VERSION="${VS_VERSION}"
27078    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27079    METHOD="well-known name"
27080
27081    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27082      VCVARSFILE="vc/bin/vcvars32.bat"
27083    else
27084      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27085    fi
27086
27087
27088  windows_path="$VS_BASE"
27089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27090    unix_path=`$CYGPATH -u "$windows_path"`
27091    VS_BASE="$unix_path"
27092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27094    VS_BASE="$unix_path"
27095  fi
27096
27097    if test -d "$VS_BASE"; then
27098      if test -f "$VS_BASE/$VCVARSFILE"; then
27099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27100$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27101        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27102        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27103        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27104        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27105      else
27106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27107$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27109$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27110      fi
27111    fi
27112  fi
27113
27114
27115  if test "x$SDK_INSTALL_DIR" != x; then
27116    if test "x$ProgramW6432" != x; then
27117
27118  if test "x$VS_ENV_CMD" = x; then
27119    VS_VERSION="${VS_VERSION}"
27120    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27121    METHOD="well-known name"
27122
27123  windows_path="$WIN_SDK_BASE"
27124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125    unix_path=`$CYGPATH -u "$windows_path"`
27126    WIN_SDK_BASE="$unix_path"
27127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27129    WIN_SDK_BASE="$unix_path"
27130  fi
27131
27132    if test -d "$WIN_SDK_BASE"; then
27133      # There have been cases of partial or broken SDK installations. A missing
27134      # lib dir is not going to work.
27135      if test ! -d "$WIN_SDK_BASE/lib"; then
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27139$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27140      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27142$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27143        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27144        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27145          VS_ENV_ARGS="/x86"
27146        else
27147          VS_ENV_ARGS="/x64"
27148        fi
27149        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27150        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27151        # TODO: improve detection for other versions of SDK
27152        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27153      else
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27157$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27158      fi
27159    fi
27160  fi
27161
27162    fi
27163    if test "x$PROGRAMW6432" != x; then
27164
27165  if test "x$VS_ENV_CMD" = x; then
27166    VS_VERSION="${VS_VERSION}"
27167    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27168    METHOD="well-known name"
27169
27170  windows_path="$WIN_SDK_BASE"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    WIN_SDK_BASE="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    WIN_SDK_BASE="$unix_path"
27177  fi
27178
27179    if test -d "$WIN_SDK_BASE"; then
27180      # There have been cases of partial or broken SDK installations. A missing
27181      # lib dir is not going to work.
27182      if test ! -d "$WIN_SDK_BASE/lib"; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27186$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27187      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27190        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27191        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27192          VS_ENV_ARGS="/x86"
27193        else
27194          VS_ENV_ARGS="/x64"
27195        fi
27196        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27197        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27198        # TODO: improve detection for other versions of SDK
27199        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27200      else
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27204$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27205      fi
27206    fi
27207  fi
27208
27209    fi
27210    if test "x$PROGRAMFILES" != x; then
27211
27212  if test "x$VS_ENV_CMD" = x; then
27213    VS_VERSION="${VS_VERSION}"
27214    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27215    METHOD="well-known name"
27216
27217  windows_path="$WIN_SDK_BASE"
27218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219    unix_path=`$CYGPATH -u "$windows_path"`
27220    WIN_SDK_BASE="$unix_path"
27221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27223    WIN_SDK_BASE="$unix_path"
27224  fi
27225
27226    if test -d "$WIN_SDK_BASE"; then
27227      # There have been cases of partial or broken SDK installations. A missing
27228      # lib dir is not going to work.
27229      if test ! -d "$WIN_SDK_BASE/lib"; then
27230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27233$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27234      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27237        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27238        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27239          VS_ENV_ARGS="/x86"
27240        else
27241          VS_ENV_ARGS="/x64"
27242        fi
27243        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27244        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27245        # TODO: improve detection for other versions of SDK
27246        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27247      else
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27251$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27252      fi
27253    fi
27254  fi
27255
27256    fi
27257
27258  if test "x$VS_ENV_CMD" = x; then
27259    VS_VERSION="${VS_VERSION}"
27260    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27261    METHOD="well-known name"
27262
27263  windows_path="$WIN_SDK_BASE"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    WIN_SDK_BASE="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    WIN_SDK_BASE="$unix_path"
27270  fi
27271
27272    if test -d "$WIN_SDK_BASE"; then
27273      # There have been cases of partial or broken SDK installations. A missing
27274      # lib dir is not going to work.
27275      if test ! -d "$WIN_SDK_BASE/lib"; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27279$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27280      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27283        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27284        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27285          VS_ENV_ARGS="/x86"
27286        else
27287          VS_ENV_ARGS="/x64"
27288        fi
27289        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27290        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27291        # TODO: improve detection for other versions of SDK
27292        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27293      else
27294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27295$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27296        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27297$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27298      fi
27299    fi
27300  fi
27301
27302
27303  if test "x$VS_ENV_CMD" = x; then
27304    VS_VERSION="${VS_VERSION}"
27305    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27306    METHOD="well-known name"
27307
27308  windows_path="$WIN_SDK_BASE"
27309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310    unix_path=`$CYGPATH -u "$windows_path"`
27311    WIN_SDK_BASE="$unix_path"
27312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314    WIN_SDK_BASE="$unix_path"
27315  fi
27316
27317    if test -d "$WIN_SDK_BASE"; then
27318      # There have been cases of partial or broken SDK installations. A missing
27319      # lib dir is not going to work.
27320      if test ! -d "$WIN_SDK_BASE/lib"; then
27321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27322$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27324$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27325      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27327$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27328        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27329        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27330          VS_ENV_ARGS="/x86"
27331        else
27332          VS_ENV_ARGS="/x64"
27333        fi
27334        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27335        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27336        # TODO: improve detection for other versions of SDK
27337        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27338      else
27339        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27340$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27341        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27342$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27343      fi
27344    fi
27345  fi
27346
27347  fi
27348
27349    if test "x$VS_ENV_CMD" != x; then
27350      TOOLCHAIN_VERSION=$VS_VERSION
27351      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27352      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27353      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27354      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27355      # The rest of the variables are already evaled while probing
27356      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27357$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27358      break
27359    fi
27360  done
27361
27362
27363  # If we have a devkit, skip all of the below.
27364  if test "x$DEVKIT_VS_VERSION" = x; then
27365    if test "x$VS_ENV_CMD" != x; then
27366      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27367
27368  # Only process if variable expands to non-empty
27369
27370  if test "x$VS_ENV_CMD" != x; then
27371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27372
27373  # First separate the path from the arguments. This will split at the first
27374  # space.
27375  complete="$VS_ENV_CMD"
27376  path="${complete%% *}"
27377  tmp="$complete EOL"
27378  arguments="${tmp#* }"
27379
27380  # Input might be given as Windows format, start by converting to
27381  # unix format.
27382  new_path=`$CYGPATH -u "$path"`
27383
27384  # Now try to locate executable using which
27385  new_path=`$WHICH "$new_path" 2> /dev/null`
27386  # bat and cmd files are not always considered executable in cygwin causing which
27387  # to not find them
27388  if test "x$new_path" = x \
27389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27391    new_path=`$CYGPATH -u "$path"`
27392  fi
27393  if test "x$new_path" = x; then
27394    # Oops. Which didn't find the executable.
27395    # The splitting of arguments from the executable at a space might have been incorrect,
27396    # since paths with space are more likely in Windows. Give it another try with the whole
27397    # argument.
27398    path="$complete"
27399    arguments="EOL"
27400    new_path=`$CYGPATH -u "$path"`
27401    new_path=`$WHICH "$new_path" 2> /dev/null`
27402    # bat and cmd files are not always considered executable in cygwin causing which
27403    # to not find them
27404    if test "x$new_path" = x \
27405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27407      new_path=`$CYGPATH -u "$path"`
27408    fi
27409    if test "x$new_path" = x; then
27410      # It's still not found. Now this is an unrecoverable error.
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27412$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27413      has_space=`$ECHO "$complete" | $GREP " "`
27414      if test "x$has_space" != x; then
27415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27417      fi
27418      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27419    fi
27420  fi
27421
27422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27425  # "foo.exe" is OK but "foo" is an error.
27426  #
27427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27428  # It is also a way to make sure we got the proper file name for the real test later on.
27429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27430  if test "x$test_shortpath" = x; then
27431    # Short path failed, file does not exist as specified.
27432    # Try adding .exe or .cmd
27433    if test -f "${new_path}.exe"; then
27434      input_to_shortpath="${new_path}.exe"
27435    elif test -f "${new_path}.cmd"; then
27436      input_to_shortpath="${new_path}.cmd"
27437    else
27438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27439$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27442      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27443    fi
27444  else
27445    input_to_shortpath="$new_path"
27446  fi
27447
27448  # Call helper function which possibly converts this using DOS-style short mode.
27449  # If so, the updated path is stored in $new_path.
27450  new_path="$input_to_shortpath"
27451
27452  input_path="$input_to_shortpath"
27453  # Check if we need to convert this using DOS-style short mode. If the path
27454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27455  # take no chances and rewrite it.
27456  # Note: m4 eats our [], so we need to use [ and ] instead.
27457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27458  if test "x$has_forbidden_chars" != x; then
27459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27463      # Going to short mode and back again did indeed matter. Since short mode is
27464      # case insensitive, let's make it lowercase to improve readability.
27465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27466      # Now convert it back to Unix-style (cygpath)
27467      input_path=`$CYGPATH -u "$shortmode_path"`
27468      new_path="$input_path"
27469    fi
27470  fi
27471
27472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27473  if test "x$test_cygdrive_prefix" = x; then
27474    # As a simple fix, exclude /usr/bin since it's not a real path.
27475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27477      # a path prefixed by /cygdrive for fixpath to work.
27478      new_path="$CYGWIN_ROOT_PATH$input_path"
27479    fi
27480  fi
27481
27482  # remove trailing .exe if any
27483  new_path="${new_path/%.exe/}"
27484
27485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27486
27487  # First separate the path from the arguments. This will split at the first
27488  # space.
27489  complete="$VS_ENV_CMD"
27490  path="${complete%% *}"
27491  tmp="$complete EOL"
27492  arguments="${tmp#* }"
27493
27494  # Input might be given as Windows format, start by converting to
27495  # unix format.
27496  new_path="$path"
27497
27498  windows_path="$new_path"
27499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500    unix_path=`$CYGPATH -u "$windows_path"`
27501    new_path="$unix_path"
27502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27504    new_path="$unix_path"
27505  fi
27506
27507
27508  # Now try to locate executable using which
27509  new_path=`$WHICH "$new_path" 2> /dev/null`
27510
27511  if test "x$new_path" = x; then
27512    # Oops. Which didn't find the executable.
27513    # The splitting of arguments from the executable at a space might have been incorrect,
27514    # since paths with space are more likely in Windows. Give it another try with the whole
27515    # argument.
27516    path="$complete"
27517    arguments="EOL"
27518    new_path="$path"
27519
27520  windows_path="$new_path"
27521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27522    unix_path=`$CYGPATH -u "$windows_path"`
27523    new_path="$unix_path"
27524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27526    new_path="$unix_path"
27527  fi
27528
27529
27530    new_path=`$WHICH "$new_path" 2> /dev/null`
27531    # bat and cmd files are not always considered executable in MSYS causing which
27532    # to not find them
27533    if test "x$new_path" = x \
27534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27536      new_path="$path"
27537
27538  windows_path="$new_path"
27539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27540    unix_path=`$CYGPATH -u "$windows_path"`
27541    new_path="$unix_path"
27542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27544    new_path="$unix_path"
27545  fi
27546
27547    fi
27548
27549    if test "x$new_path" = x; then
27550      # It's still not found. Now this is an unrecoverable error.
27551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27552$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27553      has_space=`$ECHO "$complete" | $GREP " "`
27554      if test "x$has_space" != x; then
27555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27557      fi
27558      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27559    fi
27560  fi
27561
27562  # Now new_path has a complete unix path to the binary
27563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27564    # Keep paths in /bin as-is, but remove trailing .exe if any
27565    new_path="${new_path/%.exe/}"
27566    # Do not save /bin paths to all_fixpath_prefixes!
27567  else
27568    # Not in mixed or Windows style, start by that.
27569    new_path=`cmd //c echo $new_path`
27570
27571  input_path="$new_path"
27572  # Check if we need to convert this using DOS-style short mode. If the path
27573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27574  # take no chances and rewrite it.
27575  # Note: m4 eats our [], so we need to use [ and ] instead.
27576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27577  if test "x$has_forbidden_chars" != x; then
27578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27580  fi
27581
27582    # Output is in $new_path
27583
27584  windows_path="$new_path"
27585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27586    unix_path=`$CYGPATH -u "$windows_path"`
27587    new_path="$unix_path"
27588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27590    new_path="$unix_path"
27591  fi
27592
27593    # remove trailing .exe if any
27594    new_path="${new_path/%.exe/}"
27595
27596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27598  fi
27599
27600    else
27601      # We're on a unix platform. Hooray! :)
27602      # First separate the path from the arguments. This will split at the first
27603      # space.
27604      complete="$VS_ENV_CMD"
27605      path="${complete%% *}"
27606      tmp="$complete EOL"
27607      arguments="${tmp#* }"
27608
27609      # Cannot rely on the command "which" here since it doesn't always work.
27610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27611      if test -z "$is_absolute_path"; then
27612        # Path to executable is not absolute. Find it.
27613        IFS_save="$IFS"
27614        IFS=:
27615        for p in $PATH; do
27616          if test -f "$p/$path" && test -x "$p/$path"; then
27617            new_path="$p/$path"
27618            break
27619          fi
27620        done
27621        IFS="$IFS_save"
27622      else
27623        # This is an absolute path, we can use it without further modifications.
27624        new_path="$path"
27625      fi
27626
27627      if test "x$new_path" = x; then
27628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27629$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27630        has_space=`$ECHO "$complete" | $GREP " "`
27631        if test "x$has_space" != x; then
27632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27634        fi
27635        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27636      fi
27637    fi
27638
27639    # Now join together the path and the arguments once again
27640    if test "x$arguments" != xEOL; then
27641      new_complete="$new_path ${arguments% *}"
27642    else
27643      new_complete="$new_path"
27644    fi
27645
27646    if test "x$complete" != "x$new_complete"; then
27647      VS_ENV_CMD="$new_complete"
27648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27649$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27650    fi
27651  fi
27652
27653
27654      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27655      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27656$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27657
27658      # We need to create a couple of temporary files.
27659      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27660      $MKDIR -p $VS_ENV_TMP_DIR
27661
27662      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27663      # Instead create a shell script which will set the relevant variables when run.
27664      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27665
27666  unix_path="$WINPATH_VS_ENV_CMD"
27667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27668    windows_path=`$CYGPATH -m "$unix_path"`
27669    WINPATH_VS_ENV_CMD="$windows_path"
27670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27671    windows_path=`cmd //c echo $unix_path`
27672    WINPATH_VS_ENV_CMD="$windows_path"
27673  fi
27674
27675      WINPATH_BASH="$BASH"
27676
27677  unix_path="$WINPATH_BASH"
27678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27679    windows_path=`$CYGPATH -m "$unix_path"`
27680    WINPATH_BASH="$windows_path"
27681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27682    windows_path=`cmd //c echo $unix_path`
27683    WINPATH_BASH="$windows_path"
27684  fi
27685
27686
27687      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27688      # script (executable by bash) that will setup the important variables.
27689      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27690      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27691      # This will end up something like:
27692      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27693      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27694      # These will end up something like:
27695      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27696      # The trailing space for everyone except PATH is no typo, but is needed due
27697      # to trailing \ in the Windows paths. These will be stripped later.
27698      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27699          >> $EXTRACT_VC_ENV_BAT_FILE
27700      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27701          >> $EXTRACT_VC_ENV_BAT_FILE
27702      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27703          >> $EXTRACT_VC_ENV_BAT_FILE
27704      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27705          >> $EXTRACT_VC_ENV_BAT_FILE
27706      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27707          >> $EXTRACT_VC_ENV_BAT_FILE
27708      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27709          >> $EXTRACT_VC_ENV_BAT_FILE
27710
27711      # Now execute the newly created bat file.
27712      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27713      # Change directory so we don't need to mess with Windows paths in redirects.
27714      cd $VS_ENV_TMP_DIR
27715      cmd /c extract-vs-env.bat | $CAT
27716      cd $CURDIR
27717
27718      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27720$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27721        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27722$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27723        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27724$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27725        as_fn_error $? "Cannot continue" "$LINENO" 5
27726      fi
27727
27728      # Now set all paths and other env variables. This will allow the rest of
27729      # the configure script to find and run the compiler in the proper way.
27730      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27731$as_echo "$as_me: Setting extracted environment variables" >&6;}
27732      . $VS_ENV_TMP_DIR/set-vs-env.sh
27733      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27734      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27735    else
27736      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27737      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27738$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27739    fi
27740  fi
27741
27742  # At this point, we should have correct variables in the environment, or we can't continue.
27743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27744$as_echo_n "checking for Visual Studio variables... " >&6; }
27745
27746  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27747      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27748    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27750$as_echo "present but broken" >&6; }
27751      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27752    else
27753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27754$as_echo "ok" >&6; }
27755      # Remove any trailing "\" ";" and " " from the variables.
27756      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27757      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27758      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27759      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27760      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27761      # Remove any paths containing # (typically F#) as that messes up make. This
27762      # is needed if visual studio was installed with F# support.
27763      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27764
27765
27766
27767
27768
27769      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27770      OLDIFS="$IFS"
27771      IFS=";"
27772      for i in $VS_INCLUDE; do
27773        ipath=$i
27774        # Only process non-empty elements
27775        if test "x$ipath" != x; then
27776          IFS="$OLDIFS"
27777          # Check that directory exists before calling fixup_path
27778          testpath=$ipath
27779
27780  windows_path="$testpath"
27781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27782    unix_path=`$CYGPATH -u "$windows_path"`
27783    testpath="$unix_path"
27784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27786    testpath="$unix_path"
27787  fi
27788
27789          if test -d "$testpath"; then
27790
27791  # Only process if variable expands to non-empty
27792
27793  if test "x$ipath" != x; then
27794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27795
27796  # Input might be given as Windows format, start by converting to
27797  # unix format.
27798  path="$ipath"
27799  new_path=`$CYGPATH -u "$path"`
27800
27801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27804  # "foo.exe" is OK but "foo" is an error.
27805  #
27806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27807  # It is also a way to make sure we got the proper file name for the real test later on.
27808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27809  if test "x$test_shortpath" = x; then
27810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27811$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27812    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27813  fi
27814
27815  # Call helper function which possibly converts this using DOS-style short mode.
27816  # If so, the updated path is stored in $new_path.
27817
27818  input_path="$new_path"
27819  # Check if we need to convert this using DOS-style short mode. If the path
27820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27821  # take no chances and rewrite it.
27822  # Note: m4 eats our [], so we need to use [ and ] instead.
27823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27824  if test "x$has_forbidden_chars" != x; then
27825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27829      # Going to short mode and back again did indeed matter. Since short mode is
27830      # case insensitive, let's make it lowercase to improve readability.
27831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27832      # Now convert it back to Unix-style (cygpath)
27833      input_path=`$CYGPATH -u "$shortmode_path"`
27834      new_path="$input_path"
27835    fi
27836  fi
27837
27838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27839  if test "x$test_cygdrive_prefix" = x; then
27840    # As a simple fix, exclude /usr/bin since it's not a real path.
27841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27843      # a path prefixed by /cygdrive for fixpath to work.
27844      new_path="$CYGWIN_ROOT_PATH$input_path"
27845    fi
27846  fi
27847
27848
27849  if test "x$path" != "x$new_path"; then
27850    ipath="$new_path"
27851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27852$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27853  fi
27854
27855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27856
27857  path="$ipath"
27858  has_colon=`$ECHO $path | $GREP ^.:`
27859  new_path="$path"
27860  if test "x$has_colon" = x; then
27861    # Not in mixed or Windows style, start by that.
27862    new_path=`cmd //c echo $path`
27863  fi
27864
27865
27866  input_path="$new_path"
27867  # Check if we need to convert this using DOS-style short mode. If the path
27868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27869  # take no chances and rewrite it.
27870  # Note: m4 eats our [], so we need to use [ and ] instead.
27871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27872  if test "x$has_forbidden_chars" != x; then
27873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27875  fi
27876
27877
27878  windows_path="$new_path"
27879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27880    unix_path=`$CYGPATH -u "$windows_path"`
27881    new_path="$unix_path"
27882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27884    new_path="$unix_path"
27885  fi
27886
27887  if test "x$path" != "x$new_path"; then
27888    ipath="$new_path"
27889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27890$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27891  fi
27892
27893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27895
27896    else
27897      # We're on a unix platform. Hooray! :)
27898      path="$ipath"
27899      has_space=`$ECHO "$path" | $GREP " "`
27900      if test "x$has_space" != x; then
27901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27902$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27904      fi
27905
27906      # Use eval to expand a potential ~
27907      eval path="$path"
27908      if test ! -f "$path" && test ! -d "$path"; then
27909        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27910      fi
27911
27912      ipath="`cd "$path"; $THEPWDCMD -L`"
27913    fi
27914  fi
27915
27916            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27917          fi
27918          IFS=";"
27919        fi
27920      done
27921      # Convert VS_LIB into SYSROOT_LDFLAGS
27922      for i in $VS_LIB; do
27923        libpath=$i
27924        # Only process non-empty elements
27925        if test "x$libpath" != x; then
27926          IFS="$OLDIFS"
27927          # Check that directory exists before calling fixup_path
27928          testpath=$libpath
27929
27930  windows_path="$testpath"
27931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27932    unix_path=`$CYGPATH -u "$windows_path"`
27933    testpath="$unix_path"
27934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27936    testpath="$unix_path"
27937  fi
27938
27939          if test -d "$testpath"; then
27940
27941  # Only process if variable expands to non-empty
27942
27943  if test "x$libpath" != x; then
27944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27945
27946  # Input might be given as Windows format, start by converting to
27947  # unix format.
27948  path="$libpath"
27949  new_path=`$CYGPATH -u "$path"`
27950
27951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27954  # "foo.exe" is OK but "foo" is an error.
27955  #
27956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27957  # It is also a way to make sure we got the proper file name for the real test later on.
27958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27959  if test "x$test_shortpath" = x; then
27960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27961$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27962    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27963  fi
27964
27965  # Call helper function which possibly converts this using DOS-style short mode.
27966  # If so, the updated path is stored in $new_path.
27967
27968  input_path="$new_path"
27969  # Check if we need to convert this using DOS-style short mode. If the path
27970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27971  # take no chances and rewrite it.
27972  # Note: m4 eats our [], so we need to use [ and ] instead.
27973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27974  if test "x$has_forbidden_chars" != x; then
27975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27979      # Going to short mode and back again did indeed matter. Since short mode is
27980      # case insensitive, let's make it lowercase to improve readability.
27981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982      # Now convert it back to Unix-style (cygpath)
27983      input_path=`$CYGPATH -u "$shortmode_path"`
27984      new_path="$input_path"
27985    fi
27986  fi
27987
27988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27989  if test "x$test_cygdrive_prefix" = x; then
27990    # As a simple fix, exclude /usr/bin since it's not a real path.
27991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27993      # a path prefixed by /cygdrive for fixpath to work.
27994      new_path="$CYGWIN_ROOT_PATH$input_path"
27995    fi
27996  fi
27997
27998
27999  if test "x$path" != "x$new_path"; then
28000    libpath="$new_path"
28001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28002$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28003  fi
28004
28005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28006
28007  path="$libpath"
28008  has_colon=`$ECHO $path | $GREP ^.:`
28009  new_path="$path"
28010  if test "x$has_colon" = x; then
28011    # Not in mixed or Windows style, start by that.
28012    new_path=`cmd //c echo $path`
28013  fi
28014
28015
28016  input_path="$new_path"
28017  # Check if we need to convert this using DOS-style short mode. If the path
28018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28019  # take no chances and rewrite it.
28020  # Note: m4 eats our [], so we need to use [ and ] instead.
28021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28022  if test "x$has_forbidden_chars" != x; then
28023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28025  fi
28026
28027
28028  windows_path="$new_path"
28029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28030    unix_path=`$CYGPATH -u "$windows_path"`
28031    new_path="$unix_path"
28032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28034    new_path="$unix_path"
28035  fi
28036
28037  if test "x$path" != "x$new_path"; then
28038    libpath="$new_path"
28039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28040$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28041  fi
28042
28043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28045
28046    else
28047      # We're on a unix platform. Hooray! :)
28048      path="$libpath"
28049      has_space=`$ECHO "$path" | $GREP " "`
28050      if test "x$has_space" != x; then
28051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28052$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28054      fi
28055
28056      # Use eval to expand a potential ~
28057      eval path="$path"
28058      if test ! -f "$path" && test ! -d "$path"; then
28059        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28060      fi
28061
28062      libpath="`cd "$path"; $THEPWDCMD -L`"
28063    fi
28064  fi
28065
28066            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28067          fi
28068          IFS=";"
28069        fi
28070      done
28071      IFS="$OLDIFS"
28072    fi
28073  else
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28075$as_echo "not found" >&6; }
28076
28077    if test "x$VS_ENV_CMD" = x; then
28078      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28079$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28080      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28081$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28082    else
28083      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28084$as_echo "$as_me: Running the extraction script failed." >&6;}
28085    fi
28086    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28087$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28088    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28089$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28090    as_fn_error $? "Cannot continue" "$LINENO" 5
28091  fi
28092
28093    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28094    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28095    PATH="$VS_PATH"
28096    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28097    export INCLUDE="$VS_INCLUDE"
28098    export LIB="$VS_LIB"
28099  fi
28100
28101  # For solaris we really need solaris tools, and not the GNU equivalent.
28102  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28103  # so add that to path before starting to probe.
28104  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28105  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28106    PATH="/usr/ccs/bin:$PATH"
28107  fi
28108
28109  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28110  # override all other locations.
28111  if test "x$TOOLCHAIN_PATH" != x; then
28112    PATH=$TOOLCHAIN_PATH:$PATH
28113  fi
28114
28115
28116  #
28117  # Setup the compilers (CC and CXX)
28118  #
28119
28120  COMPILER_NAME=C
28121  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28122
28123  if test "x$CC" != x; then
28124    # User has supplied compiler name already, always let that override.
28125    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28126$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28127    if test "x`basename $CC`" = "x$CC"; then
28128      # A command without a complete path is provided, search $PATH.
28129
28130      for ac_prog in $CC
28131do
28132  # Extract the first word of "$ac_prog", so it can be a program name with args.
28133set dummy $ac_prog; ac_word=$2
28134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28135$as_echo_n "checking for $ac_word... " >&6; }
28136if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28137  $as_echo_n "(cached) " >&6
28138else
28139  case $POTENTIAL_CC in
28140  [\\/]* | ?:[\\/]*)
28141  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28142  ;;
28143  *)
28144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28145for as_dir in $PATH
28146do
28147  IFS=$as_save_IFS
28148  test -z "$as_dir" && as_dir=.
28149    for ac_exec_ext in '' $ac_executable_extensions; do
28150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28151    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28153    break 2
28154  fi
28155done
28156  done
28157IFS=$as_save_IFS
28158
28159  ;;
28160esac
28161fi
28162POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28163if test -n "$POTENTIAL_CC"; then
28164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28165$as_echo "$POTENTIAL_CC" >&6; }
28166else
28167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28168$as_echo "no" >&6; }
28169fi
28170
28171
28172  test -n "$POTENTIAL_CC" && break
28173done
28174
28175      if test "x$POTENTIAL_CC" != x; then
28176        CC=$POTENTIAL_CC
28177      else
28178        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28179      fi
28180    else
28181      # Otherwise it might already be a complete path
28182      if test ! -x "$CC"; then
28183        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28184      fi
28185    fi
28186  else
28187    # No user supplied value. Locate compiler ourselves.
28188
28189    # If we are cross compiling, assume cross compilation tools follows the
28190    # cross compilation standard where they are prefixed with the autoconf
28191    # standard name for the target. For example the binary
28192    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28193    # If we are not cross compiling, then the default compiler name will be
28194    # used.
28195
28196    CC=
28197    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28198    # before checking the rest of the PATH.
28199    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28200    # step, this should not be necessary.
28201    if test -n "$TOOLCHAIN_PATH"; then
28202      PATH_save="$PATH"
28203      PATH="$TOOLCHAIN_PATH"
28204      for ac_prog in $SEARCH_LIST
28205do
28206  # Extract the first word of "$ac_prog", so it can be a program name with args.
28207set dummy $ac_prog; ac_word=$2
28208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28209$as_echo_n "checking for $ac_word... " >&6; }
28210if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28211  $as_echo_n "(cached) " >&6
28212else
28213  case $TOOLCHAIN_PATH_CC in
28214  [\\/]* | ?:[\\/]*)
28215  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28216  ;;
28217  *)
28218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28219for as_dir in $PATH
28220do
28221  IFS=$as_save_IFS
28222  test -z "$as_dir" && as_dir=.
28223    for ac_exec_ext in '' $ac_executable_extensions; do
28224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28225    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28227    break 2
28228  fi
28229done
28230  done
28231IFS=$as_save_IFS
28232
28233  ;;
28234esac
28235fi
28236TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28237if test -n "$TOOLCHAIN_PATH_CC"; then
28238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28239$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28240else
28241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28242$as_echo "no" >&6; }
28243fi
28244
28245
28246  test -n "$TOOLCHAIN_PATH_CC" && break
28247done
28248
28249      CC=$TOOLCHAIN_PATH_CC
28250      PATH="$PATH_save"
28251    fi
28252
28253    # AC_PATH_PROGS can't be run multiple times with the same variable,
28254    # so create a new name for this run.
28255    if test "x$CC" = x; then
28256      for ac_prog in $SEARCH_LIST
28257do
28258  # Extract the first word of "$ac_prog", so it can be a program name with args.
28259set dummy $ac_prog; ac_word=$2
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28261$as_echo_n "checking for $ac_word... " >&6; }
28262if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28263  $as_echo_n "(cached) " >&6
28264else
28265  case $POTENTIAL_CC in
28266  [\\/]* | ?:[\\/]*)
28267  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28268  ;;
28269  *)
28270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28271for as_dir in $PATH
28272do
28273  IFS=$as_save_IFS
28274  test -z "$as_dir" && as_dir=.
28275    for ac_exec_ext in '' $ac_executable_extensions; do
28276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28277    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28279    break 2
28280  fi
28281done
28282  done
28283IFS=$as_save_IFS
28284
28285  ;;
28286esac
28287fi
28288POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28289if test -n "$POTENTIAL_CC"; then
28290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28291$as_echo "$POTENTIAL_CC" >&6; }
28292else
28293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28294$as_echo "no" >&6; }
28295fi
28296
28297
28298  test -n "$POTENTIAL_CC" && break
28299done
28300
28301      CC=$POTENTIAL_CC
28302    fi
28303
28304    if test "x$CC" = x; then
28305
28306  # Print a helpful message on how to acquire the necessary build dependency.
28307  # devkit is the help tag: freetype, cups, pulse, alsa etc
28308  MISSING_DEPENDENCY=devkit
28309
28310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28311    cygwin_help $MISSING_DEPENDENCY
28312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28313    msys_help $MISSING_DEPENDENCY
28314  else
28315    PKGHANDLER_COMMAND=
28316
28317    case $PKGHANDLER in
28318      apt-get)
28319        apt_help     $MISSING_DEPENDENCY ;;
28320      yum)
28321        yum_help     $MISSING_DEPENDENCY ;;
28322      port)
28323        port_help    $MISSING_DEPENDENCY ;;
28324      pkgutil)
28325        pkgutil_help $MISSING_DEPENDENCY ;;
28326      pkgadd)
28327        pkgadd_help  $MISSING_DEPENDENCY ;;
28328    esac
28329
28330    if test "x$PKGHANDLER_COMMAND" != x; then
28331      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28332    fi
28333  fi
28334
28335      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28336    fi
28337  fi
28338
28339  # Now we have a compiler binary in CC. Make sure it's okay.
28340
28341  # Only process if variable expands to non-empty
28342
28343  if test "x$CC" != x; then
28344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28345
28346  # First separate the path from the arguments. This will split at the first
28347  # space.
28348  complete="$CC"
28349  path="${complete%% *}"
28350  tmp="$complete EOL"
28351  arguments="${tmp#* }"
28352
28353  # Input might be given as Windows format, start by converting to
28354  # unix format.
28355  new_path=`$CYGPATH -u "$path"`
28356
28357  # Now try to locate executable using which
28358  new_path=`$WHICH "$new_path" 2> /dev/null`
28359  # bat and cmd files are not always considered executable in cygwin causing which
28360  # to not find them
28361  if test "x$new_path" = x \
28362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28364    new_path=`$CYGPATH -u "$path"`
28365  fi
28366  if test "x$new_path" = x; then
28367    # Oops. Which didn't find the executable.
28368    # The splitting of arguments from the executable at a space might have been incorrect,
28369    # since paths with space are more likely in Windows. Give it another try with the whole
28370    # argument.
28371    path="$complete"
28372    arguments="EOL"
28373    new_path=`$CYGPATH -u "$path"`
28374    new_path=`$WHICH "$new_path" 2> /dev/null`
28375    # bat and cmd files are not always considered executable in cygwin causing which
28376    # to not find them
28377    if test "x$new_path" = x \
28378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28380      new_path=`$CYGPATH -u "$path"`
28381    fi
28382    if test "x$new_path" = x; then
28383      # It's still not found. Now this is an unrecoverable error.
28384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28385$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28386      has_space=`$ECHO "$complete" | $GREP " "`
28387      if test "x$has_space" != x; then
28388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28390      fi
28391      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28392    fi
28393  fi
28394
28395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28398  # "foo.exe" is OK but "foo" is an error.
28399  #
28400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28401  # It is also a way to make sure we got the proper file name for the real test later on.
28402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28403  if test "x$test_shortpath" = x; then
28404    # Short path failed, file does not exist as specified.
28405    # Try adding .exe or .cmd
28406    if test -f "${new_path}.exe"; then
28407      input_to_shortpath="${new_path}.exe"
28408    elif test -f "${new_path}.cmd"; then
28409      input_to_shortpath="${new_path}.cmd"
28410    else
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28412$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28415      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28416    fi
28417  else
28418    input_to_shortpath="$new_path"
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423  new_path="$input_to_shortpath"
28424
28425  input_path="$input_to_shortpath"
28426  # Check if we need to convert this using DOS-style short mode. If the path
28427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28428  # take no chances and rewrite it.
28429  # Note: m4 eats our [], so we need to use [ and ] instead.
28430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28431  if test "x$has_forbidden_chars" != x; then
28432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28436      # Going to short mode and back again did indeed matter. Since short mode is
28437      # case insensitive, let's make it lowercase to improve readability.
28438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28439      # Now convert it back to Unix-style (cygpath)
28440      input_path=`$CYGPATH -u "$shortmode_path"`
28441      new_path="$input_path"
28442    fi
28443  fi
28444
28445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28446  if test "x$test_cygdrive_prefix" = x; then
28447    # As a simple fix, exclude /usr/bin since it's not a real path.
28448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28450      # a path prefixed by /cygdrive for fixpath to work.
28451      new_path="$CYGWIN_ROOT_PATH$input_path"
28452    fi
28453  fi
28454
28455  # remove trailing .exe if any
28456  new_path="${new_path/%.exe/}"
28457
28458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28459
28460  # First separate the path from the arguments. This will split at the first
28461  # space.
28462  complete="$CC"
28463  path="${complete%% *}"
28464  tmp="$complete EOL"
28465  arguments="${tmp#* }"
28466
28467  # Input might be given as Windows format, start by converting to
28468  # unix format.
28469  new_path="$path"
28470
28471  windows_path="$new_path"
28472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28473    unix_path=`$CYGPATH -u "$windows_path"`
28474    new_path="$unix_path"
28475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28477    new_path="$unix_path"
28478  fi
28479
28480
28481  # Now try to locate executable using which
28482  new_path=`$WHICH "$new_path" 2> /dev/null`
28483
28484  if test "x$new_path" = x; then
28485    # Oops. Which didn't find the executable.
28486    # The splitting of arguments from the executable at a space might have been incorrect,
28487    # since paths with space are more likely in Windows. Give it another try with the whole
28488    # argument.
28489    path="$complete"
28490    arguments="EOL"
28491    new_path="$path"
28492
28493  windows_path="$new_path"
28494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28495    unix_path=`$CYGPATH -u "$windows_path"`
28496    new_path="$unix_path"
28497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28499    new_path="$unix_path"
28500  fi
28501
28502
28503    new_path=`$WHICH "$new_path" 2> /dev/null`
28504    # bat and cmd files are not always considered executable in MSYS causing which
28505    # to not find them
28506    if test "x$new_path" = x \
28507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28509      new_path="$path"
28510
28511  windows_path="$new_path"
28512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28513    unix_path=`$CYGPATH -u "$windows_path"`
28514    new_path="$unix_path"
28515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28517    new_path="$unix_path"
28518  fi
28519
28520    fi
28521
28522    if test "x$new_path" = x; then
28523      # It's still not found. Now this is an unrecoverable error.
28524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28525$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28526      has_space=`$ECHO "$complete" | $GREP " "`
28527      if test "x$has_space" != x; then
28528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28530      fi
28531      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28532    fi
28533  fi
28534
28535  # Now new_path has a complete unix path to the binary
28536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28537    # Keep paths in /bin as-is, but remove trailing .exe if any
28538    new_path="${new_path/%.exe/}"
28539    # Do not save /bin paths to all_fixpath_prefixes!
28540  else
28541    # Not in mixed or Windows style, start by that.
28542    new_path=`cmd //c echo $new_path`
28543
28544  input_path="$new_path"
28545  # Check if we need to convert this using DOS-style short mode. If the path
28546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28547  # take no chances and rewrite it.
28548  # Note: m4 eats our [], so we need to use [ and ] instead.
28549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28550  if test "x$has_forbidden_chars" != x; then
28551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28553  fi
28554
28555    # Output is in $new_path
28556
28557  windows_path="$new_path"
28558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28559    unix_path=`$CYGPATH -u "$windows_path"`
28560    new_path="$unix_path"
28561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28563    new_path="$unix_path"
28564  fi
28565
28566    # remove trailing .exe if any
28567    new_path="${new_path/%.exe/}"
28568
28569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28571  fi
28572
28573    else
28574      # We're on a unix platform. Hooray! :)
28575      # First separate the path from the arguments. This will split at the first
28576      # space.
28577      complete="$CC"
28578      path="${complete%% *}"
28579      tmp="$complete EOL"
28580      arguments="${tmp#* }"
28581
28582      # Cannot rely on the command "which" here since it doesn't always work.
28583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28584      if test -z "$is_absolute_path"; then
28585        # Path to executable is not absolute. Find it.
28586        IFS_save="$IFS"
28587        IFS=:
28588        for p in $PATH; do
28589          if test -f "$p/$path" && test -x "$p/$path"; then
28590            new_path="$p/$path"
28591            break
28592          fi
28593        done
28594        IFS="$IFS_save"
28595      else
28596        # This is an absolute path, we can use it without further modifications.
28597        new_path="$path"
28598      fi
28599
28600      if test "x$new_path" = x; then
28601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28602$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28603        has_space=`$ECHO "$complete" | $GREP " "`
28604        if test "x$has_space" != x; then
28605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28607        fi
28608        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28609      fi
28610    fi
28611
28612    # Now join together the path and the arguments once again
28613    if test "x$arguments" != xEOL; then
28614      new_complete="$new_path ${arguments% *}"
28615    else
28616      new_complete="$new_path"
28617    fi
28618
28619    if test "x$complete" != "x$new_complete"; then
28620      CC="$new_complete"
28621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28622$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28623    fi
28624  fi
28625
28626  TEST_COMPILER="$CC"
28627  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28628  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28629  if test "x$OPENJDK_BUILD_OS" != xaix; then
28630    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28632$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28633
28634  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28635    # Follow a chain of symbolic links. Use readlink
28636    # where it exists, else fall back to horribly
28637    # complicated shell code.
28638    if test "x$READLINK_TESTED" != yes; then
28639      # On MacOSX there is a readlink tool with a different
28640      # purpose than the GNU readlink tool. Check the found readlink.
28641      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28642      if test "x$ISGNU" = x; then
28643        # A readlink that we do not know how to use.
28644        # Are there other non-GNU readlinks out there?
28645        READLINK_TESTED=yes
28646        READLINK=
28647      fi
28648    fi
28649
28650    if test "x$READLINK" != x; then
28651      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28652    else
28653      # Save the current directory for restoring afterwards
28654      STARTDIR=$PWD
28655      COUNTER=0
28656      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28657      sym_link_file=`$BASENAME $TEST_COMPILER`
28658      cd $sym_link_dir
28659      # Use -P flag to resolve symlinks in directories.
28660      cd `$THEPWDCMD -P`
28661      sym_link_dir=`$THEPWDCMD -P`
28662      # Resolve file symlinks
28663      while test $COUNTER -lt 20; do
28664        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28665        if test "x$ISLINK" == x; then
28666          # This is not a symbolic link! We are done!
28667          break
28668        fi
28669        # Again resolve directory symlinks since the target of the just found
28670        # link could be in a different directory
28671        cd `$DIRNAME $ISLINK`
28672        sym_link_dir=`$THEPWDCMD -P`
28673        sym_link_file=`$BASENAME $ISLINK`
28674        let COUNTER=COUNTER+1
28675      done
28676      cd $STARTDIR
28677      TEST_COMPILER=$sym_link_dir/$sym_link_file
28678    fi
28679  fi
28680
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28682$as_echo "$TEST_COMPILER" >&6; }
28683  fi
28684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28685$as_echo_n "checking if CC is disguised ccache... " >&6; }
28686
28687  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28688  if test "x$COMPILER_BASENAME" = "xccache"; then
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28690$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28691    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28692    # We want to control ccache invocation ourselves, so ignore this cc and try
28693    # searching again.
28694
28695    # Remove the path to the fake ccache cc from the PATH
28696    RETRY_COMPILER_SAVED_PATH="$PATH"
28697    COMPILER_DIRNAME=`$DIRNAME $CC`
28698    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28699
28700    # Try again looking for our compiler
28701    if test -n "$ac_tool_prefix"; then
28702  for ac_prog in $TOOLCHAIN_CC_BINARY
28703  do
28704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28707$as_echo_n "checking for $ac_word... " >&6; }
28708if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28709  $as_echo_n "(cached) " >&6
28710else
28711  if test -n "$PROPER_COMPILER_CC"; then
28712  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28713else
28714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28715for as_dir in $PATH
28716do
28717  IFS=$as_save_IFS
28718  test -z "$as_dir" && as_dir=.
28719    for ac_exec_ext in '' $ac_executable_extensions; do
28720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28721    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28723    break 2
28724  fi
28725done
28726  done
28727IFS=$as_save_IFS
28728
28729fi
28730fi
28731PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28732if test -n "$PROPER_COMPILER_CC"; then
28733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28734$as_echo "$PROPER_COMPILER_CC" >&6; }
28735else
28736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28737$as_echo "no" >&6; }
28738fi
28739
28740
28741    test -n "$PROPER_COMPILER_CC" && break
28742  done
28743fi
28744if test -z "$PROPER_COMPILER_CC"; then
28745  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28746  for ac_prog in $TOOLCHAIN_CC_BINARY
28747do
28748  # Extract the first word of "$ac_prog", so it can be a program name with args.
28749set dummy $ac_prog; ac_word=$2
28750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28751$as_echo_n "checking for $ac_word... " >&6; }
28752if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28753  $as_echo_n "(cached) " >&6
28754else
28755  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28756  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28757else
28758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28759for as_dir in $PATH
28760do
28761  IFS=$as_save_IFS
28762  test -z "$as_dir" && as_dir=.
28763    for ac_exec_ext in '' $ac_executable_extensions; do
28764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28765    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28767    break 2
28768  fi
28769done
28770  done
28771IFS=$as_save_IFS
28772
28773fi
28774fi
28775ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28776if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28778$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28779else
28780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28781$as_echo "no" >&6; }
28782fi
28783
28784
28785  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28786done
28787
28788  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28789    PROPER_COMPILER_CC=""
28790  else
28791    case $cross_compiling:$ac_tool_warned in
28792yes:)
28793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28795ac_tool_warned=yes ;;
28796esac
28797    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28798  fi
28799fi
28800
28801
28802  # Only process if variable expands to non-empty
28803
28804  if test "x$PROPER_COMPILER_CC" != x; then
28805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28806
28807  # First separate the path from the arguments. This will split at the first
28808  # space.
28809  complete="$PROPER_COMPILER_CC"
28810  path="${complete%% *}"
28811  tmp="$complete EOL"
28812  arguments="${tmp#* }"
28813
28814  # Input might be given as Windows format, start by converting to
28815  # unix format.
28816  new_path=`$CYGPATH -u "$path"`
28817
28818  # Now try to locate executable using which
28819  new_path=`$WHICH "$new_path" 2> /dev/null`
28820  # bat and cmd files are not always considered executable in cygwin causing which
28821  # to not find them
28822  if test "x$new_path" = x \
28823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28825    new_path=`$CYGPATH -u "$path"`
28826  fi
28827  if test "x$new_path" = x; then
28828    # Oops. Which didn't find the executable.
28829    # The splitting of arguments from the executable at a space might have been incorrect,
28830    # since paths with space are more likely in Windows. Give it another try with the whole
28831    # argument.
28832    path="$complete"
28833    arguments="EOL"
28834    new_path=`$CYGPATH -u "$path"`
28835    new_path=`$WHICH "$new_path" 2> /dev/null`
28836    # bat and cmd files are not always considered executable in cygwin causing which
28837    # to not find them
28838    if test "x$new_path" = x \
28839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28841      new_path=`$CYGPATH -u "$path"`
28842    fi
28843    if test "x$new_path" = x; then
28844      # It's still not found. Now this is an unrecoverable error.
28845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28846$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28847      has_space=`$ECHO "$complete" | $GREP " "`
28848      if test "x$has_space" != x; then
28849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28851      fi
28852      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28853    fi
28854  fi
28855
28856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28859  # "foo.exe" is OK but "foo" is an error.
28860  #
28861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28862  # It is also a way to make sure we got the proper file name for the real test later on.
28863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28864  if test "x$test_shortpath" = x; then
28865    # Short path failed, file does not exist as specified.
28866    # Try adding .exe or .cmd
28867    if test -f "${new_path}.exe"; then
28868      input_to_shortpath="${new_path}.exe"
28869    elif test -f "${new_path}.cmd"; then
28870      input_to_shortpath="${new_path}.cmd"
28871    else
28872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28873$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28876      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28877    fi
28878  else
28879    input_to_shortpath="$new_path"
28880  fi
28881
28882  # Call helper function which possibly converts this using DOS-style short mode.
28883  # If so, the updated path is stored in $new_path.
28884  new_path="$input_to_shortpath"
28885
28886  input_path="$input_to_shortpath"
28887  # Check if we need to convert this using DOS-style short mode. If the path
28888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28889  # take no chances and rewrite it.
28890  # Note: m4 eats our [], so we need to use [ and ] instead.
28891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28892  if test "x$has_forbidden_chars" != x; then
28893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28897      # Going to short mode and back again did indeed matter. Since short mode is
28898      # case insensitive, let's make it lowercase to improve readability.
28899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28900      # Now convert it back to Unix-style (cygpath)
28901      input_path=`$CYGPATH -u "$shortmode_path"`
28902      new_path="$input_path"
28903    fi
28904  fi
28905
28906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28907  if test "x$test_cygdrive_prefix" = x; then
28908    # As a simple fix, exclude /usr/bin since it's not a real path.
28909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28911      # a path prefixed by /cygdrive for fixpath to work.
28912      new_path="$CYGWIN_ROOT_PATH$input_path"
28913    fi
28914  fi
28915
28916  # remove trailing .exe if any
28917  new_path="${new_path/%.exe/}"
28918
28919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920
28921  # First separate the path from the arguments. This will split at the first
28922  # space.
28923  complete="$PROPER_COMPILER_CC"
28924  path="${complete%% *}"
28925  tmp="$complete EOL"
28926  arguments="${tmp#* }"
28927
28928  # Input might be given as Windows format, start by converting to
28929  # unix format.
28930  new_path="$path"
28931
28932  windows_path="$new_path"
28933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28934    unix_path=`$CYGPATH -u "$windows_path"`
28935    new_path="$unix_path"
28936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28938    new_path="$unix_path"
28939  fi
28940
28941
28942  # Now try to locate executable using which
28943  new_path=`$WHICH "$new_path" 2> /dev/null`
28944
28945  if test "x$new_path" = x; then
28946    # Oops. Which didn't find the executable.
28947    # The splitting of arguments from the executable at a space might have been incorrect,
28948    # since paths with space are more likely in Windows. Give it another try with the whole
28949    # argument.
28950    path="$complete"
28951    arguments="EOL"
28952    new_path="$path"
28953
28954  windows_path="$new_path"
28955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28956    unix_path=`$CYGPATH -u "$windows_path"`
28957    new_path="$unix_path"
28958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28960    new_path="$unix_path"
28961  fi
28962
28963
28964    new_path=`$WHICH "$new_path" 2> /dev/null`
28965    # bat and cmd files are not always considered executable in MSYS causing which
28966    # to not find them
28967    if test "x$new_path" = x \
28968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28970      new_path="$path"
28971
28972  windows_path="$new_path"
28973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28974    unix_path=`$CYGPATH -u "$windows_path"`
28975    new_path="$unix_path"
28976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28978    new_path="$unix_path"
28979  fi
28980
28981    fi
28982
28983    if test "x$new_path" = x; then
28984      # It's still not found. Now this is an unrecoverable error.
28985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28986$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28987      has_space=`$ECHO "$complete" | $GREP " "`
28988      if test "x$has_space" != x; then
28989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28991      fi
28992      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28993    fi
28994  fi
28995
28996  # Now new_path has a complete unix path to the binary
28997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28998    # Keep paths in /bin as-is, but remove trailing .exe if any
28999    new_path="${new_path/%.exe/}"
29000    # Do not save /bin paths to all_fixpath_prefixes!
29001  else
29002    # Not in mixed or Windows style, start by that.
29003    new_path=`cmd //c echo $new_path`
29004
29005  input_path="$new_path"
29006  # Check if we need to convert this using DOS-style short mode. If the path
29007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29008  # take no chances and rewrite it.
29009  # Note: m4 eats our [], so we need to use [ and ] instead.
29010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29011  if test "x$has_forbidden_chars" != x; then
29012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29014  fi
29015
29016    # Output is in $new_path
29017
29018  windows_path="$new_path"
29019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29020    unix_path=`$CYGPATH -u "$windows_path"`
29021    new_path="$unix_path"
29022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29024    new_path="$unix_path"
29025  fi
29026
29027    # remove trailing .exe if any
29028    new_path="${new_path/%.exe/}"
29029
29030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29032  fi
29033
29034    else
29035      # We're on a unix platform. Hooray! :)
29036      # First separate the path from the arguments. This will split at the first
29037      # space.
29038      complete="$PROPER_COMPILER_CC"
29039      path="${complete%% *}"
29040      tmp="$complete EOL"
29041      arguments="${tmp#* }"
29042
29043      # Cannot rely on the command "which" here since it doesn't always work.
29044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29045      if test -z "$is_absolute_path"; then
29046        # Path to executable is not absolute. Find it.
29047        IFS_save="$IFS"
29048        IFS=:
29049        for p in $PATH; do
29050          if test -f "$p/$path" && test -x "$p/$path"; then
29051            new_path="$p/$path"
29052            break
29053          fi
29054        done
29055        IFS="$IFS_save"
29056      else
29057        # This is an absolute path, we can use it without further modifications.
29058        new_path="$path"
29059      fi
29060
29061      if test "x$new_path" = x; then
29062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29063$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29064        has_space=`$ECHO "$complete" | $GREP " "`
29065        if test "x$has_space" != x; then
29066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29068        fi
29069        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29070      fi
29071    fi
29072
29073    # Now join together the path and the arguments once again
29074    if test "x$arguments" != xEOL; then
29075      new_complete="$new_path ${arguments% *}"
29076    else
29077      new_complete="$new_path"
29078    fi
29079
29080    if test "x$complete" != "x$new_complete"; then
29081      PROPER_COMPILER_CC="$new_complete"
29082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29083$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29084    fi
29085  fi
29086
29087    PATH="$RETRY_COMPILER_SAVED_PATH"
29088
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29090$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29091
29092  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29093    # Follow a chain of symbolic links. Use readlink
29094    # where it exists, else fall back to horribly
29095    # complicated shell code.
29096    if test "x$READLINK_TESTED" != yes; then
29097      # On MacOSX there is a readlink tool with a different
29098      # purpose than the GNU readlink tool. Check the found readlink.
29099      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29100      if test "x$ISGNU" = x; then
29101        # A readlink that we do not know how to use.
29102        # Are there other non-GNU readlinks out there?
29103        READLINK_TESTED=yes
29104        READLINK=
29105      fi
29106    fi
29107
29108    if test "x$READLINK" != x; then
29109      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29110    else
29111      # Save the current directory for restoring afterwards
29112      STARTDIR=$PWD
29113      COUNTER=0
29114      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29115      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29116      cd $sym_link_dir
29117      # Use -P flag to resolve symlinks in directories.
29118      cd `$THEPWDCMD -P`
29119      sym_link_dir=`$THEPWDCMD -P`
29120      # Resolve file symlinks
29121      while test $COUNTER -lt 20; do
29122        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29123        if test "x$ISLINK" == x; then
29124          # This is not a symbolic link! We are done!
29125          break
29126        fi
29127        # Again resolve directory symlinks since the target of the just found
29128        # link could be in a different directory
29129        cd `$DIRNAME $ISLINK`
29130        sym_link_dir=`$THEPWDCMD -P`
29131        sym_link_file=`$BASENAME $ISLINK`
29132        let COUNTER=COUNTER+1
29133      done
29134      cd $STARTDIR
29135      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29136    fi
29137  fi
29138
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29140$as_echo "$PROPER_COMPILER_CC" >&6; }
29141    CC="$PROPER_COMPILER_CC"
29142  else
29143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29144$as_echo "no, keeping CC" >&6; }
29145  fi
29146
29147
29148  COMPILER=$CC
29149  COMPILER_NAME=$COMPILER_NAME
29150
29151  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29152    # cc -V output typically looks like
29153    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29154    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29155    # Check that this is likely to be the Solaris Studio cc.
29156    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29157    if test $? -ne 0; then
29158      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29159      { $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
29160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29162$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29164$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29165      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29166    fi
29167    # Remove usage instructions (if present), and
29168    # collapse compiler output into a single line
29169    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29170        $SED -e 's/ *[Uu]sage:.*//'`
29171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29172        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29173  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29174    # xlc -qversion output typically looks like
29175    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29176    #     Version: 11.01.0000.0015
29177    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29178    # Check that this is likely to be the IBM XL C compiler.
29179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29180    if test $? -ne 0; then
29181      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29182      { $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
29183$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29184      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29185$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29186      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29187$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29188      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29189    fi
29190    # Collapse compiler output into a single line
29191    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29192    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29193        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29194  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29195    # There is no specific version flag, but all output starts with a version string.
29196    # First line typically looks something like:
29197    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29198    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29199    # Check that this is likely to be Microsoft CL.EXE.
29200    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29201    if test $? -ne 0; then
29202      { $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
29203$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29204      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29205$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29206      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29207    fi
29208    # Collapse compiler output into a single line
29209    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29210    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29211        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29212  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29213    # gcc --version output typically looks like
29214    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29215    #     Copyright (C) 2013 Free Software Foundation, Inc.
29216    #     This is free software; see the source for copying conditions.  There is NO
29217    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29218    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29219    # Check that this is likely to be GCC.
29220    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29221    if test $? -ne 0; then
29222      { $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
29223$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29224      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29225$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29226      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29227    fi
29228    # Remove Copyright and legalese from version string, and
29229    # collapse into a single line
29230    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29231        $SED -e 's/ *Copyright .*//'`
29232    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29233        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29234  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29235    # clang --version output typically looks like
29236    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29237    #    clang version 3.3 (tags/RELEASE_33/final)
29238    # or
29239    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29240    #    Target: x86_64-pc-linux-gnu
29241    #    Thread model: posix
29242    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29243    # Check that this is likely to be clang
29244    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29245    if test $? -ne 0; then
29246      { $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
29247$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29248      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29249$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29250      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29251    fi
29252    # Collapse compiler output into a single line
29253    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29254    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29255        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29256  else
29257      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29258  fi
29259  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29260  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29261  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29262  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29263
29264  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29265$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29266
29267
29268  # Now that we have resolved CC ourself, let autoconf have its go at it
29269  ac_ext=c
29270ac_cpp='$CPP $CPPFLAGS'
29271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29273ac_compiler_gnu=$ac_cv_c_compiler_gnu
29274if test -n "$ac_tool_prefix"; then
29275  for ac_prog in $CC
29276  do
29277    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29278set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29280$as_echo_n "checking for $ac_word... " >&6; }
29281if ${ac_cv_prog_CC+:} false; then :
29282  $as_echo_n "(cached) " >&6
29283else
29284  if test -n "$CC"; then
29285  ac_cv_prog_CC="$CC" # Let the user override the test.
29286else
29287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288for as_dir in $PATH
29289do
29290  IFS=$as_save_IFS
29291  test -z "$as_dir" && as_dir=.
29292    for ac_exec_ext in '' $ac_executable_extensions; do
29293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296    break 2
29297  fi
29298done
29299  done
29300IFS=$as_save_IFS
29301
29302fi
29303fi
29304CC=$ac_cv_prog_CC
29305if test -n "$CC"; then
29306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29307$as_echo "$CC" >&6; }
29308else
29309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29310$as_echo "no" >&6; }
29311fi
29312
29313
29314    test -n "$CC" && break
29315  done
29316fi
29317if test -z "$CC"; then
29318  ac_ct_CC=$CC
29319  for ac_prog in $CC
29320do
29321  # Extract the first word of "$ac_prog", so it can be a program name with args.
29322set dummy $ac_prog; ac_word=$2
29323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29324$as_echo_n "checking for $ac_word... " >&6; }
29325if ${ac_cv_prog_ac_ct_CC+:} false; then :
29326  $as_echo_n "(cached) " >&6
29327else
29328  if test -n "$ac_ct_CC"; then
29329  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29330else
29331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29332for as_dir in $PATH
29333do
29334  IFS=$as_save_IFS
29335  test -z "$as_dir" && as_dir=.
29336    for ac_exec_ext in '' $ac_executable_extensions; do
29337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29338    ac_cv_prog_ac_ct_CC="$ac_prog"
29339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29340    break 2
29341  fi
29342done
29343  done
29344IFS=$as_save_IFS
29345
29346fi
29347fi
29348ac_ct_CC=$ac_cv_prog_ac_ct_CC
29349if test -n "$ac_ct_CC"; then
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29351$as_echo "$ac_ct_CC" >&6; }
29352else
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29354$as_echo "no" >&6; }
29355fi
29356
29357
29358  test -n "$ac_ct_CC" && break
29359done
29360
29361  if test "x$ac_ct_CC" = x; then
29362    CC=""
29363  else
29364    case $cross_compiling:$ac_tool_warned in
29365yes:)
29366{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29367$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29368ac_tool_warned=yes ;;
29369esac
29370    CC=$ac_ct_CC
29371  fi
29372fi
29373
29374
29375test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29377as_fn_error $? "no acceptable C compiler found in \$PATH
29378See \`config.log' for more details" "$LINENO" 5; }
29379
29380# Provide some information about the compiler.
29381$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29382set X $ac_compile
29383ac_compiler=$2
29384for ac_option in --version -v -V -qversion; do
29385  { { ac_try="$ac_compiler $ac_option >&5"
29386case "(($ac_try" in
29387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29388  *) ac_try_echo=$ac_try;;
29389esac
29390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29391$as_echo "$ac_try_echo"; } >&5
29392  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29393  ac_status=$?
29394  if test -s conftest.err; then
29395    sed '10a\
29396... rest of stderr output deleted ...
29397         10q' conftest.err >conftest.er1
29398    cat conftest.er1 >&5
29399  fi
29400  rm -f conftest.er1 conftest.err
29401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29402  test $ac_status = 0; }
29403done
29404
29405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29406/* end confdefs.h.  */
29407
29408int
29409main ()
29410{
29411
29412  ;
29413  return 0;
29414}
29415_ACEOF
29416ac_clean_files_save=$ac_clean_files
29417ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29418# Try to create an executable without -o first, disregard a.out.
29419# It will help us diagnose broken compilers, and finding out an intuition
29420# of exeext.
29421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29422$as_echo_n "checking whether the C compiler works... " >&6; }
29423ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29424
29425# The possible output files:
29426ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29427
29428ac_rmfiles=
29429for ac_file in $ac_files
29430do
29431  case $ac_file in
29432    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29433    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29434  esac
29435done
29436rm -f $ac_rmfiles
29437
29438if { { ac_try="$ac_link_default"
29439case "(($ac_try" in
29440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29441  *) ac_try_echo=$ac_try;;
29442esac
29443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29444$as_echo "$ac_try_echo"; } >&5
29445  (eval "$ac_link_default") 2>&5
29446  ac_status=$?
29447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29448  test $ac_status = 0; }; then :
29449  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29450# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29451# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29452# so that the user can short-circuit this test for compilers unknown to
29453# Autoconf.
29454for ac_file in $ac_files ''
29455do
29456  test -f "$ac_file" || continue
29457  case $ac_file in
29458    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29459	;;
29460    [ab].out )
29461	# We found the default executable, but exeext='' is most
29462	# certainly right.
29463	break;;
29464    *.* )
29465	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29466	then :; else
29467	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29468	fi
29469	# We set ac_cv_exeext here because the later test for it is not
29470	# safe: cross compilers may not add the suffix if given an `-o'
29471	# argument, so we may need to know it at that point already.
29472	# Even if this section looks crufty: it has the advantage of
29473	# actually working.
29474	break;;
29475    * )
29476	break;;
29477  esac
29478done
29479test "$ac_cv_exeext" = no && ac_cv_exeext=
29480
29481else
29482  ac_file=''
29483fi
29484if test -z "$ac_file"; then :
29485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29486$as_echo "no" >&6; }
29487$as_echo "$as_me: failed program was:" >&5
29488sed 's/^/| /' conftest.$ac_ext >&5
29489
29490{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29492as_fn_error 77 "C compiler cannot create executables
29493See \`config.log' for more details" "$LINENO" 5; }
29494else
29495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29496$as_echo "yes" >&6; }
29497fi
29498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29499$as_echo_n "checking for C compiler default output file name... " >&6; }
29500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29501$as_echo "$ac_file" >&6; }
29502ac_exeext=$ac_cv_exeext
29503
29504rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29505ac_clean_files=$ac_clean_files_save
29506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29507$as_echo_n "checking for suffix of executables... " >&6; }
29508if { { ac_try="$ac_link"
29509case "(($ac_try" in
29510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29511  *) ac_try_echo=$ac_try;;
29512esac
29513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29514$as_echo "$ac_try_echo"; } >&5
29515  (eval "$ac_link") 2>&5
29516  ac_status=$?
29517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29518  test $ac_status = 0; }; then :
29519  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29520# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29521# work properly (i.e., refer to `conftest.exe'), while it won't with
29522# `rm'.
29523for ac_file in conftest.exe conftest conftest.*; do
29524  test -f "$ac_file" || continue
29525  case $ac_file in
29526    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29527    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29528	  break;;
29529    * ) break;;
29530  esac
29531done
29532else
29533  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29535as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29536See \`config.log' for more details" "$LINENO" 5; }
29537fi
29538rm -f conftest conftest$ac_cv_exeext
29539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29540$as_echo "$ac_cv_exeext" >&6; }
29541
29542rm -f conftest.$ac_ext
29543EXEEXT=$ac_cv_exeext
29544ac_exeext=$EXEEXT
29545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29546/* end confdefs.h.  */
29547#include <stdio.h>
29548int
29549main ()
29550{
29551FILE *f = fopen ("conftest.out", "w");
29552 return ferror (f) || fclose (f) != 0;
29553
29554  ;
29555  return 0;
29556}
29557_ACEOF
29558ac_clean_files="$ac_clean_files conftest.out"
29559# Check that the compiler produces executables we can run.  If not, either
29560# the compiler is broken, or we cross compile.
29561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29562$as_echo_n "checking whether we are cross compiling... " >&6; }
29563if test "$cross_compiling" != yes; then
29564  { { ac_try="$ac_link"
29565case "(($ac_try" in
29566  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29567  *) ac_try_echo=$ac_try;;
29568esac
29569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29570$as_echo "$ac_try_echo"; } >&5
29571  (eval "$ac_link") 2>&5
29572  ac_status=$?
29573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29574  test $ac_status = 0; }
29575  if { ac_try='./conftest$ac_cv_exeext'
29576  { { case "(($ac_try" in
29577  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29578  *) ac_try_echo=$ac_try;;
29579esac
29580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29581$as_echo "$ac_try_echo"; } >&5
29582  (eval "$ac_try") 2>&5
29583  ac_status=$?
29584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29585  test $ac_status = 0; }; }; then
29586    cross_compiling=no
29587  else
29588    if test "$cross_compiling" = maybe; then
29589	cross_compiling=yes
29590    else
29591	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29593as_fn_error $? "cannot run C compiled programs.
29594If you meant to cross compile, use \`--host'.
29595See \`config.log' for more details" "$LINENO" 5; }
29596    fi
29597  fi
29598fi
29599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29600$as_echo "$cross_compiling" >&6; }
29601
29602rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29603ac_clean_files=$ac_clean_files_save
29604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29605$as_echo_n "checking for suffix of object files... " >&6; }
29606if ${ac_cv_objext+:} false; then :
29607  $as_echo_n "(cached) " >&6
29608else
29609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29610/* end confdefs.h.  */
29611
29612int
29613main ()
29614{
29615
29616  ;
29617  return 0;
29618}
29619_ACEOF
29620rm -f conftest.o conftest.obj
29621if { { ac_try="$ac_compile"
29622case "(($ac_try" in
29623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29624  *) ac_try_echo=$ac_try;;
29625esac
29626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29627$as_echo "$ac_try_echo"; } >&5
29628  (eval "$ac_compile") 2>&5
29629  ac_status=$?
29630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29631  test $ac_status = 0; }; then :
29632  for ac_file in conftest.o conftest.obj conftest.*; do
29633  test -f "$ac_file" || continue;
29634  case $ac_file in
29635    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29636    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29637       break;;
29638  esac
29639done
29640else
29641  $as_echo "$as_me: failed program was:" >&5
29642sed 's/^/| /' conftest.$ac_ext >&5
29643
29644{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29646as_fn_error $? "cannot compute suffix of object files: cannot compile
29647See \`config.log' for more details" "$LINENO" 5; }
29648fi
29649rm -f conftest.$ac_cv_objext conftest.$ac_ext
29650fi
29651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29652$as_echo "$ac_cv_objext" >&6; }
29653OBJEXT=$ac_cv_objext
29654ac_objext=$OBJEXT
29655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29656$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29657if ${ac_cv_c_compiler_gnu+:} false; then :
29658  $as_echo_n "(cached) " >&6
29659else
29660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29661/* end confdefs.h.  */
29662
29663int
29664main ()
29665{
29666#ifndef __GNUC__
29667       choke me
29668#endif
29669
29670  ;
29671  return 0;
29672}
29673_ACEOF
29674if ac_fn_c_try_compile "$LINENO"; then :
29675  ac_compiler_gnu=yes
29676else
29677  ac_compiler_gnu=no
29678fi
29679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29680ac_cv_c_compiler_gnu=$ac_compiler_gnu
29681
29682fi
29683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29684$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29685if test $ac_compiler_gnu = yes; then
29686  GCC=yes
29687else
29688  GCC=
29689fi
29690ac_test_CFLAGS=${CFLAGS+set}
29691ac_save_CFLAGS=$CFLAGS
29692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29693$as_echo_n "checking whether $CC accepts -g... " >&6; }
29694if ${ac_cv_prog_cc_g+:} false; then :
29695  $as_echo_n "(cached) " >&6
29696else
29697  ac_save_c_werror_flag=$ac_c_werror_flag
29698   ac_c_werror_flag=yes
29699   ac_cv_prog_cc_g=no
29700   CFLAGS="-g"
29701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29702/* end confdefs.h.  */
29703
29704int
29705main ()
29706{
29707
29708  ;
29709  return 0;
29710}
29711_ACEOF
29712if ac_fn_c_try_compile "$LINENO"; then :
29713  ac_cv_prog_cc_g=yes
29714else
29715  CFLAGS=""
29716      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29717/* end confdefs.h.  */
29718
29719int
29720main ()
29721{
29722
29723  ;
29724  return 0;
29725}
29726_ACEOF
29727if ac_fn_c_try_compile "$LINENO"; then :
29728
29729else
29730  ac_c_werror_flag=$ac_save_c_werror_flag
29731	 CFLAGS="-g"
29732	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29733/* end confdefs.h.  */
29734
29735int
29736main ()
29737{
29738
29739  ;
29740  return 0;
29741}
29742_ACEOF
29743if ac_fn_c_try_compile "$LINENO"; then :
29744  ac_cv_prog_cc_g=yes
29745fi
29746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29747fi
29748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29749fi
29750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29751   ac_c_werror_flag=$ac_save_c_werror_flag
29752fi
29753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29754$as_echo "$ac_cv_prog_cc_g" >&6; }
29755if test "$ac_test_CFLAGS" = set; then
29756  CFLAGS=$ac_save_CFLAGS
29757elif test $ac_cv_prog_cc_g = yes; then
29758  if test "$GCC" = yes; then
29759    CFLAGS="-g -O2"
29760  else
29761    CFLAGS="-g"
29762  fi
29763else
29764  if test "$GCC" = yes; then
29765    CFLAGS="-O2"
29766  else
29767    CFLAGS=
29768  fi
29769fi
29770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29771$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29772if ${ac_cv_prog_cc_c89+:} false; then :
29773  $as_echo_n "(cached) " >&6
29774else
29775  ac_cv_prog_cc_c89=no
29776ac_save_CC=$CC
29777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29778/* end confdefs.h.  */
29779#include <stdarg.h>
29780#include <stdio.h>
29781struct stat;
29782/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29783struct buf { int x; };
29784FILE * (*rcsopen) (struct buf *, struct stat *, int);
29785static char *e (p, i)
29786     char **p;
29787     int i;
29788{
29789  return p[i];
29790}
29791static char *f (char * (*g) (char **, int), char **p, ...)
29792{
29793  char *s;
29794  va_list v;
29795  va_start (v,p);
29796  s = g (p, va_arg (v,int));
29797  va_end (v);
29798  return s;
29799}
29800
29801/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29802   function prototypes and stuff, but not '\xHH' hex character constants.
29803   These don't provoke an error unfortunately, instead are silently treated
29804   as 'x'.  The following induces an error, until -std is added to get
29805   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29806   array size at least.  It's necessary to write '\x00'==0 to get something
29807   that's true only with -std.  */
29808int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29809
29810/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29811   inside strings and character constants.  */
29812#define FOO(x) 'x'
29813int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29814
29815int test (int i, double x);
29816struct s1 {int (*f) (int a);};
29817struct s2 {int (*f) (double a);};
29818int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29819int argc;
29820char **argv;
29821int
29822main ()
29823{
29824return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29825  ;
29826  return 0;
29827}
29828_ACEOF
29829for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29830	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29831do
29832  CC="$ac_save_CC $ac_arg"
29833  if ac_fn_c_try_compile "$LINENO"; then :
29834  ac_cv_prog_cc_c89=$ac_arg
29835fi
29836rm -f core conftest.err conftest.$ac_objext
29837  test "x$ac_cv_prog_cc_c89" != "xno" && break
29838done
29839rm -f conftest.$ac_ext
29840CC=$ac_save_CC
29841
29842fi
29843# AC_CACHE_VAL
29844case "x$ac_cv_prog_cc_c89" in
29845  x)
29846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29847$as_echo "none needed" >&6; } ;;
29848  xno)
29849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29850$as_echo "unsupported" >&6; } ;;
29851  *)
29852    CC="$CC $ac_cv_prog_cc_c89"
29853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29854$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29855esac
29856if test "x$ac_cv_prog_cc_c89" != xno; then :
29857
29858fi
29859
29860ac_ext=cpp
29861ac_cpp='$CXXCPP $CPPFLAGS'
29862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29865
29866
29867
29868  COMPILER_NAME=C++
29869  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29870
29871  if test "x$CXX" != x; then
29872    # User has supplied compiler name already, always let that override.
29873    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29874$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29875    if test "x`basename $CXX`" = "x$CXX"; then
29876      # A command without a complete path is provided, search $PATH.
29877
29878      for ac_prog in $CXX
29879do
29880  # Extract the first word of "$ac_prog", so it can be a program name with args.
29881set dummy $ac_prog; ac_word=$2
29882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29883$as_echo_n "checking for $ac_word... " >&6; }
29884if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29885  $as_echo_n "(cached) " >&6
29886else
29887  case $POTENTIAL_CXX in
29888  [\\/]* | ?:[\\/]*)
29889  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29890  ;;
29891  *)
29892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29893for as_dir in $PATH
29894do
29895  IFS=$as_save_IFS
29896  test -z "$as_dir" && as_dir=.
29897    for ac_exec_ext in '' $ac_executable_extensions; do
29898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29899    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29901    break 2
29902  fi
29903done
29904  done
29905IFS=$as_save_IFS
29906
29907  ;;
29908esac
29909fi
29910POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29911if test -n "$POTENTIAL_CXX"; then
29912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29913$as_echo "$POTENTIAL_CXX" >&6; }
29914else
29915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29916$as_echo "no" >&6; }
29917fi
29918
29919
29920  test -n "$POTENTIAL_CXX" && break
29921done
29922
29923      if test "x$POTENTIAL_CXX" != x; then
29924        CXX=$POTENTIAL_CXX
29925      else
29926        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29927      fi
29928    else
29929      # Otherwise it might already be a complete path
29930      if test ! -x "$CXX"; then
29931        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29932      fi
29933    fi
29934  else
29935    # No user supplied value. Locate compiler ourselves.
29936
29937    # If we are cross compiling, assume cross compilation tools follows the
29938    # cross compilation standard where they are prefixed with the autoconf
29939    # standard name for the target. For example the binary
29940    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29941    # If we are not cross compiling, then the default compiler name will be
29942    # used.
29943
29944    CXX=
29945    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29946    # before checking the rest of the PATH.
29947    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29948    # step, this should not be necessary.
29949    if test -n "$TOOLCHAIN_PATH"; then
29950      PATH_save="$PATH"
29951      PATH="$TOOLCHAIN_PATH"
29952      for ac_prog in $SEARCH_LIST
29953do
29954  # Extract the first word of "$ac_prog", so it can be a program name with args.
29955set dummy $ac_prog; ac_word=$2
29956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29957$as_echo_n "checking for $ac_word... " >&6; }
29958if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29959  $as_echo_n "(cached) " >&6
29960else
29961  case $TOOLCHAIN_PATH_CXX in
29962  [\\/]* | ?:[\\/]*)
29963  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29964  ;;
29965  *)
29966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29967for as_dir in $PATH
29968do
29969  IFS=$as_save_IFS
29970  test -z "$as_dir" && as_dir=.
29971    for ac_exec_ext in '' $ac_executable_extensions; do
29972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29973    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29975    break 2
29976  fi
29977done
29978  done
29979IFS=$as_save_IFS
29980
29981  ;;
29982esac
29983fi
29984TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29985if test -n "$TOOLCHAIN_PATH_CXX"; then
29986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29987$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29988else
29989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29990$as_echo "no" >&6; }
29991fi
29992
29993
29994  test -n "$TOOLCHAIN_PATH_CXX" && break
29995done
29996
29997      CXX=$TOOLCHAIN_PATH_CXX
29998      PATH="$PATH_save"
29999    fi
30000
30001    # AC_PATH_PROGS can't be run multiple times with the same variable,
30002    # so create a new name for this run.
30003    if test "x$CXX" = x; then
30004      for ac_prog in $SEARCH_LIST
30005do
30006  # Extract the first word of "$ac_prog", so it can be a program name with args.
30007set dummy $ac_prog; ac_word=$2
30008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30009$as_echo_n "checking for $ac_word... " >&6; }
30010if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30011  $as_echo_n "(cached) " >&6
30012else
30013  case $POTENTIAL_CXX in
30014  [\\/]* | ?:[\\/]*)
30015  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30016  ;;
30017  *)
30018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30019for as_dir in $PATH
30020do
30021  IFS=$as_save_IFS
30022  test -z "$as_dir" && as_dir=.
30023    for ac_exec_ext in '' $ac_executable_extensions; do
30024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30025    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30027    break 2
30028  fi
30029done
30030  done
30031IFS=$as_save_IFS
30032
30033  ;;
30034esac
30035fi
30036POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30037if test -n "$POTENTIAL_CXX"; then
30038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30039$as_echo "$POTENTIAL_CXX" >&6; }
30040else
30041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30042$as_echo "no" >&6; }
30043fi
30044
30045
30046  test -n "$POTENTIAL_CXX" && break
30047done
30048
30049      CXX=$POTENTIAL_CXX
30050    fi
30051
30052    if test "x$CXX" = x; then
30053
30054  # Print a helpful message on how to acquire the necessary build dependency.
30055  # devkit is the help tag: freetype, cups, pulse, alsa etc
30056  MISSING_DEPENDENCY=devkit
30057
30058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30059    cygwin_help $MISSING_DEPENDENCY
30060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30061    msys_help $MISSING_DEPENDENCY
30062  else
30063    PKGHANDLER_COMMAND=
30064
30065    case $PKGHANDLER in
30066      apt-get)
30067        apt_help     $MISSING_DEPENDENCY ;;
30068      yum)
30069        yum_help     $MISSING_DEPENDENCY ;;
30070      port)
30071        port_help    $MISSING_DEPENDENCY ;;
30072      pkgutil)
30073        pkgutil_help $MISSING_DEPENDENCY ;;
30074      pkgadd)
30075        pkgadd_help  $MISSING_DEPENDENCY ;;
30076    esac
30077
30078    if test "x$PKGHANDLER_COMMAND" != x; then
30079      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30080    fi
30081  fi
30082
30083      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30084    fi
30085  fi
30086
30087  # Now we have a compiler binary in CXX. Make sure it's okay.
30088
30089  # Only process if variable expands to non-empty
30090
30091  if test "x$CXX" != x; then
30092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30093
30094  # First separate the path from the arguments. This will split at the first
30095  # space.
30096  complete="$CXX"
30097  path="${complete%% *}"
30098  tmp="$complete EOL"
30099  arguments="${tmp#* }"
30100
30101  # Input might be given as Windows format, start by converting to
30102  # unix format.
30103  new_path=`$CYGPATH -u "$path"`
30104
30105  # Now try to locate executable using which
30106  new_path=`$WHICH "$new_path" 2> /dev/null`
30107  # bat and cmd files are not always considered executable in cygwin causing which
30108  # to not find them
30109  if test "x$new_path" = x \
30110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30112    new_path=`$CYGPATH -u "$path"`
30113  fi
30114  if test "x$new_path" = x; then
30115    # Oops. Which didn't find the executable.
30116    # The splitting of arguments from the executable at a space might have been incorrect,
30117    # since paths with space are more likely in Windows. Give it another try with the whole
30118    # argument.
30119    path="$complete"
30120    arguments="EOL"
30121    new_path=`$CYGPATH -u "$path"`
30122    new_path=`$WHICH "$new_path" 2> /dev/null`
30123    # bat and cmd files are not always considered executable in cygwin causing which
30124    # to not find them
30125    if test "x$new_path" = x \
30126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30128      new_path=`$CYGPATH -u "$path"`
30129    fi
30130    if test "x$new_path" = x; then
30131      # It's still not found. Now this is an unrecoverable error.
30132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30133$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30134      has_space=`$ECHO "$complete" | $GREP " "`
30135      if test "x$has_space" != x; then
30136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30138      fi
30139      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30140    fi
30141  fi
30142
30143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30146  # "foo.exe" is OK but "foo" is an error.
30147  #
30148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30149  # It is also a way to make sure we got the proper file name for the real test later on.
30150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30151  if test "x$test_shortpath" = x; then
30152    # Short path failed, file does not exist as specified.
30153    # Try adding .exe or .cmd
30154    if test -f "${new_path}.exe"; then
30155      input_to_shortpath="${new_path}.exe"
30156    elif test -f "${new_path}.cmd"; then
30157      input_to_shortpath="${new_path}.cmd"
30158    else
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30160$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30163      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30164    fi
30165  else
30166    input_to_shortpath="$new_path"
30167  fi
30168
30169  # Call helper function which possibly converts this using DOS-style short mode.
30170  # If so, the updated path is stored in $new_path.
30171  new_path="$input_to_shortpath"
30172
30173  input_path="$input_to_shortpath"
30174  # Check if we need to convert this using DOS-style short mode. If the path
30175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30176  # take no chances and rewrite it.
30177  # Note: m4 eats our [], so we need to use [ and ] instead.
30178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30179  if test "x$has_forbidden_chars" != x; then
30180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30184      # Going to short mode and back again did indeed matter. Since short mode is
30185      # case insensitive, let's make it lowercase to improve readability.
30186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30187      # Now convert it back to Unix-style (cygpath)
30188      input_path=`$CYGPATH -u "$shortmode_path"`
30189      new_path="$input_path"
30190    fi
30191  fi
30192
30193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30194  if test "x$test_cygdrive_prefix" = x; then
30195    # As a simple fix, exclude /usr/bin since it's not a real path.
30196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30198      # a path prefixed by /cygdrive for fixpath to work.
30199      new_path="$CYGWIN_ROOT_PATH$input_path"
30200    fi
30201  fi
30202
30203  # remove trailing .exe if any
30204  new_path="${new_path/%.exe/}"
30205
30206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207
30208  # First separate the path from the arguments. This will split at the first
30209  # space.
30210  complete="$CXX"
30211  path="${complete%% *}"
30212  tmp="$complete EOL"
30213  arguments="${tmp#* }"
30214
30215  # Input might be given as Windows format, start by converting to
30216  # unix format.
30217  new_path="$path"
30218
30219  windows_path="$new_path"
30220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30221    unix_path=`$CYGPATH -u "$windows_path"`
30222    new_path="$unix_path"
30223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30225    new_path="$unix_path"
30226  fi
30227
30228
30229  # Now try to locate executable using which
30230  new_path=`$WHICH "$new_path" 2> /dev/null`
30231
30232  if test "x$new_path" = x; then
30233    # Oops. Which didn't find the executable.
30234    # The splitting of arguments from the executable at a space might have been incorrect,
30235    # since paths with space are more likely in Windows. Give it another try with the whole
30236    # argument.
30237    path="$complete"
30238    arguments="EOL"
30239    new_path="$path"
30240
30241  windows_path="$new_path"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    new_path="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    new_path="$unix_path"
30248  fi
30249
30250
30251    new_path=`$WHICH "$new_path" 2> /dev/null`
30252    # bat and cmd files are not always considered executable in MSYS causing which
30253    # to not find them
30254    if test "x$new_path" = x \
30255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30257      new_path="$path"
30258
30259  windows_path="$new_path"
30260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30261    unix_path=`$CYGPATH -u "$windows_path"`
30262    new_path="$unix_path"
30263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30265    new_path="$unix_path"
30266  fi
30267
30268    fi
30269
30270    if test "x$new_path" = x; then
30271      # It's still not found. Now this is an unrecoverable error.
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30273$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30274      has_space=`$ECHO "$complete" | $GREP " "`
30275      if test "x$has_space" != x; then
30276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30278      fi
30279      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30280    fi
30281  fi
30282
30283  # Now new_path has a complete unix path to the binary
30284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30285    # Keep paths in /bin as-is, but remove trailing .exe if any
30286    new_path="${new_path/%.exe/}"
30287    # Do not save /bin paths to all_fixpath_prefixes!
30288  else
30289    # Not in mixed or Windows style, start by that.
30290    new_path=`cmd //c echo $new_path`
30291
30292  input_path="$new_path"
30293  # Check if we need to convert this using DOS-style short mode. If the path
30294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30295  # take no chances and rewrite it.
30296  # Note: m4 eats our [], so we need to use [ and ] instead.
30297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30298  if test "x$has_forbidden_chars" != x; then
30299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30301  fi
30302
30303    # Output is in $new_path
30304
30305  windows_path="$new_path"
30306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30307    unix_path=`$CYGPATH -u "$windows_path"`
30308    new_path="$unix_path"
30309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30311    new_path="$unix_path"
30312  fi
30313
30314    # remove trailing .exe if any
30315    new_path="${new_path/%.exe/}"
30316
30317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30319  fi
30320
30321    else
30322      # We're on a unix platform. Hooray! :)
30323      # First separate the path from the arguments. This will split at the first
30324      # space.
30325      complete="$CXX"
30326      path="${complete%% *}"
30327      tmp="$complete EOL"
30328      arguments="${tmp#* }"
30329
30330      # Cannot rely on the command "which" here since it doesn't always work.
30331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30332      if test -z "$is_absolute_path"; then
30333        # Path to executable is not absolute. Find it.
30334        IFS_save="$IFS"
30335        IFS=:
30336        for p in $PATH; do
30337          if test -f "$p/$path" && test -x "$p/$path"; then
30338            new_path="$p/$path"
30339            break
30340          fi
30341        done
30342        IFS="$IFS_save"
30343      else
30344        # This is an absolute path, we can use it without further modifications.
30345        new_path="$path"
30346      fi
30347
30348      if test "x$new_path" = x; then
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30350$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30351        has_space=`$ECHO "$complete" | $GREP " "`
30352        if test "x$has_space" != x; then
30353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30355        fi
30356        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30357      fi
30358    fi
30359
30360    # Now join together the path and the arguments once again
30361    if test "x$arguments" != xEOL; then
30362      new_complete="$new_path ${arguments% *}"
30363    else
30364      new_complete="$new_path"
30365    fi
30366
30367    if test "x$complete" != "x$new_complete"; then
30368      CXX="$new_complete"
30369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30370$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30371    fi
30372  fi
30373
30374  TEST_COMPILER="$CXX"
30375  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30376  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30377  if test "x$OPENJDK_BUILD_OS" != xaix; then
30378    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30380$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30381
30382  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30383    # Follow a chain of symbolic links. Use readlink
30384    # where it exists, else fall back to horribly
30385    # complicated shell code.
30386    if test "x$READLINK_TESTED" != yes; then
30387      # On MacOSX there is a readlink tool with a different
30388      # purpose than the GNU readlink tool. Check the found readlink.
30389      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30390      if test "x$ISGNU" = x; then
30391        # A readlink that we do not know how to use.
30392        # Are there other non-GNU readlinks out there?
30393        READLINK_TESTED=yes
30394        READLINK=
30395      fi
30396    fi
30397
30398    if test "x$READLINK" != x; then
30399      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30400    else
30401      # Save the current directory for restoring afterwards
30402      STARTDIR=$PWD
30403      COUNTER=0
30404      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30405      sym_link_file=`$BASENAME $TEST_COMPILER`
30406      cd $sym_link_dir
30407      # Use -P flag to resolve symlinks in directories.
30408      cd `$THEPWDCMD -P`
30409      sym_link_dir=`$THEPWDCMD -P`
30410      # Resolve file symlinks
30411      while test $COUNTER -lt 20; do
30412        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30413        if test "x$ISLINK" == x; then
30414          # This is not a symbolic link! We are done!
30415          break
30416        fi
30417        # Again resolve directory symlinks since the target of the just found
30418        # link could be in a different directory
30419        cd `$DIRNAME $ISLINK`
30420        sym_link_dir=`$THEPWDCMD -P`
30421        sym_link_file=`$BASENAME $ISLINK`
30422        let COUNTER=COUNTER+1
30423      done
30424      cd $STARTDIR
30425      TEST_COMPILER=$sym_link_dir/$sym_link_file
30426    fi
30427  fi
30428
30429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30430$as_echo "$TEST_COMPILER" >&6; }
30431  fi
30432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30433$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30434
30435  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30436  if test "x$COMPILER_BASENAME" = "xccache"; then
30437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30438$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30439    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30440    # We want to control ccache invocation ourselves, so ignore this cc and try
30441    # searching again.
30442
30443    # Remove the path to the fake ccache cc from the PATH
30444    RETRY_COMPILER_SAVED_PATH="$PATH"
30445    COMPILER_DIRNAME=`$DIRNAME $CXX`
30446    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30447
30448    # Try again looking for our compiler
30449    if test -n "$ac_tool_prefix"; then
30450  for ac_prog in $TOOLCHAIN_CXX_BINARY
30451  do
30452    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30453set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30455$as_echo_n "checking for $ac_word... " >&6; }
30456if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30457  $as_echo_n "(cached) " >&6
30458else
30459  if test -n "$PROPER_COMPILER_CXX"; then
30460  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30461else
30462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30463for as_dir in $PATH
30464do
30465  IFS=$as_save_IFS
30466  test -z "$as_dir" && as_dir=.
30467    for ac_exec_ext in '' $ac_executable_extensions; do
30468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30469    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30471    break 2
30472  fi
30473done
30474  done
30475IFS=$as_save_IFS
30476
30477fi
30478fi
30479PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30480if test -n "$PROPER_COMPILER_CXX"; then
30481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30482$as_echo "$PROPER_COMPILER_CXX" >&6; }
30483else
30484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30485$as_echo "no" >&6; }
30486fi
30487
30488
30489    test -n "$PROPER_COMPILER_CXX" && break
30490  done
30491fi
30492if test -z "$PROPER_COMPILER_CXX"; then
30493  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30494  for ac_prog in $TOOLCHAIN_CXX_BINARY
30495do
30496  # Extract the first word of "$ac_prog", so it can be a program name with args.
30497set dummy $ac_prog; ac_word=$2
30498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30499$as_echo_n "checking for $ac_word... " >&6; }
30500if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30501  $as_echo_n "(cached) " >&6
30502else
30503  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30504  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30505else
30506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30507for as_dir in $PATH
30508do
30509  IFS=$as_save_IFS
30510  test -z "$as_dir" && as_dir=.
30511    for ac_exec_ext in '' $ac_executable_extensions; do
30512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30513    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30515    break 2
30516  fi
30517done
30518  done
30519IFS=$as_save_IFS
30520
30521fi
30522fi
30523ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30524if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30526$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30527else
30528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30529$as_echo "no" >&6; }
30530fi
30531
30532
30533  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30534done
30535
30536  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30537    PROPER_COMPILER_CXX=""
30538  else
30539    case $cross_compiling:$ac_tool_warned in
30540yes:)
30541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30543ac_tool_warned=yes ;;
30544esac
30545    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30546  fi
30547fi
30548
30549
30550  # Only process if variable expands to non-empty
30551
30552  if test "x$PROPER_COMPILER_CXX" != x; then
30553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30554
30555  # First separate the path from the arguments. This will split at the first
30556  # space.
30557  complete="$PROPER_COMPILER_CXX"
30558  path="${complete%% *}"
30559  tmp="$complete EOL"
30560  arguments="${tmp#* }"
30561
30562  # Input might be given as Windows format, start by converting to
30563  # unix format.
30564  new_path=`$CYGPATH -u "$path"`
30565
30566  # Now try to locate executable using which
30567  new_path=`$WHICH "$new_path" 2> /dev/null`
30568  # bat and cmd files are not always considered executable in cygwin causing which
30569  # to not find them
30570  if test "x$new_path" = x \
30571      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30572      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30573    new_path=`$CYGPATH -u "$path"`
30574  fi
30575  if test "x$new_path" = x; then
30576    # Oops. Which didn't find the executable.
30577    # The splitting of arguments from the executable at a space might have been incorrect,
30578    # since paths with space are more likely in Windows. Give it another try with the whole
30579    # argument.
30580    path="$complete"
30581    arguments="EOL"
30582    new_path=`$CYGPATH -u "$path"`
30583    new_path=`$WHICH "$new_path" 2> /dev/null`
30584    # bat and cmd files are not always considered executable in cygwin causing which
30585    # to not find them
30586    if test "x$new_path" = x \
30587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30589      new_path=`$CYGPATH -u "$path"`
30590    fi
30591    if test "x$new_path" = x; then
30592      # It's still not found. Now this is an unrecoverable error.
30593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30594$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30595      has_space=`$ECHO "$complete" | $GREP " "`
30596      if test "x$has_space" != x; then
30597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30599      fi
30600      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30601    fi
30602  fi
30603
30604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30607  # "foo.exe" is OK but "foo" is an error.
30608  #
30609  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30610  # It is also a way to make sure we got the proper file name for the real test later on.
30611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30612  if test "x$test_shortpath" = x; then
30613    # Short path failed, file does not exist as specified.
30614    # Try adding .exe or .cmd
30615    if test -f "${new_path}.exe"; then
30616      input_to_shortpath="${new_path}.exe"
30617    elif test -f "${new_path}.cmd"; then
30618      input_to_shortpath="${new_path}.cmd"
30619    else
30620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30621$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30622      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30623$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30624      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30625    fi
30626  else
30627    input_to_shortpath="$new_path"
30628  fi
30629
30630  # Call helper function which possibly converts this using DOS-style short mode.
30631  # If so, the updated path is stored in $new_path.
30632  new_path="$input_to_shortpath"
30633
30634  input_path="$input_to_shortpath"
30635  # Check if we need to convert this using DOS-style short mode. If the path
30636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30637  # take no chances and rewrite it.
30638  # Note: m4 eats our [], so we need to use [ and ] instead.
30639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30640  if test "x$has_forbidden_chars" != x; then
30641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30645      # Going to short mode and back again did indeed matter. Since short mode is
30646      # case insensitive, let's make it lowercase to improve readability.
30647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30648      # Now convert it back to Unix-style (cygpath)
30649      input_path=`$CYGPATH -u "$shortmode_path"`
30650      new_path="$input_path"
30651    fi
30652  fi
30653
30654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30655  if test "x$test_cygdrive_prefix" = x; then
30656    # As a simple fix, exclude /usr/bin since it's not a real path.
30657    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30659      # a path prefixed by /cygdrive for fixpath to work.
30660      new_path="$CYGWIN_ROOT_PATH$input_path"
30661    fi
30662  fi
30663
30664  # remove trailing .exe if any
30665  new_path="${new_path/%.exe/}"
30666
30667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30668
30669  # First separate the path from the arguments. This will split at the first
30670  # space.
30671  complete="$PROPER_COMPILER_CXX"
30672  path="${complete%% *}"
30673  tmp="$complete EOL"
30674  arguments="${tmp#* }"
30675
30676  # Input might be given as Windows format, start by converting to
30677  # unix format.
30678  new_path="$path"
30679
30680  windows_path="$new_path"
30681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30682    unix_path=`$CYGPATH -u "$windows_path"`
30683    new_path="$unix_path"
30684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30686    new_path="$unix_path"
30687  fi
30688
30689
30690  # Now try to locate executable using which
30691  new_path=`$WHICH "$new_path" 2> /dev/null`
30692
30693  if test "x$new_path" = x; then
30694    # Oops. Which didn't find the executable.
30695    # The splitting of arguments from the executable at a space might have been incorrect,
30696    # since paths with space are more likely in Windows. Give it another try with the whole
30697    # argument.
30698    path="$complete"
30699    arguments="EOL"
30700    new_path="$path"
30701
30702  windows_path="$new_path"
30703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704    unix_path=`$CYGPATH -u "$windows_path"`
30705    new_path="$unix_path"
30706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30708    new_path="$unix_path"
30709  fi
30710
30711
30712    new_path=`$WHICH "$new_path" 2> /dev/null`
30713    # bat and cmd files are not always considered executable in MSYS causing which
30714    # to not find them
30715    if test "x$new_path" = x \
30716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30718      new_path="$path"
30719
30720  windows_path="$new_path"
30721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30722    unix_path=`$CYGPATH -u "$windows_path"`
30723    new_path="$unix_path"
30724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30726    new_path="$unix_path"
30727  fi
30728
30729    fi
30730
30731    if test "x$new_path" = x; then
30732      # It's still not found. Now this is an unrecoverable error.
30733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30734$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30735      has_space=`$ECHO "$complete" | $GREP " "`
30736      if test "x$has_space" != x; then
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30739      fi
30740      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30741    fi
30742  fi
30743
30744  # Now new_path has a complete unix path to the binary
30745  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30746    # Keep paths in /bin as-is, but remove trailing .exe if any
30747    new_path="${new_path/%.exe/}"
30748    # Do not save /bin paths to all_fixpath_prefixes!
30749  else
30750    # Not in mixed or Windows style, start by that.
30751    new_path=`cmd //c echo $new_path`
30752
30753  input_path="$new_path"
30754  # Check if we need to convert this using DOS-style short mode. If the path
30755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30756  # take no chances and rewrite it.
30757  # Note: m4 eats our [], so we need to use [ and ] instead.
30758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30759  if test "x$has_forbidden_chars" != x; then
30760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30762  fi
30763
30764    # Output is in $new_path
30765
30766  windows_path="$new_path"
30767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30768    unix_path=`$CYGPATH -u "$windows_path"`
30769    new_path="$unix_path"
30770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30772    new_path="$unix_path"
30773  fi
30774
30775    # remove trailing .exe if any
30776    new_path="${new_path/%.exe/}"
30777
30778    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30779    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30780  fi
30781
30782    else
30783      # We're on a unix platform. Hooray! :)
30784      # First separate the path from the arguments. This will split at the first
30785      # space.
30786      complete="$PROPER_COMPILER_CXX"
30787      path="${complete%% *}"
30788      tmp="$complete EOL"
30789      arguments="${tmp#* }"
30790
30791      # Cannot rely on the command "which" here since it doesn't always work.
30792      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30793      if test -z "$is_absolute_path"; then
30794        # Path to executable is not absolute. Find it.
30795        IFS_save="$IFS"
30796        IFS=:
30797        for p in $PATH; do
30798          if test -f "$p/$path" && test -x "$p/$path"; then
30799            new_path="$p/$path"
30800            break
30801          fi
30802        done
30803        IFS="$IFS_save"
30804      else
30805        # This is an absolute path, we can use it without further modifications.
30806        new_path="$path"
30807      fi
30808
30809      if test "x$new_path" = x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30811$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30812        has_space=`$ECHO "$complete" | $GREP " "`
30813        if test "x$has_space" != x; then
30814          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30815$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30816        fi
30817        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30818      fi
30819    fi
30820
30821    # Now join together the path and the arguments once again
30822    if test "x$arguments" != xEOL; then
30823      new_complete="$new_path ${arguments% *}"
30824    else
30825      new_complete="$new_path"
30826    fi
30827
30828    if test "x$complete" != "x$new_complete"; then
30829      PROPER_COMPILER_CXX="$new_complete"
30830      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30831$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30832    fi
30833  fi
30834
30835    PATH="$RETRY_COMPILER_SAVED_PATH"
30836
30837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30838$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30839
30840  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30841    # Follow a chain of symbolic links. Use readlink
30842    # where it exists, else fall back to horribly
30843    # complicated shell code.
30844    if test "x$READLINK_TESTED" != yes; then
30845      # On MacOSX there is a readlink tool with a different
30846      # purpose than the GNU readlink tool. Check the found readlink.
30847      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30848      if test "x$ISGNU" = x; then
30849        # A readlink that we do not know how to use.
30850        # Are there other non-GNU readlinks out there?
30851        READLINK_TESTED=yes
30852        READLINK=
30853      fi
30854    fi
30855
30856    if test "x$READLINK" != x; then
30857      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30858    else
30859      # Save the current directory for restoring afterwards
30860      STARTDIR=$PWD
30861      COUNTER=0
30862      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30863      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30864      cd $sym_link_dir
30865      # Use -P flag to resolve symlinks in directories.
30866      cd `$THEPWDCMD -P`
30867      sym_link_dir=`$THEPWDCMD -P`
30868      # Resolve file symlinks
30869      while test $COUNTER -lt 20; do
30870        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30871        if test "x$ISLINK" == x; then
30872          # This is not a symbolic link! We are done!
30873          break
30874        fi
30875        # Again resolve directory symlinks since the target of the just found
30876        # link could be in a different directory
30877        cd `$DIRNAME $ISLINK`
30878        sym_link_dir=`$THEPWDCMD -P`
30879        sym_link_file=`$BASENAME $ISLINK`
30880        let COUNTER=COUNTER+1
30881      done
30882      cd $STARTDIR
30883      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30884    fi
30885  fi
30886
30887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30888$as_echo "$PROPER_COMPILER_CXX" >&6; }
30889    CXX="$PROPER_COMPILER_CXX"
30890  else
30891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30892$as_echo "no, keeping CXX" >&6; }
30893  fi
30894
30895
30896  COMPILER=$CXX
30897  COMPILER_NAME=$COMPILER_NAME
30898
30899  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30900    # cc -V output typically looks like
30901    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30902    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30903    # Check that this is likely to be the Solaris Studio cc.
30904    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30905    if test $? -ne 0; then
30906      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30907      { $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
30908$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30910$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30912$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30913      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30914    fi
30915    # Remove usage instructions (if present), and
30916    # collapse compiler output into a single line
30917    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30918        $SED -e 's/ *[Uu]sage:.*//'`
30919    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30920        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30921  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30922    # xlc -qversion output typically looks like
30923    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30924    #     Version: 11.01.0000.0015
30925    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30926    # Check that this is likely to be the IBM XL C compiler.
30927    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30928    if test $? -ne 0; then
30929      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30930      { $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
30931$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30932      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30933$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30934      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30935$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30936      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30937    fi
30938    # Collapse compiler output into a single line
30939    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30940    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30941        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30942  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30943    # There is no specific version flag, but all output starts with a version string.
30944    # First line typically looks something like:
30945    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30946    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30947    # Check that this is likely to be Microsoft CL.EXE.
30948    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30949    if test $? -ne 0; then
30950      { $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
30951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30953$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30955    fi
30956    # Collapse compiler output into a single line
30957    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30959        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30960  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30961    # gcc --version output typically looks like
30962    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30963    #     Copyright (C) 2013 Free Software Foundation, Inc.
30964    #     This is free software; see the source for copying conditions.  There is NO
30965    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30966    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30967    # Check that this is likely to be GCC.
30968    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30969    if test $? -ne 0; then
30970      { $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
30971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30973$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30975    fi
30976    # Remove Copyright and legalese from version string, and
30977    # collapse into a single line
30978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30979        $SED -e 's/ *Copyright .*//'`
30980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30981        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30982  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30983    # clang --version output typically looks like
30984    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30985    #    clang version 3.3 (tags/RELEASE_33/final)
30986    # or
30987    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30988    #    Target: x86_64-pc-linux-gnu
30989    #    Thread model: posix
30990    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30991    # Check that this is likely to be clang
30992    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30993    if test $? -ne 0; then
30994      { $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
30995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30997$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30998      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30999    fi
31000    # Collapse compiler output into a single line
31001    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31002    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31003        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31004  else
31005      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31006  fi
31007  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31008  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31009  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31010  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31011
31012  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31013$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31014
31015
31016  # Now that we have resolved CXX ourself, let autoconf have its go at it
31017  ac_ext=cpp
31018ac_cpp='$CXXCPP $CPPFLAGS'
31019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31022if test -z "$CXX"; then
31023  if test -n "$CCC"; then
31024    CXX=$CCC
31025  else
31026    if test -n "$ac_tool_prefix"; then
31027  for ac_prog in $CXX
31028  do
31029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31032$as_echo_n "checking for $ac_word... " >&6; }
31033if ${ac_cv_prog_CXX+:} false; then :
31034  $as_echo_n "(cached) " >&6
31035else
31036  if test -n "$CXX"; then
31037  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31038else
31039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31040for as_dir in $PATH
31041do
31042  IFS=$as_save_IFS
31043  test -z "$as_dir" && as_dir=.
31044    for ac_exec_ext in '' $ac_executable_extensions; do
31045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31046    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31048    break 2
31049  fi
31050done
31051  done
31052IFS=$as_save_IFS
31053
31054fi
31055fi
31056CXX=$ac_cv_prog_CXX
31057if test -n "$CXX"; then
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31059$as_echo "$CXX" >&6; }
31060else
31061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31062$as_echo "no" >&6; }
31063fi
31064
31065
31066    test -n "$CXX" && break
31067  done
31068fi
31069if test -z "$CXX"; then
31070  ac_ct_CXX=$CXX
31071  for ac_prog in $CXX
31072do
31073  # Extract the first word of "$ac_prog", so it can be a program name with args.
31074set dummy $ac_prog; ac_word=$2
31075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31076$as_echo_n "checking for $ac_word... " >&6; }
31077if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31078  $as_echo_n "(cached) " >&6
31079else
31080  if test -n "$ac_ct_CXX"; then
31081  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31082else
31083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31084for as_dir in $PATH
31085do
31086  IFS=$as_save_IFS
31087  test -z "$as_dir" && as_dir=.
31088    for ac_exec_ext in '' $ac_executable_extensions; do
31089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31090    ac_cv_prog_ac_ct_CXX="$ac_prog"
31091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31092    break 2
31093  fi
31094done
31095  done
31096IFS=$as_save_IFS
31097
31098fi
31099fi
31100ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31101if test -n "$ac_ct_CXX"; then
31102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31103$as_echo "$ac_ct_CXX" >&6; }
31104else
31105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31106$as_echo "no" >&6; }
31107fi
31108
31109
31110  test -n "$ac_ct_CXX" && break
31111done
31112
31113  if test "x$ac_ct_CXX" = x; then
31114    CXX="g++"
31115  else
31116    case $cross_compiling:$ac_tool_warned in
31117yes:)
31118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31120ac_tool_warned=yes ;;
31121esac
31122    CXX=$ac_ct_CXX
31123  fi
31124fi
31125
31126  fi
31127fi
31128# Provide some information about the compiler.
31129$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31130set X $ac_compile
31131ac_compiler=$2
31132for ac_option in --version -v -V -qversion; do
31133  { { ac_try="$ac_compiler $ac_option >&5"
31134case "(($ac_try" in
31135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31136  *) ac_try_echo=$ac_try;;
31137esac
31138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31139$as_echo "$ac_try_echo"; } >&5
31140  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31141  ac_status=$?
31142  if test -s conftest.err; then
31143    sed '10a\
31144... rest of stderr output deleted ...
31145         10q' conftest.err >conftest.er1
31146    cat conftest.er1 >&5
31147  fi
31148  rm -f conftest.er1 conftest.err
31149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31150  test $ac_status = 0; }
31151done
31152
31153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31154$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31155if ${ac_cv_cxx_compiler_gnu+:} false; then :
31156  $as_echo_n "(cached) " >&6
31157else
31158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31159/* end confdefs.h.  */
31160
31161int
31162main ()
31163{
31164#ifndef __GNUC__
31165       choke me
31166#endif
31167
31168  ;
31169  return 0;
31170}
31171_ACEOF
31172if ac_fn_cxx_try_compile "$LINENO"; then :
31173  ac_compiler_gnu=yes
31174else
31175  ac_compiler_gnu=no
31176fi
31177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31178ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31179
31180fi
31181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31182$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31183if test $ac_compiler_gnu = yes; then
31184  GXX=yes
31185else
31186  GXX=
31187fi
31188ac_test_CXXFLAGS=${CXXFLAGS+set}
31189ac_save_CXXFLAGS=$CXXFLAGS
31190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31191$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31192if ${ac_cv_prog_cxx_g+:} false; then :
31193  $as_echo_n "(cached) " >&6
31194else
31195  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31196   ac_cxx_werror_flag=yes
31197   ac_cv_prog_cxx_g=no
31198   CXXFLAGS="-g"
31199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31200/* end confdefs.h.  */
31201
31202int
31203main ()
31204{
31205
31206  ;
31207  return 0;
31208}
31209_ACEOF
31210if ac_fn_cxx_try_compile "$LINENO"; then :
31211  ac_cv_prog_cxx_g=yes
31212else
31213  CXXFLAGS=""
31214      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31215/* end confdefs.h.  */
31216
31217int
31218main ()
31219{
31220
31221  ;
31222  return 0;
31223}
31224_ACEOF
31225if ac_fn_cxx_try_compile "$LINENO"; then :
31226
31227else
31228  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31229	 CXXFLAGS="-g"
31230	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31231/* end confdefs.h.  */
31232
31233int
31234main ()
31235{
31236
31237  ;
31238  return 0;
31239}
31240_ACEOF
31241if ac_fn_cxx_try_compile "$LINENO"; then :
31242  ac_cv_prog_cxx_g=yes
31243fi
31244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31245fi
31246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31247fi
31248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31249   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31250fi
31251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31252$as_echo "$ac_cv_prog_cxx_g" >&6; }
31253if test "$ac_test_CXXFLAGS" = set; then
31254  CXXFLAGS=$ac_save_CXXFLAGS
31255elif test $ac_cv_prog_cxx_g = yes; then
31256  if test "$GXX" = yes; then
31257    CXXFLAGS="-g -O2"
31258  else
31259    CXXFLAGS="-g"
31260  fi
31261else
31262  if test "$GXX" = yes; then
31263    CXXFLAGS="-O2"
31264  else
31265    CXXFLAGS=
31266  fi
31267fi
31268ac_ext=cpp
31269ac_cpp='$CXXCPP $CPPFLAGS'
31270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31273
31274
31275  #
31276  # Setup the preprocessor (CPP and CXXCPP)
31277  #
31278  ac_ext=c
31279ac_cpp='$CPP $CPPFLAGS'
31280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31282ac_compiler_gnu=$ac_cv_c_compiler_gnu
31283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31284$as_echo_n "checking how to run the C preprocessor... " >&6; }
31285# On Suns, sometimes $CPP names a directory.
31286if test -n "$CPP" && test -d "$CPP"; then
31287  CPP=
31288fi
31289if test -z "$CPP"; then
31290  if ${ac_cv_prog_CPP+:} false; then :
31291  $as_echo_n "(cached) " >&6
31292else
31293      # Double quotes because CPP needs to be expanded
31294    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31295    do
31296      ac_preproc_ok=false
31297for ac_c_preproc_warn_flag in '' yes
31298do
31299  # Use a header file that comes with gcc, so configuring glibc
31300  # with a fresh cross-compiler works.
31301  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31302  # <limits.h> exists even on freestanding compilers.
31303  # On the NeXT, cc -E runs the code through the compiler's parser,
31304  # not just through cpp. "Syntax error" is here to catch this case.
31305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31306/* end confdefs.h.  */
31307#ifdef __STDC__
31308# include <limits.h>
31309#else
31310# include <assert.h>
31311#endif
31312		     Syntax error
31313_ACEOF
31314if ac_fn_c_try_cpp "$LINENO"; then :
31315
31316else
31317  # Broken: fails on valid input.
31318continue
31319fi
31320rm -f conftest.err conftest.i conftest.$ac_ext
31321
31322  # OK, works on sane cases.  Now check whether nonexistent headers
31323  # can be detected and how.
31324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31325/* end confdefs.h.  */
31326#include <ac_nonexistent.h>
31327_ACEOF
31328if ac_fn_c_try_cpp "$LINENO"; then :
31329  # Broken: success on invalid input.
31330continue
31331else
31332  # Passes both tests.
31333ac_preproc_ok=:
31334break
31335fi
31336rm -f conftest.err conftest.i conftest.$ac_ext
31337
31338done
31339# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31340rm -f conftest.i conftest.err conftest.$ac_ext
31341if $ac_preproc_ok; then :
31342  break
31343fi
31344
31345    done
31346    ac_cv_prog_CPP=$CPP
31347
31348fi
31349  CPP=$ac_cv_prog_CPP
31350else
31351  ac_cv_prog_CPP=$CPP
31352fi
31353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31354$as_echo "$CPP" >&6; }
31355ac_preproc_ok=false
31356for ac_c_preproc_warn_flag in '' yes
31357do
31358  # Use a header file that comes with gcc, so configuring glibc
31359  # with a fresh cross-compiler works.
31360  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31361  # <limits.h> exists even on freestanding compilers.
31362  # On the NeXT, cc -E runs the code through the compiler's parser,
31363  # not just through cpp. "Syntax error" is here to catch this case.
31364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31365/* end confdefs.h.  */
31366#ifdef __STDC__
31367# include <limits.h>
31368#else
31369# include <assert.h>
31370#endif
31371		     Syntax error
31372_ACEOF
31373if ac_fn_c_try_cpp "$LINENO"; then :
31374
31375else
31376  # Broken: fails on valid input.
31377continue
31378fi
31379rm -f conftest.err conftest.i conftest.$ac_ext
31380
31381  # OK, works on sane cases.  Now check whether nonexistent headers
31382  # can be detected and how.
31383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31384/* end confdefs.h.  */
31385#include <ac_nonexistent.h>
31386_ACEOF
31387if ac_fn_c_try_cpp "$LINENO"; then :
31388  # Broken: success on invalid input.
31389continue
31390else
31391  # Passes both tests.
31392ac_preproc_ok=:
31393break
31394fi
31395rm -f conftest.err conftest.i conftest.$ac_ext
31396
31397done
31398# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31399rm -f conftest.i conftest.err conftest.$ac_ext
31400if $ac_preproc_ok; then :
31401
31402else
31403  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31405as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31406See \`config.log' for more details" "$LINENO" 5; }
31407fi
31408
31409ac_ext=cpp
31410ac_cpp='$CXXCPP $CPPFLAGS'
31411ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31412ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31413ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31414
31415
31416  # Only process if variable expands to non-empty
31417
31418  if test "x$CPP" != x; then
31419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31420
31421  # First separate the path from the arguments. This will split at the first
31422  # space.
31423  complete="$CPP"
31424  path="${complete%% *}"
31425  tmp="$complete EOL"
31426  arguments="${tmp#* }"
31427
31428  # Input might be given as Windows format, start by converting to
31429  # unix format.
31430  new_path=`$CYGPATH -u "$path"`
31431
31432  # Now try to locate executable using which
31433  new_path=`$WHICH "$new_path" 2> /dev/null`
31434  # bat and cmd files are not always considered executable in cygwin causing which
31435  # to not find them
31436  if test "x$new_path" = x \
31437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31439    new_path=`$CYGPATH -u "$path"`
31440  fi
31441  if test "x$new_path" = x; then
31442    # Oops. Which didn't find the executable.
31443    # The splitting of arguments from the executable at a space might have been incorrect,
31444    # since paths with space are more likely in Windows. Give it another try with the whole
31445    # argument.
31446    path="$complete"
31447    arguments="EOL"
31448    new_path=`$CYGPATH -u "$path"`
31449    new_path=`$WHICH "$new_path" 2> /dev/null`
31450    # bat and cmd files are not always considered executable in cygwin causing which
31451    # to not find them
31452    if test "x$new_path" = x \
31453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31455      new_path=`$CYGPATH -u "$path"`
31456    fi
31457    if test "x$new_path" = x; then
31458      # It's still not found. Now this is an unrecoverable error.
31459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31460$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31461      has_space=`$ECHO "$complete" | $GREP " "`
31462      if test "x$has_space" != x; then
31463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31465      fi
31466      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31467    fi
31468  fi
31469
31470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31473  # "foo.exe" is OK but "foo" is an error.
31474  #
31475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31476  # It is also a way to make sure we got the proper file name for the real test later on.
31477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31478  if test "x$test_shortpath" = x; then
31479    # Short path failed, file does not exist as specified.
31480    # Try adding .exe or .cmd
31481    if test -f "${new_path}.exe"; then
31482      input_to_shortpath="${new_path}.exe"
31483    elif test -f "${new_path}.cmd"; then
31484      input_to_shortpath="${new_path}.cmd"
31485    else
31486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31487$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31490      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31491    fi
31492  else
31493    input_to_shortpath="$new_path"
31494  fi
31495
31496  # Call helper function which possibly converts this using DOS-style short mode.
31497  # If so, the updated path is stored in $new_path.
31498  new_path="$input_to_shortpath"
31499
31500  input_path="$input_to_shortpath"
31501  # Check if we need to convert this using DOS-style short mode. If the path
31502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31503  # take no chances and rewrite it.
31504  # Note: m4 eats our [], so we need to use [ and ] instead.
31505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31506  if test "x$has_forbidden_chars" != x; then
31507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31511      # Going to short mode and back again did indeed matter. Since short mode is
31512      # case insensitive, let's make it lowercase to improve readability.
31513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31514      # Now convert it back to Unix-style (cygpath)
31515      input_path=`$CYGPATH -u "$shortmode_path"`
31516      new_path="$input_path"
31517    fi
31518  fi
31519
31520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31521  if test "x$test_cygdrive_prefix" = x; then
31522    # As a simple fix, exclude /usr/bin since it's not a real path.
31523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31525      # a path prefixed by /cygdrive for fixpath to work.
31526      new_path="$CYGWIN_ROOT_PATH$input_path"
31527    fi
31528  fi
31529
31530  # remove trailing .exe if any
31531  new_path="${new_path/%.exe/}"
31532
31533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534
31535  # First separate the path from the arguments. This will split at the first
31536  # space.
31537  complete="$CPP"
31538  path="${complete%% *}"
31539  tmp="$complete EOL"
31540  arguments="${tmp#* }"
31541
31542  # Input might be given as Windows format, start by converting to
31543  # unix format.
31544  new_path="$path"
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555
31556  # Now try to locate executable using which
31557  new_path=`$WHICH "$new_path" 2> /dev/null`
31558
31559  if test "x$new_path" = x; then
31560    # Oops. Which didn't find the executable.
31561    # The splitting of arguments from the executable at a space might have been incorrect,
31562    # since paths with space are more likely in Windows. Give it another try with the whole
31563    # argument.
31564    path="$complete"
31565    arguments="EOL"
31566    new_path="$path"
31567
31568  windows_path="$new_path"
31569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31570    unix_path=`$CYGPATH -u "$windows_path"`
31571    new_path="$unix_path"
31572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31574    new_path="$unix_path"
31575  fi
31576
31577
31578    new_path=`$WHICH "$new_path" 2> /dev/null`
31579    # bat and cmd files are not always considered executable in MSYS causing which
31580    # to not find them
31581    if test "x$new_path" = x \
31582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31584      new_path="$path"
31585
31586  windows_path="$new_path"
31587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588    unix_path=`$CYGPATH -u "$windows_path"`
31589    new_path="$unix_path"
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592    new_path="$unix_path"
31593  fi
31594
31595    fi
31596
31597    if test "x$new_path" = x; then
31598      # It's still not found. Now this is an unrecoverable error.
31599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31600$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31601      has_space=`$ECHO "$complete" | $GREP " "`
31602      if test "x$has_space" != x; then
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31605      fi
31606      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31607    fi
31608  fi
31609
31610  # Now new_path has a complete unix path to the binary
31611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31612    # Keep paths in /bin as-is, but remove trailing .exe if any
31613    new_path="${new_path/%.exe/}"
31614    # Do not save /bin paths to all_fixpath_prefixes!
31615  else
31616    # Not in mixed or Windows style, start by that.
31617    new_path=`cmd //c echo $new_path`
31618
31619  input_path="$new_path"
31620  # Check if we need to convert this using DOS-style short mode. If the path
31621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31622  # take no chances and rewrite it.
31623  # Note: m4 eats our [], so we need to use [ and ] instead.
31624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31625  if test "x$has_forbidden_chars" != x; then
31626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31628  fi
31629
31630    # Output is in $new_path
31631
31632  windows_path="$new_path"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    unix_path=`$CYGPATH -u "$windows_path"`
31635    new_path="$unix_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31638    new_path="$unix_path"
31639  fi
31640
31641    # remove trailing .exe if any
31642    new_path="${new_path/%.exe/}"
31643
31644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31646  fi
31647
31648    else
31649      # We're on a unix platform. Hooray! :)
31650      # First separate the path from the arguments. This will split at the first
31651      # space.
31652      complete="$CPP"
31653      path="${complete%% *}"
31654      tmp="$complete EOL"
31655      arguments="${tmp#* }"
31656
31657      # Cannot rely on the command "which" here since it doesn't always work.
31658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31659      if test -z "$is_absolute_path"; then
31660        # Path to executable is not absolute. Find it.
31661        IFS_save="$IFS"
31662        IFS=:
31663        for p in $PATH; do
31664          if test -f "$p/$path" && test -x "$p/$path"; then
31665            new_path="$p/$path"
31666            break
31667          fi
31668        done
31669        IFS="$IFS_save"
31670      else
31671        # This is an absolute path, we can use it without further modifications.
31672        new_path="$path"
31673      fi
31674
31675      if test "x$new_path" = x; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31677$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31678        has_space=`$ECHO "$complete" | $GREP " "`
31679        if test "x$has_space" != x; then
31680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31682        fi
31683        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31684      fi
31685    fi
31686
31687    # Now join together the path and the arguments once again
31688    if test "x$arguments" != xEOL; then
31689      new_complete="$new_path ${arguments% *}"
31690    else
31691      new_complete="$new_path"
31692    fi
31693
31694    if test "x$complete" != "x$new_complete"; then
31695      CPP="$new_complete"
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31697$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31698    fi
31699  fi
31700
31701  ac_ext=cpp
31702ac_cpp='$CXXCPP $CPPFLAGS'
31703ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31704ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31705ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31707$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31708if test -z "$CXXCPP"; then
31709  if ${ac_cv_prog_CXXCPP+:} false; then :
31710  $as_echo_n "(cached) " >&6
31711else
31712      # Double quotes because CXXCPP needs to be expanded
31713    for CXXCPP in "$CXX -E" "/lib/cpp"
31714    do
31715      ac_preproc_ok=false
31716for ac_cxx_preproc_warn_flag in '' yes
31717do
31718  # Use a header file that comes with gcc, so configuring glibc
31719  # with a fresh cross-compiler works.
31720  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31721  # <limits.h> exists even on freestanding compilers.
31722  # On the NeXT, cc -E runs the code through the compiler's parser,
31723  # not just through cpp. "Syntax error" is here to catch this case.
31724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31725/* end confdefs.h.  */
31726#ifdef __STDC__
31727# include <limits.h>
31728#else
31729# include <assert.h>
31730#endif
31731		     Syntax error
31732_ACEOF
31733if ac_fn_cxx_try_cpp "$LINENO"; then :
31734
31735else
31736  # Broken: fails on valid input.
31737continue
31738fi
31739rm -f conftest.err conftest.i conftest.$ac_ext
31740
31741  # OK, works on sane cases.  Now check whether nonexistent headers
31742  # can be detected and how.
31743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31744/* end confdefs.h.  */
31745#include <ac_nonexistent.h>
31746_ACEOF
31747if ac_fn_cxx_try_cpp "$LINENO"; then :
31748  # Broken: success on invalid input.
31749continue
31750else
31751  # Passes both tests.
31752ac_preproc_ok=:
31753break
31754fi
31755rm -f conftest.err conftest.i conftest.$ac_ext
31756
31757done
31758# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31759rm -f conftest.i conftest.err conftest.$ac_ext
31760if $ac_preproc_ok; then :
31761  break
31762fi
31763
31764    done
31765    ac_cv_prog_CXXCPP=$CXXCPP
31766
31767fi
31768  CXXCPP=$ac_cv_prog_CXXCPP
31769else
31770  ac_cv_prog_CXXCPP=$CXXCPP
31771fi
31772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31773$as_echo "$CXXCPP" >&6; }
31774ac_preproc_ok=false
31775for ac_cxx_preproc_warn_flag in '' yes
31776do
31777  # Use a header file that comes with gcc, so configuring glibc
31778  # with a fresh cross-compiler works.
31779  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31780  # <limits.h> exists even on freestanding compilers.
31781  # On the NeXT, cc -E runs the code through the compiler's parser,
31782  # not just through cpp. "Syntax error" is here to catch this case.
31783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31784/* end confdefs.h.  */
31785#ifdef __STDC__
31786# include <limits.h>
31787#else
31788# include <assert.h>
31789#endif
31790		     Syntax error
31791_ACEOF
31792if ac_fn_cxx_try_cpp "$LINENO"; then :
31793
31794else
31795  # Broken: fails on valid input.
31796continue
31797fi
31798rm -f conftest.err conftest.i conftest.$ac_ext
31799
31800  # OK, works on sane cases.  Now check whether nonexistent headers
31801  # can be detected and how.
31802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803/* end confdefs.h.  */
31804#include <ac_nonexistent.h>
31805_ACEOF
31806if ac_fn_cxx_try_cpp "$LINENO"; then :
31807  # Broken: success on invalid input.
31808continue
31809else
31810  # Passes both tests.
31811ac_preproc_ok=:
31812break
31813fi
31814rm -f conftest.err conftest.i conftest.$ac_ext
31815
31816done
31817# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31818rm -f conftest.i conftest.err conftest.$ac_ext
31819if $ac_preproc_ok; then :
31820
31821else
31822  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31824as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31825See \`config.log' for more details" "$LINENO" 5; }
31826fi
31827
31828ac_ext=cpp
31829ac_cpp='$CXXCPP $CPPFLAGS'
31830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31833
31834
31835  # Only process if variable expands to non-empty
31836
31837  if test "x$CXXCPP" != x; then
31838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31839
31840  # First separate the path from the arguments. This will split at the first
31841  # space.
31842  complete="$CXXCPP"
31843  path="${complete%% *}"
31844  tmp="$complete EOL"
31845  arguments="${tmp#* }"
31846
31847  # Input might be given as Windows format, start by converting to
31848  # unix format.
31849  new_path=`$CYGPATH -u "$path"`
31850
31851  # Now try to locate executable using which
31852  new_path=`$WHICH "$new_path" 2> /dev/null`
31853  # bat and cmd files are not always considered executable in cygwin causing which
31854  # to not find them
31855  if test "x$new_path" = x \
31856      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31857      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31858    new_path=`$CYGPATH -u "$path"`
31859  fi
31860  if test "x$new_path" = x; then
31861    # Oops. Which didn't find the executable.
31862    # The splitting of arguments from the executable at a space might have been incorrect,
31863    # since paths with space are more likely in Windows. Give it another try with the whole
31864    # argument.
31865    path="$complete"
31866    arguments="EOL"
31867    new_path=`$CYGPATH -u "$path"`
31868    new_path=`$WHICH "$new_path" 2> /dev/null`
31869    # bat and cmd files are not always considered executable in cygwin causing which
31870    # to not find them
31871    if test "x$new_path" = x \
31872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31874      new_path=`$CYGPATH -u "$path"`
31875    fi
31876    if test "x$new_path" = x; then
31877      # It's still not found. Now this is an unrecoverable error.
31878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31879$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31880      has_space=`$ECHO "$complete" | $GREP " "`
31881      if test "x$has_space" != x; then
31882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31884      fi
31885      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31886    fi
31887  fi
31888
31889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31892  # "foo.exe" is OK but "foo" is an error.
31893  #
31894  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31895  # It is also a way to make sure we got the proper file name for the real test later on.
31896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31897  if test "x$test_shortpath" = x; then
31898    # Short path failed, file does not exist as specified.
31899    # Try adding .exe or .cmd
31900    if test -f "${new_path}.exe"; then
31901      input_to_shortpath="${new_path}.exe"
31902    elif test -f "${new_path}.cmd"; then
31903      input_to_shortpath="${new_path}.cmd"
31904    else
31905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31906$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31909      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31910    fi
31911  else
31912    input_to_shortpath="$new_path"
31913  fi
31914
31915  # Call helper function which possibly converts this using DOS-style short mode.
31916  # If so, the updated path is stored in $new_path.
31917  new_path="$input_to_shortpath"
31918
31919  input_path="$input_to_shortpath"
31920  # Check if we need to convert this using DOS-style short mode. If the path
31921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31922  # take no chances and rewrite it.
31923  # Note: m4 eats our [], so we need to use [ and ] instead.
31924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31925  if test "x$has_forbidden_chars" != x; then
31926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31930      # Going to short mode and back again did indeed matter. Since short mode is
31931      # case insensitive, let's make it lowercase to improve readability.
31932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31933      # Now convert it back to Unix-style (cygpath)
31934      input_path=`$CYGPATH -u "$shortmode_path"`
31935      new_path="$input_path"
31936    fi
31937  fi
31938
31939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31940  if test "x$test_cygdrive_prefix" = x; then
31941    # As a simple fix, exclude /usr/bin since it's not a real path.
31942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31944      # a path prefixed by /cygdrive for fixpath to work.
31945      new_path="$CYGWIN_ROOT_PATH$input_path"
31946    fi
31947  fi
31948
31949  # remove trailing .exe if any
31950  new_path="${new_path/%.exe/}"
31951
31952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31953
31954  # First separate the path from the arguments. This will split at the first
31955  # space.
31956  complete="$CXXCPP"
31957  path="${complete%% *}"
31958  tmp="$complete EOL"
31959  arguments="${tmp#* }"
31960
31961  # Input might be given as Windows format, start by converting to
31962  # unix format.
31963  new_path="$path"
31964
31965  windows_path="$new_path"
31966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31967    unix_path=`$CYGPATH -u "$windows_path"`
31968    new_path="$unix_path"
31969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31971    new_path="$unix_path"
31972  fi
31973
31974
31975  # Now try to locate executable using which
31976  new_path=`$WHICH "$new_path" 2> /dev/null`
31977
31978  if test "x$new_path" = x; then
31979    # Oops. Which didn't find the executable.
31980    # The splitting of arguments from the executable at a space might have been incorrect,
31981    # since paths with space are more likely in Windows. Give it another try with the whole
31982    # argument.
31983    path="$complete"
31984    arguments="EOL"
31985    new_path="$path"
31986
31987  windows_path="$new_path"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    new_path="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    new_path="$unix_path"
31994  fi
31995
31996
31997    new_path=`$WHICH "$new_path" 2> /dev/null`
31998    # bat and cmd files are not always considered executable in MSYS causing which
31999    # to not find them
32000    if test "x$new_path" = x \
32001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32003      new_path="$path"
32004
32005  windows_path="$new_path"
32006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32007    unix_path=`$CYGPATH -u "$windows_path"`
32008    new_path="$unix_path"
32009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32011    new_path="$unix_path"
32012  fi
32013
32014    fi
32015
32016    if test "x$new_path" = x; then
32017      # It's still not found. Now this is an unrecoverable error.
32018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32019$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32020      has_space=`$ECHO "$complete" | $GREP " "`
32021      if test "x$has_space" != x; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32024      fi
32025      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32026    fi
32027  fi
32028
32029  # Now new_path has a complete unix path to the binary
32030  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32031    # Keep paths in /bin as-is, but remove trailing .exe if any
32032    new_path="${new_path/%.exe/}"
32033    # Do not save /bin paths to all_fixpath_prefixes!
32034  else
32035    # Not in mixed or Windows style, start by that.
32036    new_path=`cmd //c echo $new_path`
32037
32038  input_path="$new_path"
32039  # Check if we need to convert this using DOS-style short mode. If the path
32040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32041  # take no chances and rewrite it.
32042  # Note: m4 eats our [], so we need to use [ and ] instead.
32043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32044  if test "x$has_forbidden_chars" != x; then
32045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32047  fi
32048
32049    # Output is in $new_path
32050
32051  windows_path="$new_path"
32052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32053    unix_path=`$CYGPATH -u "$windows_path"`
32054    new_path="$unix_path"
32055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32057    new_path="$unix_path"
32058  fi
32059
32060    # remove trailing .exe if any
32061    new_path="${new_path/%.exe/}"
32062
32063    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32064    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32065  fi
32066
32067    else
32068      # We're on a unix platform. Hooray! :)
32069      # First separate the path from the arguments. This will split at the first
32070      # space.
32071      complete="$CXXCPP"
32072      path="${complete%% *}"
32073      tmp="$complete EOL"
32074      arguments="${tmp#* }"
32075
32076      # Cannot rely on the command "which" here since it doesn't always work.
32077      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32078      if test -z "$is_absolute_path"; then
32079        # Path to executable is not absolute. Find it.
32080        IFS_save="$IFS"
32081        IFS=:
32082        for p in $PATH; do
32083          if test -f "$p/$path" && test -x "$p/$path"; then
32084            new_path="$p/$path"
32085            break
32086          fi
32087        done
32088        IFS="$IFS_save"
32089      else
32090        # This is an absolute path, we can use it without further modifications.
32091        new_path="$path"
32092      fi
32093
32094      if test "x$new_path" = x; then
32095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32096$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32097        has_space=`$ECHO "$complete" | $GREP " "`
32098        if test "x$has_space" != x; then
32099          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32100$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32101        fi
32102        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32103      fi
32104    fi
32105
32106    # Now join together the path and the arguments once again
32107    if test "x$arguments" != xEOL; then
32108      new_complete="$new_path ${arguments% *}"
32109    else
32110      new_complete="$new_path"
32111    fi
32112
32113    if test "x$complete" != "x$new_complete"; then
32114      CXXCPP="$new_complete"
32115      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32116$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32117    fi
32118  fi
32119
32120
32121  #
32122  # Setup the linker (LD)
32123  #
32124  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32125    # In the Microsoft toolchain we have a separate LD command "link".
32126    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32127    # a cygwin program for something completely different.
32128    # Extract the first word of "link", so it can be a program name with args.
32129set dummy link; ac_word=$2
32130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32131$as_echo_n "checking for $ac_word... " >&6; }
32132if ${ac_cv_prog_LD+:} false; then :
32133  $as_echo_n "(cached) " >&6
32134else
32135  if test -n "$LD"; then
32136  ac_cv_prog_LD="$LD" # Let the user override the test.
32137else
32138  ac_prog_rejected=no
32139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32140for as_dir in $PATH
32141do
32142  IFS=$as_save_IFS
32143  test -z "$as_dir" && as_dir=.
32144    for ac_exec_ext in '' $ac_executable_extensions; do
32145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32146    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32147       ac_prog_rejected=yes
32148       continue
32149     fi
32150    ac_cv_prog_LD="link"
32151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32152    break 2
32153  fi
32154done
32155  done
32156IFS=$as_save_IFS
32157
32158if test $ac_prog_rejected = yes; then
32159  # We found a bogon in the path, so make sure we never use it.
32160  set dummy $ac_cv_prog_LD
32161  shift
32162  if test $# != 0; then
32163    # We chose a different compiler from the bogus one.
32164    # However, it has the same basename, so the bogon will be chosen
32165    # first if we set LD to just the basename; use the full file name.
32166    shift
32167    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32168  fi
32169fi
32170fi
32171fi
32172LD=$ac_cv_prog_LD
32173if test -n "$LD"; then
32174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32175$as_echo "$LD" >&6; }
32176else
32177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32178$as_echo "no" >&6; }
32179fi
32180
32181
32182
32183  # Only process if variable expands to non-empty
32184
32185  if test "x$LD" != x; then
32186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32187
32188  # First separate the path from the arguments. This will split at the first
32189  # space.
32190  complete="$LD"
32191  path="${complete%% *}"
32192  tmp="$complete EOL"
32193  arguments="${tmp#* }"
32194
32195  # Input might be given as Windows format, start by converting to
32196  # unix format.
32197  new_path=`$CYGPATH -u "$path"`
32198
32199  # Now try to locate executable using which
32200  new_path=`$WHICH "$new_path" 2> /dev/null`
32201  # bat and cmd files are not always considered executable in cygwin causing which
32202  # to not find them
32203  if test "x$new_path" = x \
32204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32206    new_path=`$CYGPATH -u "$path"`
32207  fi
32208  if test "x$new_path" = x; then
32209    # Oops. Which didn't find the executable.
32210    # The splitting of arguments from the executable at a space might have been incorrect,
32211    # since paths with space are more likely in Windows. Give it another try with the whole
32212    # argument.
32213    path="$complete"
32214    arguments="EOL"
32215    new_path=`$CYGPATH -u "$path"`
32216    new_path=`$WHICH "$new_path" 2> /dev/null`
32217    # bat and cmd files are not always considered executable in cygwin causing which
32218    # to not find them
32219    if test "x$new_path" = x \
32220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32222      new_path=`$CYGPATH -u "$path"`
32223    fi
32224    if test "x$new_path" = x; then
32225      # It's still not found. Now this is an unrecoverable error.
32226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32227$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32228      has_space=`$ECHO "$complete" | $GREP " "`
32229      if test "x$has_space" != x; then
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32232      fi
32233      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32234    fi
32235  fi
32236
32237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32240  # "foo.exe" is OK but "foo" is an error.
32241  #
32242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32243  # It is also a way to make sure we got the proper file name for the real test later on.
32244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32245  if test "x$test_shortpath" = x; then
32246    # Short path failed, file does not exist as specified.
32247    # Try adding .exe or .cmd
32248    if test -f "${new_path}.exe"; then
32249      input_to_shortpath="${new_path}.exe"
32250    elif test -f "${new_path}.cmd"; then
32251      input_to_shortpath="${new_path}.cmd"
32252    else
32253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32254$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32257      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32258    fi
32259  else
32260    input_to_shortpath="$new_path"
32261  fi
32262
32263  # Call helper function which possibly converts this using DOS-style short mode.
32264  # If so, the updated path is stored in $new_path.
32265  new_path="$input_to_shortpath"
32266
32267  input_path="$input_to_shortpath"
32268  # Check if we need to convert this using DOS-style short mode. If the path
32269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32270  # take no chances and rewrite it.
32271  # Note: m4 eats our [], so we need to use [ and ] instead.
32272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32273  if test "x$has_forbidden_chars" != x; then
32274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32278      # Going to short mode and back again did indeed matter. Since short mode is
32279      # case insensitive, let's make it lowercase to improve readability.
32280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32281      # Now convert it back to Unix-style (cygpath)
32282      input_path=`$CYGPATH -u "$shortmode_path"`
32283      new_path="$input_path"
32284    fi
32285  fi
32286
32287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32288  if test "x$test_cygdrive_prefix" = x; then
32289    # As a simple fix, exclude /usr/bin since it's not a real path.
32290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32292      # a path prefixed by /cygdrive for fixpath to work.
32293      new_path="$CYGWIN_ROOT_PATH$input_path"
32294    fi
32295  fi
32296
32297  # remove trailing .exe if any
32298  new_path="${new_path/%.exe/}"
32299
32300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32301
32302  # First separate the path from the arguments. This will split at the first
32303  # space.
32304  complete="$LD"
32305  path="${complete%% *}"
32306  tmp="$complete EOL"
32307  arguments="${tmp#* }"
32308
32309  # Input might be given as Windows format, start by converting to
32310  # unix format.
32311  new_path="$path"
32312
32313  windows_path="$new_path"
32314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32315    unix_path=`$CYGPATH -u "$windows_path"`
32316    new_path="$unix_path"
32317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32319    new_path="$unix_path"
32320  fi
32321
32322
32323  # Now try to locate executable using which
32324  new_path=`$WHICH "$new_path" 2> /dev/null`
32325
32326  if test "x$new_path" = x; then
32327    # Oops. Which didn't find the executable.
32328    # The splitting of arguments from the executable at a space might have been incorrect,
32329    # since paths with space are more likely in Windows. Give it another try with the whole
32330    # argument.
32331    path="$complete"
32332    arguments="EOL"
32333    new_path="$path"
32334
32335  windows_path="$new_path"
32336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32337    unix_path=`$CYGPATH -u "$windows_path"`
32338    new_path="$unix_path"
32339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32341    new_path="$unix_path"
32342  fi
32343
32344
32345    new_path=`$WHICH "$new_path" 2> /dev/null`
32346    # bat and cmd files are not always considered executable in MSYS causing which
32347    # to not find them
32348    if test "x$new_path" = x \
32349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32351      new_path="$path"
32352
32353  windows_path="$new_path"
32354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32355    unix_path=`$CYGPATH -u "$windows_path"`
32356    new_path="$unix_path"
32357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32359    new_path="$unix_path"
32360  fi
32361
32362    fi
32363
32364    if test "x$new_path" = x; then
32365      # It's still not found. Now this is an unrecoverable error.
32366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32367$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32368      has_space=`$ECHO "$complete" | $GREP " "`
32369      if test "x$has_space" != x; then
32370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32372      fi
32373      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32374    fi
32375  fi
32376
32377  # Now new_path has a complete unix path to the binary
32378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32379    # Keep paths in /bin as-is, but remove trailing .exe if any
32380    new_path="${new_path/%.exe/}"
32381    # Do not save /bin paths to all_fixpath_prefixes!
32382  else
32383    # Not in mixed or Windows style, start by that.
32384    new_path=`cmd //c echo $new_path`
32385
32386  input_path="$new_path"
32387  # Check if we need to convert this using DOS-style short mode. If the path
32388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32389  # take no chances and rewrite it.
32390  # Note: m4 eats our [], so we need to use [ and ] instead.
32391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32392  if test "x$has_forbidden_chars" != x; then
32393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32395  fi
32396
32397    # Output is in $new_path
32398
32399  windows_path="$new_path"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    new_path="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    new_path="$unix_path"
32406  fi
32407
32408    # remove trailing .exe if any
32409    new_path="${new_path/%.exe/}"
32410
32411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32413  fi
32414
32415    else
32416      # We're on a unix platform. Hooray! :)
32417      # First separate the path from the arguments. This will split at the first
32418      # space.
32419      complete="$LD"
32420      path="${complete%% *}"
32421      tmp="$complete EOL"
32422      arguments="${tmp#* }"
32423
32424      # Cannot rely on the command "which" here since it doesn't always work.
32425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32426      if test -z "$is_absolute_path"; then
32427        # Path to executable is not absolute. Find it.
32428        IFS_save="$IFS"
32429        IFS=:
32430        for p in $PATH; do
32431          if test -f "$p/$path" && test -x "$p/$path"; then
32432            new_path="$p/$path"
32433            break
32434          fi
32435        done
32436        IFS="$IFS_save"
32437      else
32438        # This is an absolute path, we can use it without further modifications.
32439        new_path="$path"
32440      fi
32441
32442      if test "x$new_path" = x; then
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32444$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32445        has_space=`$ECHO "$complete" | $GREP " "`
32446        if test "x$has_space" != x; then
32447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32449        fi
32450        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32451      fi
32452    fi
32453
32454    # Now join together the path and the arguments once again
32455    if test "x$arguments" != xEOL; then
32456      new_complete="$new_path ${arguments% *}"
32457    else
32458      new_complete="$new_path"
32459    fi
32460
32461    if test "x$complete" != "x$new_complete"; then
32462      LD="$new_complete"
32463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32464$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32465    fi
32466  fi
32467
32468    # Verify that we indeed succeeded with this trick.
32469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32470$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32471    "$LD" --version > /dev/null
32472    if test $? -eq 0 ; then
32473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32474$as_echo "no" >&6; }
32475      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32476    else
32477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32478$as_echo "yes" >&6; }
32479    fi
32480    LDCXX="$LD"
32481  else
32482    # All other toolchains use the compiler to link.
32483    LD="$CC"
32484    LDCXX="$CXX"
32485  fi
32486
32487  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32488
32489
32490  #
32491  # Setup the assembler (AS)
32492  #
32493  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32494    # FIXME: should this really be solaris, or solstudio?
32495
32496
32497  # Publish this variable in the help.
32498
32499
32500  if test "x$AS" = x; then
32501    # The variable is not set by user, try to locate tool using the code snippet
32502    for ac_prog in as
32503do
32504  # Extract the first word of "$ac_prog", so it can be a program name with args.
32505set dummy $ac_prog; ac_word=$2
32506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32507$as_echo_n "checking for $ac_word... " >&6; }
32508if ${ac_cv_path_AS+:} false; then :
32509  $as_echo_n "(cached) " >&6
32510else
32511  case $AS in
32512  [\\/]* | ?:[\\/]*)
32513  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32514  ;;
32515  *)
32516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32517for as_dir in $PATH
32518do
32519  IFS=$as_save_IFS
32520  test -z "$as_dir" && as_dir=.
32521    for ac_exec_ext in '' $ac_executable_extensions; do
32522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32523    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32525    break 2
32526  fi
32527done
32528  done
32529IFS=$as_save_IFS
32530
32531  ;;
32532esac
32533fi
32534AS=$ac_cv_path_AS
32535if test -n "$AS"; then
32536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32537$as_echo "$AS" >&6; }
32538else
32539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32540$as_echo "no" >&6; }
32541fi
32542
32543
32544  test -n "$AS" && break
32545done
32546
32547  else
32548    # The variable is set, but is it from the command line or the environment?
32549
32550    # Try to remove the string !AS! from our list.
32551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32553      # If it failed, the variable was not from the command line. Ignore it,
32554      # but warn the user (except for BASH, which is always set by the calling BASH).
32555      if test "xAS" != xBASH; then
32556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32557$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32558      fi
32559      # Try to locate tool using the code snippet
32560      for ac_prog in as
32561do
32562  # Extract the first word of "$ac_prog", so it can be a program name with args.
32563set dummy $ac_prog; ac_word=$2
32564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32565$as_echo_n "checking for $ac_word... " >&6; }
32566if ${ac_cv_path_AS+:} false; then :
32567  $as_echo_n "(cached) " >&6
32568else
32569  case $AS in
32570  [\\/]* | ?:[\\/]*)
32571  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32572  ;;
32573  *)
32574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32575for as_dir in $PATH
32576do
32577  IFS=$as_save_IFS
32578  test -z "$as_dir" && as_dir=.
32579    for ac_exec_ext in '' $ac_executable_extensions; do
32580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32581    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32583    break 2
32584  fi
32585done
32586  done
32587IFS=$as_save_IFS
32588
32589  ;;
32590esac
32591fi
32592AS=$ac_cv_path_AS
32593if test -n "$AS"; then
32594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32595$as_echo "$AS" >&6; }
32596else
32597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32598$as_echo "no" >&6; }
32599fi
32600
32601
32602  test -n "$AS" && break
32603done
32604
32605    else
32606      # If it succeeded, then it was overridden by the user. We will use it
32607      # for the tool.
32608
32609      # First remove it from the list of overridden variables, so we can test
32610      # for unknown variables in the end.
32611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32612
32613      # Check if the provided tool contains a complete path.
32614      tool_specified="$AS"
32615      tool_basename="${tool_specified##*/}"
32616      if test "x$tool_basename" = "x$tool_specified"; then
32617        # A command without a complete path is provided, search $PATH.
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32619$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32620        # Extract the first word of "$tool_basename", so it can be a program name with args.
32621set dummy $tool_basename; ac_word=$2
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32623$as_echo_n "checking for $ac_word... " >&6; }
32624if ${ac_cv_path_AS+:} false; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  case $AS in
32628  [\\/]* | ?:[\\/]*)
32629  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32630  ;;
32631  *)
32632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32633for as_dir in $PATH
32634do
32635  IFS=$as_save_IFS
32636  test -z "$as_dir" && as_dir=.
32637    for ac_exec_ext in '' $ac_executable_extensions; do
32638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32639    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32641    break 2
32642  fi
32643done
32644  done
32645IFS=$as_save_IFS
32646
32647  ;;
32648esac
32649fi
32650AS=$ac_cv_path_AS
32651if test -n "$AS"; then
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32653$as_echo "$AS" >&6; }
32654else
32655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32656$as_echo "no" >&6; }
32657fi
32658
32659
32660        if test "x$AS" = x; then
32661          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32662        fi
32663      else
32664        # Otherwise we believe it is a complete path. Use it as it is.
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32666$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32668$as_echo_n "checking for AS... " >&6; }
32669        if test ! -x "$tool_specified"; then
32670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32671$as_echo "not found" >&6; }
32672          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32673        fi
32674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32675$as_echo "$tool_specified" >&6; }
32676      fi
32677    fi
32678  fi
32679
32680
32681
32682  # Only process if variable expands to non-empty
32683
32684  if test "x$AS" != x; then
32685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32686
32687  # First separate the path from the arguments. This will split at the first
32688  # space.
32689  complete="$AS"
32690  path="${complete%% *}"
32691  tmp="$complete EOL"
32692  arguments="${tmp#* }"
32693
32694  # Input might be given as Windows format, start by converting to
32695  # unix format.
32696  new_path=`$CYGPATH -u "$path"`
32697
32698  # Now try to locate executable using which
32699  new_path=`$WHICH "$new_path" 2> /dev/null`
32700  # bat and cmd files are not always considered executable in cygwin causing which
32701  # to not find them
32702  if test "x$new_path" = x \
32703      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32704      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32705    new_path=`$CYGPATH -u "$path"`
32706  fi
32707  if test "x$new_path" = x; then
32708    # Oops. Which didn't find the executable.
32709    # The splitting of arguments from the executable at a space might have been incorrect,
32710    # since paths with space are more likely in Windows. Give it another try with the whole
32711    # argument.
32712    path="$complete"
32713    arguments="EOL"
32714    new_path=`$CYGPATH -u "$path"`
32715    new_path=`$WHICH "$new_path" 2> /dev/null`
32716    # bat and cmd files are not always considered executable in cygwin causing which
32717    # to not find them
32718    if test "x$new_path" = x \
32719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32721      new_path=`$CYGPATH -u "$path"`
32722    fi
32723    if test "x$new_path" = x; then
32724      # It's still not found. Now this is an unrecoverable error.
32725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32726$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32727      has_space=`$ECHO "$complete" | $GREP " "`
32728      if test "x$has_space" != x; then
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32731      fi
32732      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32733    fi
32734  fi
32735
32736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32739  # "foo.exe" is OK but "foo" is an error.
32740  #
32741  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32742  # It is also a way to make sure we got the proper file name for the real test later on.
32743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32744  if test "x$test_shortpath" = x; then
32745    # Short path failed, file does not exist as specified.
32746    # Try adding .exe or .cmd
32747    if test -f "${new_path}.exe"; then
32748      input_to_shortpath="${new_path}.exe"
32749    elif test -f "${new_path}.cmd"; then
32750      input_to_shortpath="${new_path}.cmd"
32751    else
32752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32753$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32756      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32757    fi
32758  else
32759    input_to_shortpath="$new_path"
32760  fi
32761
32762  # Call helper function which possibly converts this using DOS-style short mode.
32763  # If so, the updated path is stored in $new_path.
32764  new_path="$input_to_shortpath"
32765
32766  input_path="$input_to_shortpath"
32767  # Check if we need to convert this using DOS-style short mode. If the path
32768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32769  # take no chances and rewrite it.
32770  # Note: m4 eats our [], so we need to use [ and ] instead.
32771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32772  if test "x$has_forbidden_chars" != x; then
32773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32777      # Going to short mode and back again did indeed matter. Since short mode is
32778      # case insensitive, let's make it lowercase to improve readability.
32779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32780      # Now convert it back to Unix-style (cygpath)
32781      input_path=`$CYGPATH -u "$shortmode_path"`
32782      new_path="$input_path"
32783    fi
32784  fi
32785
32786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32787  if test "x$test_cygdrive_prefix" = x; then
32788    # As a simple fix, exclude /usr/bin since it's not a real path.
32789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32791      # a path prefixed by /cygdrive for fixpath to work.
32792      new_path="$CYGWIN_ROOT_PATH$input_path"
32793    fi
32794  fi
32795
32796  # remove trailing .exe if any
32797  new_path="${new_path/%.exe/}"
32798
32799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800
32801  # First separate the path from the arguments. This will split at the first
32802  # space.
32803  complete="$AS"
32804  path="${complete%% *}"
32805  tmp="$complete EOL"
32806  arguments="${tmp#* }"
32807
32808  # Input might be given as Windows format, start by converting to
32809  # unix format.
32810  new_path="$path"
32811
32812  windows_path="$new_path"
32813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814    unix_path=`$CYGPATH -u "$windows_path"`
32815    new_path="$unix_path"
32816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818    new_path="$unix_path"
32819  fi
32820
32821
32822  # Now try to locate executable using which
32823  new_path=`$WHICH "$new_path" 2> /dev/null`
32824
32825  if test "x$new_path" = x; then
32826    # Oops. Which didn't find the executable.
32827    # The splitting of arguments from the executable at a space might have been incorrect,
32828    # since paths with space are more likely in Windows. Give it another try with the whole
32829    # argument.
32830    path="$complete"
32831    arguments="EOL"
32832    new_path="$path"
32833
32834  windows_path="$new_path"
32835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836    unix_path=`$CYGPATH -u "$windows_path"`
32837    new_path="$unix_path"
32838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840    new_path="$unix_path"
32841  fi
32842
32843
32844    new_path=`$WHICH "$new_path" 2> /dev/null`
32845    # bat and cmd files are not always considered executable in MSYS causing which
32846    # to not find them
32847    if test "x$new_path" = x \
32848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32850      new_path="$path"
32851
32852  windows_path="$new_path"
32853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32854    unix_path=`$CYGPATH -u "$windows_path"`
32855    new_path="$unix_path"
32856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32858    new_path="$unix_path"
32859  fi
32860
32861    fi
32862
32863    if test "x$new_path" = x; then
32864      # It's still not found. Now this is an unrecoverable error.
32865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32866$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32867      has_space=`$ECHO "$complete" | $GREP " "`
32868      if test "x$has_space" != x; then
32869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32871      fi
32872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32873    fi
32874  fi
32875
32876  # Now new_path has a complete unix path to the binary
32877  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32878    # Keep paths in /bin as-is, but remove trailing .exe if any
32879    new_path="${new_path/%.exe/}"
32880    # Do not save /bin paths to all_fixpath_prefixes!
32881  else
32882    # Not in mixed or Windows style, start by that.
32883    new_path=`cmd //c echo $new_path`
32884
32885  input_path="$new_path"
32886  # Check if we need to convert this using DOS-style short mode. If the path
32887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32888  # take no chances and rewrite it.
32889  # Note: m4 eats our [], so we need to use [ and ] instead.
32890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32891  if test "x$has_forbidden_chars" != x; then
32892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32894  fi
32895
32896    # Output is in $new_path
32897
32898  windows_path="$new_path"
32899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900    unix_path=`$CYGPATH -u "$windows_path"`
32901    new_path="$unix_path"
32902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32904    new_path="$unix_path"
32905  fi
32906
32907    # remove trailing .exe if any
32908    new_path="${new_path/%.exe/}"
32909
32910    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912  fi
32913
32914    else
32915      # We're on a unix platform. Hooray! :)
32916      # First separate the path from the arguments. This will split at the first
32917      # space.
32918      complete="$AS"
32919      path="${complete%% *}"
32920      tmp="$complete EOL"
32921      arguments="${tmp#* }"
32922
32923      # Cannot rely on the command "which" here since it doesn't always work.
32924      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32925      if test -z "$is_absolute_path"; then
32926        # Path to executable is not absolute. Find it.
32927        IFS_save="$IFS"
32928        IFS=:
32929        for p in $PATH; do
32930          if test -f "$p/$path" && test -x "$p/$path"; then
32931            new_path="$p/$path"
32932            break
32933          fi
32934        done
32935        IFS="$IFS_save"
32936      else
32937        # This is an absolute path, we can use it without further modifications.
32938        new_path="$path"
32939      fi
32940
32941      if test "x$new_path" = x; then
32942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32943$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32944        has_space=`$ECHO "$complete" | $GREP " "`
32945        if test "x$has_space" != x; then
32946          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32947$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32948        fi
32949        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32950      fi
32951    fi
32952
32953    # Now join together the path and the arguments once again
32954    if test "x$arguments" != xEOL; then
32955      new_complete="$new_path ${arguments% *}"
32956    else
32957      new_complete="$new_path"
32958    fi
32959
32960    if test "x$complete" != "x$new_complete"; then
32961      AS="$new_complete"
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32963$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32964    fi
32965  fi
32966
32967  else
32968    # FIXME: is this correct for microsoft?
32969    AS="$CC -c"
32970  fi
32971
32972
32973  #
32974  # Setup the archiver (AR)
32975  #
32976  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32977    # The corresponding ar tool is lib.exe (used to create static libraries)
32978    # Extract the first word of "lib", so it can be a program name with args.
32979set dummy lib; ac_word=$2
32980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32981$as_echo_n "checking for $ac_word... " >&6; }
32982if ${ac_cv_prog_AR+:} false; then :
32983  $as_echo_n "(cached) " >&6
32984else
32985  if test -n "$AR"; then
32986  ac_cv_prog_AR="$AR" # Let the user override the test.
32987else
32988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32989for as_dir in $PATH
32990do
32991  IFS=$as_save_IFS
32992  test -z "$as_dir" && as_dir=.
32993    for ac_exec_ext in '' $ac_executable_extensions; do
32994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32995    ac_cv_prog_AR="lib"
32996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32997    break 2
32998  fi
32999done
33000  done
33001IFS=$as_save_IFS
33002
33003fi
33004fi
33005AR=$ac_cv_prog_AR
33006if test -n "$AR"; then
33007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33008$as_echo "$AR" >&6; }
33009else
33010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33011$as_echo "no" >&6; }
33012fi
33013
33014
33015  else
33016
33017
33018  # Publish this variable in the help.
33019
33020
33021  if test "x$AR" = x; then
33022    # The variable is not set by user, try to locate tool using the code snippet
33023    if test -n "$ac_tool_prefix"; then
33024  for ac_prog in ar
33025  do
33026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33029$as_echo_n "checking for $ac_word... " >&6; }
33030if ${ac_cv_prog_AR+:} false; then :
33031  $as_echo_n "(cached) " >&6
33032else
33033  if test -n "$AR"; then
33034  ac_cv_prog_AR="$AR" # Let the user override the test.
33035else
33036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33037for as_dir in $PATH
33038do
33039  IFS=$as_save_IFS
33040  test -z "$as_dir" && as_dir=.
33041    for ac_exec_ext in '' $ac_executable_extensions; do
33042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33043    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33045    break 2
33046  fi
33047done
33048  done
33049IFS=$as_save_IFS
33050
33051fi
33052fi
33053AR=$ac_cv_prog_AR
33054if test -n "$AR"; then
33055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33056$as_echo "$AR" >&6; }
33057else
33058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33059$as_echo "no" >&6; }
33060fi
33061
33062
33063    test -n "$AR" && break
33064  done
33065fi
33066if test -z "$AR"; then
33067  ac_ct_AR=$AR
33068  for ac_prog in ar
33069do
33070  # Extract the first word of "$ac_prog", so it can be a program name with args.
33071set dummy $ac_prog; ac_word=$2
33072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33073$as_echo_n "checking for $ac_word... " >&6; }
33074if ${ac_cv_prog_ac_ct_AR+:} false; then :
33075  $as_echo_n "(cached) " >&6
33076else
33077  if test -n "$ac_ct_AR"; then
33078  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33079else
33080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33081for as_dir in $PATH
33082do
33083  IFS=$as_save_IFS
33084  test -z "$as_dir" && as_dir=.
33085    for ac_exec_ext in '' $ac_executable_extensions; do
33086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33087    ac_cv_prog_ac_ct_AR="$ac_prog"
33088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33089    break 2
33090  fi
33091done
33092  done
33093IFS=$as_save_IFS
33094
33095fi
33096fi
33097ac_ct_AR=$ac_cv_prog_ac_ct_AR
33098if test -n "$ac_ct_AR"; then
33099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33100$as_echo "$ac_ct_AR" >&6; }
33101else
33102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33103$as_echo "no" >&6; }
33104fi
33105
33106
33107  test -n "$ac_ct_AR" && break
33108done
33109
33110  if test "x$ac_ct_AR" = x; then
33111    AR=""
33112  else
33113    case $cross_compiling:$ac_tool_warned in
33114yes:)
33115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33117ac_tool_warned=yes ;;
33118esac
33119    AR=$ac_ct_AR
33120  fi
33121fi
33122
33123  else
33124    # The variable is set, but is it from the command line or the environment?
33125
33126    # Try to remove the string !AR! from our list.
33127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33129      # If it failed, the variable was not from the command line. Ignore it,
33130      # but warn the user (except for BASH, which is always set by the calling BASH).
33131      if test "xAR" != xBASH; then
33132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33133$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33134      fi
33135      # Try to locate tool using the code snippet
33136      if test -n "$ac_tool_prefix"; then
33137  for ac_prog in ar
33138  do
33139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33142$as_echo_n "checking for $ac_word... " >&6; }
33143if ${ac_cv_prog_AR+:} false; then :
33144  $as_echo_n "(cached) " >&6
33145else
33146  if test -n "$AR"; then
33147  ac_cv_prog_AR="$AR" # Let the user override the test.
33148else
33149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33150for as_dir in $PATH
33151do
33152  IFS=$as_save_IFS
33153  test -z "$as_dir" && as_dir=.
33154    for ac_exec_ext in '' $ac_executable_extensions; do
33155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33156    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33158    break 2
33159  fi
33160done
33161  done
33162IFS=$as_save_IFS
33163
33164fi
33165fi
33166AR=$ac_cv_prog_AR
33167if test -n "$AR"; then
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33169$as_echo "$AR" >&6; }
33170else
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33172$as_echo "no" >&6; }
33173fi
33174
33175
33176    test -n "$AR" && break
33177  done
33178fi
33179if test -z "$AR"; then
33180  ac_ct_AR=$AR
33181  for ac_prog in ar
33182do
33183  # Extract the first word of "$ac_prog", so it can be a program name with args.
33184set dummy $ac_prog; ac_word=$2
33185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33186$as_echo_n "checking for $ac_word... " >&6; }
33187if ${ac_cv_prog_ac_ct_AR+:} false; then :
33188  $as_echo_n "(cached) " >&6
33189else
33190  if test -n "$ac_ct_AR"; then
33191  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33192else
33193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33194for as_dir in $PATH
33195do
33196  IFS=$as_save_IFS
33197  test -z "$as_dir" && as_dir=.
33198    for ac_exec_ext in '' $ac_executable_extensions; do
33199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33200    ac_cv_prog_ac_ct_AR="$ac_prog"
33201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33202    break 2
33203  fi
33204done
33205  done
33206IFS=$as_save_IFS
33207
33208fi
33209fi
33210ac_ct_AR=$ac_cv_prog_ac_ct_AR
33211if test -n "$ac_ct_AR"; then
33212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33213$as_echo "$ac_ct_AR" >&6; }
33214else
33215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33216$as_echo "no" >&6; }
33217fi
33218
33219
33220  test -n "$ac_ct_AR" && break
33221done
33222
33223  if test "x$ac_ct_AR" = x; then
33224    AR=""
33225  else
33226    case $cross_compiling:$ac_tool_warned in
33227yes:)
33228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33230ac_tool_warned=yes ;;
33231esac
33232    AR=$ac_ct_AR
33233  fi
33234fi
33235
33236    else
33237      # If it succeeded, then it was overridden by the user. We will use it
33238      # for the tool.
33239
33240      # First remove it from the list of overridden variables, so we can test
33241      # for unknown variables in the end.
33242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33243
33244      # Check if the provided tool contains a complete path.
33245      tool_specified="$AR"
33246      tool_basename="${tool_specified##*/}"
33247      if test "x$tool_basename" = "x$tool_specified"; then
33248        # A command without a complete path is provided, search $PATH.
33249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33250$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33251        # Extract the first word of "$tool_basename", so it can be a program name with args.
33252set dummy $tool_basename; ac_word=$2
33253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33254$as_echo_n "checking for $ac_word... " >&6; }
33255if ${ac_cv_path_AR+:} false; then :
33256  $as_echo_n "(cached) " >&6
33257else
33258  case $AR in
33259  [\\/]* | ?:[\\/]*)
33260  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33261  ;;
33262  *)
33263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33264for as_dir in $PATH
33265do
33266  IFS=$as_save_IFS
33267  test -z "$as_dir" && as_dir=.
33268    for ac_exec_ext in '' $ac_executable_extensions; do
33269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33270    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33272    break 2
33273  fi
33274done
33275  done
33276IFS=$as_save_IFS
33277
33278  ;;
33279esac
33280fi
33281AR=$ac_cv_path_AR
33282if test -n "$AR"; then
33283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33284$as_echo "$AR" >&6; }
33285else
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33287$as_echo "no" >&6; }
33288fi
33289
33290
33291        if test "x$AR" = x; then
33292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33293        fi
33294      else
33295        # Otherwise we believe it is a complete path. Use it as it is.
33296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33297$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33299$as_echo_n "checking for AR... " >&6; }
33300        if test ! -x "$tool_specified"; then
33301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33302$as_echo "not found" >&6; }
33303          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33304        fi
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33306$as_echo "$tool_specified" >&6; }
33307      fi
33308    fi
33309  fi
33310
33311
33312  fi
33313
33314  # Only process if variable expands to non-empty
33315
33316  if test "x$AR" != x; then
33317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33318
33319  # First separate the path from the arguments. This will split at the first
33320  # space.
33321  complete="$AR"
33322  path="${complete%% *}"
33323  tmp="$complete EOL"
33324  arguments="${tmp#* }"
33325
33326  # Input might be given as Windows format, start by converting to
33327  # unix format.
33328  new_path=`$CYGPATH -u "$path"`
33329
33330  # Now try to locate executable using which
33331  new_path=`$WHICH "$new_path" 2> /dev/null`
33332  # bat and cmd files are not always considered executable in cygwin causing which
33333  # to not find them
33334  if test "x$new_path" = x \
33335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33337    new_path=`$CYGPATH -u "$path"`
33338  fi
33339  if test "x$new_path" = x; then
33340    # Oops. Which didn't find the executable.
33341    # The splitting of arguments from the executable at a space might have been incorrect,
33342    # since paths with space are more likely in Windows. Give it another try with the whole
33343    # argument.
33344    path="$complete"
33345    arguments="EOL"
33346    new_path=`$CYGPATH -u "$path"`
33347    new_path=`$WHICH "$new_path" 2> /dev/null`
33348    # bat and cmd files are not always considered executable in cygwin causing which
33349    # to not find them
33350    if test "x$new_path" = x \
33351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33353      new_path=`$CYGPATH -u "$path"`
33354    fi
33355    if test "x$new_path" = x; then
33356      # It's still not found. Now this is an unrecoverable error.
33357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33358$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33359      has_space=`$ECHO "$complete" | $GREP " "`
33360      if test "x$has_space" != x; then
33361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33363      fi
33364      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33365    fi
33366  fi
33367
33368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33371  # "foo.exe" is OK but "foo" is an error.
33372  #
33373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33374  # It is also a way to make sure we got the proper file name for the real test later on.
33375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33376  if test "x$test_shortpath" = x; then
33377    # Short path failed, file does not exist as specified.
33378    # Try adding .exe or .cmd
33379    if test -f "${new_path}.exe"; then
33380      input_to_shortpath="${new_path}.exe"
33381    elif test -f "${new_path}.cmd"; then
33382      input_to_shortpath="${new_path}.cmd"
33383    else
33384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33385$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33388      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33389    fi
33390  else
33391    input_to_shortpath="$new_path"
33392  fi
33393
33394  # Call helper function which possibly converts this using DOS-style short mode.
33395  # If so, the updated path is stored in $new_path.
33396  new_path="$input_to_shortpath"
33397
33398  input_path="$input_to_shortpath"
33399  # Check if we need to convert this using DOS-style short mode. If the path
33400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33401  # take no chances and rewrite it.
33402  # Note: m4 eats our [], so we need to use [ and ] instead.
33403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33404  if test "x$has_forbidden_chars" != x; then
33405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33409      # Going to short mode and back again did indeed matter. Since short mode is
33410      # case insensitive, let's make it lowercase to improve readability.
33411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33412      # Now convert it back to Unix-style (cygpath)
33413      input_path=`$CYGPATH -u "$shortmode_path"`
33414      new_path="$input_path"
33415    fi
33416  fi
33417
33418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33419  if test "x$test_cygdrive_prefix" = x; then
33420    # As a simple fix, exclude /usr/bin since it's not a real path.
33421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33423      # a path prefixed by /cygdrive for fixpath to work.
33424      new_path="$CYGWIN_ROOT_PATH$input_path"
33425    fi
33426  fi
33427
33428  # remove trailing .exe if any
33429  new_path="${new_path/%.exe/}"
33430
33431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432
33433  # First separate the path from the arguments. This will split at the first
33434  # space.
33435  complete="$AR"
33436  path="${complete%% *}"
33437  tmp="$complete EOL"
33438  arguments="${tmp#* }"
33439
33440  # Input might be given as Windows format, start by converting to
33441  # unix format.
33442  new_path="$path"
33443
33444  windows_path="$new_path"
33445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33446    unix_path=`$CYGPATH -u "$windows_path"`
33447    new_path="$unix_path"
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33450    new_path="$unix_path"
33451  fi
33452
33453
33454  # Now try to locate executable using which
33455  new_path=`$WHICH "$new_path" 2> /dev/null`
33456
33457  if test "x$new_path" = x; then
33458    # Oops. Which didn't find the executable.
33459    # The splitting of arguments from the executable at a space might have been incorrect,
33460    # since paths with space are more likely in Windows. Give it another try with the whole
33461    # argument.
33462    path="$complete"
33463    arguments="EOL"
33464    new_path="$path"
33465
33466  windows_path="$new_path"
33467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33468    unix_path=`$CYGPATH -u "$windows_path"`
33469    new_path="$unix_path"
33470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33472    new_path="$unix_path"
33473  fi
33474
33475
33476    new_path=`$WHICH "$new_path" 2> /dev/null`
33477    # bat and cmd files are not always considered executable in MSYS causing which
33478    # to not find them
33479    if test "x$new_path" = x \
33480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33482      new_path="$path"
33483
33484  windows_path="$new_path"
33485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33486    unix_path=`$CYGPATH -u "$windows_path"`
33487    new_path="$unix_path"
33488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33490    new_path="$unix_path"
33491  fi
33492
33493    fi
33494
33495    if test "x$new_path" = x; then
33496      # It's still not found. Now this is an unrecoverable error.
33497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33498$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33499      has_space=`$ECHO "$complete" | $GREP " "`
33500      if test "x$has_space" != x; then
33501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33503      fi
33504      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33505    fi
33506  fi
33507
33508  # Now new_path has a complete unix path to the binary
33509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33510    # Keep paths in /bin as-is, but remove trailing .exe if any
33511    new_path="${new_path/%.exe/}"
33512    # Do not save /bin paths to all_fixpath_prefixes!
33513  else
33514    # Not in mixed or Windows style, start by that.
33515    new_path=`cmd //c echo $new_path`
33516
33517  input_path="$new_path"
33518  # Check if we need to convert this using DOS-style short mode. If the path
33519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33520  # take no chances and rewrite it.
33521  # Note: m4 eats our [], so we need to use [ and ] instead.
33522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33523  if test "x$has_forbidden_chars" != x; then
33524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33526  fi
33527
33528    # Output is in $new_path
33529
33530  windows_path="$new_path"
33531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33532    unix_path=`$CYGPATH -u "$windows_path"`
33533    new_path="$unix_path"
33534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33536    new_path="$unix_path"
33537  fi
33538
33539    # remove trailing .exe if any
33540    new_path="${new_path/%.exe/}"
33541
33542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33544  fi
33545
33546    else
33547      # We're on a unix platform. Hooray! :)
33548      # First separate the path from the arguments. This will split at the first
33549      # space.
33550      complete="$AR"
33551      path="${complete%% *}"
33552      tmp="$complete EOL"
33553      arguments="${tmp#* }"
33554
33555      # Cannot rely on the command "which" here since it doesn't always work.
33556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33557      if test -z "$is_absolute_path"; then
33558        # Path to executable is not absolute. Find it.
33559        IFS_save="$IFS"
33560        IFS=:
33561        for p in $PATH; do
33562          if test -f "$p/$path" && test -x "$p/$path"; then
33563            new_path="$p/$path"
33564            break
33565          fi
33566        done
33567        IFS="$IFS_save"
33568      else
33569        # This is an absolute path, we can use it without further modifications.
33570        new_path="$path"
33571      fi
33572
33573      if test "x$new_path" = x; then
33574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33575$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33576        has_space=`$ECHO "$complete" | $GREP " "`
33577        if test "x$has_space" != x; then
33578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33580        fi
33581        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33582      fi
33583    fi
33584
33585    # Now join together the path and the arguments once again
33586    if test "x$arguments" != xEOL; then
33587      new_complete="$new_path ${arguments% *}"
33588    else
33589      new_complete="$new_path"
33590    fi
33591
33592    if test "x$complete" != "x$new_complete"; then
33593      AR="$new_complete"
33594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33595$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33596    fi
33597  fi
33598
33599
33600
33601  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33602
33603
33604  # Publish this variable in the help.
33605
33606
33607  if test "x$LIPO" = x; then
33608    # The variable is not set by user, try to locate tool using the code snippet
33609    for ac_prog in lipo
33610do
33611  # Extract the first word of "$ac_prog", so it can be a program name with args.
33612set dummy $ac_prog; ac_word=$2
33613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33614$as_echo_n "checking for $ac_word... " >&6; }
33615if ${ac_cv_path_LIPO+:} false; then :
33616  $as_echo_n "(cached) " >&6
33617else
33618  case $LIPO in
33619  [\\/]* | ?:[\\/]*)
33620  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33621  ;;
33622  *)
33623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33624for as_dir in $PATH
33625do
33626  IFS=$as_save_IFS
33627  test -z "$as_dir" && as_dir=.
33628    for ac_exec_ext in '' $ac_executable_extensions; do
33629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33630    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33632    break 2
33633  fi
33634done
33635  done
33636IFS=$as_save_IFS
33637
33638  ;;
33639esac
33640fi
33641LIPO=$ac_cv_path_LIPO
33642if test -n "$LIPO"; then
33643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33644$as_echo "$LIPO" >&6; }
33645else
33646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33647$as_echo "no" >&6; }
33648fi
33649
33650
33651  test -n "$LIPO" && break
33652done
33653
33654  else
33655    # The variable is set, but is it from the command line or the environment?
33656
33657    # Try to remove the string !LIPO! from our list.
33658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33660      # If it failed, the variable was not from the command line. Ignore it,
33661      # but warn the user (except for BASH, which is always set by the calling BASH).
33662      if test "xLIPO" != xBASH; then
33663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33664$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33665      fi
33666      # Try to locate tool using the code snippet
33667      for ac_prog in lipo
33668do
33669  # Extract the first word of "$ac_prog", so it can be a program name with args.
33670set dummy $ac_prog; ac_word=$2
33671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33672$as_echo_n "checking for $ac_word... " >&6; }
33673if ${ac_cv_path_LIPO+:} false; then :
33674  $as_echo_n "(cached) " >&6
33675else
33676  case $LIPO in
33677  [\\/]* | ?:[\\/]*)
33678  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33679  ;;
33680  *)
33681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33682for as_dir in $PATH
33683do
33684  IFS=$as_save_IFS
33685  test -z "$as_dir" && as_dir=.
33686    for ac_exec_ext in '' $ac_executable_extensions; do
33687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33688    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33690    break 2
33691  fi
33692done
33693  done
33694IFS=$as_save_IFS
33695
33696  ;;
33697esac
33698fi
33699LIPO=$ac_cv_path_LIPO
33700if test -n "$LIPO"; then
33701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33702$as_echo "$LIPO" >&6; }
33703else
33704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33705$as_echo "no" >&6; }
33706fi
33707
33708
33709  test -n "$LIPO" && break
33710done
33711
33712    else
33713      # If it succeeded, then it was overridden by the user. We will use it
33714      # for the tool.
33715
33716      # First remove it from the list of overridden variables, so we can test
33717      # for unknown variables in the end.
33718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33719
33720      # Check if the provided tool contains a complete path.
33721      tool_specified="$LIPO"
33722      tool_basename="${tool_specified##*/}"
33723      if test "x$tool_basename" = "x$tool_specified"; then
33724        # A command without a complete path is provided, search $PATH.
33725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33726$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33727        # Extract the first word of "$tool_basename", so it can be a program name with args.
33728set dummy $tool_basename; ac_word=$2
33729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33730$as_echo_n "checking for $ac_word... " >&6; }
33731if ${ac_cv_path_LIPO+:} false; then :
33732  $as_echo_n "(cached) " >&6
33733else
33734  case $LIPO in
33735  [\\/]* | ?:[\\/]*)
33736  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33737  ;;
33738  *)
33739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33740for as_dir in $PATH
33741do
33742  IFS=$as_save_IFS
33743  test -z "$as_dir" && as_dir=.
33744    for ac_exec_ext in '' $ac_executable_extensions; do
33745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33746    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33748    break 2
33749  fi
33750done
33751  done
33752IFS=$as_save_IFS
33753
33754  ;;
33755esac
33756fi
33757LIPO=$ac_cv_path_LIPO
33758if test -n "$LIPO"; then
33759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33760$as_echo "$LIPO" >&6; }
33761else
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33763$as_echo "no" >&6; }
33764fi
33765
33766
33767        if test "x$LIPO" = x; then
33768          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33769        fi
33770      else
33771        # Otherwise we believe it is a complete path. Use it as it is.
33772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33773$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33775$as_echo_n "checking for LIPO... " >&6; }
33776        if test ! -x "$tool_specified"; then
33777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33778$as_echo "not found" >&6; }
33779          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33780        fi
33781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33782$as_echo "$tool_specified" >&6; }
33783      fi
33784    fi
33785  fi
33786
33787
33788
33789  # Only process if variable expands to non-empty
33790
33791  if test "x$LIPO" != x; then
33792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33793
33794  # First separate the path from the arguments. This will split at the first
33795  # space.
33796  complete="$LIPO"
33797  path="${complete%% *}"
33798  tmp="$complete EOL"
33799  arguments="${tmp#* }"
33800
33801  # Input might be given as Windows format, start by converting to
33802  # unix format.
33803  new_path=`$CYGPATH -u "$path"`
33804
33805  # Now try to locate executable using which
33806  new_path=`$WHICH "$new_path" 2> /dev/null`
33807  # bat and cmd files are not always considered executable in cygwin causing which
33808  # to not find them
33809  if test "x$new_path" = x \
33810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33812    new_path=`$CYGPATH -u "$path"`
33813  fi
33814  if test "x$new_path" = x; then
33815    # Oops. Which didn't find the executable.
33816    # The splitting of arguments from the executable at a space might have been incorrect,
33817    # since paths with space are more likely in Windows. Give it another try with the whole
33818    # argument.
33819    path="$complete"
33820    arguments="EOL"
33821    new_path=`$CYGPATH -u "$path"`
33822    new_path=`$WHICH "$new_path" 2> /dev/null`
33823    # bat and cmd files are not always considered executable in cygwin causing which
33824    # to not find them
33825    if test "x$new_path" = x \
33826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33828      new_path=`$CYGPATH -u "$path"`
33829    fi
33830    if test "x$new_path" = x; then
33831      # It's still not found. Now this is an unrecoverable error.
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33833$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33834      has_space=`$ECHO "$complete" | $GREP " "`
33835      if test "x$has_space" != x; then
33836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33838      fi
33839      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33840    fi
33841  fi
33842
33843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33846  # "foo.exe" is OK but "foo" is an error.
33847  #
33848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33849  # It is also a way to make sure we got the proper file name for the real test later on.
33850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33851  if test "x$test_shortpath" = x; then
33852    # Short path failed, file does not exist as specified.
33853    # Try adding .exe or .cmd
33854    if test -f "${new_path}.exe"; then
33855      input_to_shortpath="${new_path}.exe"
33856    elif test -f "${new_path}.cmd"; then
33857      input_to_shortpath="${new_path}.cmd"
33858    else
33859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33860$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33863      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33864    fi
33865  else
33866    input_to_shortpath="$new_path"
33867  fi
33868
33869  # Call helper function which possibly converts this using DOS-style short mode.
33870  # If so, the updated path is stored in $new_path.
33871  new_path="$input_to_shortpath"
33872
33873  input_path="$input_to_shortpath"
33874  # Check if we need to convert this using DOS-style short mode. If the path
33875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33876  # take no chances and rewrite it.
33877  # Note: m4 eats our [], so we need to use [ and ] instead.
33878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33879  if test "x$has_forbidden_chars" != x; then
33880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33884      # Going to short mode and back again did indeed matter. Since short mode is
33885      # case insensitive, let's make it lowercase to improve readability.
33886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33887      # Now convert it back to Unix-style (cygpath)
33888      input_path=`$CYGPATH -u "$shortmode_path"`
33889      new_path="$input_path"
33890    fi
33891  fi
33892
33893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33894  if test "x$test_cygdrive_prefix" = x; then
33895    # As a simple fix, exclude /usr/bin since it's not a real path.
33896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33898      # a path prefixed by /cygdrive for fixpath to work.
33899      new_path="$CYGWIN_ROOT_PATH$input_path"
33900    fi
33901  fi
33902
33903  # remove trailing .exe if any
33904  new_path="${new_path/%.exe/}"
33905
33906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907
33908  # First separate the path from the arguments. This will split at the first
33909  # space.
33910  complete="$LIPO"
33911  path="${complete%% *}"
33912  tmp="$complete EOL"
33913  arguments="${tmp#* }"
33914
33915  # Input might be given as Windows format, start by converting to
33916  # unix format.
33917  new_path="$path"
33918
33919  windows_path="$new_path"
33920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33921    unix_path=`$CYGPATH -u "$windows_path"`
33922    new_path="$unix_path"
33923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33925    new_path="$unix_path"
33926  fi
33927
33928
33929  # Now try to locate executable using which
33930  new_path=`$WHICH "$new_path" 2> /dev/null`
33931
33932  if test "x$new_path" = x; then
33933    # Oops. Which didn't find the executable.
33934    # The splitting of arguments from the executable at a space might have been incorrect,
33935    # since paths with space are more likely in Windows. Give it another try with the whole
33936    # argument.
33937    path="$complete"
33938    arguments="EOL"
33939    new_path="$path"
33940
33941  windows_path="$new_path"
33942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33943    unix_path=`$CYGPATH -u "$windows_path"`
33944    new_path="$unix_path"
33945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33947    new_path="$unix_path"
33948  fi
33949
33950
33951    new_path=`$WHICH "$new_path" 2> /dev/null`
33952    # bat and cmd files are not always considered executable in MSYS causing which
33953    # to not find them
33954    if test "x$new_path" = x \
33955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33957      new_path="$path"
33958
33959  windows_path="$new_path"
33960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33961    unix_path=`$CYGPATH -u "$windows_path"`
33962    new_path="$unix_path"
33963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33965    new_path="$unix_path"
33966  fi
33967
33968    fi
33969
33970    if test "x$new_path" = x; then
33971      # It's still not found. Now this is an unrecoverable error.
33972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33973$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33974      has_space=`$ECHO "$complete" | $GREP " "`
33975      if test "x$has_space" != x; then
33976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33978      fi
33979      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33980    fi
33981  fi
33982
33983  # Now new_path has a complete unix path to the binary
33984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33985    # Keep paths in /bin as-is, but remove trailing .exe if any
33986    new_path="${new_path/%.exe/}"
33987    # Do not save /bin paths to all_fixpath_prefixes!
33988  else
33989    # Not in mixed or Windows style, start by that.
33990    new_path=`cmd //c echo $new_path`
33991
33992  input_path="$new_path"
33993  # Check if we need to convert this using DOS-style short mode. If the path
33994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33995  # take no chances and rewrite it.
33996  # Note: m4 eats our [], so we need to use [ and ] instead.
33997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33998  if test "x$has_forbidden_chars" != x; then
33999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34001  fi
34002
34003    # Output is in $new_path
34004
34005  windows_path="$new_path"
34006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34007    unix_path=`$CYGPATH -u "$windows_path"`
34008    new_path="$unix_path"
34009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34011    new_path="$unix_path"
34012  fi
34013
34014    # remove trailing .exe if any
34015    new_path="${new_path/%.exe/}"
34016
34017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34019  fi
34020
34021    else
34022      # We're on a unix platform. Hooray! :)
34023      # First separate the path from the arguments. This will split at the first
34024      # space.
34025      complete="$LIPO"
34026      path="${complete%% *}"
34027      tmp="$complete EOL"
34028      arguments="${tmp#* }"
34029
34030      # Cannot rely on the command "which" here since it doesn't always work.
34031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34032      if test -z "$is_absolute_path"; then
34033        # Path to executable is not absolute. Find it.
34034        IFS_save="$IFS"
34035        IFS=:
34036        for p in $PATH; do
34037          if test -f "$p/$path" && test -x "$p/$path"; then
34038            new_path="$p/$path"
34039            break
34040          fi
34041        done
34042        IFS="$IFS_save"
34043      else
34044        # This is an absolute path, we can use it without further modifications.
34045        new_path="$path"
34046      fi
34047
34048      if test "x$new_path" = x; then
34049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34050$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34051        has_space=`$ECHO "$complete" | $GREP " "`
34052        if test "x$has_space" != x; then
34053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34055        fi
34056        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34057      fi
34058    fi
34059
34060    # Now join together the path and the arguments once again
34061    if test "x$arguments" != xEOL; then
34062      new_complete="$new_path ${arguments% *}"
34063    else
34064      new_complete="$new_path"
34065    fi
34066
34067    if test "x$complete" != "x$new_complete"; then
34068      LIPO="$new_complete"
34069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34070$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34071    fi
34072  fi
34073
34074  fi
34075
34076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34077    # Extract the first word of "mt", so it can be a program name with args.
34078set dummy mt; ac_word=$2
34079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34080$as_echo_n "checking for $ac_word... " >&6; }
34081if ${ac_cv_prog_MT+:} false; then :
34082  $as_echo_n "(cached) " >&6
34083else
34084  if test -n "$MT"; then
34085  ac_cv_prog_MT="$MT" # Let the user override the test.
34086else
34087  ac_prog_rejected=no
34088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34089for as_dir in $PATH
34090do
34091  IFS=$as_save_IFS
34092  test -z "$as_dir" && as_dir=.
34093    for ac_exec_ext in '' $ac_executable_extensions; do
34094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34095    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34096       ac_prog_rejected=yes
34097       continue
34098     fi
34099    ac_cv_prog_MT="mt"
34100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34101    break 2
34102  fi
34103done
34104  done
34105IFS=$as_save_IFS
34106
34107if test $ac_prog_rejected = yes; then
34108  # We found a bogon in the path, so make sure we never use it.
34109  set dummy $ac_cv_prog_MT
34110  shift
34111  if test $# != 0; then
34112    # We chose a different compiler from the bogus one.
34113    # However, it has the same basename, so the bogon will be chosen
34114    # first if we set MT to just the basename; use the full file name.
34115    shift
34116    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34117  fi
34118fi
34119fi
34120fi
34121MT=$ac_cv_prog_MT
34122if test -n "$MT"; then
34123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34124$as_echo "$MT" >&6; }
34125else
34126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34127$as_echo "no" >&6; }
34128fi
34129
34130
34131
34132  # Only process if variable expands to non-empty
34133
34134  if test "x$MT" != x; then
34135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34136
34137  # First separate the path from the arguments. This will split at the first
34138  # space.
34139  complete="$MT"
34140  path="${complete%% *}"
34141  tmp="$complete EOL"
34142  arguments="${tmp#* }"
34143
34144  # Input might be given as Windows format, start by converting to
34145  # unix format.
34146  new_path=`$CYGPATH -u "$path"`
34147
34148  # Now try to locate executable using which
34149  new_path=`$WHICH "$new_path" 2> /dev/null`
34150  # bat and cmd files are not always considered executable in cygwin causing which
34151  # to not find them
34152  if test "x$new_path" = x \
34153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34155    new_path=`$CYGPATH -u "$path"`
34156  fi
34157  if test "x$new_path" = x; then
34158    # Oops. Which didn't find the executable.
34159    # The splitting of arguments from the executable at a space might have been incorrect,
34160    # since paths with space are more likely in Windows. Give it another try with the whole
34161    # argument.
34162    path="$complete"
34163    arguments="EOL"
34164    new_path=`$CYGPATH -u "$path"`
34165    new_path=`$WHICH "$new_path" 2> /dev/null`
34166    # bat and cmd files are not always considered executable in cygwin causing which
34167    # to not find them
34168    if test "x$new_path" = x \
34169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34171      new_path=`$CYGPATH -u "$path"`
34172    fi
34173    if test "x$new_path" = x; then
34174      # It's still not found. Now this is an unrecoverable error.
34175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34176$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34177      has_space=`$ECHO "$complete" | $GREP " "`
34178      if test "x$has_space" != x; then
34179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34181      fi
34182      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34183    fi
34184  fi
34185
34186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34189  # "foo.exe" is OK but "foo" is an error.
34190  #
34191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34192  # It is also a way to make sure we got the proper file name for the real test later on.
34193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34194  if test "x$test_shortpath" = x; then
34195    # Short path failed, file does not exist as specified.
34196    # Try adding .exe or .cmd
34197    if test -f "${new_path}.exe"; then
34198      input_to_shortpath="${new_path}.exe"
34199    elif test -f "${new_path}.cmd"; then
34200      input_to_shortpath="${new_path}.cmd"
34201    else
34202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34203$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34206      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34207    fi
34208  else
34209    input_to_shortpath="$new_path"
34210  fi
34211
34212  # Call helper function which possibly converts this using DOS-style short mode.
34213  # If so, the updated path is stored in $new_path.
34214  new_path="$input_to_shortpath"
34215
34216  input_path="$input_to_shortpath"
34217  # Check if we need to convert this using DOS-style short mode. If the path
34218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34219  # take no chances and rewrite it.
34220  # Note: m4 eats our [], so we need to use [ and ] instead.
34221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34222  if test "x$has_forbidden_chars" != x; then
34223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34227      # Going to short mode and back again did indeed matter. Since short mode is
34228      # case insensitive, let's make it lowercase to improve readability.
34229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34230      # Now convert it back to Unix-style (cygpath)
34231      input_path=`$CYGPATH -u "$shortmode_path"`
34232      new_path="$input_path"
34233    fi
34234  fi
34235
34236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34237  if test "x$test_cygdrive_prefix" = x; then
34238    # As a simple fix, exclude /usr/bin since it's not a real path.
34239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34241      # a path prefixed by /cygdrive for fixpath to work.
34242      new_path="$CYGWIN_ROOT_PATH$input_path"
34243    fi
34244  fi
34245
34246  # remove trailing .exe if any
34247  new_path="${new_path/%.exe/}"
34248
34249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34250
34251  # First separate the path from the arguments. This will split at the first
34252  # space.
34253  complete="$MT"
34254  path="${complete%% *}"
34255  tmp="$complete EOL"
34256  arguments="${tmp#* }"
34257
34258  # Input might be given as Windows format, start by converting to
34259  # unix format.
34260  new_path="$path"
34261
34262  windows_path="$new_path"
34263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264    unix_path=`$CYGPATH -u "$windows_path"`
34265    new_path="$unix_path"
34266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34268    new_path="$unix_path"
34269  fi
34270
34271
34272  # Now try to locate executable using which
34273  new_path=`$WHICH "$new_path" 2> /dev/null`
34274
34275  if test "x$new_path" = x; then
34276    # Oops. Which didn't find the executable.
34277    # The splitting of arguments from the executable at a space might have been incorrect,
34278    # since paths with space are more likely in Windows. Give it another try with the whole
34279    # argument.
34280    path="$complete"
34281    arguments="EOL"
34282    new_path="$path"
34283
34284  windows_path="$new_path"
34285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34286    unix_path=`$CYGPATH -u "$windows_path"`
34287    new_path="$unix_path"
34288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34290    new_path="$unix_path"
34291  fi
34292
34293
34294    new_path=`$WHICH "$new_path" 2> /dev/null`
34295    # bat and cmd files are not always considered executable in MSYS causing which
34296    # to not find them
34297    if test "x$new_path" = x \
34298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34300      new_path="$path"
34301
34302  windows_path="$new_path"
34303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34304    unix_path=`$CYGPATH -u "$windows_path"`
34305    new_path="$unix_path"
34306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34308    new_path="$unix_path"
34309  fi
34310
34311    fi
34312
34313    if test "x$new_path" = x; then
34314      # It's still not found. Now this is an unrecoverable error.
34315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34316$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34317      has_space=`$ECHO "$complete" | $GREP " "`
34318      if test "x$has_space" != x; then
34319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34321      fi
34322      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34323    fi
34324  fi
34325
34326  # Now new_path has a complete unix path to the binary
34327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34328    # Keep paths in /bin as-is, but remove trailing .exe if any
34329    new_path="${new_path/%.exe/}"
34330    # Do not save /bin paths to all_fixpath_prefixes!
34331  else
34332    # Not in mixed or Windows style, start by that.
34333    new_path=`cmd //c echo $new_path`
34334
34335  input_path="$new_path"
34336  # Check if we need to convert this using DOS-style short mode. If the path
34337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34338  # take no chances and rewrite it.
34339  # Note: m4 eats our [], so we need to use [ and ] instead.
34340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34341  if test "x$has_forbidden_chars" != x; then
34342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34344  fi
34345
34346    # Output is in $new_path
34347
34348  windows_path="$new_path"
34349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34350    unix_path=`$CYGPATH -u "$windows_path"`
34351    new_path="$unix_path"
34352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34354    new_path="$unix_path"
34355  fi
34356
34357    # remove trailing .exe if any
34358    new_path="${new_path/%.exe/}"
34359
34360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34362  fi
34363
34364    else
34365      # We're on a unix platform. Hooray! :)
34366      # First separate the path from the arguments. This will split at the first
34367      # space.
34368      complete="$MT"
34369      path="${complete%% *}"
34370      tmp="$complete EOL"
34371      arguments="${tmp#* }"
34372
34373      # Cannot rely on the command "which" here since it doesn't always work.
34374      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34375      if test -z "$is_absolute_path"; then
34376        # Path to executable is not absolute. Find it.
34377        IFS_save="$IFS"
34378        IFS=:
34379        for p in $PATH; do
34380          if test -f "$p/$path" && test -x "$p/$path"; then
34381            new_path="$p/$path"
34382            break
34383          fi
34384        done
34385        IFS="$IFS_save"
34386      else
34387        # This is an absolute path, we can use it without further modifications.
34388        new_path="$path"
34389      fi
34390
34391      if test "x$new_path" = x; then
34392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34393$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34394        has_space=`$ECHO "$complete" | $GREP " "`
34395        if test "x$has_space" != x; then
34396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34398        fi
34399        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34400      fi
34401    fi
34402
34403    # Now join together the path and the arguments once again
34404    if test "x$arguments" != xEOL; then
34405      new_complete="$new_path ${arguments% *}"
34406    else
34407      new_complete="$new_path"
34408    fi
34409
34410    if test "x$complete" != "x$new_complete"; then
34411      MT="$new_complete"
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34413$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34414    fi
34415  fi
34416
34417    # Setup the resource compiler (RC)
34418    # Extract the first word of "rc", so it can be a program name with args.
34419set dummy rc; ac_word=$2
34420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34421$as_echo_n "checking for $ac_word... " >&6; }
34422if ${ac_cv_prog_RC+:} false; then :
34423  $as_echo_n "(cached) " >&6
34424else
34425  if test -n "$RC"; then
34426  ac_cv_prog_RC="$RC" # Let the user override the test.
34427else
34428  ac_prog_rejected=no
34429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34430for as_dir in $PATH
34431do
34432  IFS=$as_save_IFS
34433  test -z "$as_dir" && as_dir=.
34434    for ac_exec_ext in '' $ac_executable_extensions; do
34435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34436    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34437       ac_prog_rejected=yes
34438       continue
34439     fi
34440    ac_cv_prog_RC="rc"
34441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34442    break 2
34443  fi
34444done
34445  done
34446IFS=$as_save_IFS
34447
34448if test $ac_prog_rejected = yes; then
34449  # We found a bogon in the path, so make sure we never use it.
34450  set dummy $ac_cv_prog_RC
34451  shift
34452  if test $# != 0; then
34453    # We chose a different compiler from the bogus one.
34454    # However, it has the same basename, so the bogon will be chosen
34455    # first if we set RC to just the basename; use the full file name.
34456    shift
34457    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34458  fi
34459fi
34460fi
34461fi
34462RC=$ac_cv_prog_RC
34463if test -n "$RC"; then
34464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34465$as_echo "$RC" >&6; }
34466else
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34468$as_echo "no" >&6; }
34469fi
34470
34471
34472
34473  # Only process if variable expands to non-empty
34474
34475  if test "x$RC" != x; then
34476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34477
34478  # First separate the path from the arguments. This will split at the first
34479  # space.
34480  complete="$RC"
34481  path="${complete%% *}"
34482  tmp="$complete EOL"
34483  arguments="${tmp#* }"
34484
34485  # Input might be given as Windows format, start by converting to
34486  # unix format.
34487  new_path=`$CYGPATH -u "$path"`
34488
34489  # Now try to locate executable using which
34490  new_path=`$WHICH "$new_path" 2> /dev/null`
34491  # bat and cmd files are not always considered executable in cygwin causing which
34492  # to not find them
34493  if test "x$new_path" = x \
34494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34496    new_path=`$CYGPATH -u "$path"`
34497  fi
34498  if test "x$new_path" = x; then
34499    # Oops. Which didn't find the executable.
34500    # The splitting of arguments from the executable at a space might have been incorrect,
34501    # since paths with space are more likely in Windows. Give it another try with the whole
34502    # argument.
34503    path="$complete"
34504    arguments="EOL"
34505    new_path=`$CYGPATH -u "$path"`
34506    new_path=`$WHICH "$new_path" 2> /dev/null`
34507    # bat and cmd files are not always considered executable in cygwin causing which
34508    # to not find them
34509    if test "x$new_path" = x \
34510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34512      new_path=`$CYGPATH -u "$path"`
34513    fi
34514    if test "x$new_path" = x; then
34515      # It's still not found. Now this is an unrecoverable error.
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34517$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34518      has_space=`$ECHO "$complete" | $GREP " "`
34519      if test "x$has_space" != x; then
34520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34522      fi
34523      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34524    fi
34525  fi
34526
34527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34530  # "foo.exe" is OK but "foo" is an error.
34531  #
34532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34533  # It is also a way to make sure we got the proper file name for the real test later on.
34534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34535  if test "x$test_shortpath" = x; then
34536    # Short path failed, file does not exist as specified.
34537    # Try adding .exe or .cmd
34538    if test -f "${new_path}.exe"; then
34539      input_to_shortpath="${new_path}.exe"
34540    elif test -f "${new_path}.cmd"; then
34541      input_to_shortpath="${new_path}.cmd"
34542    else
34543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34544$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34547      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34548    fi
34549  else
34550    input_to_shortpath="$new_path"
34551  fi
34552
34553  # Call helper function which possibly converts this using DOS-style short mode.
34554  # If so, the updated path is stored in $new_path.
34555  new_path="$input_to_shortpath"
34556
34557  input_path="$input_to_shortpath"
34558  # Check if we need to convert this using DOS-style short mode. If the path
34559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34560  # take no chances and rewrite it.
34561  # Note: m4 eats our [], so we need to use [ and ] instead.
34562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34563  if test "x$has_forbidden_chars" != x; then
34564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34568      # Going to short mode and back again did indeed matter. Since short mode is
34569      # case insensitive, let's make it lowercase to improve readability.
34570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34571      # Now convert it back to Unix-style (cygpath)
34572      input_path=`$CYGPATH -u "$shortmode_path"`
34573      new_path="$input_path"
34574    fi
34575  fi
34576
34577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34578  if test "x$test_cygdrive_prefix" = x; then
34579    # As a simple fix, exclude /usr/bin since it's not a real path.
34580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34582      # a path prefixed by /cygdrive for fixpath to work.
34583      new_path="$CYGWIN_ROOT_PATH$input_path"
34584    fi
34585  fi
34586
34587  # remove trailing .exe if any
34588  new_path="${new_path/%.exe/}"
34589
34590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591
34592  # First separate the path from the arguments. This will split at the first
34593  # space.
34594  complete="$RC"
34595  path="${complete%% *}"
34596  tmp="$complete EOL"
34597  arguments="${tmp#* }"
34598
34599  # Input might be given as Windows format, start by converting to
34600  # unix format.
34601  new_path="$path"
34602
34603  windows_path="$new_path"
34604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34605    unix_path=`$CYGPATH -u "$windows_path"`
34606    new_path="$unix_path"
34607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34609    new_path="$unix_path"
34610  fi
34611
34612
34613  # Now try to locate executable using which
34614  new_path=`$WHICH "$new_path" 2> /dev/null`
34615
34616  if test "x$new_path" = x; then
34617    # Oops. Which didn't find the executable.
34618    # The splitting of arguments from the executable at a space might have been incorrect,
34619    # since paths with space are more likely in Windows. Give it another try with the whole
34620    # argument.
34621    path="$complete"
34622    arguments="EOL"
34623    new_path="$path"
34624
34625  windows_path="$new_path"
34626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34627    unix_path=`$CYGPATH -u "$windows_path"`
34628    new_path="$unix_path"
34629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34631    new_path="$unix_path"
34632  fi
34633
34634
34635    new_path=`$WHICH "$new_path" 2> /dev/null`
34636    # bat and cmd files are not always considered executable in MSYS causing which
34637    # to not find them
34638    if test "x$new_path" = x \
34639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34641      new_path="$path"
34642
34643  windows_path="$new_path"
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    unix_path=`$CYGPATH -u "$windows_path"`
34646    new_path="$unix_path"
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34649    new_path="$unix_path"
34650  fi
34651
34652    fi
34653
34654    if test "x$new_path" = x; then
34655      # It's still not found. Now this is an unrecoverable error.
34656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34657$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34658      has_space=`$ECHO "$complete" | $GREP " "`
34659      if test "x$has_space" != x; then
34660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34662      fi
34663      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34664    fi
34665  fi
34666
34667  # Now new_path has a complete unix path to the binary
34668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34669    # Keep paths in /bin as-is, but remove trailing .exe if any
34670    new_path="${new_path/%.exe/}"
34671    # Do not save /bin paths to all_fixpath_prefixes!
34672  else
34673    # Not in mixed or Windows style, start by that.
34674    new_path=`cmd //c echo $new_path`
34675
34676  input_path="$new_path"
34677  # Check if we need to convert this using DOS-style short mode. If the path
34678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34679  # take no chances and rewrite it.
34680  # Note: m4 eats our [], so we need to use [ and ] instead.
34681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34682  if test "x$has_forbidden_chars" != x; then
34683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34685  fi
34686
34687    # Output is in $new_path
34688
34689  windows_path="$new_path"
34690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691    unix_path=`$CYGPATH -u "$windows_path"`
34692    new_path="$unix_path"
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695    new_path="$unix_path"
34696  fi
34697
34698    # remove trailing .exe if any
34699    new_path="${new_path/%.exe/}"
34700
34701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34703  fi
34704
34705    else
34706      # We're on a unix platform. Hooray! :)
34707      # First separate the path from the arguments. This will split at the first
34708      # space.
34709      complete="$RC"
34710      path="${complete%% *}"
34711      tmp="$complete EOL"
34712      arguments="${tmp#* }"
34713
34714      # Cannot rely on the command "which" here since it doesn't always work.
34715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34716      if test -z "$is_absolute_path"; then
34717        # Path to executable is not absolute. Find it.
34718        IFS_save="$IFS"
34719        IFS=:
34720        for p in $PATH; do
34721          if test -f "$p/$path" && test -x "$p/$path"; then
34722            new_path="$p/$path"
34723            break
34724          fi
34725        done
34726        IFS="$IFS_save"
34727      else
34728        # This is an absolute path, we can use it without further modifications.
34729        new_path="$path"
34730      fi
34731
34732      if test "x$new_path" = x; then
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34734$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34735        has_space=`$ECHO "$complete" | $GREP " "`
34736        if test "x$has_space" != x; then
34737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34739        fi
34740        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34741      fi
34742    fi
34743
34744    # Now join together the path and the arguments once again
34745    if test "x$arguments" != xEOL; then
34746      new_complete="$new_path ${arguments% *}"
34747    else
34748      new_complete="$new_path"
34749    fi
34750
34751    if test "x$complete" != "x$new_complete"; then
34752      RC="$new_complete"
34753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34754$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34755    fi
34756  fi
34757
34758    # Extract the first word of "dumpbin", so it can be a program name with args.
34759set dummy dumpbin; ac_word=$2
34760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34761$as_echo_n "checking for $ac_word... " >&6; }
34762if ${ac_cv_prog_DUMPBIN+:} false; then :
34763  $as_echo_n "(cached) " >&6
34764else
34765  if test -n "$DUMPBIN"; then
34766  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34767else
34768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34769for as_dir in $PATH
34770do
34771  IFS=$as_save_IFS
34772  test -z "$as_dir" && as_dir=.
34773    for ac_exec_ext in '' $ac_executable_extensions; do
34774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34775    ac_cv_prog_DUMPBIN="dumpbin"
34776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34777    break 2
34778  fi
34779done
34780  done
34781IFS=$as_save_IFS
34782
34783fi
34784fi
34785DUMPBIN=$ac_cv_prog_DUMPBIN
34786if test -n "$DUMPBIN"; then
34787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34788$as_echo "$DUMPBIN" >&6; }
34789else
34790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34791$as_echo "no" >&6; }
34792fi
34793
34794
34795
34796  # Only process if variable expands to non-empty
34797
34798  if test "x$DUMPBIN" != x; then
34799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34800
34801  # First separate the path from the arguments. This will split at the first
34802  # space.
34803  complete="$DUMPBIN"
34804  path="${complete%% *}"
34805  tmp="$complete EOL"
34806  arguments="${tmp#* }"
34807
34808  # Input might be given as Windows format, start by converting to
34809  # unix format.
34810  new_path=`$CYGPATH -u "$path"`
34811
34812  # Now try to locate executable using which
34813  new_path=`$WHICH "$new_path" 2> /dev/null`
34814  # bat and cmd files are not always considered executable in cygwin causing which
34815  # to not find them
34816  if test "x$new_path" = x \
34817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34819    new_path=`$CYGPATH -u "$path"`
34820  fi
34821  if test "x$new_path" = x; then
34822    # Oops. Which didn't find the executable.
34823    # The splitting of arguments from the executable at a space might have been incorrect,
34824    # since paths with space are more likely in Windows. Give it another try with the whole
34825    # argument.
34826    path="$complete"
34827    arguments="EOL"
34828    new_path=`$CYGPATH -u "$path"`
34829    new_path=`$WHICH "$new_path" 2> /dev/null`
34830    # bat and cmd files are not always considered executable in cygwin causing which
34831    # to not find them
34832    if test "x$new_path" = x \
34833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34835      new_path=`$CYGPATH -u "$path"`
34836    fi
34837    if test "x$new_path" = x; then
34838      # It's still not found. Now this is an unrecoverable error.
34839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34840$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34841      has_space=`$ECHO "$complete" | $GREP " "`
34842      if test "x$has_space" != x; then
34843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34845      fi
34846      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34847    fi
34848  fi
34849
34850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34853  # "foo.exe" is OK but "foo" is an error.
34854  #
34855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34856  # It is also a way to make sure we got the proper file name for the real test later on.
34857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34858  if test "x$test_shortpath" = x; then
34859    # Short path failed, file does not exist as specified.
34860    # Try adding .exe or .cmd
34861    if test -f "${new_path}.exe"; then
34862      input_to_shortpath="${new_path}.exe"
34863    elif test -f "${new_path}.cmd"; then
34864      input_to_shortpath="${new_path}.cmd"
34865    else
34866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34867$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34870      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34871    fi
34872  else
34873    input_to_shortpath="$new_path"
34874  fi
34875
34876  # Call helper function which possibly converts this using DOS-style short mode.
34877  # If so, the updated path is stored in $new_path.
34878  new_path="$input_to_shortpath"
34879
34880  input_path="$input_to_shortpath"
34881  # Check if we need to convert this using DOS-style short mode. If the path
34882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34883  # take no chances and rewrite it.
34884  # Note: m4 eats our [], so we need to use [ and ] instead.
34885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34886  if test "x$has_forbidden_chars" != x; then
34887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34891      # Going to short mode and back again did indeed matter. Since short mode is
34892      # case insensitive, let's make it lowercase to improve readability.
34893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34894      # Now convert it back to Unix-style (cygpath)
34895      input_path=`$CYGPATH -u "$shortmode_path"`
34896      new_path="$input_path"
34897    fi
34898  fi
34899
34900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34901  if test "x$test_cygdrive_prefix" = x; then
34902    # As a simple fix, exclude /usr/bin since it's not a real path.
34903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34905      # a path prefixed by /cygdrive for fixpath to work.
34906      new_path="$CYGWIN_ROOT_PATH$input_path"
34907    fi
34908  fi
34909
34910  # remove trailing .exe if any
34911  new_path="${new_path/%.exe/}"
34912
34913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34914
34915  # First separate the path from the arguments. This will split at the first
34916  # space.
34917  complete="$DUMPBIN"
34918  path="${complete%% *}"
34919  tmp="$complete EOL"
34920  arguments="${tmp#* }"
34921
34922  # Input might be given as Windows format, start by converting to
34923  # unix format.
34924  new_path="$path"
34925
34926  windows_path="$new_path"
34927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34928    unix_path=`$CYGPATH -u "$windows_path"`
34929    new_path="$unix_path"
34930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34932    new_path="$unix_path"
34933  fi
34934
34935
34936  # Now try to locate executable using which
34937  new_path=`$WHICH "$new_path" 2> /dev/null`
34938
34939  if test "x$new_path" = x; then
34940    # Oops. Which didn't find the executable.
34941    # The splitting of arguments from the executable at a space might have been incorrect,
34942    # since paths with space are more likely in Windows. Give it another try with the whole
34943    # argument.
34944    path="$complete"
34945    arguments="EOL"
34946    new_path="$path"
34947
34948  windows_path="$new_path"
34949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34950    unix_path=`$CYGPATH -u "$windows_path"`
34951    new_path="$unix_path"
34952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34954    new_path="$unix_path"
34955  fi
34956
34957
34958    new_path=`$WHICH "$new_path" 2> /dev/null`
34959    # bat and cmd files are not always considered executable in MSYS causing which
34960    # to not find them
34961    if test "x$new_path" = x \
34962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34964      new_path="$path"
34965
34966  windows_path="$new_path"
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    unix_path=`$CYGPATH -u "$windows_path"`
34969    new_path="$unix_path"
34970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34972    new_path="$unix_path"
34973  fi
34974
34975    fi
34976
34977    if test "x$new_path" = x; then
34978      # It's still not found. Now this is an unrecoverable error.
34979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34980$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34981      has_space=`$ECHO "$complete" | $GREP " "`
34982      if test "x$has_space" != x; then
34983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34985      fi
34986      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34987    fi
34988  fi
34989
34990  # Now new_path has a complete unix path to the binary
34991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34992    # Keep paths in /bin as-is, but remove trailing .exe if any
34993    new_path="${new_path/%.exe/}"
34994    # Do not save /bin paths to all_fixpath_prefixes!
34995  else
34996    # Not in mixed or Windows style, start by that.
34997    new_path=`cmd //c echo $new_path`
34998
34999  input_path="$new_path"
35000  # Check if we need to convert this using DOS-style short mode. If the path
35001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35002  # take no chances and rewrite it.
35003  # Note: m4 eats our [], so we need to use [ and ] instead.
35004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35005  if test "x$has_forbidden_chars" != x; then
35006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35008  fi
35009
35010    # Output is in $new_path
35011
35012  windows_path="$new_path"
35013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35014    unix_path=`$CYGPATH -u "$windows_path"`
35015    new_path="$unix_path"
35016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35018    new_path="$unix_path"
35019  fi
35020
35021    # remove trailing .exe if any
35022    new_path="${new_path/%.exe/}"
35023
35024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35026  fi
35027
35028    else
35029      # We're on a unix platform. Hooray! :)
35030      # First separate the path from the arguments. This will split at the first
35031      # space.
35032      complete="$DUMPBIN"
35033      path="${complete%% *}"
35034      tmp="$complete EOL"
35035      arguments="${tmp#* }"
35036
35037      # Cannot rely on the command "which" here since it doesn't always work.
35038      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35039      if test -z "$is_absolute_path"; then
35040        # Path to executable is not absolute. Find it.
35041        IFS_save="$IFS"
35042        IFS=:
35043        for p in $PATH; do
35044          if test -f "$p/$path" && test -x "$p/$path"; then
35045            new_path="$p/$path"
35046            break
35047          fi
35048        done
35049        IFS="$IFS_save"
35050      else
35051        # This is an absolute path, we can use it without further modifications.
35052        new_path="$path"
35053      fi
35054
35055      if test "x$new_path" = x; then
35056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35057$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35058        has_space=`$ECHO "$complete" | $GREP " "`
35059        if test "x$has_space" != x; then
35060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35062        fi
35063        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35064      fi
35065    fi
35066
35067    # Now join together the path and the arguments once again
35068    if test "x$arguments" != xEOL; then
35069      new_complete="$new_path ${arguments% *}"
35070    else
35071      new_complete="$new_path"
35072    fi
35073
35074    if test "x$complete" != "x$new_complete"; then
35075      DUMPBIN="$new_complete"
35076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35077$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35078    fi
35079  fi
35080
35081    # We need to check for 'msbuild.exe' because at the place where we expect to
35082    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35083    # won't find the 'msbuild.exe' executable in that case (and the
35084    # 'ac_executable_extensions' is unusable due to performance reasons).
35085    # Notice that we intentionally don't fix up the path to MSBUILD because we
35086    # will call it in a DOS shell during freetype detection on Windows (see
35087    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35088    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35089set dummy msbuild.exe; ac_word=$2
35090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35091$as_echo_n "checking for $ac_word... " >&6; }
35092if ${ac_cv_prog_MSBUILD+:} false; then :
35093  $as_echo_n "(cached) " >&6
35094else
35095  if test -n "$MSBUILD"; then
35096  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35097else
35098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35099for as_dir in $PATH
35100do
35101  IFS=$as_save_IFS
35102  test -z "$as_dir" && as_dir=.
35103    for ac_exec_ext in '' $ac_executable_extensions; do
35104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35105    ac_cv_prog_MSBUILD="msbuild.exe"
35106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35107    break 2
35108  fi
35109done
35110  done
35111IFS=$as_save_IFS
35112
35113fi
35114fi
35115MSBUILD=$ac_cv_prog_MSBUILD
35116if test -n "$MSBUILD"; then
35117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35118$as_echo "$MSBUILD" >&6; }
35119else
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35121$as_echo "no" >&6; }
35122fi
35123
35124
35125  fi
35126
35127  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35128
35129
35130  # Publish this variable in the help.
35131
35132
35133  if test "x$STRIP" = x; then
35134    # The variable is not set by user, try to locate tool using the code snippet
35135    for ac_prog in strip
35136do
35137  # Extract the first word of "$ac_prog", so it can be a program name with args.
35138set dummy $ac_prog; ac_word=$2
35139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35140$as_echo_n "checking for $ac_word... " >&6; }
35141if ${ac_cv_path_STRIP+:} false; then :
35142  $as_echo_n "(cached) " >&6
35143else
35144  case $STRIP in
35145  [\\/]* | ?:[\\/]*)
35146  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35147  ;;
35148  *)
35149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35150for as_dir in $PATH
35151do
35152  IFS=$as_save_IFS
35153  test -z "$as_dir" && as_dir=.
35154    for ac_exec_ext in '' $ac_executable_extensions; do
35155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35156    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35158    break 2
35159  fi
35160done
35161  done
35162IFS=$as_save_IFS
35163
35164  ;;
35165esac
35166fi
35167STRIP=$ac_cv_path_STRIP
35168if test -n "$STRIP"; then
35169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35170$as_echo "$STRIP" >&6; }
35171else
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35173$as_echo "no" >&6; }
35174fi
35175
35176
35177  test -n "$STRIP" && break
35178done
35179
35180  else
35181    # The variable is set, but is it from the command line or the environment?
35182
35183    # Try to remove the string !STRIP! from our list.
35184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35186      # If it failed, the variable was not from the command line. Ignore it,
35187      # but warn the user (except for BASH, which is always set by the calling BASH).
35188      if test "xSTRIP" != xBASH; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35190$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35191      fi
35192      # Try to locate tool using the code snippet
35193      for ac_prog in strip
35194do
35195  # Extract the first word of "$ac_prog", so it can be a program name with args.
35196set dummy $ac_prog; ac_word=$2
35197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35198$as_echo_n "checking for $ac_word... " >&6; }
35199if ${ac_cv_path_STRIP+:} false; then :
35200  $as_echo_n "(cached) " >&6
35201else
35202  case $STRIP in
35203  [\\/]* | ?:[\\/]*)
35204  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35205  ;;
35206  *)
35207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35208for as_dir in $PATH
35209do
35210  IFS=$as_save_IFS
35211  test -z "$as_dir" && as_dir=.
35212    for ac_exec_ext in '' $ac_executable_extensions; do
35213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35214    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35216    break 2
35217  fi
35218done
35219  done
35220IFS=$as_save_IFS
35221
35222  ;;
35223esac
35224fi
35225STRIP=$ac_cv_path_STRIP
35226if test -n "$STRIP"; then
35227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35228$as_echo "$STRIP" >&6; }
35229else
35230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35231$as_echo "no" >&6; }
35232fi
35233
35234
35235  test -n "$STRIP" && break
35236done
35237
35238    else
35239      # If it succeeded, then it was overridden by the user. We will use it
35240      # for the tool.
35241
35242      # First remove it from the list of overridden variables, so we can test
35243      # for unknown variables in the end.
35244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35245
35246      # Check if the provided tool contains a complete path.
35247      tool_specified="$STRIP"
35248      tool_basename="${tool_specified##*/}"
35249      if test "x$tool_basename" = "x$tool_specified"; then
35250        # A command without a complete path is provided, search $PATH.
35251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35252$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35253        # Extract the first word of "$tool_basename", so it can be a program name with args.
35254set dummy $tool_basename; ac_word=$2
35255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35256$as_echo_n "checking for $ac_word... " >&6; }
35257if ${ac_cv_path_STRIP+:} false; then :
35258  $as_echo_n "(cached) " >&6
35259else
35260  case $STRIP in
35261  [\\/]* | ?:[\\/]*)
35262  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35263  ;;
35264  *)
35265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35266for as_dir in $PATH
35267do
35268  IFS=$as_save_IFS
35269  test -z "$as_dir" && as_dir=.
35270    for ac_exec_ext in '' $ac_executable_extensions; do
35271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35272    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35274    break 2
35275  fi
35276done
35277  done
35278IFS=$as_save_IFS
35279
35280  ;;
35281esac
35282fi
35283STRIP=$ac_cv_path_STRIP
35284if test -n "$STRIP"; then
35285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35286$as_echo "$STRIP" >&6; }
35287else
35288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35289$as_echo "no" >&6; }
35290fi
35291
35292
35293        if test "x$STRIP" = x; then
35294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35295        fi
35296      else
35297        # Otherwise we believe it is a complete path. Use it as it is.
35298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35299$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35301$as_echo_n "checking for STRIP... " >&6; }
35302        if test ! -x "$tool_specified"; then
35303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35304$as_echo "not found" >&6; }
35305          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35306        fi
35307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35308$as_echo "$tool_specified" >&6; }
35309      fi
35310    fi
35311  fi
35312
35313
35314
35315  # Only process if variable expands to non-empty
35316
35317  if test "x$STRIP" != x; then
35318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35319
35320  # First separate the path from the arguments. This will split at the first
35321  # space.
35322  complete="$STRIP"
35323  path="${complete%% *}"
35324  tmp="$complete EOL"
35325  arguments="${tmp#* }"
35326
35327  # Input might be given as Windows format, start by converting to
35328  # unix format.
35329  new_path=`$CYGPATH -u "$path"`
35330
35331  # Now try to locate executable using which
35332  new_path=`$WHICH "$new_path" 2> /dev/null`
35333  # bat and cmd files are not always considered executable in cygwin causing which
35334  # to not find them
35335  if test "x$new_path" = x \
35336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35338    new_path=`$CYGPATH -u "$path"`
35339  fi
35340  if test "x$new_path" = x; then
35341    # Oops. Which didn't find the executable.
35342    # The splitting of arguments from the executable at a space might have been incorrect,
35343    # since paths with space are more likely in Windows. Give it another try with the whole
35344    # argument.
35345    path="$complete"
35346    arguments="EOL"
35347    new_path=`$CYGPATH -u "$path"`
35348    new_path=`$WHICH "$new_path" 2> /dev/null`
35349    # bat and cmd files are not always considered executable in cygwin causing which
35350    # to not find them
35351    if test "x$new_path" = x \
35352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35354      new_path=`$CYGPATH -u "$path"`
35355    fi
35356    if test "x$new_path" = x; then
35357      # It's still not found. Now this is an unrecoverable error.
35358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35359$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35360      has_space=`$ECHO "$complete" | $GREP " "`
35361      if test "x$has_space" != x; then
35362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35364      fi
35365      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35366    fi
35367  fi
35368
35369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35372  # "foo.exe" is OK but "foo" is an error.
35373  #
35374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35375  # It is also a way to make sure we got the proper file name for the real test later on.
35376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35377  if test "x$test_shortpath" = x; then
35378    # Short path failed, file does not exist as specified.
35379    # Try adding .exe or .cmd
35380    if test -f "${new_path}.exe"; then
35381      input_to_shortpath="${new_path}.exe"
35382    elif test -f "${new_path}.cmd"; then
35383      input_to_shortpath="${new_path}.cmd"
35384    else
35385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35386$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35389      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35390    fi
35391  else
35392    input_to_shortpath="$new_path"
35393  fi
35394
35395  # Call helper function which possibly converts this using DOS-style short mode.
35396  # If so, the updated path is stored in $new_path.
35397  new_path="$input_to_shortpath"
35398
35399  input_path="$input_to_shortpath"
35400  # Check if we need to convert this using DOS-style short mode. If the path
35401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35402  # take no chances and rewrite it.
35403  # Note: m4 eats our [], so we need to use [ and ] instead.
35404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35405  if test "x$has_forbidden_chars" != x; then
35406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35410      # Going to short mode and back again did indeed matter. Since short mode is
35411      # case insensitive, let's make it lowercase to improve readability.
35412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35413      # Now convert it back to Unix-style (cygpath)
35414      input_path=`$CYGPATH -u "$shortmode_path"`
35415      new_path="$input_path"
35416    fi
35417  fi
35418
35419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35420  if test "x$test_cygdrive_prefix" = x; then
35421    # As a simple fix, exclude /usr/bin since it's not a real path.
35422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35424      # a path prefixed by /cygdrive for fixpath to work.
35425      new_path="$CYGWIN_ROOT_PATH$input_path"
35426    fi
35427  fi
35428
35429  # remove trailing .exe if any
35430  new_path="${new_path/%.exe/}"
35431
35432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433
35434  # First separate the path from the arguments. This will split at the first
35435  # space.
35436  complete="$STRIP"
35437  path="${complete%% *}"
35438  tmp="$complete EOL"
35439  arguments="${tmp#* }"
35440
35441  # Input might be given as Windows format, start by converting to
35442  # unix format.
35443  new_path="$path"
35444
35445  windows_path="$new_path"
35446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35447    unix_path=`$CYGPATH -u "$windows_path"`
35448    new_path="$unix_path"
35449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35451    new_path="$unix_path"
35452  fi
35453
35454
35455  # Now try to locate executable using which
35456  new_path=`$WHICH "$new_path" 2> /dev/null`
35457
35458  if test "x$new_path" = x; then
35459    # Oops. Which didn't find the executable.
35460    # The splitting of arguments from the executable at a space might have been incorrect,
35461    # since paths with space are more likely in Windows. Give it another try with the whole
35462    # argument.
35463    path="$complete"
35464    arguments="EOL"
35465    new_path="$path"
35466
35467  windows_path="$new_path"
35468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469    unix_path=`$CYGPATH -u "$windows_path"`
35470    new_path="$unix_path"
35471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35473    new_path="$unix_path"
35474  fi
35475
35476
35477    new_path=`$WHICH "$new_path" 2> /dev/null`
35478    # bat and cmd files are not always considered executable in MSYS causing which
35479    # to not find them
35480    if test "x$new_path" = x \
35481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35483      new_path="$path"
35484
35485  windows_path="$new_path"
35486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35487    unix_path=`$CYGPATH -u "$windows_path"`
35488    new_path="$unix_path"
35489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35491    new_path="$unix_path"
35492  fi
35493
35494    fi
35495
35496    if test "x$new_path" = x; then
35497      # It's still not found. Now this is an unrecoverable error.
35498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35499$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35500      has_space=`$ECHO "$complete" | $GREP " "`
35501      if test "x$has_space" != x; then
35502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35504      fi
35505      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35506    fi
35507  fi
35508
35509  # Now new_path has a complete unix path to the binary
35510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35511    # Keep paths in /bin as-is, but remove trailing .exe if any
35512    new_path="${new_path/%.exe/}"
35513    # Do not save /bin paths to all_fixpath_prefixes!
35514  else
35515    # Not in mixed or Windows style, start by that.
35516    new_path=`cmd //c echo $new_path`
35517
35518  input_path="$new_path"
35519  # Check if we need to convert this using DOS-style short mode. If the path
35520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35521  # take no chances and rewrite it.
35522  # Note: m4 eats our [], so we need to use [ and ] instead.
35523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35524  if test "x$has_forbidden_chars" != x; then
35525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35527  fi
35528
35529    # Output is in $new_path
35530
35531  windows_path="$new_path"
35532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35533    unix_path=`$CYGPATH -u "$windows_path"`
35534    new_path="$unix_path"
35535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35537    new_path="$unix_path"
35538  fi
35539
35540    # remove trailing .exe if any
35541    new_path="${new_path/%.exe/}"
35542
35543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35545  fi
35546
35547    else
35548      # We're on a unix platform. Hooray! :)
35549      # First separate the path from the arguments. This will split at the first
35550      # space.
35551      complete="$STRIP"
35552      path="${complete%% *}"
35553      tmp="$complete EOL"
35554      arguments="${tmp#* }"
35555
35556      # Cannot rely on the command "which" here since it doesn't always work.
35557      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35558      if test -z "$is_absolute_path"; then
35559        # Path to executable is not absolute. Find it.
35560        IFS_save="$IFS"
35561        IFS=:
35562        for p in $PATH; do
35563          if test -f "$p/$path" && test -x "$p/$path"; then
35564            new_path="$p/$path"
35565            break
35566          fi
35567        done
35568        IFS="$IFS_save"
35569      else
35570        # This is an absolute path, we can use it without further modifications.
35571        new_path="$path"
35572      fi
35573
35574      if test "x$new_path" = x; then
35575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35577        has_space=`$ECHO "$complete" | $GREP " "`
35578        if test "x$has_space" != x; then
35579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35581        fi
35582        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35583      fi
35584    fi
35585
35586    # Now join together the path and the arguments once again
35587    if test "x$arguments" != xEOL; then
35588      new_complete="$new_path ${arguments% *}"
35589    else
35590      new_complete="$new_path"
35591    fi
35592
35593    if test "x$complete" != "x$new_complete"; then
35594      STRIP="$new_complete"
35595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35596$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35597    fi
35598  fi
35599
35600
35601
35602  # Publish this variable in the help.
35603
35604
35605  if test "x$NM" = x; then
35606    # The variable is not set by user, try to locate tool using the code snippet
35607    for ac_prog in nm
35608do
35609  # Extract the first word of "$ac_prog", so it can be a program name with args.
35610set dummy $ac_prog; ac_word=$2
35611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35612$as_echo_n "checking for $ac_word... " >&6; }
35613if ${ac_cv_path_NM+:} false; then :
35614  $as_echo_n "(cached) " >&6
35615else
35616  case $NM in
35617  [\\/]* | ?:[\\/]*)
35618  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35619  ;;
35620  *)
35621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35622for as_dir in $PATH
35623do
35624  IFS=$as_save_IFS
35625  test -z "$as_dir" && as_dir=.
35626    for ac_exec_ext in '' $ac_executable_extensions; do
35627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35628    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35630    break 2
35631  fi
35632done
35633  done
35634IFS=$as_save_IFS
35635
35636  ;;
35637esac
35638fi
35639NM=$ac_cv_path_NM
35640if test -n "$NM"; then
35641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35642$as_echo "$NM" >&6; }
35643else
35644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35645$as_echo "no" >&6; }
35646fi
35647
35648
35649  test -n "$NM" && break
35650done
35651
35652  else
35653    # The variable is set, but is it from the command line or the environment?
35654
35655    # Try to remove the string !NM! from our list.
35656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35658      # If it failed, the variable was not from the command line. Ignore it,
35659      # but warn the user (except for BASH, which is always set by the calling BASH).
35660      if test "xNM" != xBASH; then
35661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35662$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35663      fi
35664      # Try to locate tool using the code snippet
35665      for ac_prog in nm
35666do
35667  # Extract the first word of "$ac_prog", so it can be a program name with args.
35668set dummy $ac_prog; ac_word=$2
35669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35670$as_echo_n "checking for $ac_word... " >&6; }
35671if ${ac_cv_path_NM+:} false; then :
35672  $as_echo_n "(cached) " >&6
35673else
35674  case $NM in
35675  [\\/]* | ?:[\\/]*)
35676  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35677  ;;
35678  *)
35679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35680for as_dir in $PATH
35681do
35682  IFS=$as_save_IFS
35683  test -z "$as_dir" && as_dir=.
35684    for ac_exec_ext in '' $ac_executable_extensions; do
35685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35686    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35688    break 2
35689  fi
35690done
35691  done
35692IFS=$as_save_IFS
35693
35694  ;;
35695esac
35696fi
35697NM=$ac_cv_path_NM
35698if test -n "$NM"; then
35699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35700$as_echo "$NM" >&6; }
35701else
35702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35703$as_echo "no" >&6; }
35704fi
35705
35706
35707  test -n "$NM" && break
35708done
35709
35710    else
35711      # If it succeeded, then it was overridden by the user. We will use it
35712      # for the tool.
35713
35714      # First remove it from the list of overridden variables, so we can test
35715      # for unknown variables in the end.
35716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35717
35718      # Check if the provided tool contains a complete path.
35719      tool_specified="$NM"
35720      tool_basename="${tool_specified##*/}"
35721      if test "x$tool_basename" = "x$tool_specified"; then
35722        # A command without a complete path is provided, search $PATH.
35723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35724$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35725        # Extract the first word of "$tool_basename", so it can be a program name with args.
35726set dummy $tool_basename; ac_word=$2
35727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35728$as_echo_n "checking for $ac_word... " >&6; }
35729if ${ac_cv_path_NM+:} false; then :
35730  $as_echo_n "(cached) " >&6
35731else
35732  case $NM in
35733  [\\/]* | ?:[\\/]*)
35734  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35735  ;;
35736  *)
35737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35738for as_dir in $PATH
35739do
35740  IFS=$as_save_IFS
35741  test -z "$as_dir" && as_dir=.
35742    for ac_exec_ext in '' $ac_executable_extensions; do
35743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35744    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35746    break 2
35747  fi
35748done
35749  done
35750IFS=$as_save_IFS
35751
35752  ;;
35753esac
35754fi
35755NM=$ac_cv_path_NM
35756if test -n "$NM"; then
35757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35758$as_echo "$NM" >&6; }
35759else
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35761$as_echo "no" >&6; }
35762fi
35763
35764
35765        if test "x$NM" = x; then
35766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35767        fi
35768      else
35769        # Otherwise we believe it is a complete path. Use it as it is.
35770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35771$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35773$as_echo_n "checking for NM... " >&6; }
35774        if test ! -x "$tool_specified"; then
35775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35776$as_echo "not found" >&6; }
35777          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35778        fi
35779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35780$as_echo "$tool_specified" >&6; }
35781      fi
35782    fi
35783  fi
35784
35785
35786
35787  # Only process if variable expands to non-empty
35788
35789  if test "x$NM" != x; then
35790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35791
35792  # First separate the path from the arguments. This will split at the first
35793  # space.
35794  complete="$NM"
35795  path="${complete%% *}"
35796  tmp="$complete EOL"
35797  arguments="${tmp#* }"
35798
35799  # Input might be given as Windows format, start by converting to
35800  # unix format.
35801  new_path=`$CYGPATH -u "$path"`
35802
35803  # Now try to locate executable using which
35804  new_path=`$WHICH "$new_path" 2> /dev/null`
35805  # bat and cmd files are not always considered executable in cygwin causing which
35806  # to not find them
35807  if test "x$new_path" = x \
35808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35810    new_path=`$CYGPATH -u "$path"`
35811  fi
35812  if test "x$new_path" = x; then
35813    # Oops. Which didn't find the executable.
35814    # The splitting of arguments from the executable at a space might have been incorrect,
35815    # since paths with space are more likely in Windows. Give it another try with the whole
35816    # argument.
35817    path="$complete"
35818    arguments="EOL"
35819    new_path=`$CYGPATH -u "$path"`
35820    new_path=`$WHICH "$new_path" 2> /dev/null`
35821    # bat and cmd files are not always considered executable in cygwin causing which
35822    # to not find them
35823    if test "x$new_path" = x \
35824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35826      new_path=`$CYGPATH -u "$path"`
35827    fi
35828    if test "x$new_path" = x; then
35829      # It's still not found. Now this is an unrecoverable error.
35830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35832      has_space=`$ECHO "$complete" | $GREP " "`
35833      if test "x$has_space" != x; then
35834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35836      fi
35837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35838    fi
35839  fi
35840
35841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35844  # "foo.exe" is OK but "foo" is an error.
35845  #
35846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35847  # It is also a way to make sure we got the proper file name for the real test later on.
35848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35849  if test "x$test_shortpath" = x; then
35850    # Short path failed, file does not exist as specified.
35851    # Try adding .exe or .cmd
35852    if test -f "${new_path}.exe"; then
35853      input_to_shortpath="${new_path}.exe"
35854    elif test -f "${new_path}.cmd"; then
35855      input_to_shortpath="${new_path}.cmd"
35856    else
35857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35858$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35861      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35862    fi
35863  else
35864    input_to_shortpath="$new_path"
35865  fi
35866
35867  # Call helper function which possibly converts this using DOS-style short mode.
35868  # If so, the updated path is stored in $new_path.
35869  new_path="$input_to_shortpath"
35870
35871  input_path="$input_to_shortpath"
35872  # Check if we need to convert this using DOS-style short mode. If the path
35873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35874  # take no chances and rewrite it.
35875  # Note: m4 eats our [], so we need to use [ and ] instead.
35876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35877  if test "x$has_forbidden_chars" != x; then
35878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35882      # Going to short mode and back again did indeed matter. Since short mode is
35883      # case insensitive, let's make it lowercase to improve readability.
35884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35885      # Now convert it back to Unix-style (cygpath)
35886      input_path=`$CYGPATH -u "$shortmode_path"`
35887      new_path="$input_path"
35888    fi
35889  fi
35890
35891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35892  if test "x$test_cygdrive_prefix" = x; then
35893    # As a simple fix, exclude /usr/bin since it's not a real path.
35894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35896      # a path prefixed by /cygdrive for fixpath to work.
35897      new_path="$CYGWIN_ROOT_PATH$input_path"
35898    fi
35899  fi
35900
35901  # remove trailing .exe if any
35902  new_path="${new_path/%.exe/}"
35903
35904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35905
35906  # First separate the path from the arguments. This will split at the first
35907  # space.
35908  complete="$NM"
35909  path="${complete%% *}"
35910  tmp="$complete EOL"
35911  arguments="${tmp#* }"
35912
35913  # Input might be given as Windows format, start by converting to
35914  # unix format.
35915  new_path="$path"
35916
35917  windows_path="$new_path"
35918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35919    unix_path=`$CYGPATH -u "$windows_path"`
35920    new_path="$unix_path"
35921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35923    new_path="$unix_path"
35924  fi
35925
35926
35927  # Now try to locate executable using which
35928  new_path=`$WHICH "$new_path" 2> /dev/null`
35929
35930  if test "x$new_path" = x; then
35931    # Oops. Which didn't find the executable.
35932    # The splitting of arguments from the executable at a space might have been incorrect,
35933    # since paths with space are more likely in Windows. Give it another try with the whole
35934    # argument.
35935    path="$complete"
35936    arguments="EOL"
35937    new_path="$path"
35938
35939  windows_path="$new_path"
35940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35941    unix_path=`$CYGPATH -u "$windows_path"`
35942    new_path="$unix_path"
35943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35945    new_path="$unix_path"
35946  fi
35947
35948
35949    new_path=`$WHICH "$new_path" 2> /dev/null`
35950    # bat and cmd files are not always considered executable in MSYS causing which
35951    # to not find them
35952    if test "x$new_path" = x \
35953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35955      new_path="$path"
35956
35957  windows_path="$new_path"
35958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35959    unix_path=`$CYGPATH -u "$windows_path"`
35960    new_path="$unix_path"
35961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35963    new_path="$unix_path"
35964  fi
35965
35966    fi
35967
35968    if test "x$new_path" = x; then
35969      # It's still not found. Now this is an unrecoverable error.
35970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35971$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35972      has_space=`$ECHO "$complete" | $GREP " "`
35973      if test "x$has_space" != x; then
35974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35976      fi
35977      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35978    fi
35979  fi
35980
35981  # Now new_path has a complete unix path to the binary
35982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35983    # Keep paths in /bin as-is, but remove trailing .exe if any
35984    new_path="${new_path/%.exe/}"
35985    # Do not save /bin paths to all_fixpath_prefixes!
35986  else
35987    # Not in mixed or Windows style, start by that.
35988    new_path=`cmd //c echo $new_path`
35989
35990  input_path="$new_path"
35991  # Check if we need to convert this using DOS-style short mode. If the path
35992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35993  # take no chances and rewrite it.
35994  # Note: m4 eats our [], so we need to use [ and ] instead.
35995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35996  if test "x$has_forbidden_chars" != x; then
35997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35999  fi
36000
36001    # Output is in $new_path
36002
36003  windows_path="$new_path"
36004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36005    unix_path=`$CYGPATH -u "$windows_path"`
36006    new_path="$unix_path"
36007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36009    new_path="$unix_path"
36010  fi
36011
36012    # remove trailing .exe if any
36013    new_path="${new_path/%.exe/}"
36014
36015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36017  fi
36018
36019    else
36020      # We're on a unix platform. Hooray! :)
36021      # First separate the path from the arguments. This will split at the first
36022      # space.
36023      complete="$NM"
36024      path="${complete%% *}"
36025      tmp="$complete EOL"
36026      arguments="${tmp#* }"
36027
36028      # Cannot rely on the command "which" here since it doesn't always work.
36029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36030      if test -z "$is_absolute_path"; then
36031        # Path to executable is not absolute. Find it.
36032        IFS_save="$IFS"
36033        IFS=:
36034        for p in $PATH; do
36035          if test -f "$p/$path" && test -x "$p/$path"; then
36036            new_path="$p/$path"
36037            break
36038          fi
36039        done
36040        IFS="$IFS_save"
36041      else
36042        # This is an absolute path, we can use it without further modifications.
36043        new_path="$path"
36044      fi
36045
36046      if test "x$new_path" = x; then
36047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36048$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36049        has_space=`$ECHO "$complete" | $GREP " "`
36050        if test "x$has_space" != x; then
36051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36053        fi
36054        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36055      fi
36056    fi
36057
36058    # Now join together the path and the arguments once again
36059    if test "x$arguments" != xEOL; then
36060      new_complete="$new_path ${arguments% *}"
36061    else
36062      new_complete="$new_path"
36063    fi
36064
36065    if test "x$complete" != "x$new_complete"; then
36066      NM="$new_complete"
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36068$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36069    fi
36070  fi
36071
36072
36073
36074  # Publish this variable in the help.
36075
36076
36077  if test "x$GNM" = x; then
36078    # The variable is not set by user, try to locate tool using the code snippet
36079    for ac_prog in gnm
36080do
36081  # Extract the first word of "$ac_prog", so it can be a program name with args.
36082set dummy $ac_prog; ac_word=$2
36083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36084$as_echo_n "checking for $ac_word... " >&6; }
36085if ${ac_cv_path_GNM+:} false; then :
36086  $as_echo_n "(cached) " >&6
36087else
36088  case $GNM in
36089  [\\/]* | ?:[\\/]*)
36090  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36091  ;;
36092  *)
36093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36094for as_dir in $PATH
36095do
36096  IFS=$as_save_IFS
36097  test -z "$as_dir" && as_dir=.
36098    for ac_exec_ext in '' $ac_executable_extensions; do
36099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36100    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36102    break 2
36103  fi
36104done
36105  done
36106IFS=$as_save_IFS
36107
36108  ;;
36109esac
36110fi
36111GNM=$ac_cv_path_GNM
36112if test -n "$GNM"; then
36113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36114$as_echo "$GNM" >&6; }
36115else
36116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36117$as_echo "no" >&6; }
36118fi
36119
36120
36121  test -n "$GNM" && break
36122done
36123
36124  else
36125    # The variable is set, but is it from the command line or the environment?
36126
36127    # Try to remove the string !GNM! from our list.
36128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36130      # If it failed, the variable was not from the command line. Ignore it,
36131      # but warn the user (except for BASH, which is always set by the calling BASH).
36132      if test "xGNM" != xBASH; then
36133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36134$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36135      fi
36136      # Try to locate tool using the code snippet
36137      for ac_prog in gnm
36138do
36139  # Extract the first word of "$ac_prog", so it can be a program name with args.
36140set dummy $ac_prog; ac_word=$2
36141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36142$as_echo_n "checking for $ac_word... " >&6; }
36143if ${ac_cv_path_GNM+:} false; then :
36144  $as_echo_n "(cached) " >&6
36145else
36146  case $GNM in
36147  [\\/]* | ?:[\\/]*)
36148  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36149  ;;
36150  *)
36151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36152for as_dir in $PATH
36153do
36154  IFS=$as_save_IFS
36155  test -z "$as_dir" && as_dir=.
36156    for ac_exec_ext in '' $ac_executable_extensions; do
36157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36158    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36160    break 2
36161  fi
36162done
36163  done
36164IFS=$as_save_IFS
36165
36166  ;;
36167esac
36168fi
36169GNM=$ac_cv_path_GNM
36170if test -n "$GNM"; then
36171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36172$as_echo "$GNM" >&6; }
36173else
36174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36175$as_echo "no" >&6; }
36176fi
36177
36178
36179  test -n "$GNM" && break
36180done
36181
36182    else
36183      # If it succeeded, then it was overridden by the user. We will use it
36184      # for the tool.
36185
36186      # First remove it from the list of overridden variables, so we can test
36187      # for unknown variables in the end.
36188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36189
36190      # Check if the provided tool contains a complete path.
36191      tool_specified="$GNM"
36192      tool_basename="${tool_specified##*/}"
36193      if test "x$tool_basename" = "x$tool_specified"; then
36194        # A command without a complete path is provided, search $PATH.
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36196$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36197        # Extract the first word of "$tool_basename", so it can be a program name with args.
36198set dummy $tool_basename; ac_word=$2
36199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36200$as_echo_n "checking for $ac_word... " >&6; }
36201if ${ac_cv_path_GNM+:} false; then :
36202  $as_echo_n "(cached) " >&6
36203else
36204  case $GNM in
36205  [\\/]* | ?:[\\/]*)
36206  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36207  ;;
36208  *)
36209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36210for as_dir in $PATH
36211do
36212  IFS=$as_save_IFS
36213  test -z "$as_dir" && as_dir=.
36214    for ac_exec_ext in '' $ac_executable_extensions; do
36215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36216    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36218    break 2
36219  fi
36220done
36221  done
36222IFS=$as_save_IFS
36223
36224  ;;
36225esac
36226fi
36227GNM=$ac_cv_path_GNM
36228if test -n "$GNM"; then
36229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36230$as_echo "$GNM" >&6; }
36231else
36232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36233$as_echo "no" >&6; }
36234fi
36235
36236
36237        if test "x$GNM" = x; then
36238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36239        fi
36240      else
36241        # Otherwise we believe it is a complete path. Use it as it is.
36242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36243$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36245$as_echo_n "checking for GNM... " >&6; }
36246        if test ! -x "$tool_specified"; then
36247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36248$as_echo "not found" >&6; }
36249          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36250        fi
36251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36252$as_echo "$tool_specified" >&6; }
36253      fi
36254    fi
36255  fi
36256
36257
36258
36259  # Only process if variable expands to non-empty
36260
36261  if test "x$GNM" != x; then
36262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36263
36264  # First separate the path from the arguments. This will split at the first
36265  # space.
36266  complete="$GNM"
36267  path="${complete%% *}"
36268  tmp="$complete EOL"
36269  arguments="${tmp#* }"
36270
36271  # Input might be given as Windows format, start by converting to
36272  # unix format.
36273  new_path=`$CYGPATH -u "$path"`
36274
36275  # Now try to locate executable using which
36276  new_path=`$WHICH "$new_path" 2> /dev/null`
36277  # bat and cmd files are not always considered executable in cygwin causing which
36278  # to not find them
36279  if test "x$new_path" = x \
36280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36282    new_path=`$CYGPATH -u "$path"`
36283  fi
36284  if test "x$new_path" = x; then
36285    # Oops. Which didn't find the executable.
36286    # The splitting of arguments from the executable at a space might have been incorrect,
36287    # since paths with space are more likely in Windows. Give it another try with the whole
36288    # argument.
36289    path="$complete"
36290    arguments="EOL"
36291    new_path=`$CYGPATH -u "$path"`
36292    new_path=`$WHICH "$new_path" 2> /dev/null`
36293    # bat and cmd files are not always considered executable in cygwin causing which
36294    # to not find them
36295    if test "x$new_path" = x \
36296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36298      new_path=`$CYGPATH -u "$path"`
36299    fi
36300    if test "x$new_path" = x; then
36301      # It's still not found. Now this is an unrecoverable error.
36302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36303$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36304      has_space=`$ECHO "$complete" | $GREP " "`
36305      if test "x$has_space" != x; then
36306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36308      fi
36309      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36310    fi
36311  fi
36312
36313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36316  # "foo.exe" is OK but "foo" is an error.
36317  #
36318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36319  # It is also a way to make sure we got the proper file name for the real test later on.
36320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36321  if test "x$test_shortpath" = x; then
36322    # Short path failed, file does not exist as specified.
36323    # Try adding .exe or .cmd
36324    if test -f "${new_path}.exe"; then
36325      input_to_shortpath="${new_path}.exe"
36326    elif test -f "${new_path}.cmd"; then
36327      input_to_shortpath="${new_path}.cmd"
36328    else
36329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36330$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36333      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36334    fi
36335  else
36336    input_to_shortpath="$new_path"
36337  fi
36338
36339  # Call helper function which possibly converts this using DOS-style short mode.
36340  # If so, the updated path is stored in $new_path.
36341  new_path="$input_to_shortpath"
36342
36343  input_path="$input_to_shortpath"
36344  # Check if we need to convert this using DOS-style short mode. If the path
36345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36346  # take no chances and rewrite it.
36347  # Note: m4 eats our [], so we need to use [ and ] instead.
36348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36349  if test "x$has_forbidden_chars" != x; then
36350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36354      # Going to short mode and back again did indeed matter. Since short mode is
36355      # case insensitive, let's make it lowercase to improve readability.
36356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36357      # Now convert it back to Unix-style (cygpath)
36358      input_path=`$CYGPATH -u "$shortmode_path"`
36359      new_path="$input_path"
36360    fi
36361  fi
36362
36363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36364  if test "x$test_cygdrive_prefix" = x; then
36365    # As a simple fix, exclude /usr/bin since it's not a real path.
36366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36368      # a path prefixed by /cygdrive for fixpath to work.
36369      new_path="$CYGWIN_ROOT_PATH$input_path"
36370    fi
36371  fi
36372
36373  # remove trailing .exe if any
36374  new_path="${new_path/%.exe/}"
36375
36376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377
36378  # First separate the path from the arguments. This will split at the first
36379  # space.
36380  complete="$GNM"
36381  path="${complete%% *}"
36382  tmp="$complete EOL"
36383  arguments="${tmp#* }"
36384
36385  # Input might be given as Windows format, start by converting to
36386  # unix format.
36387  new_path="$path"
36388
36389  windows_path="$new_path"
36390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36391    unix_path=`$CYGPATH -u "$windows_path"`
36392    new_path="$unix_path"
36393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36395    new_path="$unix_path"
36396  fi
36397
36398
36399  # Now try to locate executable using which
36400  new_path=`$WHICH "$new_path" 2> /dev/null`
36401
36402  if test "x$new_path" = x; then
36403    # Oops. Which didn't find the executable.
36404    # The splitting of arguments from the executable at a space might have been incorrect,
36405    # since paths with space are more likely in Windows. Give it another try with the whole
36406    # argument.
36407    path="$complete"
36408    arguments="EOL"
36409    new_path="$path"
36410
36411  windows_path="$new_path"
36412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36413    unix_path=`$CYGPATH -u "$windows_path"`
36414    new_path="$unix_path"
36415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36417    new_path="$unix_path"
36418  fi
36419
36420
36421    new_path=`$WHICH "$new_path" 2> /dev/null`
36422    # bat and cmd files are not always considered executable in MSYS causing which
36423    # to not find them
36424    if test "x$new_path" = x \
36425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36427      new_path="$path"
36428
36429  windows_path="$new_path"
36430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36431    unix_path=`$CYGPATH -u "$windows_path"`
36432    new_path="$unix_path"
36433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36435    new_path="$unix_path"
36436  fi
36437
36438    fi
36439
36440    if test "x$new_path" = x; then
36441      # It's still not found. Now this is an unrecoverable error.
36442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36443$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36444      has_space=`$ECHO "$complete" | $GREP " "`
36445      if test "x$has_space" != x; then
36446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36448      fi
36449      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36450    fi
36451  fi
36452
36453  # Now new_path has a complete unix path to the binary
36454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36455    # Keep paths in /bin as-is, but remove trailing .exe if any
36456    new_path="${new_path/%.exe/}"
36457    # Do not save /bin paths to all_fixpath_prefixes!
36458  else
36459    # Not in mixed or Windows style, start by that.
36460    new_path=`cmd //c echo $new_path`
36461
36462  input_path="$new_path"
36463  # Check if we need to convert this using DOS-style short mode. If the path
36464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36465  # take no chances and rewrite it.
36466  # Note: m4 eats our [], so we need to use [ and ] instead.
36467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36468  if test "x$has_forbidden_chars" != x; then
36469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36471  fi
36472
36473    # Output is in $new_path
36474
36475  windows_path="$new_path"
36476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36477    unix_path=`$CYGPATH -u "$windows_path"`
36478    new_path="$unix_path"
36479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36481    new_path="$unix_path"
36482  fi
36483
36484    # remove trailing .exe if any
36485    new_path="${new_path/%.exe/}"
36486
36487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36489  fi
36490
36491    else
36492      # We're on a unix platform. Hooray! :)
36493      # First separate the path from the arguments. This will split at the first
36494      # space.
36495      complete="$GNM"
36496      path="${complete%% *}"
36497      tmp="$complete EOL"
36498      arguments="${tmp#* }"
36499
36500      # Cannot rely on the command "which" here since it doesn't always work.
36501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36502      if test -z "$is_absolute_path"; then
36503        # Path to executable is not absolute. Find it.
36504        IFS_save="$IFS"
36505        IFS=:
36506        for p in $PATH; do
36507          if test -f "$p/$path" && test -x "$p/$path"; then
36508            new_path="$p/$path"
36509            break
36510          fi
36511        done
36512        IFS="$IFS_save"
36513      else
36514        # This is an absolute path, we can use it without further modifications.
36515        new_path="$path"
36516      fi
36517
36518      if test "x$new_path" = x; then
36519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36520$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36521        has_space=`$ECHO "$complete" | $GREP " "`
36522        if test "x$has_space" != x; then
36523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36525        fi
36526        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36527      fi
36528    fi
36529
36530    # Now join together the path and the arguments once again
36531    if test "x$arguments" != xEOL; then
36532      new_complete="$new_path ${arguments% *}"
36533    else
36534      new_complete="$new_path"
36535    fi
36536
36537    if test "x$complete" != "x$new_complete"; then
36538      GNM="$new_complete"
36539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36540$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36541    fi
36542  fi
36543
36544
36545
36546
36547  # Publish this variable in the help.
36548
36549
36550  if test "x$MCS" = x; then
36551    # The variable is not set by user, try to locate tool using the code snippet
36552    for ac_prog in mcs
36553do
36554  # Extract the first word of "$ac_prog", so it can be a program name with args.
36555set dummy $ac_prog; ac_word=$2
36556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36557$as_echo_n "checking for $ac_word... " >&6; }
36558if ${ac_cv_path_MCS+:} false; then :
36559  $as_echo_n "(cached) " >&6
36560else
36561  case $MCS in
36562  [\\/]* | ?:[\\/]*)
36563  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36564  ;;
36565  *)
36566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36567for as_dir in $PATH
36568do
36569  IFS=$as_save_IFS
36570  test -z "$as_dir" && as_dir=.
36571    for ac_exec_ext in '' $ac_executable_extensions; do
36572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36573    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36575    break 2
36576  fi
36577done
36578  done
36579IFS=$as_save_IFS
36580
36581  ;;
36582esac
36583fi
36584MCS=$ac_cv_path_MCS
36585if test -n "$MCS"; then
36586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36587$as_echo "$MCS" >&6; }
36588else
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36590$as_echo "no" >&6; }
36591fi
36592
36593
36594  test -n "$MCS" && break
36595done
36596
36597  else
36598    # The variable is set, but is it from the command line or the environment?
36599
36600    # Try to remove the string !MCS! from our list.
36601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36603      # If it failed, the variable was not from the command line. Ignore it,
36604      # but warn the user (except for BASH, which is always set by the calling BASH).
36605      if test "xMCS" != xBASH; then
36606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36607$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36608      fi
36609      # Try to locate tool using the code snippet
36610      for ac_prog in mcs
36611do
36612  # Extract the first word of "$ac_prog", so it can be a program name with args.
36613set dummy $ac_prog; ac_word=$2
36614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36615$as_echo_n "checking for $ac_word... " >&6; }
36616if ${ac_cv_path_MCS+:} false; then :
36617  $as_echo_n "(cached) " >&6
36618else
36619  case $MCS in
36620  [\\/]* | ?:[\\/]*)
36621  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36622  ;;
36623  *)
36624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36625for as_dir in $PATH
36626do
36627  IFS=$as_save_IFS
36628  test -z "$as_dir" && as_dir=.
36629    for ac_exec_ext in '' $ac_executable_extensions; do
36630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36631    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36633    break 2
36634  fi
36635done
36636  done
36637IFS=$as_save_IFS
36638
36639  ;;
36640esac
36641fi
36642MCS=$ac_cv_path_MCS
36643if test -n "$MCS"; then
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36645$as_echo "$MCS" >&6; }
36646else
36647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36648$as_echo "no" >&6; }
36649fi
36650
36651
36652  test -n "$MCS" && break
36653done
36654
36655    else
36656      # If it succeeded, then it was overridden by the user. We will use it
36657      # for the tool.
36658
36659      # First remove it from the list of overridden variables, so we can test
36660      # for unknown variables in the end.
36661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36662
36663      # Check if the provided tool contains a complete path.
36664      tool_specified="$MCS"
36665      tool_basename="${tool_specified##*/}"
36666      if test "x$tool_basename" = "x$tool_specified"; then
36667        # A command without a complete path is provided, search $PATH.
36668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36669$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36670        # Extract the first word of "$tool_basename", so it can be a program name with args.
36671set dummy $tool_basename; ac_word=$2
36672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36673$as_echo_n "checking for $ac_word... " >&6; }
36674if ${ac_cv_path_MCS+:} false; then :
36675  $as_echo_n "(cached) " >&6
36676else
36677  case $MCS in
36678  [\\/]* | ?:[\\/]*)
36679  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36680  ;;
36681  *)
36682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36683for as_dir in $PATH
36684do
36685  IFS=$as_save_IFS
36686  test -z "$as_dir" && as_dir=.
36687    for ac_exec_ext in '' $ac_executable_extensions; do
36688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36689    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36691    break 2
36692  fi
36693done
36694  done
36695IFS=$as_save_IFS
36696
36697  ;;
36698esac
36699fi
36700MCS=$ac_cv_path_MCS
36701if test -n "$MCS"; then
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36703$as_echo "$MCS" >&6; }
36704else
36705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36706$as_echo "no" >&6; }
36707fi
36708
36709
36710        if test "x$MCS" = x; then
36711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36712        fi
36713      else
36714        # Otherwise we believe it is a complete path. Use it as it is.
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36716$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36718$as_echo_n "checking for MCS... " >&6; }
36719        if test ! -x "$tool_specified"; then
36720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36721$as_echo "not found" >&6; }
36722          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36723        fi
36724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36725$as_echo "$tool_specified" >&6; }
36726      fi
36727    fi
36728  fi
36729
36730
36731
36732  # Only process if variable expands to non-empty
36733
36734  if test "x$MCS" != x; then
36735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36736
36737  # First separate the path from the arguments. This will split at the first
36738  # space.
36739  complete="$MCS"
36740  path="${complete%% *}"
36741  tmp="$complete EOL"
36742  arguments="${tmp#* }"
36743
36744  # Input might be given as Windows format, start by converting to
36745  # unix format.
36746  new_path=`$CYGPATH -u "$path"`
36747
36748  # Now try to locate executable using which
36749  new_path=`$WHICH "$new_path" 2> /dev/null`
36750  # bat and cmd files are not always considered executable in cygwin causing which
36751  # to not find them
36752  if test "x$new_path" = x \
36753      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36754      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36755    new_path=`$CYGPATH -u "$path"`
36756  fi
36757  if test "x$new_path" = x; then
36758    # Oops. Which didn't find the executable.
36759    # The splitting of arguments from the executable at a space might have been incorrect,
36760    # since paths with space are more likely in Windows. Give it another try with the whole
36761    # argument.
36762    path="$complete"
36763    arguments="EOL"
36764    new_path=`$CYGPATH -u "$path"`
36765    new_path=`$WHICH "$new_path" 2> /dev/null`
36766    # bat and cmd files are not always considered executable in cygwin causing which
36767    # to not find them
36768    if test "x$new_path" = x \
36769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36771      new_path=`$CYGPATH -u "$path"`
36772    fi
36773    if test "x$new_path" = x; then
36774      # It's still not found. Now this is an unrecoverable error.
36775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36776$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36777      has_space=`$ECHO "$complete" | $GREP " "`
36778      if test "x$has_space" != x; then
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36781      fi
36782      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36783    fi
36784  fi
36785
36786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36789  # "foo.exe" is OK but "foo" is an error.
36790  #
36791  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36792  # It is also a way to make sure we got the proper file name for the real test later on.
36793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36794  if test "x$test_shortpath" = x; then
36795    # Short path failed, file does not exist as specified.
36796    # Try adding .exe or .cmd
36797    if test -f "${new_path}.exe"; then
36798      input_to_shortpath="${new_path}.exe"
36799    elif test -f "${new_path}.cmd"; then
36800      input_to_shortpath="${new_path}.cmd"
36801    else
36802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36803$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36806      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36807    fi
36808  else
36809    input_to_shortpath="$new_path"
36810  fi
36811
36812  # Call helper function which possibly converts this using DOS-style short mode.
36813  # If so, the updated path is stored in $new_path.
36814  new_path="$input_to_shortpath"
36815
36816  input_path="$input_to_shortpath"
36817  # Check if we need to convert this using DOS-style short mode. If the path
36818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36819  # take no chances and rewrite it.
36820  # Note: m4 eats our [], so we need to use [ and ] instead.
36821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36822  if test "x$has_forbidden_chars" != x; then
36823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36827      # Going to short mode and back again did indeed matter. Since short mode is
36828      # case insensitive, let's make it lowercase to improve readability.
36829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36830      # Now convert it back to Unix-style (cygpath)
36831      input_path=`$CYGPATH -u "$shortmode_path"`
36832      new_path="$input_path"
36833    fi
36834  fi
36835
36836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36837  if test "x$test_cygdrive_prefix" = x; then
36838    # As a simple fix, exclude /usr/bin since it's not a real path.
36839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36841      # a path prefixed by /cygdrive for fixpath to work.
36842      new_path="$CYGWIN_ROOT_PATH$input_path"
36843    fi
36844  fi
36845
36846  # remove trailing .exe if any
36847  new_path="${new_path/%.exe/}"
36848
36849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36850
36851  # First separate the path from the arguments. This will split at the first
36852  # space.
36853  complete="$MCS"
36854  path="${complete%% *}"
36855  tmp="$complete EOL"
36856  arguments="${tmp#* }"
36857
36858  # Input might be given as Windows format, start by converting to
36859  # unix format.
36860  new_path="$path"
36861
36862  windows_path="$new_path"
36863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36864    unix_path=`$CYGPATH -u "$windows_path"`
36865    new_path="$unix_path"
36866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36868    new_path="$unix_path"
36869  fi
36870
36871
36872  # Now try to locate executable using which
36873  new_path=`$WHICH "$new_path" 2> /dev/null`
36874
36875  if test "x$new_path" = x; then
36876    # Oops. Which didn't find the executable.
36877    # The splitting of arguments from the executable at a space might have been incorrect,
36878    # since paths with space are more likely in Windows. Give it another try with the whole
36879    # argument.
36880    path="$complete"
36881    arguments="EOL"
36882    new_path="$path"
36883
36884  windows_path="$new_path"
36885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36886    unix_path=`$CYGPATH -u "$windows_path"`
36887    new_path="$unix_path"
36888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36890    new_path="$unix_path"
36891  fi
36892
36893
36894    new_path=`$WHICH "$new_path" 2> /dev/null`
36895    # bat and cmd files are not always considered executable in MSYS causing which
36896    # to not find them
36897    if test "x$new_path" = x \
36898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36900      new_path="$path"
36901
36902  windows_path="$new_path"
36903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36904    unix_path=`$CYGPATH -u "$windows_path"`
36905    new_path="$unix_path"
36906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36908    new_path="$unix_path"
36909  fi
36910
36911    fi
36912
36913    if test "x$new_path" = x; then
36914      # It's still not found. Now this is an unrecoverable error.
36915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36916$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36917      has_space=`$ECHO "$complete" | $GREP " "`
36918      if test "x$has_space" != x; then
36919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36921      fi
36922      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36923    fi
36924  fi
36925
36926  # Now new_path has a complete unix path to the binary
36927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36928    # Keep paths in /bin as-is, but remove trailing .exe if any
36929    new_path="${new_path/%.exe/}"
36930    # Do not save /bin paths to all_fixpath_prefixes!
36931  else
36932    # Not in mixed or Windows style, start by that.
36933    new_path=`cmd //c echo $new_path`
36934
36935  input_path="$new_path"
36936  # Check if we need to convert this using DOS-style short mode. If the path
36937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36938  # take no chances and rewrite it.
36939  # Note: m4 eats our [], so we need to use [ and ] instead.
36940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36941  if test "x$has_forbidden_chars" != x; then
36942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36944  fi
36945
36946    # Output is in $new_path
36947
36948  windows_path="$new_path"
36949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36950    unix_path=`$CYGPATH -u "$windows_path"`
36951    new_path="$unix_path"
36952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36954    new_path="$unix_path"
36955  fi
36956
36957    # remove trailing .exe if any
36958    new_path="${new_path/%.exe/}"
36959
36960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36962  fi
36963
36964    else
36965      # We're on a unix platform. Hooray! :)
36966      # First separate the path from the arguments. This will split at the first
36967      # space.
36968      complete="$MCS"
36969      path="${complete%% *}"
36970      tmp="$complete EOL"
36971      arguments="${tmp#* }"
36972
36973      # Cannot rely on the command "which" here since it doesn't always work.
36974      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36975      if test -z "$is_absolute_path"; then
36976        # Path to executable is not absolute. Find it.
36977        IFS_save="$IFS"
36978        IFS=:
36979        for p in $PATH; do
36980          if test -f "$p/$path" && test -x "$p/$path"; then
36981            new_path="$p/$path"
36982            break
36983          fi
36984        done
36985        IFS="$IFS_save"
36986      else
36987        # This is an absolute path, we can use it without further modifications.
36988        new_path="$path"
36989      fi
36990
36991      if test "x$new_path" = x; then
36992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36993$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36994        has_space=`$ECHO "$complete" | $GREP " "`
36995        if test "x$has_space" != x; then
36996          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36998        fi
36999        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37000      fi
37001    fi
37002
37003    # Now join together the path and the arguments once again
37004    if test "x$arguments" != xEOL; then
37005      new_complete="$new_path ${arguments% *}"
37006    else
37007      new_complete="$new_path"
37008    fi
37009
37010    if test "x$complete" != "x$new_complete"; then
37011      MCS="$new_complete"
37012      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37013$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37014    fi
37015  fi
37016
37017  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37018    # FIXME: we should unify this with the solaris case above.
37019
37020
37021  # Publish this variable in the help.
37022
37023
37024  if test "x$STRIP" = x; then
37025    # The variable is not set by user, try to locate tool using the code snippet
37026    if test -n "$ac_tool_prefix"; then
37027  for ac_prog in strip
37028  do
37029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37032$as_echo_n "checking for $ac_word... " >&6; }
37033if ${ac_cv_prog_STRIP+:} false; then :
37034  $as_echo_n "(cached) " >&6
37035else
37036  if test -n "$STRIP"; then
37037  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37038else
37039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37040for as_dir in $PATH
37041do
37042  IFS=$as_save_IFS
37043  test -z "$as_dir" && as_dir=.
37044    for ac_exec_ext in '' $ac_executable_extensions; do
37045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37046    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37048    break 2
37049  fi
37050done
37051  done
37052IFS=$as_save_IFS
37053
37054fi
37055fi
37056STRIP=$ac_cv_prog_STRIP
37057if test -n "$STRIP"; then
37058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37059$as_echo "$STRIP" >&6; }
37060else
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37062$as_echo "no" >&6; }
37063fi
37064
37065
37066    test -n "$STRIP" && break
37067  done
37068fi
37069if test -z "$STRIP"; then
37070  ac_ct_STRIP=$STRIP
37071  for ac_prog in strip
37072do
37073  # Extract the first word of "$ac_prog", so it can be a program name with args.
37074set dummy $ac_prog; ac_word=$2
37075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37076$as_echo_n "checking for $ac_word... " >&6; }
37077if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37078  $as_echo_n "(cached) " >&6
37079else
37080  if test -n "$ac_ct_STRIP"; then
37081  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37082else
37083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37084for as_dir in $PATH
37085do
37086  IFS=$as_save_IFS
37087  test -z "$as_dir" && as_dir=.
37088    for ac_exec_ext in '' $ac_executable_extensions; do
37089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37090    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37092    break 2
37093  fi
37094done
37095  done
37096IFS=$as_save_IFS
37097
37098fi
37099fi
37100ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37101if test -n "$ac_ct_STRIP"; then
37102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37103$as_echo "$ac_ct_STRIP" >&6; }
37104else
37105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37106$as_echo "no" >&6; }
37107fi
37108
37109
37110  test -n "$ac_ct_STRIP" && break
37111done
37112
37113  if test "x$ac_ct_STRIP" = x; then
37114    STRIP=""
37115  else
37116    case $cross_compiling:$ac_tool_warned in
37117yes:)
37118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37120ac_tool_warned=yes ;;
37121esac
37122    STRIP=$ac_ct_STRIP
37123  fi
37124fi
37125
37126  else
37127    # The variable is set, but is it from the command line or the environment?
37128
37129    # Try to remove the string !STRIP! from our list.
37130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37132      # If it failed, the variable was not from the command line. Ignore it,
37133      # but warn the user (except for BASH, which is always set by the calling BASH).
37134      if test "xSTRIP" != xBASH; then
37135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37136$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37137      fi
37138      # Try to locate tool using the code snippet
37139      if test -n "$ac_tool_prefix"; then
37140  for ac_prog in strip
37141  do
37142    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37143set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37145$as_echo_n "checking for $ac_word... " >&6; }
37146if ${ac_cv_prog_STRIP+:} false; then :
37147  $as_echo_n "(cached) " >&6
37148else
37149  if test -n "$STRIP"; then
37150  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37151else
37152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37153for as_dir in $PATH
37154do
37155  IFS=$as_save_IFS
37156  test -z "$as_dir" && as_dir=.
37157    for ac_exec_ext in '' $ac_executable_extensions; do
37158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37159    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37161    break 2
37162  fi
37163done
37164  done
37165IFS=$as_save_IFS
37166
37167fi
37168fi
37169STRIP=$ac_cv_prog_STRIP
37170if test -n "$STRIP"; then
37171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37172$as_echo "$STRIP" >&6; }
37173else
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37175$as_echo "no" >&6; }
37176fi
37177
37178
37179    test -n "$STRIP" && break
37180  done
37181fi
37182if test -z "$STRIP"; then
37183  ac_ct_STRIP=$STRIP
37184  for ac_prog in strip
37185do
37186  # Extract the first word of "$ac_prog", so it can be a program name with args.
37187set dummy $ac_prog; ac_word=$2
37188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37189$as_echo_n "checking for $ac_word... " >&6; }
37190if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37191  $as_echo_n "(cached) " >&6
37192else
37193  if test -n "$ac_ct_STRIP"; then
37194  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37195else
37196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37197for as_dir in $PATH
37198do
37199  IFS=$as_save_IFS
37200  test -z "$as_dir" && as_dir=.
37201    for ac_exec_ext in '' $ac_executable_extensions; do
37202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37203    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37205    break 2
37206  fi
37207done
37208  done
37209IFS=$as_save_IFS
37210
37211fi
37212fi
37213ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37214if test -n "$ac_ct_STRIP"; then
37215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37216$as_echo "$ac_ct_STRIP" >&6; }
37217else
37218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37219$as_echo "no" >&6; }
37220fi
37221
37222
37223  test -n "$ac_ct_STRIP" && break
37224done
37225
37226  if test "x$ac_ct_STRIP" = x; then
37227    STRIP=""
37228  else
37229    case $cross_compiling:$ac_tool_warned in
37230yes:)
37231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37233ac_tool_warned=yes ;;
37234esac
37235    STRIP=$ac_ct_STRIP
37236  fi
37237fi
37238
37239    else
37240      # If it succeeded, then it was overridden by the user. We will use it
37241      # for the tool.
37242
37243      # First remove it from the list of overridden variables, so we can test
37244      # for unknown variables in the end.
37245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37246
37247      # Check if the provided tool contains a complete path.
37248      tool_specified="$STRIP"
37249      tool_basename="${tool_specified##*/}"
37250      if test "x$tool_basename" = "x$tool_specified"; then
37251        # A command without a complete path is provided, search $PATH.
37252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37253$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37254        # Extract the first word of "$tool_basename", so it can be a program name with args.
37255set dummy $tool_basename; ac_word=$2
37256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37257$as_echo_n "checking for $ac_word... " >&6; }
37258if ${ac_cv_path_STRIP+:} false; then :
37259  $as_echo_n "(cached) " >&6
37260else
37261  case $STRIP in
37262  [\\/]* | ?:[\\/]*)
37263  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37264  ;;
37265  *)
37266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37267for as_dir in $PATH
37268do
37269  IFS=$as_save_IFS
37270  test -z "$as_dir" && as_dir=.
37271    for ac_exec_ext in '' $ac_executable_extensions; do
37272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37273    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37275    break 2
37276  fi
37277done
37278  done
37279IFS=$as_save_IFS
37280
37281  ;;
37282esac
37283fi
37284STRIP=$ac_cv_path_STRIP
37285if test -n "$STRIP"; then
37286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37287$as_echo "$STRIP" >&6; }
37288else
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37290$as_echo "no" >&6; }
37291fi
37292
37293
37294        if test "x$STRIP" = x; then
37295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37296        fi
37297      else
37298        # Otherwise we believe it is a complete path. Use it as it is.
37299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37300$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37302$as_echo_n "checking for STRIP... " >&6; }
37303        if test ! -x "$tool_specified"; then
37304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37305$as_echo "not found" >&6; }
37306          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37307        fi
37308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37309$as_echo "$tool_specified" >&6; }
37310      fi
37311    fi
37312  fi
37313
37314
37315
37316  # Only process if variable expands to non-empty
37317
37318  if test "x$STRIP" != x; then
37319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37320
37321  # First separate the path from the arguments. This will split at the first
37322  # space.
37323  complete="$STRIP"
37324  path="${complete%% *}"
37325  tmp="$complete EOL"
37326  arguments="${tmp#* }"
37327
37328  # Input might be given as Windows format, start by converting to
37329  # unix format.
37330  new_path=`$CYGPATH -u "$path"`
37331
37332  # Now try to locate executable using which
37333  new_path=`$WHICH "$new_path" 2> /dev/null`
37334  # bat and cmd files are not always considered executable in cygwin causing which
37335  # to not find them
37336  if test "x$new_path" = x \
37337      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37338      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37339    new_path=`$CYGPATH -u "$path"`
37340  fi
37341  if test "x$new_path" = x; then
37342    # Oops. Which didn't find the executable.
37343    # The splitting of arguments from the executable at a space might have been incorrect,
37344    # since paths with space are more likely in Windows. Give it another try with the whole
37345    # argument.
37346    path="$complete"
37347    arguments="EOL"
37348    new_path=`$CYGPATH -u "$path"`
37349    new_path=`$WHICH "$new_path" 2> /dev/null`
37350    # bat and cmd files are not always considered executable in cygwin causing which
37351    # to not find them
37352    if test "x$new_path" = x \
37353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37355      new_path=`$CYGPATH -u "$path"`
37356    fi
37357    if test "x$new_path" = x; then
37358      # It's still not found. Now this is an unrecoverable error.
37359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37360$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37361      has_space=`$ECHO "$complete" | $GREP " "`
37362      if test "x$has_space" != x; then
37363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37365      fi
37366      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37367    fi
37368  fi
37369
37370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37373  # "foo.exe" is OK but "foo" is an error.
37374  #
37375  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37376  # It is also a way to make sure we got the proper file name for the real test later on.
37377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37378  if test "x$test_shortpath" = x; then
37379    # Short path failed, file does not exist as specified.
37380    # Try adding .exe or .cmd
37381    if test -f "${new_path}.exe"; then
37382      input_to_shortpath="${new_path}.exe"
37383    elif test -f "${new_path}.cmd"; then
37384      input_to_shortpath="${new_path}.cmd"
37385    else
37386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37387$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37390      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37391    fi
37392  else
37393    input_to_shortpath="$new_path"
37394  fi
37395
37396  # Call helper function which possibly converts this using DOS-style short mode.
37397  # If so, the updated path is stored in $new_path.
37398  new_path="$input_to_shortpath"
37399
37400  input_path="$input_to_shortpath"
37401  # Check if we need to convert this using DOS-style short mode. If the path
37402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37403  # take no chances and rewrite it.
37404  # Note: m4 eats our [], so we need to use [ and ] instead.
37405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37406  if test "x$has_forbidden_chars" != x; then
37407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37411      # Going to short mode and back again did indeed matter. Since short mode is
37412      # case insensitive, let's make it lowercase to improve readability.
37413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37414      # Now convert it back to Unix-style (cygpath)
37415      input_path=`$CYGPATH -u "$shortmode_path"`
37416      new_path="$input_path"
37417    fi
37418  fi
37419
37420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37421  if test "x$test_cygdrive_prefix" = x; then
37422    # As a simple fix, exclude /usr/bin since it's not a real path.
37423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37425      # a path prefixed by /cygdrive for fixpath to work.
37426      new_path="$CYGWIN_ROOT_PATH$input_path"
37427    fi
37428  fi
37429
37430  # remove trailing .exe if any
37431  new_path="${new_path/%.exe/}"
37432
37433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37434
37435  # First separate the path from the arguments. This will split at the first
37436  # space.
37437  complete="$STRIP"
37438  path="${complete%% *}"
37439  tmp="$complete EOL"
37440  arguments="${tmp#* }"
37441
37442  # Input might be given as Windows format, start by converting to
37443  # unix format.
37444  new_path="$path"
37445
37446  windows_path="$new_path"
37447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37448    unix_path=`$CYGPATH -u "$windows_path"`
37449    new_path="$unix_path"
37450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37452    new_path="$unix_path"
37453  fi
37454
37455
37456  # Now try to locate executable using which
37457  new_path=`$WHICH "$new_path" 2> /dev/null`
37458
37459  if test "x$new_path" = x; then
37460    # Oops. Which didn't find the executable.
37461    # The splitting of arguments from the executable at a space might have been incorrect,
37462    # since paths with space are more likely in Windows. Give it another try with the whole
37463    # argument.
37464    path="$complete"
37465    arguments="EOL"
37466    new_path="$path"
37467
37468  windows_path="$new_path"
37469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37470    unix_path=`$CYGPATH -u "$windows_path"`
37471    new_path="$unix_path"
37472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37474    new_path="$unix_path"
37475  fi
37476
37477
37478    new_path=`$WHICH "$new_path" 2> /dev/null`
37479    # bat and cmd files are not always considered executable in MSYS causing which
37480    # to not find them
37481    if test "x$new_path" = x \
37482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37484      new_path="$path"
37485
37486  windows_path="$new_path"
37487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37488    unix_path=`$CYGPATH -u "$windows_path"`
37489    new_path="$unix_path"
37490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37492    new_path="$unix_path"
37493  fi
37494
37495    fi
37496
37497    if test "x$new_path" = x; then
37498      # It's still not found. Now this is an unrecoverable error.
37499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37500$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37501      has_space=`$ECHO "$complete" | $GREP " "`
37502      if test "x$has_space" != x; then
37503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37505      fi
37506      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37507    fi
37508  fi
37509
37510  # Now new_path has a complete unix path to the binary
37511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37512    # Keep paths in /bin as-is, but remove trailing .exe if any
37513    new_path="${new_path/%.exe/}"
37514    # Do not save /bin paths to all_fixpath_prefixes!
37515  else
37516    # Not in mixed or Windows style, start by that.
37517    new_path=`cmd //c echo $new_path`
37518
37519  input_path="$new_path"
37520  # Check if we need to convert this using DOS-style short mode. If the path
37521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37522  # take no chances and rewrite it.
37523  # Note: m4 eats our [], so we need to use [ and ] instead.
37524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37525  if test "x$has_forbidden_chars" != x; then
37526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37528  fi
37529
37530    # Output is in $new_path
37531
37532  windows_path="$new_path"
37533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37534    unix_path=`$CYGPATH -u "$windows_path"`
37535    new_path="$unix_path"
37536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37538    new_path="$unix_path"
37539  fi
37540
37541    # remove trailing .exe if any
37542    new_path="${new_path/%.exe/}"
37543
37544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37546  fi
37547
37548    else
37549      # We're on a unix platform. Hooray! :)
37550      # First separate the path from the arguments. This will split at the first
37551      # space.
37552      complete="$STRIP"
37553      path="${complete%% *}"
37554      tmp="$complete EOL"
37555      arguments="${tmp#* }"
37556
37557      # Cannot rely on the command "which" here since it doesn't always work.
37558      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37559      if test -z "$is_absolute_path"; then
37560        # Path to executable is not absolute. Find it.
37561        IFS_save="$IFS"
37562        IFS=:
37563        for p in $PATH; do
37564          if test -f "$p/$path" && test -x "$p/$path"; then
37565            new_path="$p/$path"
37566            break
37567          fi
37568        done
37569        IFS="$IFS_save"
37570      else
37571        # This is an absolute path, we can use it without further modifications.
37572        new_path="$path"
37573      fi
37574
37575      if test "x$new_path" = x; then
37576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37577$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37578        has_space=`$ECHO "$complete" | $GREP " "`
37579        if test "x$has_space" != x; then
37580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37582        fi
37583        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37584      fi
37585    fi
37586
37587    # Now join together the path and the arguments once again
37588    if test "x$arguments" != xEOL; then
37589      new_complete="$new_path ${arguments% *}"
37590    else
37591      new_complete="$new_path"
37592    fi
37593
37594    if test "x$complete" != "x$new_complete"; then
37595      STRIP="$new_complete"
37596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37597$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37598    fi
37599  fi
37600
37601
37602
37603  # Publish this variable in the help.
37604
37605
37606  if test "x$NM" = x; then
37607    # The variable is not set by user, try to locate tool using the code snippet
37608    if test -n "$ac_tool_prefix"; then
37609  for ac_prog in nm
37610  do
37611    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37612set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37614$as_echo_n "checking for $ac_word... " >&6; }
37615if ${ac_cv_prog_NM+:} false; then :
37616  $as_echo_n "(cached) " >&6
37617else
37618  if test -n "$NM"; then
37619  ac_cv_prog_NM="$NM" # Let the user override the test.
37620else
37621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37622for as_dir in $PATH
37623do
37624  IFS=$as_save_IFS
37625  test -z "$as_dir" && as_dir=.
37626    for ac_exec_ext in '' $ac_executable_extensions; do
37627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37628    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37630    break 2
37631  fi
37632done
37633  done
37634IFS=$as_save_IFS
37635
37636fi
37637fi
37638NM=$ac_cv_prog_NM
37639if test -n "$NM"; then
37640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37641$as_echo "$NM" >&6; }
37642else
37643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37644$as_echo "no" >&6; }
37645fi
37646
37647
37648    test -n "$NM" && break
37649  done
37650fi
37651if test -z "$NM"; then
37652  ac_ct_NM=$NM
37653  for ac_prog in nm
37654do
37655  # Extract the first word of "$ac_prog", so it can be a program name with args.
37656set dummy $ac_prog; ac_word=$2
37657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37658$as_echo_n "checking for $ac_word... " >&6; }
37659if ${ac_cv_prog_ac_ct_NM+:} false; then :
37660  $as_echo_n "(cached) " >&6
37661else
37662  if test -n "$ac_ct_NM"; then
37663  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37664else
37665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37666for as_dir in $PATH
37667do
37668  IFS=$as_save_IFS
37669  test -z "$as_dir" && as_dir=.
37670    for ac_exec_ext in '' $ac_executable_extensions; do
37671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37672    ac_cv_prog_ac_ct_NM="$ac_prog"
37673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37674    break 2
37675  fi
37676done
37677  done
37678IFS=$as_save_IFS
37679
37680fi
37681fi
37682ac_ct_NM=$ac_cv_prog_ac_ct_NM
37683if test -n "$ac_ct_NM"; then
37684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37685$as_echo "$ac_ct_NM" >&6; }
37686else
37687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37688$as_echo "no" >&6; }
37689fi
37690
37691
37692  test -n "$ac_ct_NM" && break
37693done
37694
37695  if test "x$ac_ct_NM" = x; then
37696    NM=""
37697  else
37698    case $cross_compiling:$ac_tool_warned in
37699yes:)
37700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37702ac_tool_warned=yes ;;
37703esac
37704    NM=$ac_ct_NM
37705  fi
37706fi
37707
37708  else
37709    # The variable is set, but is it from the command line or the environment?
37710
37711    # Try to remove the string !NM! from our list.
37712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37714      # If it failed, the variable was not from the command line. Ignore it,
37715      # but warn the user (except for BASH, which is always set by the calling BASH).
37716      if test "xNM" != xBASH; then
37717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37718$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37719      fi
37720      # Try to locate tool using the code snippet
37721      if test -n "$ac_tool_prefix"; then
37722  for ac_prog in nm
37723  do
37724    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37725set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37727$as_echo_n "checking for $ac_word... " >&6; }
37728if ${ac_cv_prog_NM+:} false; then :
37729  $as_echo_n "(cached) " >&6
37730else
37731  if test -n "$NM"; then
37732  ac_cv_prog_NM="$NM" # Let the user override the test.
37733else
37734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37735for as_dir in $PATH
37736do
37737  IFS=$as_save_IFS
37738  test -z "$as_dir" && as_dir=.
37739    for ac_exec_ext in '' $ac_executable_extensions; do
37740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37741    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37743    break 2
37744  fi
37745done
37746  done
37747IFS=$as_save_IFS
37748
37749fi
37750fi
37751NM=$ac_cv_prog_NM
37752if test -n "$NM"; then
37753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37754$as_echo "$NM" >&6; }
37755else
37756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37757$as_echo "no" >&6; }
37758fi
37759
37760
37761    test -n "$NM" && break
37762  done
37763fi
37764if test -z "$NM"; then
37765  ac_ct_NM=$NM
37766  for ac_prog in nm
37767do
37768  # Extract the first word of "$ac_prog", so it can be a program name with args.
37769set dummy $ac_prog; ac_word=$2
37770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37771$as_echo_n "checking for $ac_word... " >&6; }
37772if ${ac_cv_prog_ac_ct_NM+:} false; then :
37773  $as_echo_n "(cached) " >&6
37774else
37775  if test -n "$ac_ct_NM"; then
37776  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37777else
37778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37779for as_dir in $PATH
37780do
37781  IFS=$as_save_IFS
37782  test -z "$as_dir" && as_dir=.
37783    for ac_exec_ext in '' $ac_executable_extensions; do
37784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37785    ac_cv_prog_ac_ct_NM="$ac_prog"
37786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37787    break 2
37788  fi
37789done
37790  done
37791IFS=$as_save_IFS
37792
37793fi
37794fi
37795ac_ct_NM=$ac_cv_prog_ac_ct_NM
37796if test -n "$ac_ct_NM"; then
37797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37798$as_echo "$ac_ct_NM" >&6; }
37799else
37800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37801$as_echo "no" >&6; }
37802fi
37803
37804
37805  test -n "$ac_ct_NM" && break
37806done
37807
37808  if test "x$ac_ct_NM" = x; then
37809    NM=""
37810  else
37811    case $cross_compiling:$ac_tool_warned in
37812yes:)
37813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37815ac_tool_warned=yes ;;
37816esac
37817    NM=$ac_ct_NM
37818  fi
37819fi
37820
37821    else
37822      # If it succeeded, then it was overridden by the user. We will use it
37823      # for the tool.
37824
37825      # First remove it from the list of overridden variables, so we can test
37826      # for unknown variables in the end.
37827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37828
37829      # Check if the provided tool contains a complete path.
37830      tool_specified="$NM"
37831      tool_basename="${tool_specified##*/}"
37832      if test "x$tool_basename" = "x$tool_specified"; then
37833        # A command without a complete path is provided, search $PATH.
37834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37835$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37836        # Extract the first word of "$tool_basename", so it can be a program name with args.
37837set dummy $tool_basename; ac_word=$2
37838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37839$as_echo_n "checking for $ac_word... " >&6; }
37840if ${ac_cv_path_NM+:} false; then :
37841  $as_echo_n "(cached) " >&6
37842else
37843  case $NM in
37844  [\\/]* | ?:[\\/]*)
37845  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37846  ;;
37847  *)
37848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37849for as_dir in $PATH
37850do
37851  IFS=$as_save_IFS
37852  test -z "$as_dir" && as_dir=.
37853    for ac_exec_ext in '' $ac_executable_extensions; do
37854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37855    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37857    break 2
37858  fi
37859done
37860  done
37861IFS=$as_save_IFS
37862
37863  ;;
37864esac
37865fi
37866NM=$ac_cv_path_NM
37867if test -n "$NM"; then
37868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37869$as_echo "$NM" >&6; }
37870else
37871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37872$as_echo "no" >&6; }
37873fi
37874
37875
37876        if test "x$NM" = x; then
37877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37878        fi
37879      else
37880        # Otherwise we believe it is a complete path. Use it as it is.
37881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37882$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37884$as_echo_n "checking for NM... " >&6; }
37885        if test ! -x "$tool_specified"; then
37886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37887$as_echo "not found" >&6; }
37888          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37889        fi
37890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37891$as_echo "$tool_specified" >&6; }
37892      fi
37893    fi
37894  fi
37895
37896
37897
37898  # Only process if variable expands to non-empty
37899
37900  if test "x$NM" != x; then
37901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37902
37903  # First separate the path from the arguments. This will split at the first
37904  # space.
37905  complete="$NM"
37906  path="${complete%% *}"
37907  tmp="$complete EOL"
37908  arguments="${tmp#* }"
37909
37910  # Input might be given as Windows format, start by converting to
37911  # unix format.
37912  new_path=`$CYGPATH -u "$path"`
37913
37914  # Now try to locate executable using which
37915  new_path=`$WHICH "$new_path" 2> /dev/null`
37916  # bat and cmd files are not always considered executable in cygwin causing which
37917  # to not find them
37918  if test "x$new_path" = x \
37919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37921    new_path=`$CYGPATH -u "$path"`
37922  fi
37923  if test "x$new_path" = x; then
37924    # Oops. Which didn't find the executable.
37925    # The splitting of arguments from the executable at a space might have been incorrect,
37926    # since paths with space are more likely in Windows. Give it another try with the whole
37927    # argument.
37928    path="$complete"
37929    arguments="EOL"
37930    new_path=`$CYGPATH -u "$path"`
37931    new_path=`$WHICH "$new_path" 2> /dev/null`
37932    # bat and cmd files are not always considered executable in cygwin causing which
37933    # to not find them
37934    if test "x$new_path" = x \
37935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37937      new_path=`$CYGPATH -u "$path"`
37938    fi
37939    if test "x$new_path" = x; then
37940      # It's still not found. Now this is an unrecoverable error.
37941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37942$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37943      has_space=`$ECHO "$complete" | $GREP " "`
37944      if test "x$has_space" != x; then
37945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37947      fi
37948      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37949    fi
37950  fi
37951
37952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37955  # "foo.exe" is OK but "foo" is an error.
37956  #
37957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37958  # It is also a way to make sure we got the proper file name for the real test later on.
37959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37960  if test "x$test_shortpath" = x; then
37961    # Short path failed, file does not exist as specified.
37962    # Try adding .exe or .cmd
37963    if test -f "${new_path}.exe"; then
37964      input_to_shortpath="${new_path}.exe"
37965    elif test -f "${new_path}.cmd"; then
37966      input_to_shortpath="${new_path}.cmd"
37967    else
37968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37969$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37972      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37973    fi
37974  else
37975    input_to_shortpath="$new_path"
37976  fi
37977
37978  # Call helper function which possibly converts this using DOS-style short mode.
37979  # If so, the updated path is stored in $new_path.
37980  new_path="$input_to_shortpath"
37981
37982  input_path="$input_to_shortpath"
37983  # Check if we need to convert this using DOS-style short mode. If the path
37984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37985  # take no chances and rewrite it.
37986  # Note: m4 eats our [], so we need to use [ and ] instead.
37987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37988  if test "x$has_forbidden_chars" != x; then
37989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37993      # Going to short mode and back again did indeed matter. Since short mode is
37994      # case insensitive, let's make it lowercase to improve readability.
37995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37996      # Now convert it back to Unix-style (cygpath)
37997      input_path=`$CYGPATH -u "$shortmode_path"`
37998      new_path="$input_path"
37999    fi
38000  fi
38001
38002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38003  if test "x$test_cygdrive_prefix" = x; then
38004    # As a simple fix, exclude /usr/bin since it's not a real path.
38005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38007      # a path prefixed by /cygdrive for fixpath to work.
38008      new_path="$CYGWIN_ROOT_PATH$input_path"
38009    fi
38010  fi
38011
38012  # remove trailing .exe if any
38013  new_path="${new_path/%.exe/}"
38014
38015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38016
38017  # First separate the path from the arguments. This will split at the first
38018  # space.
38019  complete="$NM"
38020  path="${complete%% *}"
38021  tmp="$complete EOL"
38022  arguments="${tmp#* }"
38023
38024  # Input might be given as Windows format, start by converting to
38025  # unix format.
38026  new_path="$path"
38027
38028  windows_path="$new_path"
38029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38030    unix_path=`$CYGPATH -u "$windows_path"`
38031    new_path="$unix_path"
38032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38034    new_path="$unix_path"
38035  fi
38036
38037
38038  # Now try to locate executable using which
38039  new_path=`$WHICH "$new_path" 2> /dev/null`
38040
38041  if test "x$new_path" = x; then
38042    # Oops. Which didn't find the executable.
38043    # The splitting of arguments from the executable at a space might have been incorrect,
38044    # since paths with space are more likely in Windows. Give it another try with the whole
38045    # argument.
38046    path="$complete"
38047    arguments="EOL"
38048    new_path="$path"
38049
38050  windows_path="$new_path"
38051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38052    unix_path=`$CYGPATH -u "$windows_path"`
38053    new_path="$unix_path"
38054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38056    new_path="$unix_path"
38057  fi
38058
38059
38060    new_path=`$WHICH "$new_path" 2> /dev/null`
38061    # bat and cmd files are not always considered executable in MSYS causing which
38062    # to not find them
38063    if test "x$new_path" = x \
38064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38066      new_path="$path"
38067
38068  windows_path="$new_path"
38069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38070    unix_path=`$CYGPATH -u "$windows_path"`
38071    new_path="$unix_path"
38072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38074    new_path="$unix_path"
38075  fi
38076
38077    fi
38078
38079    if test "x$new_path" = x; then
38080      # It's still not found. Now this is an unrecoverable error.
38081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38082$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38083      has_space=`$ECHO "$complete" | $GREP " "`
38084      if test "x$has_space" != x; then
38085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38087      fi
38088      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38089    fi
38090  fi
38091
38092  # Now new_path has a complete unix path to the binary
38093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38094    # Keep paths in /bin as-is, but remove trailing .exe if any
38095    new_path="${new_path/%.exe/}"
38096    # Do not save /bin paths to all_fixpath_prefixes!
38097  else
38098    # Not in mixed or Windows style, start by that.
38099    new_path=`cmd //c echo $new_path`
38100
38101  input_path="$new_path"
38102  # Check if we need to convert this using DOS-style short mode. If the path
38103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38104  # take no chances and rewrite it.
38105  # Note: m4 eats our [], so we need to use [ and ] instead.
38106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38107  if test "x$has_forbidden_chars" != x; then
38108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38110  fi
38111
38112    # Output is in $new_path
38113
38114  windows_path="$new_path"
38115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38116    unix_path=`$CYGPATH -u "$windows_path"`
38117    new_path="$unix_path"
38118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38120    new_path="$unix_path"
38121  fi
38122
38123    # remove trailing .exe if any
38124    new_path="${new_path/%.exe/}"
38125
38126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38128  fi
38129
38130    else
38131      # We're on a unix platform. Hooray! :)
38132      # First separate the path from the arguments. This will split at the first
38133      # space.
38134      complete="$NM"
38135      path="${complete%% *}"
38136      tmp="$complete EOL"
38137      arguments="${tmp#* }"
38138
38139      # Cannot rely on the command "which" here since it doesn't always work.
38140      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38141      if test -z "$is_absolute_path"; then
38142        # Path to executable is not absolute. Find it.
38143        IFS_save="$IFS"
38144        IFS=:
38145        for p in $PATH; do
38146          if test -f "$p/$path" && test -x "$p/$path"; then
38147            new_path="$p/$path"
38148            break
38149          fi
38150        done
38151        IFS="$IFS_save"
38152      else
38153        # This is an absolute path, we can use it without further modifications.
38154        new_path="$path"
38155      fi
38156
38157      if test "x$new_path" = x; then
38158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38159$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38160        has_space=`$ECHO "$complete" | $GREP " "`
38161        if test "x$has_space" != x; then
38162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38164        fi
38165        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38166      fi
38167    fi
38168
38169    # Now join together the path and the arguments once again
38170    if test "x$arguments" != xEOL; then
38171      new_complete="$new_path ${arguments% *}"
38172    else
38173      new_complete="$new_path"
38174    fi
38175
38176    if test "x$complete" != "x$new_complete"; then
38177      NM="$new_complete"
38178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38179$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38180    fi
38181  fi
38182
38183    GNM="$NM"
38184
38185  fi
38186
38187  # objcopy is used for moving debug symbols to separate files when
38188  # full debug symbols are enabled.
38189  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38190
38191
38192  # Publish this variable in the help.
38193
38194
38195  if test "x$OBJCOPY" = x; then
38196    # The variable is not set by user, try to locate tool using the code snippet
38197    if test -n "$ac_tool_prefix"; then
38198  for ac_prog in gobjcopy objcopy
38199  do
38200    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38203$as_echo_n "checking for $ac_word... " >&6; }
38204if ${ac_cv_prog_OBJCOPY+:} false; then :
38205  $as_echo_n "(cached) " >&6
38206else
38207  if test -n "$OBJCOPY"; then
38208  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38209else
38210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38211for as_dir in $PATH
38212do
38213  IFS=$as_save_IFS
38214  test -z "$as_dir" && as_dir=.
38215    for ac_exec_ext in '' $ac_executable_extensions; do
38216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38217    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38219    break 2
38220  fi
38221done
38222  done
38223IFS=$as_save_IFS
38224
38225fi
38226fi
38227OBJCOPY=$ac_cv_prog_OBJCOPY
38228if test -n "$OBJCOPY"; then
38229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38230$as_echo "$OBJCOPY" >&6; }
38231else
38232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38233$as_echo "no" >&6; }
38234fi
38235
38236
38237    test -n "$OBJCOPY" && break
38238  done
38239fi
38240if test -z "$OBJCOPY"; then
38241  ac_ct_OBJCOPY=$OBJCOPY
38242  for ac_prog in gobjcopy objcopy
38243do
38244  # Extract the first word of "$ac_prog", so it can be a program name with args.
38245set dummy $ac_prog; ac_word=$2
38246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38247$as_echo_n "checking for $ac_word... " >&6; }
38248if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38249  $as_echo_n "(cached) " >&6
38250else
38251  if test -n "$ac_ct_OBJCOPY"; then
38252  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38253else
38254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38255for as_dir in $PATH
38256do
38257  IFS=$as_save_IFS
38258  test -z "$as_dir" && as_dir=.
38259    for ac_exec_ext in '' $ac_executable_extensions; do
38260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38261    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38263    break 2
38264  fi
38265done
38266  done
38267IFS=$as_save_IFS
38268
38269fi
38270fi
38271ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38272if test -n "$ac_ct_OBJCOPY"; then
38273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38274$as_echo "$ac_ct_OBJCOPY" >&6; }
38275else
38276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38277$as_echo "no" >&6; }
38278fi
38279
38280
38281  test -n "$ac_ct_OBJCOPY" && break
38282done
38283
38284  if test "x$ac_ct_OBJCOPY" = x; then
38285    OBJCOPY=""
38286  else
38287    case $cross_compiling:$ac_tool_warned in
38288yes:)
38289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38291ac_tool_warned=yes ;;
38292esac
38293    OBJCOPY=$ac_ct_OBJCOPY
38294  fi
38295fi
38296
38297  else
38298    # The variable is set, but is it from the command line or the environment?
38299
38300    # Try to remove the string !OBJCOPY! from our list.
38301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38303      # If it failed, the variable was not from the command line. Ignore it,
38304      # but warn the user (except for BASH, which is always set by the calling BASH).
38305      if test "xOBJCOPY" != xBASH; then
38306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38307$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38308      fi
38309      # Try to locate tool using the code snippet
38310      if test -n "$ac_tool_prefix"; then
38311  for ac_prog in gobjcopy objcopy
38312  do
38313    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38314set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38316$as_echo_n "checking for $ac_word... " >&6; }
38317if ${ac_cv_prog_OBJCOPY+:} false; then :
38318  $as_echo_n "(cached) " >&6
38319else
38320  if test -n "$OBJCOPY"; then
38321  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38322else
38323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38324for as_dir in $PATH
38325do
38326  IFS=$as_save_IFS
38327  test -z "$as_dir" && as_dir=.
38328    for ac_exec_ext in '' $ac_executable_extensions; do
38329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38330    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38332    break 2
38333  fi
38334done
38335  done
38336IFS=$as_save_IFS
38337
38338fi
38339fi
38340OBJCOPY=$ac_cv_prog_OBJCOPY
38341if test -n "$OBJCOPY"; then
38342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38343$as_echo "$OBJCOPY" >&6; }
38344else
38345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38346$as_echo "no" >&6; }
38347fi
38348
38349
38350    test -n "$OBJCOPY" && break
38351  done
38352fi
38353if test -z "$OBJCOPY"; then
38354  ac_ct_OBJCOPY=$OBJCOPY
38355  for ac_prog in gobjcopy objcopy
38356do
38357  # Extract the first word of "$ac_prog", so it can be a program name with args.
38358set dummy $ac_prog; ac_word=$2
38359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38360$as_echo_n "checking for $ac_word... " >&6; }
38361if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38362  $as_echo_n "(cached) " >&6
38363else
38364  if test -n "$ac_ct_OBJCOPY"; then
38365  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38366else
38367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38368for as_dir in $PATH
38369do
38370  IFS=$as_save_IFS
38371  test -z "$as_dir" && as_dir=.
38372    for ac_exec_ext in '' $ac_executable_extensions; do
38373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38374    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38376    break 2
38377  fi
38378done
38379  done
38380IFS=$as_save_IFS
38381
38382fi
38383fi
38384ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38385if test -n "$ac_ct_OBJCOPY"; then
38386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38387$as_echo "$ac_ct_OBJCOPY" >&6; }
38388else
38389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38390$as_echo "no" >&6; }
38391fi
38392
38393
38394  test -n "$ac_ct_OBJCOPY" && break
38395done
38396
38397  if test "x$ac_ct_OBJCOPY" = x; then
38398    OBJCOPY=""
38399  else
38400    case $cross_compiling:$ac_tool_warned in
38401yes:)
38402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38404ac_tool_warned=yes ;;
38405esac
38406    OBJCOPY=$ac_ct_OBJCOPY
38407  fi
38408fi
38409
38410    else
38411      # If it succeeded, then it was overridden by the user. We will use it
38412      # for the tool.
38413
38414      # First remove it from the list of overridden variables, so we can test
38415      # for unknown variables in the end.
38416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38417
38418      # Check if the provided tool contains a complete path.
38419      tool_specified="$OBJCOPY"
38420      tool_basename="${tool_specified##*/}"
38421      if test "x$tool_basename" = "x$tool_specified"; then
38422        # A command without a complete path is provided, search $PATH.
38423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38424$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38425        # Extract the first word of "$tool_basename", so it can be a program name with args.
38426set dummy $tool_basename; ac_word=$2
38427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38428$as_echo_n "checking for $ac_word... " >&6; }
38429if ${ac_cv_path_OBJCOPY+:} false; then :
38430  $as_echo_n "(cached) " >&6
38431else
38432  case $OBJCOPY in
38433  [\\/]* | ?:[\\/]*)
38434  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38435  ;;
38436  *)
38437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38438for as_dir in $PATH
38439do
38440  IFS=$as_save_IFS
38441  test -z "$as_dir" && as_dir=.
38442    for ac_exec_ext in '' $ac_executable_extensions; do
38443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38444    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38446    break 2
38447  fi
38448done
38449  done
38450IFS=$as_save_IFS
38451
38452  ;;
38453esac
38454fi
38455OBJCOPY=$ac_cv_path_OBJCOPY
38456if test -n "$OBJCOPY"; then
38457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38458$as_echo "$OBJCOPY" >&6; }
38459else
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38461$as_echo "no" >&6; }
38462fi
38463
38464
38465        if test "x$OBJCOPY" = x; then
38466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38467        fi
38468      else
38469        # Otherwise we believe it is a complete path. Use it as it is.
38470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38471$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38473$as_echo_n "checking for OBJCOPY... " >&6; }
38474        if test ! -x "$tool_specified"; then
38475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38476$as_echo "not found" >&6; }
38477          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38478        fi
38479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38480$as_echo "$tool_specified" >&6; }
38481      fi
38482    fi
38483  fi
38484
38485
38486    # Only call fixup if objcopy was found.
38487    if test -n "$OBJCOPY"; then
38488
38489  # Only process if variable expands to non-empty
38490
38491  if test "x$OBJCOPY" != x; then
38492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38493
38494  # First separate the path from the arguments. This will split at the first
38495  # space.
38496  complete="$OBJCOPY"
38497  path="${complete%% *}"
38498  tmp="$complete EOL"
38499  arguments="${tmp#* }"
38500
38501  # Input might be given as Windows format, start by converting to
38502  # unix format.
38503  new_path=`$CYGPATH -u "$path"`
38504
38505  # Now try to locate executable using which
38506  new_path=`$WHICH "$new_path" 2> /dev/null`
38507  # bat and cmd files are not always considered executable in cygwin causing which
38508  # to not find them
38509  if test "x$new_path" = x \
38510      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38511      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38512    new_path=`$CYGPATH -u "$path"`
38513  fi
38514  if test "x$new_path" = x; then
38515    # Oops. Which didn't find the executable.
38516    # The splitting of arguments from the executable at a space might have been incorrect,
38517    # since paths with space are more likely in Windows. Give it another try with the whole
38518    # argument.
38519    path="$complete"
38520    arguments="EOL"
38521    new_path=`$CYGPATH -u "$path"`
38522    new_path=`$WHICH "$new_path" 2> /dev/null`
38523    # bat and cmd files are not always considered executable in cygwin causing which
38524    # to not find them
38525    if test "x$new_path" = x \
38526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38528      new_path=`$CYGPATH -u "$path"`
38529    fi
38530    if test "x$new_path" = x; then
38531      # It's still not found. Now this is an unrecoverable error.
38532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38533$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38534      has_space=`$ECHO "$complete" | $GREP " "`
38535      if test "x$has_space" != x; then
38536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38538      fi
38539      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38540    fi
38541  fi
38542
38543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38546  # "foo.exe" is OK but "foo" is an error.
38547  #
38548  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38549  # It is also a way to make sure we got the proper file name for the real test later on.
38550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38551  if test "x$test_shortpath" = x; then
38552    # Short path failed, file does not exist as specified.
38553    # Try adding .exe or .cmd
38554    if test -f "${new_path}.exe"; then
38555      input_to_shortpath="${new_path}.exe"
38556    elif test -f "${new_path}.cmd"; then
38557      input_to_shortpath="${new_path}.cmd"
38558    else
38559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38560$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38561      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38562$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38563      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38564    fi
38565  else
38566    input_to_shortpath="$new_path"
38567  fi
38568
38569  # Call helper function which possibly converts this using DOS-style short mode.
38570  # If so, the updated path is stored in $new_path.
38571  new_path="$input_to_shortpath"
38572
38573  input_path="$input_to_shortpath"
38574  # Check if we need to convert this using DOS-style short mode. If the path
38575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38576  # take no chances and rewrite it.
38577  # Note: m4 eats our [], so we need to use [ and ] instead.
38578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38579  if test "x$has_forbidden_chars" != x; then
38580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38584      # Going to short mode and back again did indeed matter. Since short mode is
38585      # case insensitive, let's make it lowercase to improve readability.
38586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38587      # Now convert it back to Unix-style (cygpath)
38588      input_path=`$CYGPATH -u "$shortmode_path"`
38589      new_path="$input_path"
38590    fi
38591  fi
38592
38593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38594  if test "x$test_cygdrive_prefix" = x; then
38595    # As a simple fix, exclude /usr/bin since it's not a real path.
38596    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38598      # a path prefixed by /cygdrive for fixpath to work.
38599      new_path="$CYGWIN_ROOT_PATH$input_path"
38600    fi
38601  fi
38602
38603  # remove trailing .exe if any
38604  new_path="${new_path/%.exe/}"
38605
38606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607
38608  # First separate the path from the arguments. This will split at the first
38609  # space.
38610  complete="$OBJCOPY"
38611  path="${complete%% *}"
38612  tmp="$complete EOL"
38613  arguments="${tmp#* }"
38614
38615  # Input might be given as Windows format, start by converting to
38616  # unix format.
38617  new_path="$path"
38618
38619  windows_path="$new_path"
38620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38621    unix_path=`$CYGPATH -u "$windows_path"`
38622    new_path="$unix_path"
38623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38625    new_path="$unix_path"
38626  fi
38627
38628
38629  # Now try to locate executable using which
38630  new_path=`$WHICH "$new_path" 2> /dev/null`
38631
38632  if test "x$new_path" = x; then
38633    # Oops. Which didn't find the executable.
38634    # The splitting of arguments from the executable at a space might have been incorrect,
38635    # since paths with space are more likely in Windows. Give it another try with the whole
38636    # argument.
38637    path="$complete"
38638    arguments="EOL"
38639    new_path="$path"
38640
38641  windows_path="$new_path"
38642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38643    unix_path=`$CYGPATH -u "$windows_path"`
38644    new_path="$unix_path"
38645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38647    new_path="$unix_path"
38648  fi
38649
38650
38651    new_path=`$WHICH "$new_path" 2> /dev/null`
38652    # bat and cmd files are not always considered executable in MSYS causing which
38653    # to not find them
38654    if test "x$new_path" = x \
38655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38657      new_path="$path"
38658
38659  windows_path="$new_path"
38660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38661    unix_path=`$CYGPATH -u "$windows_path"`
38662    new_path="$unix_path"
38663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38665    new_path="$unix_path"
38666  fi
38667
38668    fi
38669
38670    if test "x$new_path" = x; then
38671      # It's still not found. Now this is an unrecoverable error.
38672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38673$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38674      has_space=`$ECHO "$complete" | $GREP " "`
38675      if test "x$has_space" != x; then
38676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38678      fi
38679      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38680    fi
38681  fi
38682
38683  # Now new_path has a complete unix path to the binary
38684  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38685    # Keep paths in /bin as-is, but remove trailing .exe if any
38686    new_path="${new_path/%.exe/}"
38687    # Do not save /bin paths to all_fixpath_prefixes!
38688  else
38689    # Not in mixed or Windows style, start by that.
38690    new_path=`cmd //c echo $new_path`
38691
38692  input_path="$new_path"
38693  # Check if we need to convert this using DOS-style short mode. If the path
38694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38695  # take no chances and rewrite it.
38696  # Note: m4 eats our [], so we need to use [ and ] instead.
38697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38698  if test "x$has_forbidden_chars" != x; then
38699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38701  fi
38702
38703    # Output is in $new_path
38704
38705  windows_path="$new_path"
38706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38707    unix_path=`$CYGPATH -u "$windows_path"`
38708    new_path="$unix_path"
38709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38711    new_path="$unix_path"
38712  fi
38713
38714    # remove trailing .exe if any
38715    new_path="${new_path/%.exe/}"
38716
38717    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38718    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38719  fi
38720
38721    else
38722      # We're on a unix platform. Hooray! :)
38723      # First separate the path from the arguments. This will split at the first
38724      # space.
38725      complete="$OBJCOPY"
38726      path="${complete%% *}"
38727      tmp="$complete EOL"
38728      arguments="${tmp#* }"
38729
38730      # Cannot rely on the command "which" here since it doesn't always work.
38731      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38732      if test -z "$is_absolute_path"; then
38733        # Path to executable is not absolute. Find it.
38734        IFS_save="$IFS"
38735        IFS=:
38736        for p in $PATH; do
38737          if test -f "$p/$path" && test -x "$p/$path"; then
38738            new_path="$p/$path"
38739            break
38740          fi
38741        done
38742        IFS="$IFS_save"
38743      else
38744        # This is an absolute path, we can use it without further modifications.
38745        new_path="$path"
38746      fi
38747
38748      if test "x$new_path" = x; then
38749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38750$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38751        has_space=`$ECHO "$complete" | $GREP " "`
38752        if test "x$has_space" != x; then
38753          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38754$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38755        fi
38756        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38757      fi
38758    fi
38759
38760    # Now join together the path and the arguments once again
38761    if test "x$arguments" != xEOL; then
38762      new_complete="$new_path ${arguments% *}"
38763    else
38764      new_complete="$new_path"
38765    fi
38766
38767    if test "x$complete" != "x$new_complete"; then
38768      OBJCOPY="$new_complete"
38769      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38770$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38771    fi
38772  fi
38773
38774    fi
38775  fi
38776
38777
38778
38779  # Publish this variable in the help.
38780
38781
38782  if test "x$OBJDUMP" = x; then
38783    # The variable is not set by user, try to locate tool using the code snippet
38784    if test -n "$ac_tool_prefix"; then
38785  for ac_prog in gobjdump objdump
38786  do
38787    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38790$as_echo_n "checking for $ac_word... " >&6; }
38791if ${ac_cv_prog_OBJDUMP+:} false; then :
38792  $as_echo_n "(cached) " >&6
38793else
38794  if test -n "$OBJDUMP"; then
38795  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38796else
38797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38798for as_dir in $PATH
38799do
38800  IFS=$as_save_IFS
38801  test -z "$as_dir" && as_dir=.
38802    for ac_exec_ext in '' $ac_executable_extensions; do
38803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38804    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38806    break 2
38807  fi
38808done
38809  done
38810IFS=$as_save_IFS
38811
38812fi
38813fi
38814OBJDUMP=$ac_cv_prog_OBJDUMP
38815if test -n "$OBJDUMP"; then
38816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38817$as_echo "$OBJDUMP" >&6; }
38818else
38819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38820$as_echo "no" >&6; }
38821fi
38822
38823
38824    test -n "$OBJDUMP" && break
38825  done
38826fi
38827if test -z "$OBJDUMP"; then
38828  ac_ct_OBJDUMP=$OBJDUMP
38829  for ac_prog in gobjdump objdump
38830do
38831  # Extract the first word of "$ac_prog", so it can be a program name with args.
38832set dummy $ac_prog; ac_word=$2
38833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38834$as_echo_n "checking for $ac_word... " >&6; }
38835if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38836  $as_echo_n "(cached) " >&6
38837else
38838  if test -n "$ac_ct_OBJDUMP"; then
38839  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38840else
38841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38842for as_dir in $PATH
38843do
38844  IFS=$as_save_IFS
38845  test -z "$as_dir" && as_dir=.
38846    for ac_exec_ext in '' $ac_executable_extensions; do
38847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38848    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38850    break 2
38851  fi
38852done
38853  done
38854IFS=$as_save_IFS
38855
38856fi
38857fi
38858ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38859if test -n "$ac_ct_OBJDUMP"; then
38860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38861$as_echo "$ac_ct_OBJDUMP" >&6; }
38862else
38863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38864$as_echo "no" >&6; }
38865fi
38866
38867
38868  test -n "$ac_ct_OBJDUMP" && break
38869done
38870
38871  if test "x$ac_ct_OBJDUMP" = x; then
38872    OBJDUMP=""
38873  else
38874    case $cross_compiling:$ac_tool_warned in
38875yes:)
38876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38878ac_tool_warned=yes ;;
38879esac
38880    OBJDUMP=$ac_ct_OBJDUMP
38881  fi
38882fi
38883
38884  else
38885    # The variable is set, but is it from the command line or the environment?
38886
38887    # Try to remove the string !OBJDUMP! from our list.
38888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38890      # If it failed, the variable was not from the command line. Ignore it,
38891      # but warn the user (except for BASH, which is always set by the calling BASH).
38892      if test "xOBJDUMP" != xBASH; then
38893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38894$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38895      fi
38896      # Try to locate tool using the code snippet
38897      if test -n "$ac_tool_prefix"; then
38898  for ac_prog in gobjdump objdump
38899  do
38900    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38901set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38903$as_echo_n "checking for $ac_word... " >&6; }
38904if ${ac_cv_prog_OBJDUMP+:} false; then :
38905  $as_echo_n "(cached) " >&6
38906else
38907  if test -n "$OBJDUMP"; then
38908  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38909else
38910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38911for as_dir in $PATH
38912do
38913  IFS=$as_save_IFS
38914  test -z "$as_dir" && as_dir=.
38915    for ac_exec_ext in '' $ac_executable_extensions; do
38916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38917    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38919    break 2
38920  fi
38921done
38922  done
38923IFS=$as_save_IFS
38924
38925fi
38926fi
38927OBJDUMP=$ac_cv_prog_OBJDUMP
38928if test -n "$OBJDUMP"; then
38929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38930$as_echo "$OBJDUMP" >&6; }
38931else
38932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38933$as_echo "no" >&6; }
38934fi
38935
38936
38937    test -n "$OBJDUMP" && break
38938  done
38939fi
38940if test -z "$OBJDUMP"; then
38941  ac_ct_OBJDUMP=$OBJDUMP
38942  for ac_prog in gobjdump objdump
38943do
38944  # Extract the first word of "$ac_prog", so it can be a program name with args.
38945set dummy $ac_prog; ac_word=$2
38946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38947$as_echo_n "checking for $ac_word... " >&6; }
38948if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38949  $as_echo_n "(cached) " >&6
38950else
38951  if test -n "$ac_ct_OBJDUMP"; then
38952  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38953else
38954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38955for as_dir in $PATH
38956do
38957  IFS=$as_save_IFS
38958  test -z "$as_dir" && as_dir=.
38959    for ac_exec_ext in '' $ac_executable_extensions; do
38960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38961    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38963    break 2
38964  fi
38965done
38966  done
38967IFS=$as_save_IFS
38968
38969fi
38970fi
38971ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38972if test -n "$ac_ct_OBJDUMP"; then
38973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38974$as_echo "$ac_ct_OBJDUMP" >&6; }
38975else
38976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38977$as_echo "no" >&6; }
38978fi
38979
38980
38981  test -n "$ac_ct_OBJDUMP" && break
38982done
38983
38984  if test "x$ac_ct_OBJDUMP" = x; then
38985    OBJDUMP=""
38986  else
38987    case $cross_compiling:$ac_tool_warned in
38988yes:)
38989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38991ac_tool_warned=yes ;;
38992esac
38993    OBJDUMP=$ac_ct_OBJDUMP
38994  fi
38995fi
38996
38997    else
38998      # If it succeeded, then it was overridden by the user. We will use it
38999      # for the tool.
39000
39001      # First remove it from the list of overridden variables, so we can test
39002      # for unknown variables in the end.
39003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39004
39005      # Check if the provided tool contains a complete path.
39006      tool_specified="$OBJDUMP"
39007      tool_basename="${tool_specified##*/}"
39008      if test "x$tool_basename" = "x$tool_specified"; then
39009        # A command without a complete path is provided, search $PATH.
39010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39011$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39012        # Extract the first word of "$tool_basename", so it can be a program name with args.
39013set dummy $tool_basename; ac_word=$2
39014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39015$as_echo_n "checking for $ac_word... " >&6; }
39016if ${ac_cv_path_OBJDUMP+:} false; then :
39017  $as_echo_n "(cached) " >&6
39018else
39019  case $OBJDUMP in
39020  [\\/]* | ?:[\\/]*)
39021  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39022  ;;
39023  *)
39024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39025for as_dir in $PATH
39026do
39027  IFS=$as_save_IFS
39028  test -z "$as_dir" && as_dir=.
39029    for ac_exec_ext in '' $ac_executable_extensions; do
39030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39031    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39033    break 2
39034  fi
39035done
39036  done
39037IFS=$as_save_IFS
39038
39039  ;;
39040esac
39041fi
39042OBJDUMP=$ac_cv_path_OBJDUMP
39043if test -n "$OBJDUMP"; then
39044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39045$as_echo "$OBJDUMP" >&6; }
39046else
39047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39048$as_echo "no" >&6; }
39049fi
39050
39051
39052        if test "x$OBJDUMP" = x; then
39053          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39054        fi
39055      else
39056        # Otherwise we believe it is a complete path. Use it as it is.
39057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39058$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39060$as_echo_n "checking for OBJDUMP... " >&6; }
39061        if test ! -x "$tool_specified"; then
39062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39063$as_echo "not found" >&6; }
39064          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39065        fi
39066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39067$as_echo "$tool_specified" >&6; }
39068      fi
39069    fi
39070  fi
39071
39072
39073  if test "x$OBJDUMP" != x; then
39074    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39075    # bails if argument is missing.
39076
39077  # Only process if variable expands to non-empty
39078
39079  if test "x$OBJDUMP" != x; then
39080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081
39082  # First separate the path from the arguments. This will split at the first
39083  # space.
39084  complete="$OBJDUMP"
39085  path="${complete%% *}"
39086  tmp="$complete EOL"
39087  arguments="${tmp#* }"
39088
39089  # Input might be given as Windows format, start by converting to
39090  # unix format.
39091  new_path=`$CYGPATH -u "$path"`
39092
39093  # Now try to locate executable using which
39094  new_path=`$WHICH "$new_path" 2> /dev/null`
39095  # bat and cmd files are not always considered executable in cygwin causing which
39096  # to not find them
39097  if test "x$new_path" = x \
39098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39100    new_path=`$CYGPATH -u "$path"`
39101  fi
39102  if test "x$new_path" = x; then
39103    # Oops. Which didn't find the executable.
39104    # The splitting of arguments from the executable at a space might have been incorrect,
39105    # since paths with space are more likely in Windows. Give it another try with the whole
39106    # argument.
39107    path="$complete"
39108    arguments="EOL"
39109    new_path=`$CYGPATH -u "$path"`
39110    new_path=`$WHICH "$new_path" 2> /dev/null`
39111    # bat and cmd files are not always considered executable in cygwin causing which
39112    # to not find them
39113    if test "x$new_path" = x \
39114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39116      new_path=`$CYGPATH -u "$path"`
39117    fi
39118    if test "x$new_path" = x; then
39119      # It's still not found. Now this is an unrecoverable error.
39120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39121$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39122      has_space=`$ECHO "$complete" | $GREP " "`
39123      if test "x$has_space" != x; then
39124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39126      fi
39127      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39128    fi
39129  fi
39130
39131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39134  # "foo.exe" is OK but "foo" is an error.
39135  #
39136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39137  # It is also a way to make sure we got the proper file name for the real test later on.
39138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39139  if test "x$test_shortpath" = x; then
39140    # Short path failed, file does not exist as specified.
39141    # Try adding .exe or .cmd
39142    if test -f "${new_path}.exe"; then
39143      input_to_shortpath="${new_path}.exe"
39144    elif test -f "${new_path}.cmd"; then
39145      input_to_shortpath="${new_path}.cmd"
39146    else
39147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39148$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39151      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39152    fi
39153  else
39154    input_to_shortpath="$new_path"
39155  fi
39156
39157  # Call helper function which possibly converts this using DOS-style short mode.
39158  # If so, the updated path is stored in $new_path.
39159  new_path="$input_to_shortpath"
39160
39161  input_path="$input_to_shortpath"
39162  # Check if we need to convert this using DOS-style short mode. If the path
39163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39164  # take no chances and rewrite it.
39165  # Note: m4 eats our [], so we need to use [ and ] instead.
39166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39167  if test "x$has_forbidden_chars" != x; then
39168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39172      # Going to short mode and back again did indeed matter. Since short mode is
39173      # case insensitive, let's make it lowercase to improve readability.
39174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39175      # Now convert it back to Unix-style (cygpath)
39176      input_path=`$CYGPATH -u "$shortmode_path"`
39177      new_path="$input_path"
39178    fi
39179  fi
39180
39181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39182  if test "x$test_cygdrive_prefix" = x; then
39183    # As a simple fix, exclude /usr/bin since it's not a real path.
39184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39186      # a path prefixed by /cygdrive for fixpath to work.
39187      new_path="$CYGWIN_ROOT_PATH$input_path"
39188    fi
39189  fi
39190
39191  # remove trailing .exe if any
39192  new_path="${new_path/%.exe/}"
39193
39194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39195
39196  # First separate the path from the arguments. This will split at the first
39197  # space.
39198  complete="$OBJDUMP"
39199  path="${complete%% *}"
39200  tmp="$complete EOL"
39201  arguments="${tmp#* }"
39202
39203  # Input might be given as Windows format, start by converting to
39204  # unix format.
39205  new_path="$path"
39206
39207  windows_path="$new_path"
39208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39209    unix_path=`$CYGPATH -u "$windows_path"`
39210    new_path="$unix_path"
39211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39213    new_path="$unix_path"
39214  fi
39215
39216
39217  # Now try to locate executable using which
39218  new_path=`$WHICH "$new_path" 2> /dev/null`
39219
39220  if test "x$new_path" = x; then
39221    # Oops. Which didn't find the executable.
39222    # The splitting of arguments from the executable at a space might have been incorrect,
39223    # since paths with space are more likely in Windows. Give it another try with the whole
39224    # argument.
39225    path="$complete"
39226    arguments="EOL"
39227    new_path="$path"
39228
39229  windows_path="$new_path"
39230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39231    unix_path=`$CYGPATH -u "$windows_path"`
39232    new_path="$unix_path"
39233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39235    new_path="$unix_path"
39236  fi
39237
39238
39239    new_path=`$WHICH "$new_path" 2> /dev/null`
39240    # bat and cmd files are not always considered executable in MSYS causing which
39241    # to not find them
39242    if test "x$new_path" = x \
39243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39245      new_path="$path"
39246
39247  windows_path="$new_path"
39248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39249    unix_path=`$CYGPATH -u "$windows_path"`
39250    new_path="$unix_path"
39251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39253    new_path="$unix_path"
39254  fi
39255
39256    fi
39257
39258    if test "x$new_path" = x; then
39259      # It's still not found. Now this is an unrecoverable error.
39260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39261$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39262      has_space=`$ECHO "$complete" | $GREP " "`
39263      if test "x$has_space" != x; then
39264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39266      fi
39267      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39268    fi
39269  fi
39270
39271  # Now new_path has a complete unix path to the binary
39272  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39273    # Keep paths in /bin as-is, but remove trailing .exe if any
39274    new_path="${new_path/%.exe/}"
39275    # Do not save /bin paths to all_fixpath_prefixes!
39276  else
39277    # Not in mixed or Windows style, start by that.
39278    new_path=`cmd //c echo $new_path`
39279
39280  input_path="$new_path"
39281  # Check if we need to convert this using DOS-style short mode. If the path
39282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39283  # take no chances and rewrite it.
39284  # Note: m4 eats our [], so we need to use [ and ] instead.
39285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39286  if test "x$has_forbidden_chars" != x; then
39287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39289  fi
39290
39291    # Output is in $new_path
39292
39293  windows_path="$new_path"
39294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39295    unix_path=`$CYGPATH -u "$windows_path"`
39296    new_path="$unix_path"
39297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39299    new_path="$unix_path"
39300  fi
39301
39302    # remove trailing .exe if any
39303    new_path="${new_path/%.exe/}"
39304
39305    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39306    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39307  fi
39308
39309    else
39310      # We're on a unix platform. Hooray! :)
39311      # First separate the path from the arguments. This will split at the first
39312      # space.
39313      complete="$OBJDUMP"
39314      path="${complete%% *}"
39315      tmp="$complete EOL"
39316      arguments="${tmp#* }"
39317
39318      # Cannot rely on the command "which" here since it doesn't always work.
39319      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39320      if test -z "$is_absolute_path"; then
39321        # Path to executable is not absolute. Find it.
39322        IFS_save="$IFS"
39323        IFS=:
39324        for p in $PATH; do
39325          if test -f "$p/$path" && test -x "$p/$path"; then
39326            new_path="$p/$path"
39327            break
39328          fi
39329        done
39330        IFS="$IFS_save"
39331      else
39332        # This is an absolute path, we can use it without further modifications.
39333        new_path="$path"
39334      fi
39335
39336      if test "x$new_path" = x; then
39337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39338$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39339        has_space=`$ECHO "$complete" | $GREP " "`
39340        if test "x$has_space" != x; then
39341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39343        fi
39344        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39345      fi
39346    fi
39347
39348    # Now join together the path and the arguments once again
39349    if test "x$arguments" != xEOL; then
39350      new_complete="$new_path ${arguments% *}"
39351    else
39352      new_complete="$new_path"
39353    fi
39354
39355    if test "x$complete" != "x$new_complete"; then
39356      OBJDUMP="$new_complete"
39357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39358$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39359    fi
39360  fi
39361
39362  fi
39363
39364
39365  # Restore old path.
39366  PATH="$OLD_PATH"
39367
39368  # Restore the flags to the user specified values.
39369  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39370  CFLAGS="$ORG_CFLAGS"
39371  CXXFLAGS="$ORG_CXXFLAGS"
39372
39373
39374# Finally do some processing after the detection phase
39375
39376  if test "x$COMPILE_TYPE" = "xcross"; then
39377    # Now we need to find a C/C++ compiler that can build executables for the
39378    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39379    # used once. Also, we need to do this without adding a tools dir to the
39380    # path, otherwise we might pick up cross-compilers which don't use standard
39381    # naming.
39382
39383    # FIXME: we should list the discovered compilers as an exclude pattern!
39384    # If we do that, we can do this detection before POST_DETECTION, and still
39385    # find the build compilers in the tools dir, if needed.
39386
39387
39388  # Publish this variable in the help.
39389
39390
39391  if test "x$BUILD_CC" = x; then
39392    # The variable is not set by user, try to locate tool using the code snippet
39393    for ac_prog in cl cc gcc
39394do
39395  # Extract the first word of "$ac_prog", so it can be a program name with args.
39396set dummy $ac_prog; ac_word=$2
39397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39398$as_echo_n "checking for $ac_word... " >&6; }
39399if ${ac_cv_path_BUILD_CC+:} false; then :
39400  $as_echo_n "(cached) " >&6
39401else
39402  case $BUILD_CC in
39403  [\\/]* | ?:[\\/]*)
39404  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39405  ;;
39406  *)
39407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39408for as_dir in $PATH
39409do
39410  IFS=$as_save_IFS
39411  test -z "$as_dir" && as_dir=.
39412    for ac_exec_ext in '' $ac_executable_extensions; do
39413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39414    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39416    break 2
39417  fi
39418done
39419  done
39420IFS=$as_save_IFS
39421
39422  ;;
39423esac
39424fi
39425BUILD_CC=$ac_cv_path_BUILD_CC
39426if test -n "$BUILD_CC"; then
39427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39428$as_echo "$BUILD_CC" >&6; }
39429else
39430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39431$as_echo "no" >&6; }
39432fi
39433
39434
39435  test -n "$BUILD_CC" && break
39436done
39437
39438  else
39439    # The variable is set, but is it from the command line or the environment?
39440
39441    # Try to remove the string !BUILD_CC! from our list.
39442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39444      # If it failed, the variable was not from the command line. Ignore it,
39445      # but warn the user (except for BASH, which is always set by the calling BASH).
39446      if test "xBUILD_CC" != xBASH; then
39447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39448$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39449      fi
39450      # Try to locate tool using the code snippet
39451      for ac_prog in cl cc gcc
39452do
39453  # Extract the first word of "$ac_prog", so it can be a program name with args.
39454set dummy $ac_prog; ac_word=$2
39455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39456$as_echo_n "checking for $ac_word... " >&6; }
39457if ${ac_cv_path_BUILD_CC+:} false; then :
39458  $as_echo_n "(cached) " >&6
39459else
39460  case $BUILD_CC in
39461  [\\/]* | ?:[\\/]*)
39462  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39463  ;;
39464  *)
39465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39466for as_dir in $PATH
39467do
39468  IFS=$as_save_IFS
39469  test -z "$as_dir" && as_dir=.
39470    for ac_exec_ext in '' $ac_executable_extensions; do
39471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39472    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39474    break 2
39475  fi
39476done
39477  done
39478IFS=$as_save_IFS
39479
39480  ;;
39481esac
39482fi
39483BUILD_CC=$ac_cv_path_BUILD_CC
39484if test -n "$BUILD_CC"; then
39485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39486$as_echo "$BUILD_CC" >&6; }
39487else
39488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39489$as_echo "no" >&6; }
39490fi
39491
39492
39493  test -n "$BUILD_CC" && break
39494done
39495
39496    else
39497      # If it succeeded, then it was overridden by the user. We will use it
39498      # for the tool.
39499
39500      # First remove it from the list of overridden variables, so we can test
39501      # for unknown variables in the end.
39502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39503
39504      # Check if the provided tool contains a complete path.
39505      tool_specified="$BUILD_CC"
39506      tool_basename="${tool_specified##*/}"
39507      if test "x$tool_basename" = "x$tool_specified"; then
39508        # A command without a complete path is provided, search $PATH.
39509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39510$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39511        # Extract the first word of "$tool_basename", so it can be a program name with args.
39512set dummy $tool_basename; ac_word=$2
39513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39514$as_echo_n "checking for $ac_word... " >&6; }
39515if ${ac_cv_path_BUILD_CC+:} false; then :
39516  $as_echo_n "(cached) " >&6
39517else
39518  case $BUILD_CC in
39519  [\\/]* | ?:[\\/]*)
39520  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39521  ;;
39522  *)
39523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39524for as_dir in $PATH
39525do
39526  IFS=$as_save_IFS
39527  test -z "$as_dir" && as_dir=.
39528    for ac_exec_ext in '' $ac_executable_extensions; do
39529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39530    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39532    break 2
39533  fi
39534done
39535  done
39536IFS=$as_save_IFS
39537
39538  ;;
39539esac
39540fi
39541BUILD_CC=$ac_cv_path_BUILD_CC
39542if test -n "$BUILD_CC"; then
39543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39544$as_echo "$BUILD_CC" >&6; }
39545else
39546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39547$as_echo "no" >&6; }
39548fi
39549
39550
39551        if test "x$BUILD_CC" = x; then
39552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39553        fi
39554      else
39555        # Otherwise we believe it is a complete path. Use it as it is.
39556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39557$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39559$as_echo_n "checking for BUILD_CC... " >&6; }
39560        if test ! -x "$tool_specified"; then
39561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39562$as_echo "not found" >&6; }
39563          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39564        fi
39565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39566$as_echo "$tool_specified" >&6; }
39567      fi
39568    fi
39569  fi
39570
39571
39572
39573  # Only process if variable expands to non-empty
39574
39575  if test "x$BUILD_CC" != x; then
39576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39577
39578  # First separate the path from the arguments. This will split at the first
39579  # space.
39580  complete="$BUILD_CC"
39581  path="${complete%% *}"
39582  tmp="$complete EOL"
39583  arguments="${tmp#* }"
39584
39585  # Input might be given as Windows format, start by converting to
39586  # unix format.
39587  new_path=`$CYGPATH -u "$path"`
39588
39589  # Now try to locate executable using which
39590  new_path=`$WHICH "$new_path" 2> /dev/null`
39591  # bat and cmd files are not always considered executable in cygwin causing which
39592  # to not find them
39593  if test "x$new_path" = x \
39594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39596    new_path=`$CYGPATH -u "$path"`
39597  fi
39598  if test "x$new_path" = x; then
39599    # Oops. Which didn't find the executable.
39600    # The splitting of arguments from the executable at a space might have been incorrect,
39601    # since paths with space are more likely in Windows. Give it another try with the whole
39602    # argument.
39603    path="$complete"
39604    arguments="EOL"
39605    new_path=`$CYGPATH -u "$path"`
39606    new_path=`$WHICH "$new_path" 2> /dev/null`
39607    # bat and cmd files are not always considered executable in cygwin causing which
39608    # to not find them
39609    if test "x$new_path" = x \
39610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39612      new_path=`$CYGPATH -u "$path"`
39613    fi
39614    if test "x$new_path" = x; then
39615      # It's still not found. Now this is an unrecoverable error.
39616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39617$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39618      has_space=`$ECHO "$complete" | $GREP " "`
39619      if test "x$has_space" != x; then
39620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39622      fi
39623      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39624    fi
39625  fi
39626
39627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39630  # "foo.exe" is OK but "foo" is an error.
39631  #
39632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39633  # It is also a way to make sure we got the proper file name for the real test later on.
39634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39635  if test "x$test_shortpath" = x; then
39636    # Short path failed, file does not exist as specified.
39637    # Try adding .exe or .cmd
39638    if test -f "${new_path}.exe"; then
39639      input_to_shortpath="${new_path}.exe"
39640    elif test -f "${new_path}.cmd"; then
39641      input_to_shortpath="${new_path}.cmd"
39642    else
39643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39644$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39647      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39648    fi
39649  else
39650    input_to_shortpath="$new_path"
39651  fi
39652
39653  # Call helper function which possibly converts this using DOS-style short mode.
39654  # If so, the updated path is stored in $new_path.
39655  new_path="$input_to_shortpath"
39656
39657  input_path="$input_to_shortpath"
39658  # Check if we need to convert this using DOS-style short mode. If the path
39659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39660  # take no chances and rewrite it.
39661  # Note: m4 eats our [], so we need to use [ and ] instead.
39662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39663  if test "x$has_forbidden_chars" != x; then
39664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39668      # Going to short mode and back again did indeed matter. Since short mode is
39669      # case insensitive, let's make it lowercase to improve readability.
39670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39671      # Now convert it back to Unix-style (cygpath)
39672      input_path=`$CYGPATH -u "$shortmode_path"`
39673      new_path="$input_path"
39674    fi
39675  fi
39676
39677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39678  if test "x$test_cygdrive_prefix" = x; then
39679    # As a simple fix, exclude /usr/bin since it's not a real path.
39680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39682      # a path prefixed by /cygdrive for fixpath to work.
39683      new_path="$CYGWIN_ROOT_PATH$input_path"
39684    fi
39685  fi
39686
39687  # remove trailing .exe if any
39688  new_path="${new_path/%.exe/}"
39689
39690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39691
39692  # First separate the path from the arguments. This will split at the first
39693  # space.
39694  complete="$BUILD_CC"
39695  path="${complete%% *}"
39696  tmp="$complete EOL"
39697  arguments="${tmp#* }"
39698
39699  # Input might be given as Windows format, start by converting to
39700  # unix format.
39701  new_path="$path"
39702
39703  windows_path="$new_path"
39704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39705    unix_path=`$CYGPATH -u "$windows_path"`
39706    new_path="$unix_path"
39707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39709    new_path="$unix_path"
39710  fi
39711
39712
39713  # Now try to locate executable using which
39714  new_path=`$WHICH "$new_path" 2> /dev/null`
39715
39716  if test "x$new_path" = x; then
39717    # Oops. Which didn't find the executable.
39718    # The splitting of arguments from the executable at a space might have been incorrect,
39719    # since paths with space are more likely in Windows. Give it another try with the whole
39720    # argument.
39721    path="$complete"
39722    arguments="EOL"
39723    new_path="$path"
39724
39725  windows_path="$new_path"
39726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39727    unix_path=`$CYGPATH -u "$windows_path"`
39728    new_path="$unix_path"
39729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39731    new_path="$unix_path"
39732  fi
39733
39734
39735    new_path=`$WHICH "$new_path" 2> /dev/null`
39736    # bat and cmd files are not always considered executable in MSYS causing which
39737    # to not find them
39738    if test "x$new_path" = x \
39739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39741      new_path="$path"
39742
39743  windows_path="$new_path"
39744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39745    unix_path=`$CYGPATH -u "$windows_path"`
39746    new_path="$unix_path"
39747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39749    new_path="$unix_path"
39750  fi
39751
39752    fi
39753
39754    if test "x$new_path" = x; then
39755      # It's still not found. Now this is an unrecoverable error.
39756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39757$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39758      has_space=`$ECHO "$complete" | $GREP " "`
39759      if test "x$has_space" != x; then
39760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39762      fi
39763      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39764    fi
39765  fi
39766
39767  # Now new_path has a complete unix path to the binary
39768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39769    # Keep paths in /bin as-is, but remove trailing .exe if any
39770    new_path="${new_path/%.exe/}"
39771    # Do not save /bin paths to all_fixpath_prefixes!
39772  else
39773    # Not in mixed or Windows style, start by that.
39774    new_path=`cmd //c echo $new_path`
39775
39776  input_path="$new_path"
39777  # Check if we need to convert this using DOS-style short mode. If the path
39778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39779  # take no chances and rewrite it.
39780  # Note: m4 eats our [], so we need to use [ and ] instead.
39781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39782  if test "x$has_forbidden_chars" != x; then
39783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39785  fi
39786
39787    # Output is in $new_path
39788
39789  windows_path="$new_path"
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791    unix_path=`$CYGPATH -u "$windows_path"`
39792    new_path="$unix_path"
39793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39795    new_path="$unix_path"
39796  fi
39797
39798    # remove trailing .exe if any
39799    new_path="${new_path/%.exe/}"
39800
39801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39803  fi
39804
39805    else
39806      # We're on a unix platform. Hooray! :)
39807      # First separate the path from the arguments. This will split at the first
39808      # space.
39809      complete="$BUILD_CC"
39810      path="${complete%% *}"
39811      tmp="$complete EOL"
39812      arguments="${tmp#* }"
39813
39814      # Cannot rely on the command "which" here since it doesn't always work.
39815      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39816      if test -z "$is_absolute_path"; then
39817        # Path to executable is not absolute. Find it.
39818        IFS_save="$IFS"
39819        IFS=:
39820        for p in $PATH; do
39821          if test -f "$p/$path" && test -x "$p/$path"; then
39822            new_path="$p/$path"
39823            break
39824          fi
39825        done
39826        IFS="$IFS_save"
39827      else
39828        # This is an absolute path, we can use it without further modifications.
39829        new_path="$path"
39830      fi
39831
39832      if test "x$new_path" = x; then
39833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39834$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39835        has_space=`$ECHO "$complete" | $GREP " "`
39836        if test "x$has_space" != x; then
39837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39839        fi
39840        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39841      fi
39842    fi
39843
39844    # Now join together the path and the arguments once again
39845    if test "x$arguments" != xEOL; then
39846      new_complete="$new_path ${arguments% *}"
39847    else
39848      new_complete="$new_path"
39849    fi
39850
39851    if test "x$complete" != "x$new_complete"; then
39852      BUILD_CC="$new_complete"
39853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39854$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39855    fi
39856  fi
39857
39858
39859
39860  # Publish this variable in the help.
39861
39862
39863  if test "x$BUILD_CXX" = x; then
39864    # The variable is not set by user, try to locate tool using the code snippet
39865    for ac_prog in cl CC g++
39866do
39867  # Extract the first word of "$ac_prog", so it can be a program name with args.
39868set dummy $ac_prog; ac_word=$2
39869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39870$as_echo_n "checking for $ac_word... " >&6; }
39871if ${ac_cv_path_BUILD_CXX+:} false; then :
39872  $as_echo_n "(cached) " >&6
39873else
39874  case $BUILD_CXX in
39875  [\\/]* | ?:[\\/]*)
39876  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39877  ;;
39878  *)
39879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39880for as_dir in $PATH
39881do
39882  IFS=$as_save_IFS
39883  test -z "$as_dir" && as_dir=.
39884    for ac_exec_ext in '' $ac_executable_extensions; do
39885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39886    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39888    break 2
39889  fi
39890done
39891  done
39892IFS=$as_save_IFS
39893
39894  ;;
39895esac
39896fi
39897BUILD_CXX=$ac_cv_path_BUILD_CXX
39898if test -n "$BUILD_CXX"; then
39899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39900$as_echo "$BUILD_CXX" >&6; }
39901else
39902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39903$as_echo "no" >&6; }
39904fi
39905
39906
39907  test -n "$BUILD_CXX" && break
39908done
39909
39910  else
39911    # The variable is set, but is it from the command line or the environment?
39912
39913    # Try to remove the string !BUILD_CXX! from our list.
39914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39916      # If it failed, the variable was not from the command line. Ignore it,
39917      # but warn the user (except for BASH, which is always set by the calling BASH).
39918      if test "xBUILD_CXX" != xBASH; then
39919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39920$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39921      fi
39922      # Try to locate tool using the code snippet
39923      for ac_prog in cl CC g++
39924do
39925  # Extract the first word of "$ac_prog", so it can be a program name with args.
39926set dummy $ac_prog; ac_word=$2
39927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39928$as_echo_n "checking for $ac_word... " >&6; }
39929if ${ac_cv_path_BUILD_CXX+:} false; then :
39930  $as_echo_n "(cached) " >&6
39931else
39932  case $BUILD_CXX in
39933  [\\/]* | ?:[\\/]*)
39934  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39935  ;;
39936  *)
39937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39938for as_dir in $PATH
39939do
39940  IFS=$as_save_IFS
39941  test -z "$as_dir" && as_dir=.
39942    for ac_exec_ext in '' $ac_executable_extensions; do
39943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39944    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39946    break 2
39947  fi
39948done
39949  done
39950IFS=$as_save_IFS
39951
39952  ;;
39953esac
39954fi
39955BUILD_CXX=$ac_cv_path_BUILD_CXX
39956if test -n "$BUILD_CXX"; then
39957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39958$as_echo "$BUILD_CXX" >&6; }
39959else
39960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39961$as_echo "no" >&6; }
39962fi
39963
39964
39965  test -n "$BUILD_CXX" && break
39966done
39967
39968    else
39969      # If it succeeded, then it was overridden by the user. We will use it
39970      # for the tool.
39971
39972      # First remove it from the list of overridden variables, so we can test
39973      # for unknown variables in the end.
39974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39975
39976      # Check if the provided tool contains a complete path.
39977      tool_specified="$BUILD_CXX"
39978      tool_basename="${tool_specified##*/}"
39979      if test "x$tool_basename" = "x$tool_specified"; then
39980        # A command without a complete path is provided, search $PATH.
39981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39982$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39983        # Extract the first word of "$tool_basename", so it can be a program name with args.
39984set dummy $tool_basename; ac_word=$2
39985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39986$as_echo_n "checking for $ac_word... " >&6; }
39987if ${ac_cv_path_BUILD_CXX+:} false; then :
39988  $as_echo_n "(cached) " >&6
39989else
39990  case $BUILD_CXX in
39991  [\\/]* | ?:[\\/]*)
39992  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39993  ;;
39994  *)
39995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39996for as_dir in $PATH
39997do
39998  IFS=$as_save_IFS
39999  test -z "$as_dir" && as_dir=.
40000    for ac_exec_ext in '' $ac_executable_extensions; do
40001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40002    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40004    break 2
40005  fi
40006done
40007  done
40008IFS=$as_save_IFS
40009
40010  ;;
40011esac
40012fi
40013BUILD_CXX=$ac_cv_path_BUILD_CXX
40014if test -n "$BUILD_CXX"; then
40015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40016$as_echo "$BUILD_CXX" >&6; }
40017else
40018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40019$as_echo "no" >&6; }
40020fi
40021
40022
40023        if test "x$BUILD_CXX" = x; then
40024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40025        fi
40026      else
40027        # Otherwise we believe it is a complete path. Use it as it is.
40028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40029$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40031$as_echo_n "checking for BUILD_CXX... " >&6; }
40032        if test ! -x "$tool_specified"; then
40033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40034$as_echo "not found" >&6; }
40035          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40036        fi
40037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40038$as_echo "$tool_specified" >&6; }
40039      fi
40040    fi
40041  fi
40042
40043
40044
40045  # Only process if variable expands to non-empty
40046
40047  if test "x$BUILD_CXX" != x; then
40048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40049
40050  # First separate the path from the arguments. This will split at the first
40051  # space.
40052  complete="$BUILD_CXX"
40053  path="${complete%% *}"
40054  tmp="$complete EOL"
40055  arguments="${tmp#* }"
40056
40057  # Input might be given as Windows format, start by converting to
40058  # unix format.
40059  new_path=`$CYGPATH -u "$path"`
40060
40061  # Now try to locate executable using which
40062  new_path=`$WHICH "$new_path" 2> /dev/null`
40063  # bat and cmd files are not always considered executable in cygwin causing which
40064  # to not find them
40065  if test "x$new_path" = x \
40066      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40067      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40068    new_path=`$CYGPATH -u "$path"`
40069  fi
40070  if test "x$new_path" = x; then
40071    # Oops. Which didn't find the executable.
40072    # The splitting of arguments from the executable at a space might have been incorrect,
40073    # since paths with space are more likely in Windows. Give it another try with the whole
40074    # argument.
40075    path="$complete"
40076    arguments="EOL"
40077    new_path=`$CYGPATH -u "$path"`
40078    new_path=`$WHICH "$new_path" 2> /dev/null`
40079    # bat and cmd files are not always considered executable in cygwin causing which
40080    # to not find them
40081    if test "x$new_path" = x \
40082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40084      new_path=`$CYGPATH -u "$path"`
40085    fi
40086    if test "x$new_path" = x; then
40087      # It's still not found. Now this is an unrecoverable error.
40088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40089$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40090      has_space=`$ECHO "$complete" | $GREP " "`
40091      if test "x$has_space" != x; then
40092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40094      fi
40095      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40096    fi
40097  fi
40098
40099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40102  # "foo.exe" is OK but "foo" is an error.
40103  #
40104  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40105  # It is also a way to make sure we got the proper file name for the real test later on.
40106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40107  if test "x$test_shortpath" = x; then
40108    # Short path failed, file does not exist as specified.
40109    # Try adding .exe or .cmd
40110    if test -f "${new_path}.exe"; then
40111      input_to_shortpath="${new_path}.exe"
40112    elif test -f "${new_path}.cmd"; then
40113      input_to_shortpath="${new_path}.cmd"
40114    else
40115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40116$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40119      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40120    fi
40121  else
40122    input_to_shortpath="$new_path"
40123  fi
40124
40125  # Call helper function which possibly converts this using DOS-style short mode.
40126  # If so, the updated path is stored in $new_path.
40127  new_path="$input_to_shortpath"
40128
40129  input_path="$input_to_shortpath"
40130  # Check if we need to convert this using DOS-style short mode. If the path
40131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40132  # take no chances and rewrite it.
40133  # Note: m4 eats our [], so we need to use [ and ] instead.
40134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40135  if test "x$has_forbidden_chars" != x; then
40136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40140      # Going to short mode and back again did indeed matter. Since short mode is
40141      # case insensitive, let's make it lowercase to improve readability.
40142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40143      # Now convert it back to Unix-style (cygpath)
40144      input_path=`$CYGPATH -u "$shortmode_path"`
40145      new_path="$input_path"
40146    fi
40147  fi
40148
40149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40150  if test "x$test_cygdrive_prefix" = x; then
40151    # As a simple fix, exclude /usr/bin since it's not a real path.
40152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40154      # a path prefixed by /cygdrive for fixpath to work.
40155      new_path="$CYGWIN_ROOT_PATH$input_path"
40156    fi
40157  fi
40158
40159  # remove trailing .exe if any
40160  new_path="${new_path/%.exe/}"
40161
40162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40163
40164  # First separate the path from the arguments. This will split at the first
40165  # space.
40166  complete="$BUILD_CXX"
40167  path="${complete%% *}"
40168  tmp="$complete EOL"
40169  arguments="${tmp#* }"
40170
40171  # Input might be given as Windows format, start by converting to
40172  # unix format.
40173  new_path="$path"
40174
40175  windows_path="$new_path"
40176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40177    unix_path=`$CYGPATH -u "$windows_path"`
40178    new_path="$unix_path"
40179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40181    new_path="$unix_path"
40182  fi
40183
40184
40185  # Now try to locate executable using which
40186  new_path=`$WHICH "$new_path" 2> /dev/null`
40187
40188  if test "x$new_path" = x; then
40189    # Oops. Which didn't find the executable.
40190    # The splitting of arguments from the executable at a space might have been incorrect,
40191    # since paths with space are more likely in Windows. Give it another try with the whole
40192    # argument.
40193    path="$complete"
40194    arguments="EOL"
40195    new_path="$path"
40196
40197  windows_path="$new_path"
40198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40199    unix_path=`$CYGPATH -u "$windows_path"`
40200    new_path="$unix_path"
40201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40203    new_path="$unix_path"
40204  fi
40205
40206
40207    new_path=`$WHICH "$new_path" 2> /dev/null`
40208    # bat and cmd files are not always considered executable in MSYS causing which
40209    # to not find them
40210    if test "x$new_path" = x \
40211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40213      new_path="$path"
40214
40215  windows_path="$new_path"
40216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40217    unix_path=`$CYGPATH -u "$windows_path"`
40218    new_path="$unix_path"
40219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40221    new_path="$unix_path"
40222  fi
40223
40224    fi
40225
40226    if test "x$new_path" = x; then
40227      # It's still not found. Now this is an unrecoverable error.
40228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40229$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40230      has_space=`$ECHO "$complete" | $GREP " "`
40231      if test "x$has_space" != x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40234      fi
40235      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40236    fi
40237  fi
40238
40239  # Now new_path has a complete unix path to the binary
40240  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40241    # Keep paths in /bin as-is, but remove trailing .exe if any
40242    new_path="${new_path/%.exe/}"
40243    # Do not save /bin paths to all_fixpath_prefixes!
40244  else
40245    # Not in mixed or Windows style, start by that.
40246    new_path=`cmd //c echo $new_path`
40247
40248  input_path="$new_path"
40249  # Check if we need to convert this using DOS-style short mode. If the path
40250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40251  # take no chances and rewrite it.
40252  # Note: m4 eats our [], so we need to use [ and ] instead.
40253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40254  if test "x$has_forbidden_chars" != x; then
40255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40257  fi
40258
40259    # Output is in $new_path
40260
40261  windows_path="$new_path"
40262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40263    unix_path=`$CYGPATH -u "$windows_path"`
40264    new_path="$unix_path"
40265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40267    new_path="$unix_path"
40268  fi
40269
40270    # remove trailing .exe if any
40271    new_path="${new_path/%.exe/}"
40272
40273    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40274    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40275  fi
40276
40277    else
40278      # We're on a unix platform. Hooray! :)
40279      # First separate the path from the arguments. This will split at the first
40280      # space.
40281      complete="$BUILD_CXX"
40282      path="${complete%% *}"
40283      tmp="$complete EOL"
40284      arguments="${tmp#* }"
40285
40286      # Cannot rely on the command "which" here since it doesn't always work.
40287      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40288      if test -z "$is_absolute_path"; then
40289        # Path to executable is not absolute. Find it.
40290        IFS_save="$IFS"
40291        IFS=:
40292        for p in $PATH; do
40293          if test -f "$p/$path" && test -x "$p/$path"; then
40294            new_path="$p/$path"
40295            break
40296          fi
40297        done
40298        IFS="$IFS_save"
40299      else
40300        # This is an absolute path, we can use it without further modifications.
40301        new_path="$path"
40302      fi
40303
40304      if test "x$new_path" = x; then
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40306$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40307        has_space=`$ECHO "$complete" | $GREP " "`
40308        if test "x$has_space" != x; then
40309          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40310$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40311        fi
40312        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40313      fi
40314    fi
40315
40316    # Now join together the path and the arguments once again
40317    if test "x$arguments" != xEOL; then
40318      new_complete="$new_path ${arguments% *}"
40319    else
40320      new_complete="$new_path"
40321    fi
40322
40323    if test "x$complete" != "x$new_complete"; then
40324      BUILD_CXX="$new_complete"
40325      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40326$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40327    fi
40328  fi
40329
40330
40331
40332  # Publish this variable in the help.
40333
40334
40335  if test "x$BUILD_LD" = x; then
40336    # The variable is not set by user, try to locate tool using the code snippet
40337    for ac_prog in ld
40338do
40339  # Extract the first word of "$ac_prog", so it can be a program name with args.
40340set dummy $ac_prog; ac_word=$2
40341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40342$as_echo_n "checking for $ac_word... " >&6; }
40343if ${ac_cv_path_BUILD_LD+:} false; then :
40344  $as_echo_n "(cached) " >&6
40345else
40346  case $BUILD_LD in
40347  [\\/]* | ?:[\\/]*)
40348  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40349  ;;
40350  *)
40351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40352for as_dir in $PATH
40353do
40354  IFS=$as_save_IFS
40355  test -z "$as_dir" && as_dir=.
40356    for ac_exec_ext in '' $ac_executable_extensions; do
40357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40358    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40360    break 2
40361  fi
40362done
40363  done
40364IFS=$as_save_IFS
40365
40366  ;;
40367esac
40368fi
40369BUILD_LD=$ac_cv_path_BUILD_LD
40370if test -n "$BUILD_LD"; then
40371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40372$as_echo "$BUILD_LD" >&6; }
40373else
40374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40375$as_echo "no" >&6; }
40376fi
40377
40378
40379  test -n "$BUILD_LD" && break
40380done
40381
40382  else
40383    # The variable is set, but is it from the command line or the environment?
40384
40385    # Try to remove the string !BUILD_LD! from our list.
40386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40388      # If it failed, the variable was not from the command line. Ignore it,
40389      # but warn the user (except for BASH, which is always set by the calling BASH).
40390      if test "xBUILD_LD" != xBASH; then
40391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40392$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40393      fi
40394      # Try to locate tool using the code snippet
40395      for ac_prog in ld
40396do
40397  # Extract the first word of "$ac_prog", so it can be a program name with args.
40398set dummy $ac_prog; ac_word=$2
40399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40400$as_echo_n "checking for $ac_word... " >&6; }
40401if ${ac_cv_path_BUILD_LD+:} false; then :
40402  $as_echo_n "(cached) " >&6
40403else
40404  case $BUILD_LD in
40405  [\\/]* | ?:[\\/]*)
40406  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40407  ;;
40408  *)
40409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40410for as_dir in $PATH
40411do
40412  IFS=$as_save_IFS
40413  test -z "$as_dir" && as_dir=.
40414    for ac_exec_ext in '' $ac_executable_extensions; do
40415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40416    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40418    break 2
40419  fi
40420done
40421  done
40422IFS=$as_save_IFS
40423
40424  ;;
40425esac
40426fi
40427BUILD_LD=$ac_cv_path_BUILD_LD
40428if test -n "$BUILD_LD"; then
40429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40430$as_echo "$BUILD_LD" >&6; }
40431else
40432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40433$as_echo "no" >&6; }
40434fi
40435
40436
40437  test -n "$BUILD_LD" && break
40438done
40439
40440    else
40441      # If it succeeded, then it was overridden by the user. We will use it
40442      # for the tool.
40443
40444      # First remove it from the list of overridden variables, so we can test
40445      # for unknown variables in the end.
40446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40447
40448      # Check if the provided tool contains a complete path.
40449      tool_specified="$BUILD_LD"
40450      tool_basename="${tool_specified##*/}"
40451      if test "x$tool_basename" = "x$tool_specified"; then
40452        # A command without a complete path is provided, search $PATH.
40453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40454$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40455        # Extract the first word of "$tool_basename", so it can be a program name with args.
40456set dummy $tool_basename; ac_word=$2
40457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40458$as_echo_n "checking for $ac_word... " >&6; }
40459if ${ac_cv_path_BUILD_LD+:} false; then :
40460  $as_echo_n "(cached) " >&6
40461else
40462  case $BUILD_LD in
40463  [\\/]* | ?:[\\/]*)
40464  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40465  ;;
40466  *)
40467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40468for as_dir in $PATH
40469do
40470  IFS=$as_save_IFS
40471  test -z "$as_dir" && as_dir=.
40472    for ac_exec_ext in '' $ac_executable_extensions; do
40473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40474    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40476    break 2
40477  fi
40478done
40479  done
40480IFS=$as_save_IFS
40481
40482  ;;
40483esac
40484fi
40485BUILD_LD=$ac_cv_path_BUILD_LD
40486if test -n "$BUILD_LD"; then
40487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40488$as_echo "$BUILD_LD" >&6; }
40489else
40490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40491$as_echo "no" >&6; }
40492fi
40493
40494
40495        if test "x$BUILD_LD" = x; then
40496          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40497        fi
40498      else
40499        # Otherwise we believe it is a complete path. Use it as it is.
40500        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40501$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40503$as_echo_n "checking for BUILD_LD... " >&6; }
40504        if test ! -x "$tool_specified"; then
40505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40506$as_echo "not found" >&6; }
40507          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40508        fi
40509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40510$as_echo "$tool_specified" >&6; }
40511      fi
40512    fi
40513  fi
40514
40515
40516
40517  # Only process if variable expands to non-empty
40518
40519  if test "x$BUILD_LD" != x; then
40520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40521
40522  # First separate the path from the arguments. This will split at the first
40523  # space.
40524  complete="$BUILD_LD"
40525  path="${complete%% *}"
40526  tmp="$complete EOL"
40527  arguments="${tmp#* }"
40528
40529  # Input might be given as Windows format, start by converting to
40530  # unix format.
40531  new_path=`$CYGPATH -u "$path"`
40532
40533  # Now try to locate executable using which
40534  new_path=`$WHICH "$new_path" 2> /dev/null`
40535  # bat and cmd files are not always considered executable in cygwin causing which
40536  # to not find them
40537  if test "x$new_path" = x \
40538      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40539      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40540    new_path=`$CYGPATH -u "$path"`
40541  fi
40542  if test "x$new_path" = x; then
40543    # Oops. Which didn't find the executable.
40544    # The splitting of arguments from the executable at a space might have been incorrect,
40545    # since paths with space are more likely in Windows. Give it another try with the whole
40546    # argument.
40547    path="$complete"
40548    arguments="EOL"
40549    new_path=`$CYGPATH -u "$path"`
40550    new_path=`$WHICH "$new_path" 2> /dev/null`
40551    # bat and cmd files are not always considered executable in cygwin causing which
40552    # to not find them
40553    if test "x$new_path" = x \
40554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40556      new_path=`$CYGPATH -u "$path"`
40557    fi
40558    if test "x$new_path" = x; then
40559      # It's still not found. Now this is an unrecoverable error.
40560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40561$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40562      has_space=`$ECHO "$complete" | $GREP " "`
40563      if test "x$has_space" != x; then
40564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40566      fi
40567      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40568    fi
40569  fi
40570
40571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40574  # "foo.exe" is OK but "foo" is an error.
40575  #
40576  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40577  # It is also a way to make sure we got the proper file name for the real test later on.
40578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40579  if test "x$test_shortpath" = x; then
40580    # Short path failed, file does not exist as specified.
40581    # Try adding .exe or .cmd
40582    if test -f "${new_path}.exe"; then
40583      input_to_shortpath="${new_path}.exe"
40584    elif test -f "${new_path}.cmd"; then
40585      input_to_shortpath="${new_path}.cmd"
40586    else
40587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40588$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40591      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40592    fi
40593  else
40594    input_to_shortpath="$new_path"
40595  fi
40596
40597  # Call helper function which possibly converts this using DOS-style short mode.
40598  # If so, the updated path is stored in $new_path.
40599  new_path="$input_to_shortpath"
40600
40601  input_path="$input_to_shortpath"
40602  # Check if we need to convert this using DOS-style short mode. If the path
40603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40604  # take no chances and rewrite it.
40605  # Note: m4 eats our [], so we need to use [ and ] instead.
40606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40607  if test "x$has_forbidden_chars" != x; then
40608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40612      # Going to short mode and back again did indeed matter. Since short mode is
40613      # case insensitive, let's make it lowercase to improve readability.
40614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40615      # Now convert it back to Unix-style (cygpath)
40616      input_path=`$CYGPATH -u "$shortmode_path"`
40617      new_path="$input_path"
40618    fi
40619  fi
40620
40621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40622  if test "x$test_cygdrive_prefix" = x; then
40623    # As a simple fix, exclude /usr/bin since it's not a real path.
40624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40626      # a path prefixed by /cygdrive for fixpath to work.
40627      new_path="$CYGWIN_ROOT_PATH$input_path"
40628    fi
40629  fi
40630
40631  # remove trailing .exe if any
40632  new_path="${new_path/%.exe/}"
40633
40634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40635
40636  # First separate the path from the arguments. This will split at the first
40637  # space.
40638  complete="$BUILD_LD"
40639  path="${complete%% *}"
40640  tmp="$complete EOL"
40641  arguments="${tmp#* }"
40642
40643  # Input might be given as Windows format, start by converting to
40644  # unix format.
40645  new_path="$path"
40646
40647  windows_path="$new_path"
40648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40649    unix_path=`$CYGPATH -u "$windows_path"`
40650    new_path="$unix_path"
40651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40653    new_path="$unix_path"
40654  fi
40655
40656
40657  # Now try to locate executable using which
40658  new_path=`$WHICH "$new_path" 2> /dev/null`
40659
40660  if test "x$new_path" = x; then
40661    # Oops. Which didn't find the executable.
40662    # The splitting of arguments from the executable at a space might have been incorrect,
40663    # since paths with space are more likely in Windows. Give it another try with the whole
40664    # argument.
40665    path="$complete"
40666    arguments="EOL"
40667    new_path="$path"
40668
40669  windows_path="$new_path"
40670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40671    unix_path=`$CYGPATH -u "$windows_path"`
40672    new_path="$unix_path"
40673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40675    new_path="$unix_path"
40676  fi
40677
40678
40679    new_path=`$WHICH "$new_path" 2> /dev/null`
40680    # bat and cmd files are not always considered executable in MSYS causing which
40681    # to not find them
40682    if test "x$new_path" = x \
40683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40685      new_path="$path"
40686
40687  windows_path="$new_path"
40688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40689    unix_path=`$CYGPATH -u "$windows_path"`
40690    new_path="$unix_path"
40691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40693    new_path="$unix_path"
40694  fi
40695
40696    fi
40697
40698    if test "x$new_path" = x; then
40699      # It's still not found. Now this is an unrecoverable error.
40700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40701$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40702      has_space=`$ECHO "$complete" | $GREP " "`
40703      if test "x$has_space" != x; then
40704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40706      fi
40707      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40708    fi
40709  fi
40710
40711  # Now new_path has a complete unix path to the binary
40712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40713    # Keep paths in /bin as-is, but remove trailing .exe if any
40714    new_path="${new_path/%.exe/}"
40715    # Do not save /bin paths to all_fixpath_prefixes!
40716  else
40717    # Not in mixed or Windows style, start by that.
40718    new_path=`cmd //c echo $new_path`
40719
40720  input_path="$new_path"
40721  # Check if we need to convert this using DOS-style short mode. If the path
40722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40723  # take no chances and rewrite it.
40724  # Note: m4 eats our [], so we need to use [ and ] instead.
40725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40726  if test "x$has_forbidden_chars" != x; then
40727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40729  fi
40730
40731    # Output is in $new_path
40732
40733  windows_path="$new_path"
40734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40735    unix_path=`$CYGPATH -u "$windows_path"`
40736    new_path="$unix_path"
40737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40739    new_path="$unix_path"
40740  fi
40741
40742    # remove trailing .exe if any
40743    new_path="${new_path/%.exe/}"
40744
40745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40747  fi
40748
40749    else
40750      # We're on a unix platform. Hooray! :)
40751      # First separate the path from the arguments. This will split at the first
40752      # space.
40753      complete="$BUILD_LD"
40754      path="${complete%% *}"
40755      tmp="$complete EOL"
40756      arguments="${tmp#* }"
40757
40758      # Cannot rely on the command "which" here since it doesn't always work.
40759      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40760      if test -z "$is_absolute_path"; then
40761        # Path to executable is not absolute. Find it.
40762        IFS_save="$IFS"
40763        IFS=:
40764        for p in $PATH; do
40765          if test -f "$p/$path" && test -x "$p/$path"; then
40766            new_path="$p/$path"
40767            break
40768          fi
40769        done
40770        IFS="$IFS_save"
40771      else
40772        # This is an absolute path, we can use it without further modifications.
40773        new_path="$path"
40774      fi
40775
40776      if test "x$new_path" = x; then
40777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40778$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40779        has_space=`$ECHO "$complete" | $GREP " "`
40780        if test "x$has_space" != x; then
40781          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40782$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40783        fi
40784        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40785      fi
40786    fi
40787
40788    # Now join together the path and the arguments once again
40789    if test "x$arguments" != xEOL; then
40790      new_complete="$new_path ${arguments% *}"
40791    else
40792      new_complete="$new_path"
40793    fi
40794
40795    if test "x$complete" != "x$new_complete"; then
40796      BUILD_LD="$new_complete"
40797      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40798$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40799    fi
40800  fi
40801
40802  else
40803    # If we are not cross compiling, use the normal target compilers for
40804    # building the build platform executables.
40805    BUILD_CC="$CC"
40806    BUILD_CXX="$CXX"
40807    BUILD_LD="$LD"
40808  fi
40809
40810
40811
40812
40813
40814
40815  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40816    # For hotspot, we need these in Windows mixed path,
40817    # so rewrite them all. Need added .exe suffix.
40818    HOTSPOT_CXX="$CXX.exe"
40819    HOTSPOT_LD="$LD.exe"
40820    HOTSPOT_MT="$MT.exe"
40821    HOTSPOT_RC="$RC.exe"
40822
40823  unix_path="$HOTSPOT_CXX"
40824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40825    windows_path=`$CYGPATH -m "$unix_path"`
40826    HOTSPOT_CXX="$windows_path"
40827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40828    windows_path=`cmd //c echo $unix_path`
40829    HOTSPOT_CXX="$windows_path"
40830  fi
40831
40832
40833  unix_path="$HOTSPOT_LD"
40834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40835    windows_path=`$CYGPATH -m "$unix_path"`
40836    HOTSPOT_LD="$windows_path"
40837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40838    windows_path=`cmd //c echo $unix_path`
40839    HOTSPOT_LD="$windows_path"
40840  fi
40841
40842
40843  unix_path="$HOTSPOT_MT"
40844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40845    windows_path=`$CYGPATH -m "$unix_path"`
40846    HOTSPOT_MT="$windows_path"
40847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40848    windows_path=`cmd //c echo $unix_path`
40849    HOTSPOT_MT="$windows_path"
40850  fi
40851
40852
40853  unix_path="$HOTSPOT_RC"
40854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40855    windows_path=`$CYGPATH -m "$unix_path"`
40856    HOTSPOT_RC="$windows_path"
40857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40858    windows_path=`cmd //c echo $unix_path`
40859    HOTSPOT_RC="$windows_path"
40860  fi
40861
40862
40863
40864  else
40865    HOTSPOT_CXX="$CXX"
40866    HOTSPOT_LD="$LD"
40867  fi
40868
40869
40870
40871  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40872    USE_CLANG=true
40873  fi
40874
40875
40876
40877
40878
40879  # The package path is used only on macosx?
40880  # FIXME: clean this up, and/or move it elsewhere.
40881  PACKAGE_PATH=/opt/local
40882
40883
40884  # Check for extra potential brokenness.
40885  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40886    # On Windows, double-check that we got the right compiler.
40887    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40888    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40889    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40890      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40891        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
40892      fi
40893    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40894      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40895        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40896      fi
40897    fi
40898  fi
40899
40900  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40901    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40902    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40903    # This is later checked when setting flags.
40904
40905    # "-Og" suppported for GCC 4.8 and later
40906    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40907
40908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40909$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40910  supports=yes
40911
40912  saved_cflags="$CFLAGS"
40913  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40914  ac_ext=c
40915ac_cpp='$CPP $CPPFLAGS'
40916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40918ac_compiler_gnu=$ac_cv_c_compiler_gnu
40919
40920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40921/* end confdefs.h.  */
40922int i;
40923_ACEOF
40924if ac_fn_c_try_compile "$LINENO"; then :
40925
40926else
40927  supports=no
40928fi
40929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40930  ac_ext=cpp
40931ac_cpp='$CXXCPP $CPPFLAGS'
40932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40935
40936  CFLAGS="$saved_cflags"
40937
40938  saved_cxxflags="$CXXFLAGS"
40939  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40940  ac_ext=cpp
40941ac_cpp='$CXXCPP $CPPFLAGS'
40942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40945
40946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40947/* end confdefs.h.  */
40948int i;
40949_ACEOF
40950if ac_fn_cxx_try_compile "$LINENO"; then :
40951
40952else
40953  supports=no
40954fi
40955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40956  ac_ext=cpp
40957ac_cpp='$CXXCPP $CPPFLAGS'
40958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40961
40962  CXXFLAGS="$saved_cxxflags"
40963
40964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40965$as_echo "$supports" >&6; }
40966  if test "x$supports" = "xyes" ; then
40967    HAS_CFLAG_OPTIMIZE_DEBUG=true
40968  else
40969    HAS_CFLAG_OPTIMIZE_DEBUG=false
40970  fi
40971
40972
40973    # "-z relro" supported in GNU binutils 2.17 and later
40974    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40975
40976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40977$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40978  supports=yes
40979
40980  saved_ldflags="$LDFLAGS"
40981  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40982  ac_ext=c
40983ac_cpp='$CPP $CPPFLAGS'
40984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40986ac_compiler_gnu=$ac_cv_c_compiler_gnu
40987
40988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40989/* end confdefs.h.  */
40990
40991int
40992main ()
40993{
40994
40995  ;
40996  return 0;
40997}
40998_ACEOF
40999if ac_fn_c_try_link "$LINENO"; then :
41000
41001else
41002  supports=no
41003fi
41004rm -f core conftest.err conftest.$ac_objext \
41005    conftest$ac_exeext conftest.$ac_ext
41006  ac_ext=cpp
41007ac_cpp='$CXXCPP $CPPFLAGS'
41008ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41009ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41010ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41011
41012  LDFLAGS="$saved_ldflags"
41013
41014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41015$as_echo "$supports" >&6; }
41016  if test "x$supports" = "xyes" ; then
41017    HAS_LINKER_RELRO=true
41018  else
41019    HAS_LINKER_RELRO=false
41020  fi
41021
41022
41023    # "-z now" supported in GNU binutils 2.11 and later
41024    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41025
41026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41027$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41028  supports=yes
41029
41030  saved_ldflags="$LDFLAGS"
41031  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41032  ac_ext=c
41033ac_cpp='$CPP $CPPFLAGS'
41034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41036ac_compiler_gnu=$ac_cv_c_compiler_gnu
41037
41038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41039/* end confdefs.h.  */
41040
41041int
41042main ()
41043{
41044
41045  ;
41046  return 0;
41047}
41048_ACEOF
41049if ac_fn_c_try_link "$LINENO"; then :
41050
41051else
41052  supports=no
41053fi
41054rm -f core conftest.err conftest.$ac_objext \
41055    conftest$ac_exeext conftest.$ac_ext
41056  ac_ext=cpp
41057ac_cpp='$CXXCPP $CPPFLAGS'
41058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41061
41062  LDFLAGS="$saved_ldflags"
41063
41064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41065$as_echo "$supports" >&6; }
41066  if test "x$supports" = "xyes" ; then
41067    HAS_LINKER_NOW=true
41068  else
41069    HAS_LINKER_NOW=false
41070  fi
41071
41072  fi
41073
41074  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41075  # in executable.'
41076  USING_BROKEN_SUSE_LD=no
41077  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41079$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41080    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41081    $ECHO "int main() { }" > main.c
41082    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41084$as_echo "no" >&6; }
41085      USING_BROKEN_SUSE_LD=no
41086    else
41087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41088$as_echo "yes" >&6; }
41089      USING_BROKEN_SUSE_LD=yes
41090    fi
41091    rm -rf version-script.map main.c a.out
41092  fi
41093
41094
41095
41096# Setup the JTReg Regression Test Harness.
41097
41098
41099# Check whether --with-jtreg was given.
41100if test "${with_jtreg+set}" = set; then :
41101  withval=$with_jtreg;
41102else
41103  with_jtreg=no
41104fi
41105
41106
41107  if test "x$with_jtreg" = xno; then
41108    # jtreg disabled
41109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41110$as_echo_n "checking for jtreg... " >&6; }
41111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41112$as_echo "no" >&6; }
41113  else
41114    if test "x$with_jtreg" != xyes; then
41115      # with path specified.
41116      JT_HOME="$with_jtreg"
41117    fi
41118
41119    if test "x$JT_HOME" != x; then
41120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41121$as_echo_n "checking for jtreg... " >&6; }
41122
41123      # use JT_HOME enviroment var.
41124
41125  # Only process if variable expands to non-empty
41126
41127  if test "x$JT_HOME" != x; then
41128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41129
41130  # Input might be given as Windows format, start by converting to
41131  # unix format.
41132  path="$JT_HOME"
41133  new_path=`$CYGPATH -u "$path"`
41134
41135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41138  # "foo.exe" is OK but "foo" is an error.
41139  #
41140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41141  # It is also a way to make sure we got the proper file name for the real test later on.
41142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41143  if test "x$test_shortpath" = x; then
41144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41145$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41146    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41147  fi
41148
41149  # Call helper function which possibly converts this using DOS-style short mode.
41150  # If so, the updated path is stored in $new_path.
41151
41152  input_path="$new_path"
41153  # Check if we need to convert this using DOS-style short mode. If the path
41154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41155  # take no chances and rewrite it.
41156  # Note: m4 eats our [], so we need to use [ and ] instead.
41157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41158  if test "x$has_forbidden_chars" != x; then
41159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41163      # Going to short mode and back again did indeed matter. Since short mode is
41164      # case insensitive, let's make it lowercase to improve readability.
41165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41166      # Now convert it back to Unix-style (cygpath)
41167      input_path=`$CYGPATH -u "$shortmode_path"`
41168      new_path="$input_path"
41169    fi
41170  fi
41171
41172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41173  if test "x$test_cygdrive_prefix" = x; then
41174    # As a simple fix, exclude /usr/bin since it's not a real path.
41175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41177      # a path prefixed by /cygdrive for fixpath to work.
41178      new_path="$CYGWIN_ROOT_PATH$input_path"
41179    fi
41180  fi
41181
41182
41183  if test "x$path" != "x$new_path"; then
41184    JT_HOME="$new_path"
41185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41186$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41187  fi
41188
41189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41190
41191  path="$JT_HOME"
41192  has_colon=`$ECHO $path | $GREP ^.:`
41193  new_path="$path"
41194  if test "x$has_colon" = x; then
41195    # Not in mixed or Windows style, start by that.
41196    new_path=`cmd //c echo $path`
41197  fi
41198
41199
41200  input_path="$new_path"
41201  # Check if we need to convert this using DOS-style short mode. If the path
41202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41203  # take no chances and rewrite it.
41204  # Note: m4 eats our [], so we need to use [ and ] instead.
41205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41206  if test "x$has_forbidden_chars" != x; then
41207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41209  fi
41210
41211
41212  windows_path="$new_path"
41213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41214    unix_path=`$CYGPATH -u "$windows_path"`
41215    new_path="$unix_path"
41216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41218    new_path="$unix_path"
41219  fi
41220
41221  if test "x$path" != "x$new_path"; then
41222    JT_HOME="$new_path"
41223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41224$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41225  fi
41226
41227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41229
41230    else
41231      # We're on a unix platform. Hooray! :)
41232      path="$JT_HOME"
41233      has_space=`$ECHO "$path" | $GREP " "`
41234      if test "x$has_space" != x; then
41235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41236$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41238      fi
41239
41240      # Use eval to expand a potential ~
41241      eval path="$path"
41242      if test ! -f "$path" && test ! -d "$path"; then
41243        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41244      fi
41245
41246      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41247    fi
41248  fi
41249
41250
41251      # jtreg win32 script works for everybody
41252      JTREGEXE="$JT_HOME/bin/jtreg"
41253
41254      if test ! -f "$JTREGEXE"; then
41255        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41256      fi
41257
41258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41259$as_echo "$JTREGEXE" >&6; }
41260    else
41261      # try to find jtreg on path
41262
41263
41264
41265  # Publish this variable in the help.
41266
41267
41268  if test "x$JTREGEXE" = x; then
41269    # The variable is not set by user, try to locate tool using the code snippet
41270    for ac_prog in jtreg
41271do
41272  # Extract the first word of "$ac_prog", so it can be a program name with args.
41273set dummy $ac_prog; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_path_JTREGEXE+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  case $JTREGEXE in
41280  [\\/]* | ?:[\\/]*)
41281  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41282  ;;
41283  *)
41284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299  ;;
41300esac
41301fi
41302JTREGEXE=$ac_cv_path_JTREGEXE
41303if test -n "$JTREGEXE"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41305$as_echo "$JTREGEXE" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312  test -n "$JTREGEXE" && break
41313done
41314
41315  else
41316    # The variable is set, but is it from the command line or the environment?
41317
41318    # Try to remove the string !JTREGEXE! from our list.
41319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41321      # If it failed, the variable was not from the command line. Ignore it,
41322      # but warn the user (except for BASH, which is always set by the calling BASH).
41323      if test "xJTREGEXE" != xBASH; then
41324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41325$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41326      fi
41327      # Try to locate tool using the code snippet
41328      for ac_prog in jtreg
41329do
41330  # Extract the first word of "$ac_prog", so it can be a program name with args.
41331set dummy $ac_prog; ac_word=$2
41332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41333$as_echo_n "checking for $ac_word... " >&6; }
41334if ${ac_cv_path_JTREGEXE+:} false; then :
41335  $as_echo_n "(cached) " >&6
41336else
41337  case $JTREGEXE in
41338  [\\/]* | ?:[\\/]*)
41339  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41340  ;;
41341  *)
41342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41343for as_dir in $PATH
41344do
41345  IFS=$as_save_IFS
41346  test -z "$as_dir" && as_dir=.
41347    for ac_exec_ext in '' $ac_executable_extensions; do
41348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41349    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41351    break 2
41352  fi
41353done
41354  done
41355IFS=$as_save_IFS
41356
41357  ;;
41358esac
41359fi
41360JTREGEXE=$ac_cv_path_JTREGEXE
41361if test -n "$JTREGEXE"; then
41362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41363$as_echo "$JTREGEXE" >&6; }
41364else
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41366$as_echo "no" >&6; }
41367fi
41368
41369
41370  test -n "$JTREGEXE" && break
41371done
41372
41373    else
41374      # If it succeeded, then it was overridden by the user. We will use it
41375      # for the tool.
41376
41377      # First remove it from the list of overridden variables, so we can test
41378      # for unknown variables in the end.
41379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41380
41381      # Check if the provided tool contains a complete path.
41382      tool_specified="$JTREGEXE"
41383      tool_basename="${tool_specified##*/}"
41384      if test "x$tool_basename" = "x$tool_specified"; then
41385        # A command without a complete path is provided, search $PATH.
41386        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41387$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41388        # Extract the first word of "$tool_basename", so it can be a program name with args.
41389set dummy $tool_basename; ac_word=$2
41390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41391$as_echo_n "checking for $ac_word... " >&6; }
41392if ${ac_cv_path_JTREGEXE+:} false; then :
41393  $as_echo_n "(cached) " >&6
41394else
41395  case $JTREGEXE in
41396  [\\/]* | ?:[\\/]*)
41397  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41398  ;;
41399  *)
41400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41401for as_dir in $PATH
41402do
41403  IFS=$as_save_IFS
41404  test -z "$as_dir" && as_dir=.
41405    for ac_exec_ext in '' $ac_executable_extensions; do
41406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41407    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41409    break 2
41410  fi
41411done
41412  done
41413IFS=$as_save_IFS
41414
41415  ;;
41416esac
41417fi
41418JTREGEXE=$ac_cv_path_JTREGEXE
41419if test -n "$JTREGEXE"; then
41420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41421$as_echo "$JTREGEXE" >&6; }
41422else
41423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41424$as_echo "no" >&6; }
41425fi
41426
41427
41428        if test "x$JTREGEXE" = x; then
41429          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41430        fi
41431      else
41432        # Otherwise we believe it is a complete path. Use it as it is.
41433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41434$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41436$as_echo_n "checking for JTREGEXE... " >&6; }
41437        if test ! -x "$tool_specified"; then
41438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41439$as_echo "not found" >&6; }
41440          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41441        fi
41442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41443$as_echo "$tool_specified" >&6; }
41444      fi
41445    fi
41446  fi
41447
41448
41449
41450  if test "x$JTREGEXE" = x; then
41451    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41452  fi
41453
41454
41455      JT_HOME="`$DIRNAME $JTREGEXE`"
41456    fi
41457  fi
41458
41459
41460
41461
41462
41463
41464  # Option used to tell the compiler whether to create 32- or 64-bit executables
41465  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41466    COMPILER_TARGET_BITS_FLAG="-q"
41467  else
41468    COMPILER_TARGET_BITS_FLAG="-m"
41469  fi
41470
41471
41472  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41473  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41474    ARFLAGS="-r"
41475  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41476    ARFLAGS="-X64"
41477  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41478    # lib.exe is used as AR to create static libraries.
41479    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41480  else
41481    ARFLAGS=""
41482  fi
41483
41484
41485  ## Setup strip.
41486  # FIXME: should this really be per platform, or should it be per toolchain type?
41487  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41488  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41489  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41490    STRIPFLAGS="-g"
41491  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41492    STRIPFLAGS="-x"
41493  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41494    STRIPFLAGS="-S"
41495  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41496    STRIPFLAGS="-X32_64"
41497  fi
41498
41499  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41500    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41501  fi
41502
41503
41504  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41505    # FIXME: break out into MCSFLAGS
41506    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41507  fi
41508
41509
41510  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41511    CC_OUT_OPTION=-Fo
41512    EXE_OUT_OPTION=-out:
41513    LD_OUT_OPTION=-out:
41514    AR_OUT_OPTION=-out:
41515  else
41516    # The option used to specify the target .o,.a or .so file.
41517    # When compiling, how to specify the to be created object file.
41518    CC_OUT_OPTION='-o$(SPACE)'
41519    # When linking, how to specify the to be created executable.
41520    EXE_OUT_OPTION='-o$(SPACE)'
41521    # When linking, how to specify the to be created dynamically linkable library.
41522    LD_OUT_OPTION='-o$(SPACE)'
41523    # When archiving, how to specify the to be create static archive for object files.
41524    AR_OUT_OPTION='rcs$(SPACE)'
41525  fi
41526
41527
41528
41529
41530
41531  # On Windows, we need to set RC flags.
41532  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41533    RC_FLAGS="-nologo -l0x409"
41534    if test "x$VARIANT" = xOPT; then
41535      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41536    fi
41537
41538    # The version variables used to create RC_FLAGS may be overridden
41539    # in a custom configure script, or possibly the command line.
41540    # Let those variables be expanded at make time in spec.gmk.
41541    # The \$ are escaped to the shell, and the $(...) variables
41542    # are evaluated by make.
41543    RC_FLAGS="$RC_FLAGS \
41544        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41545        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41546        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41547        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41548        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41549        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41550        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41551  fi
41552
41553
41554  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41555    # silence copyright notice and other headers.
41556    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41557  fi
41558
41559  if test "x$SYSROOT" != "x"; then
41560    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41561      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41562        # Solaris Studio does not have a concept of sysroot. Instead we must
41563        # make sure the default include and lib dirs are appended to each
41564        # compile and link command line.
41565        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41566        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41567            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41568            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41569      fi
41570    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41571      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41572      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41573      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41574    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41575      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41576      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41577    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41578      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41579      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41580    fi
41581    # Propagate the sysroot args to hotspot
41582    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41583    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41584    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41585  fi
41586
41587  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41588  # set this here so it doesn't have to be peppered throughout the forest
41589  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41590    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41591    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41592  fi
41593
41594
41595
41596
41597
41598# FIXME: Currently we must test this after toolchain but before flags. Fix!
41599
41600# Now we can test some aspects on the target using configure macros.
41601
41602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41603$as_echo_n "checking for ANSI C header files... " >&6; }
41604if ${ac_cv_header_stdc+:} false; then :
41605  $as_echo_n "(cached) " >&6
41606else
41607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41608/* end confdefs.h.  */
41609#include <stdlib.h>
41610#include <stdarg.h>
41611#include <string.h>
41612#include <float.h>
41613
41614int
41615main ()
41616{
41617
41618  ;
41619  return 0;
41620}
41621_ACEOF
41622if ac_fn_cxx_try_compile "$LINENO"; then :
41623  ac_cv_header_stdc=yes
41624else
41625  ac_cv_header_stdc=no
41626fi
41627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41628
41629if test $ac_cv_header_stdc = yes; then
41630  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41632/* end confdefs.h.  */
41633#include <string.h>
41634
41635_ACEOF
41636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41637  $EGREP "memchr" >/dev/null 2>&1; then :
41638
41639else
41640  ac_cv_header_stdc=no
41641fi
41642rm -f conftest*
41643
41644fi
41645
41646if test $ac_cv_header_stdc = yes; then
41647  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41649/* end confdefs.h.  */
41650#include <stdlib.h>
41651
41652_ACEOF
41653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41654  $EGREP "free" >/dev/null 2>&1; then :
41655
41656else
41657  ac_cv_header_stdc=no
41658fi
41659rm -f conftest*
41660
41661fi
41662
41663if test $ac_cv_header_stdc = yes; then
41664  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41665  if test "$cross_compiling" = yes; then :
41666  :
41667else
41668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41669/* end confdefs.h.  */
41670#include <ctype.h>
41671#include <stdlib.h>
41672#if ((' ' & 0x0FF) == 0x020)
41673# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41674# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41675#else
41676# define ISLOWER(c) \
41677		   (('a' <= (c) && (c) <= 'i') \
41678		     || ('j' <= (c) && (c) <= 'r') \
41679		     || ('s' <= (c) && (c) <= 'z'))
41680# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41681#endif
41682
41683#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41684int
41685main ()
41686{
41687  int i;
41688  for (i = 0; i < 256; i++)
41689    if (XOR (islower (i), ISLOWER (i))
41690	|| toupper (i) != TOUPPER (i))
41691      return 2;
41692  return 0;
41693}
41694_ACEOF
41695if ac_fn_cxx_try_run "$LINENO"; then :
41696
41697else
41698  ac_cv_header_stdc=no
41699fi
41700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41701  conftest.$ac_objext conftest.beam conftest.$ac_ext
41702fi
41703
41704fi
41705fi
41706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41707$as_echo "$ac_cv_header_stdc" >&6; }
41708if test $ac_cv_header_stdc = yes; then
41709
41710$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41711
41712fi
41713
41714# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41715for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41716		  inttypes.h stdint.h unistd.h
41717do :
41718  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41719ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41720"
41721if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41722  cat >>confdefs.h <<_ACEOF
41723#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41724_ACEOF
41725
41726fi
41727
41728done
41729
41730
41731
41732  ###############################################################################
41733  #
41734  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41735  # (The JVM can use 32 or 64 bit Java pointers but that decision
41736  # is made at runtime.)
41737  #
41738
41739  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41740    # Always specify -m flag on Solaris
41741    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41742
41743  # When we add flags to the "official" CFLAGS etc, we need to
41744  # keep track of these additions in ADDED_CFLAGS etc. These
41745  # will later be checked to make sure only controlled additions
41746  # have been made to CFLAGS etc.
41747  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41748  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41749  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41750
41751  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41752  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41753  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41754
41755  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41756  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41757  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41758
41759  elif test "x$COMPILE_TYPE" = xreduced; then
41760    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41761      # Specify -m if running reduced on unix platforms
41762
41763  # When we add flags to the "official" CFLAGS etc, we need to
41764  # keep track of these additions in ADDED_CFLAGS etc. These
41765  # will later be checked to make sure only controlled additions
41766  # have been made to CFLAGS etc.
41767  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41768  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41769  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41770
41771  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41772  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41773  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41774
41775  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41776  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41777  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41778
41779    fi
41780  fi
41781
41782  # Make compilation sanity check
41783  for ac_header in stdio.h
41784do :
41785  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41786if test "x$ac_cv_header_stdio_h" = xyes; then :
41787  cat >>confdefs.h <<_ACEOF
41788#define HAVE_STDIO_H 1
41789_ACEOF
41790
41791else
41792
41793    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41794$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41795    if test "x$COMPILE_TYPE" = xreduced; then
41796      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41797$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41798    elif test "x$COMPILE_TYPE" = xcross; then
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41800$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41801    fi
41802    as_fn_error $? "Cannot continue." "$LINENO" 5
41803
41804fi
41805
41806done
41807
41808
41809  # The cast to long int works around a bug in the HP C Compiler
41810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41812# This bug is HP SR number 8606223364.
41813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41814$as_echo_n "checking size of int *... " >&6; }
41815if ${ac_cv_sizeof_int_p+:} false; then :
41816  $as_echo_n "(cached) " >&6
41817else
41818  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41819
41820else
41821  if test "$ac_cv_type_int_p" = yes; then
41822     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41824as_fn_error 77 "cannot compute sizeof (int *)
41825See \`config.log' for more details" "$LINENO" 5; }
41826   else
41827     ac_cv_sizeof_int_p=0
41828   fi
41829fi
41830
41831fi
41832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41833$as_echo "$ac_cv_sizeof_int_p" >&6; }
41834
41835
41836
41837cat >>confdefs.h <<_ACEOF
41838#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41839_ACEOF
41840
41841
41842
41843  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41844  if test "x$ac_cv_sizeof_int_p" = x; then
41845    # The test failed, lets stick to the assumed value.
41846    { $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
41847$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41848  else
41849    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41850
41851    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41852      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41853      # Let's try to implicitely set the compilers target architecture and retry the test
41854      { $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
41855$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;}
41856      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41857$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41858
41859  # When we add flags to the "official" CFLAGS etc, we need to
41860  # keep track of these additions in ADDED_CFLAGS etc. These
41861  # will later be checked to make sure only controlled additions
41862  # have been made to CFLAGS etc.
41863  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41864  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41865  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41866
41867  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41868  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41869  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41870
41871  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41872  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41873  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41874
41875
41876      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41877      unset ac_cv_sizeof_int_p
41878      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41879      cat >>confdefs.h <<_ACEOF
41880#undef SIZEOF_INT_P
41881_ACEOF
41882
41883      # The cast to long int works around a bug in the HP C Compiler
41884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41886# This bug is HP SR number 8606223364.
41887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41888$as_echo_n "checking size of int *... " >&6; }
41889if ${ac_cv_sizeof_int_p+:} false; then :
41890  $as_echo_n "(cached) " >&6
41891else
41892  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41893
41894else
41895  if test "$ac_cv_type_int_p" = yes; then
41896     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41898as_fn_error 77 "cannot compute sizeof (int *)
41899See \`config.log' for more details" "$LINENO" 5; }
41900   else
41901     ac_cv_sizeof_int_p=0
41902   fi
41903fi
41904
41905fi
41906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41907$as_echo "$ac_cv_sizeof_int_p" >&6; }
41908
41909
41910
41911cat >>confdefs.h <<_ACEOF
41912#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41913_ACEOF
41914
41915
41916
41917      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41918
41919      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41920        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
41921      fi
41922    fi
41923  fi
41924
41925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41926$as_echo_n "checking for target address size... " >&6; }
41927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41928$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41929
41930
41931  ###############################################################################
41932  #
41933  # Is the target little of big endian?
41934  #
41935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41936$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41937if ${ac_cv_c_bigendian+:} false; then :
41938  $as_echo_n "(cached) " >&6
41939else
41940  ac_cv_c_bigendian=unknown
41941    # See if we're dealing with a universal compiler.
41942    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41943/* end confdefs.h.  */
41944#ifndef __APPLE_CC__
41945	       not a universal capable compiler
41946	     #endif
41947	     typedef int dummy;
41948
41949_ACEOF
41950if ac_fn_cxx_try_compile "$LINENO"; then :
41951
41952	# Check for potential -arch flags.  It is not universal unless
41953	# there are at least two -arch flags with different values.
41954	ac_arch=
41955	ac_prev=
41956	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41957	 if test -n "$ac_prev"; then
41958	   case $ac_word in
41959	     i?86 | x86_64 | ppc | ppc64)
41960	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41961		 ac_arch=$ac_word
41962	       else
41963		 ac_cv_c_bigendian=universal
41964		 break
41965	       fi
41966	       ;;
41967	   esac
41968	   ac_prev=
41969	 elif test "x$ac_word" = "x-arch"; then
41970	   ac_prev=arch
41971	 fi
41972       done
41973fi
41974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41975    if test $ac_cv_c_bigendian = unknown; then
41976      # See if sys/param.h defines the BYTE_ORDER macro.
41977      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41978/* end confdefs.h.  */
41979#include <sys/types.h>
41980	     #include <sys/param.h>
41981
41982int
41983main ()
41984{
41985#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41986		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41987		     && LITTLE_ENDIAN)
41988	      bogus endian macros
41989	     #endif
41990
41991  ;
41992  return 0;
41993}
41994_ACEOF
41995if ac_fn_cxx_try_compile "$LINENO"; then :
41996  # It does; now see whether it defined to BIG_ENDIAN or not.
41997	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41998/* end confdefs.h.  */
41999#include <sys/types.h>
42000		#include <sys/param.h>
42001
42002int
42003main ()
42004{
42005#if BYTE_ORDER != BIG_ENDIAN
42006		 not big endian
42007		#endif
42008
42009  ;
42010  return 0;
42011}
42012_ACEOF
42013if ac_fn_cxx_try_compile "$LINENO"; then :
42014  ac_cv_c_bigendian=yes
42015else
42016  ac_cv_c_bigendian=no
42017fi
42018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42019fi
42020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42021    fi
42022    if test $ac_cv_c_bigendian = unknown; then
42023      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42024      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42025/* end confdefs.h.  */
42026#include <limits.h>
42027
42028int
42029main ()
42030{
42031#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42032	      bogus endian macros
42033	     #endif
42034
42035  ;
42036  return 0;
42037}
42038_ACEOF
42039if ac_fn_cxx_try_compile "$LINENO"; then :
42040  # It does; now see whether it defined to _BIG_ENDIAN or not.
42041	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42042/* end confdefs.h.  */
42043#include <limits.h>
42044
42045int
42046main ()
42047{
42048#ifndef _BIG_ENDIAN
42049		 not big endian
42050		#endif
42051
42052  ;
42053  return 0;
42054}
42055_ACEOF
42056if ac_fn_cxx_try_compile "$LINENO"; then :
42057  ac_cv_c_bigendian=yes
42058else
42059  ac_cv_c_bigendian=no
42060fi
42061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42062fi
42063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42064    fi
42065    if test $ac_cv_c_bigendian = unknown; then
42066      # Compile a test program.
42067      if test "$cross_compiling" = yes; then :
42068  # Try to guess by grepping values from an object file.
42069	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42070/* end confdefs.h.  */
42071short int ascii_mm[] =
42072		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42073		short int ascii_ii[] =
42074		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42075		int use_ascii (int i) {
42076		  return ascii_mm[i] + ascii_ii[i];
42077		}
42078		short int ebcdic_ii[] =
42079		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42080		short int ebcdic_mm[] =
42081		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42082		int use_ebcdic (int i) {
42083		  return ebcdic_mm[i] + ebcdic_ii[i];
42084		}
42085		extern int foo;
42086
42087int
42088main ()
42089{
42090return use_ascii (foo) == use_ebcdic (foo);
42091  ;
42092  return 0;
42093}
42094_ACEOF
42095if ac_fn_cxx_try_compile "$LINENO"; then :
42096  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42097	      ac_cv_c_bigendian=yes
42098	    fi
42099	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42100	      if test "$ac_cv_c_bigendian" = unknown; then
42101		ac_cv_c_bigendian=no
42102	      else
42103		# finding both strings is unlikely to happen, but who knows?
42104		ac_cv_c_bigendian=unknown
42105	      fi
42106	    fi
42107fi
42108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42109else
42110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42111/* end confdefs.h.  */
42112$ac_includes_default
42113int
42114main ()
42115{
42116
42117	     /* Are we little or big endian?  From Harbison&Steele.  */
42118	     union
42119	     {
42120	       long int l;
42121	       char c[sizeof (long int)];
42122	     } u;
42123	     u.l = 1;
42124	     return u.c[sizeof (long int) - 1] == 1;
42125
42126  ;
42127  return 0;
42128}
42129_ACEOF
42130if ac_fn_cxx_try_run "$LINENO"; then :
42131  ac_cv_c_bigendian=no
42132else
42133  ac_cv_c_bigendian=yes
42134fi
42135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42136  conftest.$ac_objext conftest.beam conftest.$ac_ext
42137fi
42138
42139    fi
42140fi
42141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42142$as_echo "$ac_cv_c_bigendian" >&6; }
42143 case $ac_cv_c_bigendian in #(
42144   yes)
42145     ENDIAN="big";; #(
42146   no)
42147     ENDIAN="little" ;; #(
42148   universal)
42149     ENDIAN="universal_endianness"
42150     ;; #(
42151   *)
42152     ENDIAN="unknown" ;;
42153 esac
42154
42155
42156  if test "x$ENDIAN" = xuniversal_endianness; then
42157    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42158  fi
42159  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42160    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
42161  fi
42162
42163
42164# Configure flags for the tools
42165
42166  ###############################################################################
42167  #
42168  # How to compile shared libraries.
42169  #
42170
42171  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42172    PICFLAG="-fPIC"
42173    C_FLAG_REORDER=''
42174    CXX_FLAG_REORDER=''
42175
42176    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42177      # Linking is different on MacOSX
42178      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42179      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42180      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42181      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42182      SET_SHARED_LIBRARY_MAPFILE=''
42183    else
42184      # Default works for linux, might work on other platforms as well.
42185      SHARED_LIBRARY_FLAGS='-shared'
42186      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42187      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42188      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42189      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42190    fi
42191  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42192    PICFLAG=''
42193    C_FLAG_REORDER=''
42194    CXX_FLAG_REORDER=''
42195
42196    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42197      # Linking is different on MacOSX
42198      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42199      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42200      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42201      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42202      SET_SHARED_LIBRARY_MAPFILE=''
42203    else
42204      # Default works for linux, might work on other platforms as well.
42205      SHARED_LIBRARY_FLAGS='-shared'
42206      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42207      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42208      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42209      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42210    fi
42211  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42212    PICFLAG="-KPIC"
42213    C_FLAG_REORDER='-xF'
42214    CXX_FLAG_REORDER='-xF'
42215    SHARED_LIBRARY_FLAGS="-G"
42216    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42217    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42218    SET_SHARED_LIBRARY_NAME=''
42219    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42220  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42221    PICFLAG="-qpic=large"
42222    C_FLAG_REORDER=''
42223    CXX_FLAG_REORDER=''
42224    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42225    SET_EXECUTABLE_ORIGIN=""
42226    SET_SHARED_LIBRARY_ORIGIN=''
42227    SET_SHARED_LIBRARY_NAME=''
42228    SET_SHARED_LIBRARY_MAPFILE=''
42229  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42230    PICFLAG=""
42231    C_FLAG_REORDER=''
42232    CXX_FLAG_REORDER=''
42233    SHARED_LIBRARY_FLAGS="-LD"
42234    SET_EXECUTABLE_ORIGIN=''
42235    SET_SHARED_LIBRARY_ORIGIN=''
42236    SET_SHARED_LIBRARY_NAME=''
42237    SET_SHARED_LIBRARY_MAPFILE=''
42238  fi
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42249    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42250    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42251    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42252  fi
42253  # The (cross) compiler is now configured, we can now test capabilities
42254  # of the target platform.
42255
42256
42257
42258  ###############################################################################
42259  #
42260  # Setup the opt flags for different compilers
42261  # and different operating systems.
42262  #
42263
42264  # FIXME: this was indirectly the old default, but just inherited.
42265  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42266  #   C_FLAG_DEPS="-MMD -MF"
42267  # fi
42268
42269  # Generate make dependency files
42270  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42271    C_FLAG_DEPS="-MMD -MF"
42272  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42273    C_FLAG_DEPS="-MMD -MF"
42274  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42275    C_FLAG_DEPS="-xMMD -xMF"
42276  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42277    C_FLAG_DEPS="-qmakedep=gcc -MF"
42278  fi
42279  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42280
42281
42282
42283  # Debug symbols
42284  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42285    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42286      # reduce from default "-g2" option to save space
42287      CFLAGS_DEBUG_SYMBOLS="-g1"
42288      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42289    else
42290      CFLAGS_DEBUG_SYMBOLS="-g"
42291      CXXFLAGS_DEBUG_SYMBOLS="-g"
42292    fi
42293  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42294    CFLAGS_DEBUG_SYMBOLS="-g"
42295    CXXFLAGS_DEBUG_SYMBOLS="-g"
42296  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42297    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42298    # FIXME: likely a bug, this disables debug symbols rather than enables them
42299    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42300  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42301    CFLAGS_DEBUG_SYMBOLS="-g"
42302    CXXFLAGS_DEBUG_SYMBOLS="-g"
42303  fi
42304
42305
42306
42307  # bounds, memory and behavior checking options
42308  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42309    case $DEBUG_LEVEL in
42310    release )
42311      # no adjustment
42312      ;;
42313    fastdebug )
42314      # no adjustment
42315      ;;
42316    slowdebug )
42317      # Add runtime stack smashing and undefined behavior checks
42318      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42319      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42320      ;;
42321    esac
42322  fi
42323
42324
42325
42326  # Optimization levels
42327  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42328    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42329
42330    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42331      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42332      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42333      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42334      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42335      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42336      C_O_FLAG_NONE="-xregs=no%frameptr"
42337      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42338      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42339      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42340      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42341      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42342      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42343        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42344        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42345      fi
42346    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42347      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42348      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42349      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42350      C_O_FLAG_DEBUG=""
42351      C_O_FLAG_NONE=""
42352      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42353      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42354      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42355      C_O_FLAG_DEBUG=""
42356      CXX_O_FLAG_NONE=""
42357    fi
42358  else
42359    # The remaining toolchains share opt flags between CC and CXX;
42360    # setup for C and duplicate afterwards.
42361    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42362      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42363        # On MacOSX we optimize for size, something
42364        # we should do for all platforms?
42365        C_O_FLAG_HIGHEST="-Os"
42366        C_O_FLAG_HI="-Os"
42367        C_O_FLAG_NORM="-Os"
42368      else
42369        C_O_FLAG_HIGHEST="-O3"
42370        C_O_FLAG_HI="-O3"
42371        C_O_FLAG_NORM="-O2"
42372      fi
42373      C_O_FLAG_DEBUG="-O0"
42374      C_O_FLAG_NONE="-O0"
42375    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42376      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42377        # On MacOSX we optimize for size, something
42378        # we should do for all platforms?
42379        C_O_FLAG_HIGHEST="-Os"
42380        C_O_FLAG_HI="-Os"
42381        C_O_FLAG_NORM="-Os"
42382      else
42383        C_O_FLAG_HIGHEST="-O3"
42384        C_O_FLAG_HI="-O3"
42385        C_O_FLAG_NORM="-O2"
42386      fi
42387      C_O_FLAG_DEBUG="-O0"
42388      C_O_FLAG_NONE="-O0"
42389    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42390      C_O_FLAG_HIGHEST="-O3"
42391      C_O_FLAG_HI="-O3 -qstrict"
42392      C_O_FLAG_NORM="-O2"
42393      C_O_FLAG_DEBUG="-qnoopt"
42394      C_O_FLAG_NONE="-qnoop"
42395    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42396      C_O_FLAG_HIGHEST="-O2"
42397      C_O_FLAG_HI="-O1"
42398      C_O_FLAG_NORM="-O1"
42399      C_O_FLAG_DEBUG="-Od"
42400      C_O_FLAG_NONE="-Od"
42401    fi
42402    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42403    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42404    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42405    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42406    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42407  fi
42408
42409  # Adjust optimization flags according to debug level.
42410  case $DEBUG_LEVEL in
42411    release )
42412      # no adjustment
42413      ;;
42414    fastdebug )
42415      # Not quite so much optimization
42416      C_O_FLAG_HI="$C_O_FLAG_NORM"
42417      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42418      ;;
42419    slowdebug )
42420      # Disable optimization
42421      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42422      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42423      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42424      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42425      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42426      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42427      ;;
42428  esac
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442  # Special extras...
42443  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42444    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42445      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42446      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42447    fi
42448    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42449    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42450  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42451    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42452    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42453  fi
42454
42455  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42457$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42458  fi
42459
42460  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42462$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42463  fi
42464
42465  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42467$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42468  fi
42469
42470
42471# Check whether --with-extra-cflags was given.
42472if test "${with_extra_cflags+set}" = set; then :
42473  withval=$with_extra_cflags;
42474fi
42475
42476
42477
42478# Check whether --with-extra-cxxflags was given.
42479if test "${with_extra_cxxflags+set}" = set; then :
42480  withval=$with_extra_cxxflags;
42481fi
42482
42483
42484
42485# Check whether --with-extra-ldflags was given.
42486if test "${with_extra_ldflags+set}" = set; then :
42487  withval=$with_extra_ldflags;
42488fi
42489
42490
42491  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42492  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42493  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42494
42495  # Hotspot needs these set in their legacy form
42496  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42497  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42498  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42499
42500
42501
42502
42503
42504  ###############################################################################
42505  #
42506  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42507  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42508  #
42509
42510  # Setup compiler/platform specific flags into
42511  #    CFLAGS_JDK    - C Compiler flags
42512  #    CXXFLAGS_JDK  - C++ Compiler flags
42513  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42514  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42515    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42516        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42517    case $OPENJDK_TARGET_CPU_ARCH in
42518      arm )
42519        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42520        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42521        ;;
42522      ppc )
42523        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42524        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42525        ;;
42526      * )
42527        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42528        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42529        ;;
42530    esac
42531  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42532    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42533    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42534      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42535    fi
42536
42537    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42538    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42539  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42540    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42541    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42542  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42543    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42544        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42545        -DWIN32_LEAN_AND_MEAN \
42546        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42547        -DWIN32 -DIAL"
42548    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42549      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42550    else
42551      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42552    fi
42553    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42554    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42555    # studio.
42556    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42557      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42558          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42559    fi
42560  fi
42561
42562  ###############################################################################
42563
42564  # Adjust flags according to debug level.
42565  case $DEBUG_LEVEL in
42566    fastdebug | slowdebug )
42567      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42568      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42569      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42570      ;;
42571    release )
42572      ;;
42573    * )
42574      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42575      ;;
42576  esac
42577
42578  # Setup LP64
42579  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42580
42581  # Set some common defines. These works for all compilers, but assume
42582  # -D is universally accepted.
42583
42584  # Setup endianness
42585  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42586    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42587    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42588    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42589    #   Note: -Dmacro         is the same as    #define macro 1
42590    #         -Dmacro=        is the same as    #define macro
42591    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42592      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42593    else
42594      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42595    fi
42596  else
42597    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42598    # are defined in the system?
42599    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42600      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42601    else
42602      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42603    fi
42604  fi
42605
42606  # Setup target OS define. Use OS target name but in upper case.
42607  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42608  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42609
42610  # Setup target CPU
42611  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42612
42613  # Setup debug/release defines
42614  if test "x$DEBUG_LEVEL" = xrelease; then
42615    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42616    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42617      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42618    fi
42619  else
42620    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42621  fi
42622
42623  # Setup release name
42624  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42625
42626
42627  # Set some additional per-OS defines.
42628  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42629    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42630  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42631    # FIXME: PPC64 should not be here.
42632    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42633  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42634    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42635  fi
42636
42637  # Additional macosx handling
42638  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42639    # Setting these parameters makes it an error to link to macosx APIs that are
42640    # newer than the given OS version and makes the linked binaries compatible
42641    # even if built on a newer version of the OS.
42642    # The expected format is X.Y.Z
42643    MACOSX_VERSION_MIN=10.7.0
42644
42645
42646    # The macro takes the version with no dots, ex: 1070
42647    # Let the flags variables get resolved in make for easier override on make
42648    # command line.
42649    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42650    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42651  fi
42652
42653  # Setup some hard coded includes
42654  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42655      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42656      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42657      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42658
42659  # The shared libraries are compiled using the picflag.
42660  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42661  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42662
42663  # Executable flags
42664  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42665  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42666
42667
42668
42669
42670
42671
42672  # Flags for compiling test libraries
42673  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42674  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42675
42676  # Flags for compiling test executables
42677  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42678  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42679
42680
42681
42682
42683
42684
42685  # Setup LDFLAGS et al.
42686  #
42687
42688  # Now this is odd. The JDK native libraries have to link against libjvm.so
42689  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42690  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42691  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42692  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42693  # libraries will link to whatever is in memory. Yuck.
42694  #
42695  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42696  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42697    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42698    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42699      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42700    fi
42701    # TODO: make -debug optional "--disable-full-debug-symbols"
42702    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42703  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42704    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42705    # We have previously set HAS_GNU_HASH if this is the case
42706    if test -n "$HAS_GNU_HASH"; then
42707      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42708    fi
42709    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42710      # And since we now know that the linker is gnu, then add -z defs, to forbid
42711      # undefined symbols in object files.
42712      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42713      case $DEBUG_LEVEL in
42714        release )
42715          # tell linker to optimize libraries.
42716          # Should this be supplied to the OSS linker as well?
42717          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42718          ;;
42719        slowdebug )
42720          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42721            # do relocations at load
42722            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42723            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42724          fi
42725          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42726            # mark relocations read only
42727            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42728            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42729          fi
42730          ;;
42731        fastdebug )
42732          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42733            # mark relocations read only
42734            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42735            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42736          fi
42737          ;;
42738        * )
42739          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42740          ;;
42741        esac
42742    fi
42743  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42744    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42745    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42746  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42747    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42748  fi
42749
42750  # Customize LDFLAGS for executables
42751
42752  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42753
42754  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42755    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42756      LDFLAGS_STACK_SIZE=1048576
42757    else
42758      LDFLAGS_STACK_SIZE=327680
42759    fi
42760    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42761  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42762    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42763  fi
42764
42765  # Customize LDFLAGS for libs
42766  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42767
42768  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42769    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42770    LDFLAGS_JDKLIB_SUFFIX=""
42771  else
42772    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42773        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42774
42775    # On some platforms (mac) the linker warns about non existing -L dirs.
42776    # Add server first if available. Linking aginst client does not always produce the same results.
42777    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42778    # Default to server for other variants.
42779    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42780      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42781    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42782      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42783    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42784      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42785    else
42786      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42787    fi
42788
42789    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42790    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42791      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42792    fi
42793  fi
42794
42795
42796
42797
42798
42799
42800
42801  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42802  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42803  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42804  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42805
42806
42807
42808
42809
42810
42811
42812  # Some Zero and Shark settings.
42813  # ZERO_ARCHFLAG tells the compiler which mode to build for
42814  case "${OPENJDK_TARGET_CPU}" in
42815    s390)
42816      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42817      ;;
42818    *)
42819      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42820  esac
42821
42822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42823$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42824  supports=yes
42825
42826  saved_cflags="$CFLAGS"
42827  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42828  ac_ext=c
42829ac_cpp='$CPP $CPPFLAGS'
42830ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42831ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42832ac_compiler_gnu=$ac_cv_c_compiler_gnu
42833
42834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42835/* end confdefs.h.  */
42836int i;
42837_ACEOF
42838if ac_fn_c_try_compile "$LINENO"; then :
42839
42840else
42841  supports=no
42842fi
42843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42844  ac_ext=cpp
42845ac_cpp='$CXXCPP $CPPFLAGS'
42846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42849
42850  CFLAGS="$saved_cflags"
42851
42852  saved_cxxflags="$CXXFLAGS"
42853  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42854  ac_ext=cpp
42855ac_cpp='$CXXCPP $CPPFLAGS'
42856ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42857ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42858ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42859
42860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42861/* end confdefs.h.  */
42862int i;
42863_ACEOF
42864if ac_fn_cxx_try_compile "$LINENO"; then :
42865
42866else
42867  supports=no
42868fi
42869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42870  ac_ext=cpp
42871ac_cpp='$CXXCPP $CPPFLAGS'
42872ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42873ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42874ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42875
42876  CXXFLAGS="$saved_cxxflags"
42877
42878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42879$as_echo "$supports" >&6; }
42880  if test "x$supports" = "xyes" ; then
42881    :
42882  else
42883    ZERO_ARCHFLAG=""
42884  fi
42885
42886
42887
42888  # Check that the compiler supports -mX (or -qX on AIX) flags
42889  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42890
42891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42892$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42893  supports=yes
42894
42895  saved_cflags="$CFLAGS"
42896  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42897  ac_ext=c
42898ac_cpp='$CPP $CPPFLAGS'
42899ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42900ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42901ac_compiler_gnu=$ac_cv_c_compiler_gnu
42902
42903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42904/* end confdefs.h.  */
42905int i;
42906_ACEOF
42907if ac_fn_c_try_compile "$LINENO"; then :
42908
42909else
42910  supports=no
42911fi
42912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42913  ac_ext=cpp
42914ac_cpp='$CXXCPP $CPPFLAGS'
42915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42918
42919  CFLAGS="$saved_cflags"
42920
42921  saved_cxxflags="$CXXFLAGS"
42922  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42923  ac_ext=cpp
42924ac_cpp='$CXXCPP $CPPFLAGS'
42925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42928
42929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42930/* end confdefs.h.  */
42931int i;
42932_ACEOF
42933if ac_fn_cxx_try_compile "$LINENO"; then :
42934
42935else
42936  supports=no
42937fi
42938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42939  ac_ext=cpp
42940ac_cpp='$CXXCPP $CPPFLAGS'
42941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42944
42945  CXXFLAGS="$saved_cxxflags"
42946
42947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42948$as_echo "$supports" >&6; }
42949  if test "x$supports" = "xyes" ; then
42950    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42951  else
42952    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42953  fi
42954
42955
42956
42957  case "${TOOLCHAIN_TYPE}" in
42958    microsoft)
42959      DISABLE_WARNING_PREFIX="-wd"
42960      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42961      ;;
42962    solstudio)
42963      DISABLE_WARNING_PREFIX="-erroff="
42964      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42965      ;;
42966    gcc)
42967      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42968
42969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42970$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42971  supports=yes
42972
42973  saved_cflags="$CFLAGS"
42974  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42975  ac_ext=c
42976ac_cpp='$CPP $CPPFLAGS'
42977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42979ac_compiler_gnu=$ac_cv_c_compiler_gnu
42980
42981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42982/* end confdefs.h.  */
42983int i;
42984_ACEOF
42985if ac_fn_c_try_compile "$LINENO"; then :
42986
42987else
42988  supports=no
42989fi
42990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42991  ac_ext=cpp
42992ac_cpp='$CXXCPP $CPPFLAGS'
42993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42996
42997  CFLAGS="$saved_cflags"
42998
42999  saved_cxxflags="$CXXFLAGS"
43000  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43001  ac_ext=cpp
43002ac_cpp='$CXXCPP $CPPFLAGS'
43003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43006
43007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43008/* end confdefs.h.  */
43009int i;
43010_ACEOF
43011if ac_fn_cxx_try_compile "$LINENO"; then :
43012
43013else
43014  supports=no
43015fi
43016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43017  ac_ext=cpp
43018ac_cpp='$CXXCPP $CPPFLAGS'
43019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43022
43023  CXXFLAGS="$saved_cxxflags"
43024
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43026$as_echo "$supports" >&6; }
43027  if test "x$supports" = "xyes" ; then
43028    GCC_CAN_DISABLE_WARNINGS=true
43029  else
43030    GCC_CAN_DISABLE_WARNINGS=false
43031
43032  fi
43033
43034      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43035        DISABLE_WARNING_PREFIX="-Wno-"
43036      else
43037        DISABLE_WARNING_PREFIX=
43038      fi
43039      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43040      ;;
43041    clang)
43042      DISABLE_WARNING_PREFIX="-Wno-"
43043      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43044      ;;
43045  esac
43046
43047
43048
43049
43050# Setup debug symbols (need objcopy from the toolchain for that)
43051
43052  #
43053  # ENABLE_DEBUG_SYMBOLS
43054  # This must be done after the toolchain is setup, since we're looking at objcopy.
43055  #
43056  # Check whether --enable-debug-symbols was given.
43057if test "${enable_debug_symbols+set}" = set; then :
43058  enableval=$enable_debug_symbols;
43059fi
43060
43061
43062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43063$as_echo_n "checking if we should generate debug symbols... " >&6; }
43064
43065  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43066    # explicit enabling of enable-debug-symbols and can't find objcopy
43067    #   this is an error
43068    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43069  fi
43070
43071  if test "x$enable_debug_symbols" = "xyes"; then
43072    ENABLE_DEBUG_SYMBOLS=true
43073  elif test "x$enable_debug_symbols" = "xno"; then
43074    ENABLE_DEBUG_SYMBOLS=false
43075  else
43076    # Default is on if objcopy is found
43077    if test "x$OBJCOPY" != x; then
43078      ENABLE_DEBUG_SYMBOLS=true
43079    # MacOS X and Windows don't use objcopy but default is on for those OSes
43080    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43081      ENABLE_DEBUG_SYMBOLS=true
43082    else
43083      ENABLE_DEBUG_SYMBOLS=false
43084    fi
43085  fi
43086
43087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43088$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43089
43090  #
43091  # ZIP_DEBUGINFO_FILES
43092  #
43093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43094$as_echo_n "checking if we should zip debug-info files... " >&6; }
43095  # Check whether --enable-zip-debug-info was given.
43096if test "${enable_zip_debug_info+set}" = set; then :
43097  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43098else
43099  enable_zip_debug_info="yes"
43100fi
43101
43102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43103$as_echo "${enable_zip_debug_info}" >&6; }
43104
43105  if test "x${enable_zip_debug_info}" = "xno"; then
43106    ZIP_DEBUGINFO_FILES=false
43107  else
43108    ZIP_DEBUGINFO_FILES=true
43109  fi
43110
43111
43112
43113
43114
43115  # Check whether --enable-native-coverage was given.
43116if test "${enable_native_coverage+set}" = set; then :
43117  enableval=$enable_native_coverage;
43118fi
43119
43120  GCOV_ENABLED="false"
43121  if test "x$enable_native_coverage" = "xyes"; then
43122    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43124$as_echo_n "checking if native coverage is enabled... " >&6; }
43125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43126$as_echo "yes" >&6; }
43127      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43128      GCOV_LDFLAGS="-fprofile-arcs"
43129      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43130      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43131      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43132      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43133      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43134      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43135      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43136      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43137      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43138      GCOV_ENABLED="true"
43139    else
43140      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43141    fi
43142  elif test "x$enable_native_coverage" = "xno"; then
43143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43144$as_echo_n "checking if native coverage is enabled... " >&6; }
43145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43146$as_echo "no" >&6; }
43147  elif test "x$enable_native_coverage" != "x"; then
43148    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43149  fi
43150
43151
43152
43153
43154###############################################################################
43155#
43156# Check dependencies for external and internal libraries.
43157#
43158###############################################################################
43159
43160# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43161
43162  # When using cygwin or msys, we need a wrapper binary that renames
43163  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43164  # @files and rewrites these too! This wrapper binary is
43165  # called fixpath.
43166  FIXPATH=
43167  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43169$as_echo_n "checking if fixpath can be created... " >&6; }
43170    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43171    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43172    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43173    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43174      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43175      FIXPATH="$FIXPATH_BIN -c"
43176    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43177      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43178      # @ was chosen as separator to minimize risk of other tools messing around with it
43179      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43180          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43181      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43182      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43183    fi
43184    FIXPATH_SRC_W="$FIXPATH_SRC"
43185    FIXPATH_BIN_W="$FIXPATH_BIN"
43186
43187  unix_path="$FIXPATH_SRC_W"
43188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43189    windows_path=`$CYGPATH -m "$unix_path"`
43190    FIXPATH_SRC_W="$windows_path"
43191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43192    windows_path=`cmd //c echo $unix_path`
43193    FIXPATH_SRC_W="$windows_path"
43194  fi
43195
43196
43197  unix_path="$FIXPATH_BIN_W"
43198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43199    windows_path=`$CYGPATH -m "$unix_path"`
43200    FIXPATH_BIN_W="$windows_path"
43201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43202    windows_path=`cmd //c echo $unix_path`
43203    FIXPATH_BIN_W="$windows_path"
43204  fi
43205
43206    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43207    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43208    cd $FIXPATH_DIR
43209    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43210    cd $CURDIR
43211
43212    if test ! -x $FIXPATH_BIN; then
43213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43214$as_echo "no" >&6; }
43215      cat $FIXPATH_DIR/fixpath1.log
43216      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43217    fi
43218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43219$as_echo "yes" >&6; }
43220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43221$as_echo_n "checking if fixpath.exe works... " >&6; }
43222    cd $FIXPATH_DIR
43223    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43224        > $FIXPATH_DIR/fixpath2.log 2>&1
43225    cd $CURDIR
43226    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43228$as_echo "no" >&6; }
43229      cat $FIXPATH_DIR/fixpath2.log
43230      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43231    fi
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43233$as_echo "yes" >&6; }
43234  fi
43235
43236
43237
43238
43239
43240
43241  ###############################################################################
43242  #
43243  # OS specific settings that we never will need to probe.
43244  #
43245  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43247$as_echo_n "checking what is not needed on Linux?... " >&6; }
43248    PULSE_NOT_NEEDED=yes
43249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43250$as_echo "pulse" >&6; }
43251  fi
43252
43253  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43255$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43256    ALSA_NOT_NEEDED=yes
43257    PULSE_NOT_NEEDED=yes
43258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43259$as_echo "alsa pulse" >&6; }
43260  fi
43261
43262  if test "x$OPENJDK_TARGET_OS" = xaix; then
43263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43264$as_echo_n "checking what is not needed on AIX?... " >&6; }
43265    ALSA_NOT_NEEDED=yes
43266    PULSE_NOT_NEEDED=yes
43267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43268$as_echo "alsa pulse" >&6; }
43269  fi
43270
43271
43272  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43274$as_echo_n "checking what is not needed on Windows?... " >&6; }
43275    CUPS_NOT_NEEDED=yes
43276    ALSA_NOT_NEEDED=yes
43277    PULSE_NOT_NEEDED=yes
43278    X11_NOT_NEEDED=yes
43279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43280$as_echo "alsa cups pulse x11" >&6; }
43281  fi
43282
43283  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43285$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43286    ALSA_NOT_NEEDED=yes
43287    PULSE_NOT_NEEDED=yes
43288    X11_NOT_NEEDED=yes
43289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43290$as_echo "alsa pulse x11" >&6; }
43291  fi
43292
43293  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43295$as_echo_n "checking what is not needed on bsd?... " >&6; }
43296    ALSA_NOT_NEEDED=yes
43297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43298$as_echo "alsa" >&6; }
43299  fi
43300
43301  if test "x$OPENJDK" = "xfalse"; then
43302    FREETYPE_NOT_NEEDED=yes
43303  fi
43304
43305  if test "x$SUPPORT_HEADFUL" = xno; then
43306    X11_NOT_NEEDED=yes
43307  fi
43308
43309
43310
43311  ###############################################################################
43312  #
43313  # Check for X Windows
43314  #
43315
43316  if test "x$X11_NOT_NEEDED" = xyes; then
43317    if test "x${with_x}" != x; then
43318      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43319$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43320    fi
43321    X_CFLAGS=
43322    X_LIBS=
43323  else
43324    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43325    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43326    # --x-libraries for the sysroot, if that seems to be correct.
43327    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43328      if test "x$SYSROOT" != "x"; then
43329        if test "x$x_includes" = xNONE; then
43330          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43331            x_includes="$SYSROOT/usr/X11R6/include"
43332          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43333            x_includes="$SYSROOT/usr/include"
43334          fi
43335        fi
43336        if test "x$x_libraries" = xNONE; then
43337          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43338            x_libraries="$SYSROOT/usr/X11R6/lib"
43339          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43340            x_libraries="$SYSROOT/usr/lib64"
43341          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43342            x_libraries="$SYSROOT/usr/lib"
43343          fi
43344        fi
43345      fi
43346    fi
43347
43348    # Now let autoconf do it's magic
43349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43350$as_echo_n "checking for X... " >&6; }
43351
43352
43353# Check whether --with-x was given.
43354if test "${with_x+set}" = set; then :
43355  withval=$with_x;
43356fi
43357
43358# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43359if test "x$with_x" = xno; then
43360  # The user explicitly disabled X.
43361  have_x=disabled
43362else
43363  case $x_includes,$x_libraries in #(
43364    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43365    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43366  $as_echo_n "(cached) " >&6
43367else
43368  # One or both of the vars are not set, and there is no cached value.
43369ac_x_includes=no ac_x_libraries=no
43370rm -f -r conftest.dir
43371if mkdir conftest.dir; then
43372  cd conftest.dir
43373  cat >Imakefile <<'_ACEOF'
43374incroot:
43375	@echo incroot='${INCROOT}'
43376usrlibdir:
43377	@echo usrlibdir='${USRLIBDIR}'
43378libdir:
43379	@echo libdir='${LIBDIR}'
43380_ACEOF
43381  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43382    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43383    for ac_var in incroot usrlibdir libdir; do
43384      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43385    done
43386    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43387    for ac_extension in a so sl dylib la dll; do
43388      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43389	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43390	ac_im_usrlibdir=$ac_im_libdir; break
43391      fi
43392    done
43393    # Screen out bogus values from the imake configuration.  They are
43394    # bogus both because they are the default anyway, and because
43395    # using them would break gcc on systems where it needs fixed includes.
43396    case $ac_im_incroot in
43397	/usr/include) ac_x_includes= ;;
43398	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43399    esac
43400    case $ac_im_usrlibdir in
43401	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43402	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43403    esac
43404  fi
43405  cd ..
43406  rm -f -r conftest.dir
43407fi
43408
43409# Standard set of common directories for X headers.
43410# Check X11 before X11Rn because it is often a symlink to the current release.
43411ac_x_header_dirs='
43412/usr/X11/include
43413/usr/X11R7/include
43414/usr/X11R6/include
43415/usr/X11R5/include
43416/usr/X11R4/include
43417
43418/usr/include/X11
43419/usr/include/X11R7
43420/usr/include/X11R6
43421/usr/include/X11R5
43422/usr/include/X11R4
43423
43424/usr/local/X11/include
43425/usr/local/X11R7/include
43426/usr/local/X11R6/include
43427/usr/local/X11R5/include
43428/usr/local/X11R4/include
43429
43430/usr/local/include/X11
43431/usr/local/include/X11R7
43432/usr/local/include/X11R6
43433/usr/local/include/X11R5
43434/usr/local/include/X11R4
43435
43436/usr/X386/include
43437/usr/x386/include
43438/usr/XFree86/include/X11
43439
43440/usr/include
43441/usr/local/include
43442/usr/unsupported/include
43443/usr/athena/include
43444/usr/local/x11r5/include
43445/usr/lpp/Xamples/include
43446
43447/usr/openwin/include
43448/usr/openwin/share/include'
43449
43450if test "$ac_x_includes" = no; then
43451  # Guess where to find include files, by looking for Xlib.h.
43452  # First, try using that file with no special directory specified.
43453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43454/* end confdefs.h.  */
43455#include <X11/Xlib.h>
43456_ACEOF
43457if ac_fn_cxx_try_cpp "$LINENO"; then :
43458  # We can compile using X headers with no special include directory.
43459ac_x_includes=
43460else
43461  for ac_dir in $ac_x_header_dirs; do
43462  if test -r "$ac_dir/X11/Xlib.h"; then
43463    ac_x_includes=$ac_dir
43464    break
43465  fi
43466done
43467fi
43468rm -f conftest.err conftest.i conftest.$ac_ext
43469fi # $ac_x_includes = no
43470
43471if test "$ac_x_libraries" = no; then
43472  # Check for the libraries.
43473  # See if we find them without any special options.
43474  # Don't add to $LIBS permanently.
43475  ac_save_LIBS=$LIBS
43476  LIBS="-lX11 $LIBS"
43477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43478/* end confdefs.h.  */
43479#include <X11/Xlib.h>
43480int
43481main ()
43482{
43483XrmInitialize ()
43484  ;
43485  return 0;
43486}
43487_ACEOF
43488if ac_fn_cxx_try_link "$LINENO"; then :
43489  LIBS=$ac_save_LIBS
43490# We can link X programs with no special library path.
43491ac_x_libraries=
43492else
43493  LIBS=$ac_save_LIBS
43494for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43495do
43496  # Don't even attempt the hair of trying to link an X program!
43497  for ac_extension in a so sl dylib la dll; do
43498    if test -r "$ac_dir/libX11.$ac_extension"; then
43499      ac_x_libraries=$ac_dir
43500      break 2
43501    fi
43502  done
43503done
43504fi
43505rm -f core conftest.err conftest.$ac_objext \
43506    conftest$ac_exeext conftest.$ac_ext
43507fi # $ac_x_libraries = no
43508
43509case $ac_x_includes,$ac_x_libraries in #(
43510  no,* | *,no | *\'*)
43511    # Didn't find X, or a directory has "'" in its name.
43512    ac_cv_have_x="have_x=no";; #(
43513  *)
43514    # Record where we found X for the cache.
43515    ac_cv_have_x="have_x=yes\
43516	ac_x_includes='$ac_x_includes'\
43517	ac_x_libraries='$ac_x_libraries'"
43518esac
43519fi
43520;; #(
43521    *) have_x=yes;;
43522  esac
43523  eval "$ac_cv_have_x"
43524fi # $with_x != no
43525
43526if test "$have_x" != yes; then
43527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43528$as_echo "$have_x" >&6; }
43529  no_x=yes
43530else
43531  # If each of the values was on the command line, it overrides each guess.
43532  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43533  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43534  # Update the cache value to reflect the command line values.
43535  ac_cv_have_x="have_x=yes\
43536	ac_x_includes='$x_includes'\
43537	ac_x_libraries='$x_libraries'"
43538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43539$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43540fi
43541
43542    if test "$no_x" = yes; then
43543  # Not all programs may use this symbol, but it does not hurt to define it.
43544
43545$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43546
43547  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43548else
43549  if test -n "$x_includes"; then
43550    X_CFLAGS="$X_CFLAGS -I$x_includes"
43551  fi
43552
43553  # It would also be nice to do this for all -L options, not just this one.
43554  if test -n "$x_libraries"; then
43555    X_LIBS="$X_LIBS -L$x_libraries"
43556    # For Solaris; some versions of Sun CC require a space after -R and
43557    # others require no space.  Words are not sufficient . . . .
43558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43559$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43560    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43561    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43562    ac_cxx_werror_flag=yes
43563    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43564/* end confdefs.h.  */
43565
43566int
43567main ()
43568{
43569
43570  ;
43571  return 0;
43572}
43573_ACEOF
43574if ac_fn_cxx_try_link "$LINENO"; then :
43575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43576$as_echo "no" >&6; }
43577       X_LIBS="$X_LIBS -R$x_libraries"
43578else
43579  LIBS="$ac_xsave_LIBS -R $x_libraries"
43580       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43581/* end confdefs.h.  */
43582
43583int
43584main ()
43585{
43586
43587  ;
43588  return 0;
43589}
43590_ACEOF
43591if ac_fn_cxx_try_link "$LINENO"; then :
43592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43593$as_echo "yes" >&6; }
43594	  X_LIBS="$X_LIBS -R $x_libraries"
43595else
43596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43597$as_echo "neither works" >&6; }
43598fi
43599rm -f core conftest.err conftest.$ac_objext \
43600    conftest$ac_exeext conftest.$ac_ext
43601fi
43602rm -f core conftest.err conftest.$ac_objext \
43603    conftest$ac_exeext conftest.$ac_ext
43604    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43605    LIBS=$ac_xsave_LIBS
43606  fi
43607
43608  # Check for system-dependent libraries X programs must link with.
43609  # Do this before checking for the system-independent R6 libraries
43610  # (-lICE), since we may need -lsocket or whatever for X linking.
43611
43612  if test "$ISC" = yes; then
43613    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43614  else
43615    # Martyn Johnson says this is needed for Ultrix, if the X
43616    # libraries were built with DECnet support.  And Karl Berry says
43617    # the Alpha needs dnet_stub (dnet does not exist).
43618    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43619    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43620/* end confdefs.h.  */
43621
43622/* Override any GCC internal prototype to avoid an error.
43623   Use char because int might match the return type of a GCC
43624   builtin and then its argument prototype would still apply.  */
43625#ifdef __cplusplus
43626extern "C"
43627#endif
43628char XOpenDisplay ();
43629int
43630main ()
43631{
43632return XOpenDisplay ();
43633  ;
43634  return 0;
43635}
43636_ACEOF
43637if ac_fn_cxx_try_link "$LINENO"; then :
43638
43639else
43640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43641$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43642if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43643  $as_echo_n "(cached) " >&6
43644else
43645  ac_check_lib_save_LIBS=$LIBS
43646LIBS="-ldnet  $LIBS"
43647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43648/* end confdefs.h.  */
43649
43650/* Override any GCC internal prototype to avoid an error.
43651   Use char because int might match the return type of a GCC
43652   builtin and then its argument prototype would still apply.  */
43653#ifdef __cplusplus
43654extern "C"
43655#endif
43656char dnet_ntoa ();
43657int
43658main ()
43659{
43660return dnet_ntoa ();
43661  ;
43662  return 0;
43663}
43664_ACEOF
43665if ac_fn_cxx_try_link "$LINENO"; then :
43666  ac_cv_lib_dnet_dnet_ntoa=yes
43667else
43668  ac_cv_lib_dnet_dnet_ntoa=no
43669fi
43670rm -f core conftest.err conftest.$ac_objext \
43671    conftest$ac_exeext conftest.$ac_ext
43672LIBS=$ac_check_lib_save_LIBS
43673fi
43674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43675$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43676if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43677  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43678fi
43679
43680    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43682$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43683if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43684  $as_echo_n "(cached) " >&6
43685else
43686  ac_check_lib_save_LIBS=$LIBS
43687LIBS="-ldnet_stub  $LIBS"
43688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43689/* end confdefs.h.  */
43690
43691/* Override any GCC internal prototype to avoid an error.
43692   Use char because int might match the return type of a GCC
43693   builtin and then its argument prototype would still apply.  */
43694#ifdef __cplusplus
43695extern "C"
43696#endif
43697char dnet_ntoa ();
43698int
43699main ()
43700{
43701return dnet_ntoa ();
43702  ;
43703  return 0;
43704}
43705_ACEOF
43706if ac_fn_cxx_try_link "$LINENO"; then :
43707  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43708else
43709  ac_cv_lib_dnet_stub_dnet_ntoa=no
43710fi
43711rm -f core conftest.err conftest.$ac_objext \
43712    conftest$ac_exeext conftest.$ac_ext
43713LIBS=$ac_check_lib_save_LIBS
43714fi
43715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43716$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43717if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43718  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43719fi
43720
43721    fi
43722fi
43723rm -f core conftest.err conftest.$ac_objext \
43724    conftest$ac_exeext conftest.$ac_ext
43725    LIBS="$ac_xsave_LIBS"
43726
43727    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43728    # to get the SysV transport functions.
43729    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43730    # needs -lnsl.
43731    # The nsl library prevents programs from opening the X display
43732    # on Irix 5.2, according to T.E. Dickey.
43733    # The functions gethostbyname, getservbyname, and inet_addr are
43734    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43735    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43736if test "x$ac_cv_func_gethostbyname" = xyes; then :
43737
43738fi
43739
43740    if test $ac_cv_func_gethostbyname = no; then
43741      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43742$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43743if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43744  $as_echo_n "(cached) " >&6
43745else
43746  ac_check_lib_save_LIBS=$LIBS
43747LIBS="-lnsl  $LIBS"
43748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43749/* end confdefs.h.  */
43750
43751/* Override any GCC internal prototype to avoid an error.
43752   Use char because int might match the return type of a GCC
43753   builtin and then its argument prototype would still apply.  */
43754#ifdef __cplusplus
43755extern "C"
43756#endif
43757char gethostbyname ();
43758int
43759main ()
43760{
43761return gethostbyname ();
43762  ;
43763  return 0;
43764}
43765_ACEOF
43766if ac_fn_cxx_try_link "$LINENO"; then :
43767  ac_cv_lib_nsl_gethostbyname=yes
43768else
43769  ac_cv_lib_nsl_gethostbyname=no
43770fi
43771rm -f core conftest.err conftest.$ac_objext \
43772    conftest$ac_exeext conftest.$ac_ext
43773LIBS=$ac_check_lib_save_LIBS
43774fi
43775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43776$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43777if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43778  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43779fi
43780
43781      if test $ac_cv_lib_nsl_gethostbyname = no; then
43782	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43783$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43784if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43785  $as_echo_n "(cached) " >&6
43786else
43787  ac_check_lib_save_LIBS=$LIBS
43788LIBS="-lbsd  $LIBS"
43789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43790/* end confdefs.h.  */
43791
43792/* Override any GCC internal prototype to avoid an error.
43793   Use char because int might match the return type of a GCC
43794   builtin and then its argument prototype would still apply.  */
43795#ifdef __cplusplus
43796extern "C"
43797#endif
43798char gethostbyname ();
43799int
43800main ()
43801{
43802return gethostbyname ();
43803  ;
43804  return 0;
43805}
43806_ACEOF
43807if ac_fn_cxx_try_link "$LINENO"; then :
43808  ac_cv_lib_bsd_gethostbyname=yes
43809else
43810  ac_cv_lib_bsd_gethostbyname=no
43811fi
43812rm -f core conftest.err conftest.$ac_objext \
43813    conftest$ac_exeext conftest.$ac_ext
43814LIBS=$ac_check_lib_save_LIBS
43815fi
43816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43817$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43818if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43819  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43820fi
43821
43822      fi
43823    fi
43824
43825    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43826    # socket/setsockopt and other routines are undefined under SCO ODT
43827    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43828    # on later versions), says Simon Leinen: it contains gethostby*
43829    # variants that don't use the name server (or something).  -lsocket
43830    # must be given before -lnsl if both are needed.  We assume that
43831    # if connect needs -lnsl, so does gethostbyname.
43832    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43833if test "x$ac_cv_func_connect" = xyes; then :
43834
43835fi
43836
43837    if test $ac_cv_func_connect = no; then
43838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43839$as_echo_n "checking for connect in -lsocket... " >&6; }
43840if ${ac_cv_lib_socket_connect+:} false; then :
43841  $as_echo_n "(cached) " >&6
43842else
43843  ac_check_lib_save_LIBS=$LIBS
43844LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43846/* end confdefs.h.  */
43847
43848/* Override any GCC internal prototype to avoid an error.
43849   Use char because int might match the return type of a GCC
43850   builtin and then its argument prototype would still apply.  */
43851#ifdef __cplusplus
43852extern "C"
43853#endif
43854char connect ();
43855int
43856main ()
43857{
43858return connect ();
43859  ;
43860  return 0;
43861}
43862_ACEOF
43863if ac_fn_cxx_try_link "$LINENO"; then :
43864  ac_cv_lib_socket_connect=yes
43865else
43866  ac_cv_lib_socket_connect=no
43867fi
43868rm -f core conftest.err conftest.$ac_objext \
43869    conftest$ac_exeext conftest.$ac_ext
43870LIBS=$ac_check_lib_save_LIBS
43871fi
43872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43873$as_echo "$ac_cv_lib_socket_connect" >&6; }
43874if test "x$ac_cv_lib_socket_connect" = xyes; then :
43875  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43876fi
43877
43878    fi
43879
43880    # Guillermo Gomez says -lposix is necessary on A/UX.
43881    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43882if test "x$ac_cv_func_remove" = xyes; then :
43883
43884fi
43885
43886    if test $ac_cv_func_remove = no; then
43887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43888$as_echo_n "checking for remove in -lposix... " >&6; }
43889if ${ac_cv_lib_posix_remove+:} false; then :
43890  $as_echo_n "(cached) " >&6
43891else
43892  ac_check_lib_save_LIBS=$LIBS
43893LIBS="-lposix  $LIBS"
43894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43895/* end confdefs.h.  */
43896
43897/* Override any GCC internal prototype to avoid an error.
43898   Use char because int might match the return type of a GCC
43899   builtin and then its argument prototype would still apply.  */
43900#ifdef __cplusplus
43901extern "C"
43902#endif
43903char remove ();
43904int
43905main ()
43906{
43907return remove ();
43908  ;
43909  return 0;
43910}
43911_ACEOF
43912if ac_fn_cxx_try_link "$LINENO"; then :
43913  ac_cv_lib_posix_remove=yes
43914else
43915  ac_cv_lib_posix_remove=no
43916fi
43917rm -f core conftest.err conftest.$ac_objext \
43918    conftest$ac_exeext conftest.$ac_ext
43919LIBS=$ac_check_lib_save_LIBS
43920fi
43921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43922$as_echo "$ac_cv_lib_posix_remove" >&6; }
43923if test "x$ac_cv_lib_posix_remove" = xyes; then :
43924  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43925fi
43926
43927    fi
43928
43929    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43930    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43931if test "x$ac_cv_func_shmat" = xyes; then :
43932
43933fi
43934
43935    if test $ac_cv_func_shmat = no; then
43936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43937$as_echo_n "checking for shmat in -lipc... " >&6; }
43938if ${ac_cv_lib_ipc_shmat+:} false; then :
43939  $as_echo_n "(cached) " >&6
43940else
43941  ac_check_lib_save_LIBS=$LIBS
43942LIBS="-lipc  $LIBS"
43943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43944/* end confdefs.h.  */
43945
43946/* Override any GCC internal prototype to avoid an error.
43947   Use char because int might match the return type of a GCC
43948   builtin and then its argument prototype would still apply.  */
43949#ifdef __cplusplus
43950extern "C"
43951#endif
43952char shmat ();
43953int
43954main ()
43955{
43956return shmat ();
43957  ;
43958  return 0;
43959}
43960_ACEOF
43961if ac_fn_cxx_try_link "$LINENO"; then :
43962  ac_cv_lib_ipc_shmat=yes
43963else
43964  ac_cv_lib_ipc_shmat=no
43965fi
43966rm -f core conftest.err conftest.$ac_objext \
43967    conftest$ac_exeext conftest.$ac_ext
43968LIBS=$ac_check_lib_save_LIBS
43969fi
43970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43971$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43972if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43973  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43974fi
43975
43976    fi
43977  fi
43978
43979  # Check for libraries that X11R6 Xt/Xaw programs need.
43980  ac_save_LDFLAGS=$LDFLAGS
43981  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43982  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43983  # check for ICE first), but we must link in the order -lSM -lICE or
43984  # we get undefined symbols.  So assume we have SM if we have ICE.
43985  # These have to be linked with before -lX11, unlike the other
43986  # libraries we check for below, so use a different variable.
43987  # John Interrante, Karl Berry
43988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43989$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43990if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43991  $as_echo_n "(cached) " >&6
43992else
43993  ac_check_lib_save_LIBS=$LIBS
43994LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43996/* end confdefs.h.  */
43997
43998/* Override any GCC internal prototype to avoid an error.
43999   Use char because int might match the return type of a GCC
44000   builtin and then its argument prototype would still apply.  */
44001#ifdef __cplusplus
44002extern "C"
44003#endif
44004char IceConnectionNumber ();
44005int
44006main ()
44007{
44008return IceConnectionNumber ();
44009  ;
44010  return 0;
44011}
44012_ACEOF
44013if ac_fn_cxx_try_link "$LINENO"; then :
44014  ac_cv_lib_ICE_IceConnectionNumber=yes
44015else
44016  ac_cv_lib_ICE_IceConnectionNumber=no
44017fi
44018rm -f core conftest.err conftest.$ac_objext \
44019    conftest$ac_exeext conftest.$ac_ext
44020LIBS=$ac_check_lib_save_LIBS
44021fi
44022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44023$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44024if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44025  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44026fi
44027
44028  LDFLAGS=$ac_save_LDFLAGS
44029
44030fi
44031
44032
44033    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44034    # this doesn't make sense so we remove it.
44035    if test "x$COMPILE_TYPE" = xcross; then
44036      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44037    fi
44038
44039    if test "x$no_x" = xyes; then
44040
44041  # Print a helpful message on how to acquire the necessary build dependency.
44042  # x11 is the help tag: freetype, cups, pulse, alsa etc
44043  MISSING_DEPENDENCY=x11
44044
44045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44046    cygwin_help $MISSING_DEPENDENCY
44047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44048    msys_help $MISSING_DEPENDENCY
44049  else
44050    PKGHANDLER_COMMAND=
44051
44052    case $PKGHANDLER in
44053      apt-get)
44054        apt_help     $MISSING_DEPENDENCY ;;
44055      yum)
44056        yum_help     $MISSING_DEPENDENCY ;;
44057      port)
44058        port_help    $MISSING_DEPENDENCY ;;
44059      pkgutil)
44060        pkgutil_help $MISSING_DEPENDENCY ;;
44061      pkgadd)
44062        pkgadd_help  $MISSING_DEPENDENCY ;;
44063    esac
44064
44065    if test "x$PKGHANDLER_COMMAND" != x; then
44066      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44067    fi
44068  fi
44069
44070      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44071    fi
44072
44073    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44074      OPENWIN_HOME="/usr/openwin"
44075      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44076      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44077          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44078          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44079          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44080    fi
44081
44082    ac_ext=c
44083ac_cpp='$CPP $CPPFLAGS'
44084ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44085ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44086ac_compiler_gnu=$ac_cv_c_compiler_gnu
44087
44088    OLD_CFLAGS="$CFLAGS"
44089    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44090
44091    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44092    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44093do :
44094  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44095ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44096          # include <X11/Xlib.h>
44097          # include <X11/Xutil.h>
44098
44099
44100"
44101if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44102  cat >>confdefs.h <<_ACEOF
44103#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44104_ACEOF
44105 X11_HEADERS_OK=yes
44106else
44107  X11_HEADERS_OK=no; break
44108fi
44109
44110done
44111
44112
44113    if test "x$X11_HEADERS_OK" = xno; then
44114
44115  # Print a helpful message on how to acquire the necessary build dependency.
44116  # x11 is the help tag: freetype, cups, pulse, alsa etc
44117  MISSING_DEPENDENCY=x11
44118
44119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44120    cygwin_help $MISSING_DEPENDENCY
44121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44122    msys_help $MISSING_DEPENDENCY
44123  else
44124    PKGHANDLER_COMMAND=
44125
44126    case $PKGHANDLER in
44127      apt-get)
44128        apt_help     $MISSING_DEPENDENCY ;;
44129      yum)
44130        yum_help     $MISSING_DEPENDENCY ;;
44131      port)
44132        port_help    $MISSING_DEPENDENCY ;;
44133      pkgutil)
44134        pkgutil_help $MISSING_DEPENDENCY ;;
44135      pkgadd)
44136        pkgadd_help  $MISSING_DEPENDENCY ;;
44137    esac
44138
44139    if test "x$PKGHANDLER_COMMAND" != x; then
44140      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44141    fi
44142  fi
44143
44144      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44145    fi
44146
44147    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44148    # defined in libawt_xawt.
44149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44150$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44151    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44152/* end confdefs.h.  */
44153#include <X11/extensions/Xrender.h>
44154int
44155main ()
44156{
44157XLinearGradient x;
44158  ;
44159  return 0;
44160}
44161_ACEOF
44162if ac_fn_c_try_compile "$LINENO"; then :
44163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44164$as_echo "yes" >&6; }
44165else
44166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44167$as_echo "no" >&6; }
44168         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44169fi
44170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44171
44172    CFLAGS="$OLD_CFLAGS"
44173    ac_ext=cpp
44174ac_cpp='$CXXCPP $CPPFLAGS'
44175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44178
44179  fi # X11_NOT_NEEDED
44180
44181
44182
44183
44184
44185
44186  ###############################################################################
44187  #
44188  # The common unix printing system cups is used to print from java.
44189  #
44190
44191# Check whether --with-cups was given.
44192if test "${with_cups+set}" = set; then :
44193  withval=$with_cups;
44194fi
44195
44196
44197# Check whether --with-cups-include was given.
44198if test "${with_cups_include+set}" = set; then :
44199  withval=$with_cups_include;
44200fi
44201
44202
44203  if test "x$CUPS_NOT_NEEDED" = xyes; then
44204    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44205      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44206$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44207    fi
44208    CUPS_CFLAGS=
44209  else
44210    CUPS_FOUND=no
44211
44212    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44213      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44214    fi
44215
44216    if test "x${with_cups}" != x; then
44217      CUPS_CFLAGS="-I${with_cups}/include"
44218      CUPS_FOUND=yes
44219    fi
44220    if test "x${with_cups_include}" != x; then
44221      CUPS_CFLAGS="-I${with_cups_include}"
44222      CUPS_FOUND=yes
44223    fi
44224    if test "x$CUPS_FOUND" = xno; then
44225
44226
44227  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44228    # Source the builddeps file again, to make sure it uses the latest variables!
44229    . $builddepsfile
44230    # Look for a target and build machine specific resource!
44231    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44232    if test "x$resource" = x; then
44233      # Ok, lets instead look for a target specific resource
44234      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44235    fi
44236    if test "x$resource" = x; then
44237      # Ok, lets instead look for a build specific resource
44238      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44239    fi
44240    if test "x$resource" = x; then
44241      # Ok, lets instead look for a generic resource
44242      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44243      resource=${builddep_cups}
44244    fi
44245    if test "x$resource" != x; then
44246      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44247$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44248      # If the resource in the builddeps.conf file is an existing directory,
44249      # for example /java/linux/cups
44250      if test -d ${resource}; then
44251        depdir=${resource}
44252      else
44253
44254  # cups is for example mymodule
44255  # $resource is for example libs/general/libmymod_1_2_3.zip
44256  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44257  # $with_builddeps_dir is for example /localhome/builddeps
44258  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44259  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44260  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44261  filename=`basename $resource`
44262  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44263  filebase=${filename%%.*}
44264  extension=${filename#*.}
44265  installdir=$with_builddeps_dir/$filebase
44266  if test ! -f $installdir/$filename.unpacked; then
44267    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44268$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44269    if test ! -d $installdir; then
44270      mkdir -p $installdir
44271    fi
44272    if test ! -d $installdir; then
44273      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44274    fi
44275    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44276    touch $tmpfile
44277    if test ! -f $tmpfile; then
44278      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44279    fi
44280
44281  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44282  # $tmpfile is the local file name for the downloaded file.
44283  VALID_TOOL=no
44284  if test "x$BDEPS_FTP" = xwget; then
44285    VALID_TOOL=yes
44286    wget -O $tmpfile $with_builddeps_server/$resource
44287  fi
44288  if test "x$BDEPS_FTP" = xlftp; then
44289    VALID_TOOL=yes
44290    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44291  fi
44292  if test "x$BDEPS_FTP" = xftp; then
44293    VALID_TOOL=yes
44294    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44295    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44296    FTPUSERPWD=${FTPSERVER%%@*}
44297    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44298      FTPUSER=${userpwd%%:*}
44299      FTPPWD=${userpwd#*@}
44300      FTPSERVER=${FTPSERVER#*@}
44301    else
44302      FTPUSER=ftp
44303      FTPPWD=ftp
44304    fi
44305    # the "pass" command does not work on some
44306    # ftp clients (read ftp.exe) but if it works,
44307    # passive mode is better!
44308    ( \
44309        echo "user $FTPUSER $FTPPWD"        ; \
44310        echo "pass"                         ; \
44311        echo "bin"                          ; \
44312        echo "get $FTPPATH $tmpfile"              ; \
44313    ) | ftp -in $FTPSERVER
44314  fi
44315  if test "x$VALID_TOOL" != xyes; then
44316    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44317  fi
44318
44319    mv $tmpfile $installdir/$filename
44320    if test ! -s $installdir/$filename; then
44321      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44322    fi
44323    case "$extension" in
44324      zip)  echo "Unzipping $installdir/$filename..."
44325        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44326        ;;
44327      tar.gz) echo "Untaring $installdir/$filename..."
44328        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44329        ;;
44330      tgz) echo "Untaring $installdir/$filename..."
44331        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44332        ;;
44333      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44334        ;;
44335    esac
44336  fi
44337  if test -f $installdir/$filename.unpacked; then
44338    depdir=$installdir
44339  fi
44340
44341      fi
44342      # Source the builddeps file again, because in the previous command, the depdir
44343      # was updated to point at the current build dependency install directory.
44344      . $builddepsfile
44345      # Now extract variables from the builddeps.conf files.
44346      theroot=${builddep_cups_ROOT}
44347      thecflags=${builddep_cups_CFLAGS}
44348      thelibs=${builddep_cups_LIBS}
44349      if test "x$depdir" = x; then
44350        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44351      fi
44352      CUPS=$depdir
44353      if test "x$theroot" != x; then
44354        CUPS="$theroot"
44355      fi
44356      if test "x$thecflags" != x; then
44357        CUPS_CFLAGS="$thecflags"
44358      fi
44359      if test "x$thelibs" != x; then
44360        CUPS_LIBS="$thelibs"
44361      fi
44362      CUPS_FOUND=yes
44363
44364    fi
44365
44366  fi
44367
44368    fi
44369    if test "x$CUPS_FOUND" = xno; then
44370      # Are the cups headers installed in the default /usr/include location?
44371      for ac_header in cups/cups.h cups/ppd.h
44372do :
44373  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44374ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44375if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44376  cat >>confdefs.h <<_ACEOF
44377#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44378_ACEOF
44379
44380            CUPS_FOUND=yes
44381            CUPS_CFLAGS=
44382            DEFAULT_CUPS=yes
44383
44384
44385fi
44386
44387done
44388
44389    fi
44390    if test "x$CUPS_FOUND" = xno; then
44391      # Getting nervous now? Lets poke around for standard Solaris third-party
44392      # package installation locations.
44393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44394$as_echo_n "checking for cups headers... " >&6; }
44395      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44396        # An SFW package seems to be installed!
44397        CUPS_FOUND=yes
44398        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44399      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44400        # A CSW package seems to be installed!
44401        CUPS_FOUND=yes
44402        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44403      fi
44404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44405$as_echo "$CUPS_FOUND" >&6; }
44406    fi
44407    if test "x$CUPS_FOUND" = xno; then
44408
44409  # Print a helpful message on how to acquire the necessary build dependency.
44410  # cups is the help tag: freetype, cups, pulse, alsa etc
44411  MISSING_DEPENDENCY=cups
44412
44413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44414    cygwin_help $MISSING_DEPENDENCY
44415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44416    msys_help $MISSING_DEPENDENCY
44417  else
44418    PKGHANDLER_COMMAND=
44419
44420    case $PKGHANDLER in
44421      apt-get)
44422        apt_help     $MISSING_DEPENDENCY ;;
44423      yum)
44424        yum_help     $MISSING_DEPENDENCY ;;
44425      port)
44426        port_help    $MISSING_DEPENDENCY ;;
44427      pkgutil)
44428        pkgutil_help $MISSING_DEPENDENCY ;;
44429      pkgadd)
44430        pkgadd_help  $MISSING_DEPENDENCY ;;
44431    esac
44432
44433    if test "x$PKGHANDLER_COMMAND" != x; then
44434      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44435    fi
44436  fi
44437
44438      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44439    fi
44440  fi
44441
44442
44443
44444
44445
44446
44447  ###############################################################################
44448  #
44449  # The ubiquitous freetype library is used to render fonts.
44450  #
44451
44452# Check whether --with-freetype was given.
44453if test "${with_freetype+set}" = set; then :
44454  withval=$with_freetype;
44455fi
44456
44457
44458# Check whether --with-freetype-include was given.
44459if test "${with_freetype_include+set}" = set; then :
44460  withval=$with_freetype_include;
44461fi
44462
44463
44464# Check whether --with-freetype-lib was given.
44465if test "${with_freetype_lib+set}" = set; then :
44466  withval=$with_freetype_lib;
44467fi
44468
44469
44470# Check whether --with-freetype-src was given.
44471if test "${with_freetype_src+set}" = set; then :
44472  withval=$with_freetype_src;
44473fi
44474
44475  # Check whether --enable-freetype-bundling was given.
44476if test "${enable_freetype_bundling+set}" = set; then :
44477  enableval=$enable_freetype_bundling;
44478fi
44479
44480
44481  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44482  FREETYPE_BASE_NAME=freetype
44483  FREETYPE_CFLAGS=
44484  FREETYPE_LIBS=
44485  FREETYPE_BUNDLE_LIB_PATH=
44486
44487  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44488    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44489      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44490$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44491    fi
44492    if test "x$enable_freetype_bundling" != x; then
44493      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44494$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44495    fi
44496  else
44497    # freetype is needed to build; go get it!
44498
44499    BUNDLE_FREETYPE="$enable_freetype_bundling"
44500
44501    if  test "x$with_freetype_src" != x; then
44502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44503        # Try to build freetype if --with-freetype-src was given on Windows
44504
44505  FREETYPE_SRC_PATH="$with_freetype_src"
44506  BUILD_FREETYPE=yes
44507
44508  # Check if the freetype sources are acessible..
44509  if ! test -d $FREETYPE_SRC_PATH; then
44510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44511$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44512    BUILD_FREETYPE=no
44513  fi
44514  # ..and contain a vc2010 project file
44515  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44516  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44518$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44519    BUILD_FREETYPE=no
44520  fi
44521  # Now check if configure found a version of 'msbuild.exe'
44522  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44523    { $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
44524$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;}
44525    BUILD_FREETYPE=no
44526  fi
44527
44528  # Ready to go..
44529  if test "x$BUILD_FREETYPE" = xyes; then
44530
44531    # msbuild requires trailing slashes for output directories
44532    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44533    freetype_lib_path_unix="$freetype_lib_path"
44534    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44535
44536  unix_path="$vcxproj_path"
44537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44538    windows_path=`$CYGPATH -m "$unix_path"`
44539    vcxproj_path="$windows_path"
44540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44541    windows_path=`cmd //c echo $unix_path`
44542    vcxproj_path="$windows_path"
44543  fi
44544
44545
44546  unix_path="$freetype_lib_path"
44547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44548    windows_path=`$CYGPATH -m "$unix_path"`
44549    freetype_lib_path="$windows_path"
44550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44551    windows_path=`cmd //c echo $unix_path`
44552    freetype_lib_path="$windows_path"
44553  fi
44554
44555
44556  unix_path="$freetype_obj_path"
44557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44558    windows_path=`$CYGPATH -m "$unix_path"`
44559    freetype_obj_path="$windows_path"
44560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44561    windows_path=`cmd //c echo $unix_path`
44562    freetype_obj_path="$windows_path"
44563  fi
44564
44565    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44566      freetype_platform=x64
44567    else
44568      freetype_platform=win32
44569    fi
44570
44571    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44572    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44573    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44574    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44575    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44576$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44577
44578    # First we try to build the freetype.dll
44579    $ECHO -e "@echo off\n"\
44580	     "$MSBUILD $vcxproj_path "\
44581		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44582		       "/p:Configuration=\"Release Multithreaded\" "\
44583		       "/p:Platform=$freetype_platform "\
44584		       "/p:ConfigurationType=DynamicLibrary "\
44585		       "/p:TargetName=freetype "\
44586		       "/p:OutDir=\"$freetype_lib_path\" "\
44587		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44588    cmd /c freetype.bat
44589
44590    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44591      # If that succeeds we also build freetype.lib
44592      $ECHO -e "@echo off\n"\
44593	       "$MSBUILD $vcxproj_path "\
44594			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44595			 "/p:Configuration=\"Release Multithreaded\" "\
44596			 "/p:Platform=$freetype_platform "\
44597			 "/p:ConfigurationType=StaticLibrary "\
44598			 "/p:TargetName=freetype "\
44599			 "/p:OutDir=\"$freetype_lib_path\" "\
44600			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44601      cmd /c freetype.bat
44602
44603      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44604	# Once we build both, lib and dll, set freetype lib and include path appropriately
44605	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44606	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44607	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44608$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44609      else
44610	BUILD_FREETYPE=no
44611      fi
44612    else
44613      BUILD_FREETYPE=no
44614    fi
44615  fi
44616
44617        if test "x$BUILD_FREETYPE" = xyes; then
44618          # Okay, we built it. Check that it works.
44619
44620  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44621  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44622  METHOD="--with-freetype-src"
44623
44624  # Let's start with an optimistic view of the world :-)
44625  FOUND_FREETYPE=yes
44626
44627  # First look for the canonical freetype main include file ft2build.h.
44628  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44629    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44630    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44631    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44632      # Fail.
44633      FOUND_FREETYPE=no
44634    fi
44635  fi
44636
44637  if test "x$FOUND_FREETYPE" = xyes; then
44638    # Include file found, let's continue the sanity check.
44639    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44640$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44641
44642    # Reset to default value
44643    FREETYPE_BASE_NAME=freetype
44644    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44645    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44646      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44648        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44649        # for the .6 version explicitly.
44650        FREETYPE_BASE_NAME=freetype.6
44651        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44653$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44654      else
44655        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44656$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44657        FOUND_FREETYPE=no
44658      fi
44659    else
44660      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44661        # On Windows, we will need both .lib and .dll file.
44662        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44663          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44664$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44665          FOUND_FREETYPE=no
44666        fi
44667      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44668          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44669        # Found lib in isa dir, use that instead.
44670        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44671        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44672$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44673      fi
44674    fi
44675  fi
44676
44677  if test "x$FOUND_FREETYPE" = xyes; then
44678
44679  # Only process if variable expands to non-empty
44680
44681  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44683
44684  # Input might be given as Windows format, start by converting to
44685  # unix format.
44686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44687  new_path=`$CYGPATH -u "$path"`
44688
44689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44692  # "foo.exe" is OK but "foo" is an error.
44693  #
44694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44695  # It is also a way to make sure we got the proper file name for the real test later on.
44696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44697  if test "x$test_shortpath" = x; then
44698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44700    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44701  fi
44702
44703  # Call helper function which possibly converts this using DOS-style short mode.
44704  # If so, the updated path is stored in $new_path.
44705
44706  input_path="$new_path"
44707  # Check if we need to convert this using DOS-style short mode. If the path
44708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44709  # take no chances and rewrite it.
44710  # Note: m4 eats our [], so we need to use [ and ] instead.
44711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44712  if test "x$has_forbidden_chars" != x; then
44713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44717      # Going to short mode and back again did indeed matter. Since short mode is
44718      # case insensitive, let's make it lowercase to improve readability.
44719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44720      # Now convert it back to Unix-style (cygpath)
44721      input_path=`$CYGPATH -u "$shortmode_path"`
44722      new_path="$input_path"
44723    fi
44724  fi
44725
44726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44727  if test "x$test_cygdrive_prefix" = x; then
44728    # As a simple fix, exclude /usr/bin since it's not a real path.
44729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44731      # a path prefixed by /cygdrive for fixpath to work.
44732      new_path="$CYGWIN_ROOT_PATH$input_path"
44733    fi
44734  fi
44735
44736
44737  if test "x$path" != "x$new_path"; then
44738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44741  fi
44742
44743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44744
44745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44746  has_colon=`$ECHO $path | $GREP ^.:`
44747  new_path="$path"
44748  if test "x$has_colon" = x; then
44749    # Not in mixed or Windows style, start by that.
44750    new_path=`cmd //c echo $path`
44751  fi
44752
44753
44754  input_path="$new_path"
44755  # Check if we need to convert this using DOS-style short mode. If the path
44756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44757  # take no chances and rewrite it.
44758  # Note: m4 eats our [], so we need to use [ and ] instead.
44759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44760  if test "x$has_forbidden_chars" != x; then
44761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44763  fi
44764
44765
44766  windows_path="$new_path"
44767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44768    unix_path=`$CYGPATH -u "$windows_path"`
44769    new_path="$unix_path"
44770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44772    new_path="$unix_path"
44773  fi
44774
44775  if test "x$path" != "x$new_path"; then
44776    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44779  fi
44780
44781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44783
44784    else
44785      # We're on a unix platform. Hooray! :)
44786      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44787      has_space=`$ECHO "$path" | $GREP " "`
44788      if test "x$has_space" != x; then
44789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44792      fi
44793
44794      # Use eval to expand a potential ~
44795      eval path="$path"
44796      if test ! -f "$path" && test ! -d "$path"; then
44797        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44798      fi
44799
44800      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44801    fi
44802  fi
44803
44804
44805  # Only process if variable expands to non-empty
44806
44807  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44809
44810  # Input might be given as Windows format, start by converting to
44811  # unix format.
44812  path="$POTENTIAL_FREETYPE_LIB_PATH"
44813  new_path=`$CYGPATH -u "$path"`
44814
44815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44818  # "foo.exe" is OK but "foo" is an error.
44819  #
44820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44821  # It is also a way to make sure we got the proper file name for the real test later on.
44822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44823  if test "x$test_shortpath" = x; then
44824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44826    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44827  fi
44828
44829  # Call helper function which possibly converts this using DOS-style short mode.
44830  # If so, the updated path is stored in $new_path.
44831
44832  input_path="$new_path"
44833  # Check if we need to convert this using DOS-style short mode. If the path
44834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44835  # take no chances and rewrite it.
44836  # Note: m4 eats our [], so we need to use [ and ] instead.
44837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44838  if test "x$has_forbidden_chars" != x; then
44839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44843      # Going to short mode and back again did indeed matter. Since short mode is
44844      # case insensitive, let's make it lowercase to improve readability.
44845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44846      # Now convert it back to Unix-style (cygpath)
44847      input_path=`$CYGPATH -u "$shortmode_path"`
44848      new_path="$input_path"
44849    fi
44850  fi
44851
44852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44853  if test "x$test_cygdrive_prefix" = x; then
44854    # As a simple fix, exclude /usr/bin since it's not a real path.
44855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44857      # a path prefixed by /cygdrive for fixpath to work.
44858      new_path="$CYGWIN_ROOT_PATH$input_path"
44859    fi
44860  fi
44861
44862
44863  if test "x$path" != "x$new_path"; then
44864    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44867  fi
44868
44869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44870
44871  path="$POTENTIAL_FREETYPE_LIB_PATH"
44872  has_colon=`$ECHO $path | $GREP ^.:`
44873  new_path="$path"
44874  if test "x$has_colon" = x; then
44875    # Not in mixed or Windows style, start by that.
44876    new_path=`cmd //c echo $path`
44877  fi
44878
44879
44880  input_path="$new_path"
44881  # Check if we need to convert this using DOS-style short mode. If the path
44882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44883  # take no chances and rewrite it.
44884  # Note: m4 eats our [], so we need to use [ and ] instead.
44885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44886  if test "x$has_forbidden_chars" != x; then
44887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44889  fi
44890
44891
44892  windows_path="$new_path"
44893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44894    unix_path=`$CYGPATH -u "$windows_path"`
44895    new_path="$unix_path"
44896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44898    new_path="$unix_path"
44899  fi
44900
44901  if test "x$path" != "x$new_path"; then
44902    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44905  fi
44906
44907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44909
44910    else
44911      # We're on a unix platform. Hooray! :)
44912      path="$POTENTIAL_FREETYPE_LIB_PATH"
44913      has_space=`$ECHO "$path" | $GREP " "`
44914      if test "x$has_space" != x; then
44915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44918      fi
44919
44920      # Use eval to expand a potential ~
44921      eval path="$path"
44922      if test ! -f "$path" && test ! -d "$path"; then
44923        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44924      fi
44925
44926      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44927    fi
44928  fi
44929
44930
44931    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44933$as_echo_n "checking for freetype includes... " >&6; }
44934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44935$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44936    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44938$as_echo_n "checking for freetype libraries... " >&6; }
44939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44940$as_echo "$FREETYPE_LIB_PATH" >&6; }
44941  fi
44942
44943          if test "x$FOUND_FREETYPE" != xyes; then
44944            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44945          fi
44946        else
44947          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44948$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44949          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44950        fi
44951      else
44952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44953$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44954      fi
44955    fi
44956
44957    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44958      # User has specified settings
44959
44960      if test "x$BUNDLE_FREETYPE" = x; then
44961        # If not specified, default is to bundle freetype
44962        BUNDLE_FREETYPE=yes
44963      fi
44964
44965      if test "x$with_freetype" != x; then
44966        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44967        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44968      fi
44969
44970      # Allow --with-freetype-lib and --with-freetype-include to override
44971      if test "x$with_freetype_include" != x; then
44972        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44973      fi
44974      if test "x$with_freetype_lib" != x; then
44975        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44976      fi
44977
44978      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44979        # Okay, we got it. Check that it works.
44980
44981  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44982  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44983  METHOD="--with-freetype"
44984
44985  # Let's start with an optimistic view of the world :-)
44986  FOUND_FREETYPE=yes
44987
44988  # First look for the canonical freetype main include file ft2build.h.
44989  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44990    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44991    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44992    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44993      # Fail.
44994      FOUND_FREETYPE=no
44995    fi
44996  fi
44997
44998  if test "x$FOUND_FREETYPE" = xyes; then
44999    # Include file found, let's continue the sanity check.
45000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45001$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45002
45003    # Reset to default value
45004    FREETYPE_BASE_NAME=freetype
45005    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45006    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45007      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45008          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45009        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45010        # for the .6 version explicitly.
45011        FREETYPE_BASE_NAME=freetype.6
45012        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45013        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45014$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45015      else
45016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45017$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45018        FOUND_FREETYPE=no
45019      fi
45020    else
45021      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45022        # On Windows, we will need both .lib and .dll file.
45023        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45024          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45026          FOUND_FREETYPE=no
45027        fi
45028      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45030        # Found lib in isa dir, use that instead.
45031        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45032        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45033$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45034      fi
45035    fi
45036  fi
45037
45038  if test "x$FOUND_FREETYPE" = xyes; then
45039
45040  # Only process if variable expands to non-empty
45041
45042  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45044
45045  # Input might be given as Windows format, start by converting to
45046  # unix format.
45047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45048  new_path=`$CYGPATH -u "$path"`
45049
45050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45053  # "foo.exe" is OK but "foo" is an error.
45054  #
45055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45056  # It is also a way to make sure we got the proper file name for the real test later on.
45057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45058  if test "x$test_shortpath" = x; then
45059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45062  fi
45063
45064  # Call helper function which possibly converts this using DOS-style short mode.
45065  # If so, the updated path is stored in $new_path.
45066
45067  input_path="$new_path"
45068  # Check if we need to convert this using DOS-style short mode. If the path
45069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45070  # take no chances and rewrite it.
45071  # Note: m4 eats our [], so we need to use [ and ] instead.
45072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45073  if test "x$has_forbidden_chars" != x; then
45074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45078      # Going to short mode and back again did indeed matter. Since short mode is
45079      # case insensitive, let's make it lowercase to improve readability.
45080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45081      # Now convert it back to Unix-style (cygpath)
45082      input_path=`$CYGPATH -u "$shortmode_path"`
45083      new_path="$input_path"
45084    fi
45085  fi
45086
45087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45088  if test "x$test_cygdrive_prefix" = x; then
45089    # As a simple fix, exclude /usr/bin since it's not a real path.
45090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45092      # a path prefixed by /cygdrive for fixpath to work.
45093      new_path="$CYGWIN_ROOT_PATH$input_path"
45094    fi
45095  fi
45096
45097
45098  if test "x$path" != "x$new_path"; then
45099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45102  fi
45103
45104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45105
45106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45107  has_colon=`$ECHO $path | $GREP ^.:`
45108  new_path="$path"
45109  if test "x$has_colon" = x; then
45110    # Not in mixed or Windows style, start by that.
45111    new_path=`cmd //c echo $path`
45112  fi
45113
45114
45115  input_path="$new_path"
45116  # Check if we need to convert this using DOS-style short mode. If the path
45117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45118  # take no chances and rewrite it.
45119  # Note: m4 eats our [], so we need to use [ and ] instead.
45120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45121  if test "x$has_forbidden_chars" != x; then
45122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45124  fi
45125
45126
45127  windows_path="$new_path"
45128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45129    unix_path=`$CYGPATH -u "$windows_path"`
45130    new_path="$unix_path"
45131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45133    new_path="$unix_path"
45134  fi
45135
45136  if test "x$path" != "x$new_path"; then
45137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45140  fi
45141
45142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45144
45145    else
45146      # We're on a unix platform. Hooray! :)
45147      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45148      has_space=`$ECHO "$path" | $GREP " "`
45149      if test "x$has_space" != x; then
45150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45153      fi
45154
45155      # Use eval to expand a potential ~
45156      eval path="$path"
45157      if test ! -f "$path" && test ! -d "$path"; then
45158        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45159      fi
45160
45161      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45162    fi
45163  fi
45164
45165
45166  # Only process if variable expands to non-empty
45167
45168  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45170
45171  # Input might be given as Windows format, start by converting to
45172  # unix format.
45173  path="$POTENTIAL_FREETYPE_LIB_PATH"
45174  new_path=`$CYGPATH -u "$path"`
45175
45176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45179  # "foo.exe" is OK but "foo" is an error.
45180  #
45181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45182  # It is also a way to make sure we got the proper file name for the real test later on.
45183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45184  if test "x$test_shortpath" = x; then
45185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45188  fi
45189
45190  # Call helper function which possibly converts this using DOS-style short mode.
45191  # If so, the updated path is stored in $new_path.
45192
45193  input_path="$new_path"
45194  # Check if we need to convert this using DOS-style short mode. If the path
45195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45196  # take no chances and rewrite it.
45197  # Note: m4 eats our [], so we need to use [ and ] instead.
45198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45199  if test "x$has_forbidden_chars" != x; then
45200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45204      # Going to short mode and back again did indeed matter. Since short mode is
45205      # case insensitive, let's make it lowercase to improve readability.
45206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45207      # Now convert it back to Unix-style (cygpath)
45208      input_path=`$CYGPATH -u "$shortmode_path"`
45209      new_path="$input_path"
45210    fi
45211  fi
45212
45213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45214  if test "x$test_cygdrive_prefix" = x; then
45215    # As a simple fix, exclude /usr/bin since it's not a real path.
45216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45218      # a path prefixed by /cygdrive for fixpath to work.
45219      new_path="$CYGWIN_ROOT_PATH$input_path"
45220    fi
45221  fi
45222
45223
45224  if test "x$path" != "x$new_path"; then
45225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45228  fi
45229
45230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45231
45232  path="$POTENTIAL_FREETYPE_LIB_PATH"
45233  has_colon=`$ECHO $path | $GREP ^.:`
45234  new_path="$path"
45235  if test "x$has_colon" = x; then
45236    # Not in mixed or Windows style, start by that.
45237    new_path=`cmd //c echo $path`
45238  fi
45239
45240
45241  input_path="$new_path"
45242  # Check if we need to convert this using DOS-style short mode. If the path
45243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45244  # take no chances and rewrite it.
45245  # Note: m4 eats our [], so we need to use [ and ] instead.
45246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45247  if test "x$has_forbidden_chars" != x; then
45248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45250  fi
45251
45252
45253  windows_path="$new_path"
45254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45255    unix_path=`$CYGPATH -u "$windows_path"`
45256    new_path="$unix_path"
45257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45259    new_path="$unix_path"
45260  fi
45261
45262  if test "x$path" != "x$new_path"; then
45263    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45266  fi
45267
45268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45270
45271    else
45272      # We're on a unix platform. Hooray! :)
45273      path="$POTENTIAL_FREETYPE_LIB_PATH"
45274      has_space=`$ECHO "$path" | $GREP " "`
45275      if test "x$has_space" != x; then
45276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45279      fi
45280
45281      # Use eval to expand a potential ~
45282      eval path="$path"
45283      if test ! -f "$path" && test ! -d "$path"; then
45284        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45285      fi
45286
45287      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45288    fi
45289  fi
45290
45291
45292    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45294$as_echo_n "checking for freetype includes... " >&6; }
45295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45296$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45297    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45299$as_echo_n "checking for freetype libraries... " >&6; }
45300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45301$as_echo "$FREETYPE_LIB_PATH" >&6; }
45302  fi
45303
45304        if test "x$FOUND_FREETYPE" != xyes; then
45305          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45306        fi
45307      else
45308        # User specified only one of lib or include. This is an error.
45309        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45310          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45311$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45312          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45313        else
45314          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45315$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45316          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45317        fi
45318      fi
45319    else
45320      # User did not specify settings, but we need freetype. Try to locate it.
45321
45322      if test "x$BUNDLE_FREETYPE" = x; then
45323        # If not specified, default is to bundle freetype only on windows
45324        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45325          BUNDLE_FREETYPE=yes
45326        else
45327          BUNDLE_FREETYPE=no
45328        fi
45329      fi
45330
45331      if test "x$FOUND_FREETYPE" != xyes; then
45332        # Check builddeps
45333
45334
45335  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45336    # Source the builddeps file again, to make sure it uses the latest variables!
45337    . $builddepsfile
45338    # Look for a target and build machine specific resource!
45339    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45340    if test "x$resource" = x; then
45341      # Ok, lets instead look for a target specific resource
45342      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45343    fi
45344    if test "x$resource" = x; then
45345      # Ok, lets instead look for a build specific resource
45346      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45347    fi
45348    if test "x$resource" = x; then
45349      # Ok, lets instead look for a generic resource
45350      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45351      resource=${builddep_freetype2}
45352    fi
45353    if test "x$resource" != x; then
45354      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45355$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45356      # If the resource in the builddeps.conf file is an existing directory,
45357      # for example /java/linux/cups
45358      if test -d ${resource}; then
45359        depdir=${resource}
45360      else
45361
45362  # freetype2 is for example mymodule
45363  # $resource is for example libs/general/libmymod_1_2_3.zip
45364  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45365  # $with_builddeps_dir is for example /localhome/builddeps
45366  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45367  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45368  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45369  filename=`basename $resource`
45370  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45371  filebase=${filename%%.*}
45372  extension=${filename#*.}
45373  installdir=$with_builddeps_dir/$filebase
45374  if test ! -f $installdir/$filename.unpacked; then
45375    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45376$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45377    if test ! -d $installdir; then
45378      mkdir -p $installdir
45379    fi
45380    if test ! -d $installdir; then
45381      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45382    fi
45383    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45384    touch $tmpfile
45385    if test ! -f $tmpfile; then
45386      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45387    fi
45388
45389  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45390  # $tmpfile is the local file name for the downloaded file.
45391  VALID_TOOL=no
45392  if test "x$BDEPS_FTP" = xwget; then
45393    VALID_TOOL=yes
45394    wget -O $tmpfile $with_builddeps_server/$resource
45395  fi
45396  if test "x$BDEPS_FTP" = xlftp; then
45397    VALID_TOOL=yes
45398    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45399  fi
45400  if test "x$BDEPS_FTP" = xftp; then
45401    VALID_TOOL=yes
45402    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45403    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45404    FTPUSERPWD=${FTPSERVER%%@*}
45405    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45406      FTPUSER=${userpwd%%:*}
45407      FTPPWD=${userpwd#*@}
45408      FTPSERVER=${FTPSERVER#*@}
45409    else
45410      FTPUSER=ftp
45411      FTPPWD=ftp
45412    fi
45413    # the "pass" command does not work on some
45414    # ftp clients (read ftp.exe) but if it works,
45415    # passive mode is better!
45416    ( \
45417        echo "user $FTPUSER $FTPPWD"        ; \
45418        echo "pass"                         ; \
45419        echo "bin"                          ; \
45420        echo "get $FTPPATH $tmpfile"              ; \
45421    ) | ftp -in $FTPSERVER
45422  fi
45423  if test "x$VALID_TOOL" != xyes; then
45424    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45425  fi
45426
45427    mv $tmpfile $installdir/$filename
45428    if test ! -s $installdir/$filename; then
45429      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45430    fi
45431    case "$extension" in
45432      zip)  echo "Unzipping $installdir/$filename..."
45433        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45434        ;;
45435      tar.gz) echo "Untaring $installdir/$filename..."
45436        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45437        ;;
45438      tgz) echo "Untaring $installdir/$filename..."
45439        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45440        ;;
45441      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45442        ;;
45443    esac
45444  fi
45445  if test -f $installdir/$filename.unpacked; then
45446    depdir=$installdir
45447  fi
45448
45449      fi
45450      # Source the builddeps file again, because in the previous command, the depdir
45451      # was updated to point at the current build dependency install directory.
45452      . $builddepsfile
45453      # Now extract variables from the builddeps.conf files.
45454      theroot=${builddep_freetype2_ROOT}
45455      thecflags=${builddep_freetype2_CFLAGS}
45456      thelibs=${builddep_freetype2_LIBS}
45457      if test "x$depdir" = x; then
45458        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45459      fi
45460      FREETYPE=$depdir
45461      if test "x$theroot" != x; then
45462        FREETYPE="$theroot"
45463      fi
45464      if test "x$thecflags" != x; then
45465        FREETYPE_CFLAGS="$thecflags"
45466      fi
45467      if test "x$thelibs" != x; then
45468        FREETYPE_LIBS="$thelibs"
45469      fi
45470      FOUND_FREETYPE=yes
45471      else FOUND_FREETYPE=no
45472
45473    fi
45474    else FOUND_FREETYPE=no
45475
45476  fi
45477
45478        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45479        if test "x$FOUND_FREETYPE" = xyes; then
45480          if test "x$BUNDLE_FREETYPE" = xyes; then
45481            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45482$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45483            FOUND_FREETYPE=no
45484          else
45485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45486$as_echo_n "checking for freetype... " >&6; }
45487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45488$as_echo "yes (using builddeps)" >&6; }
45489          fi
45490        fi
45491      fi
45492
45493      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45494      if test "x$SYSROOT" = x; then
45495        if test "x$FOUND_FREETYPE" != xyes; then
45496          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45497          if test "x$PKG_CONFIG" != x; then
45498
45499pkg_failed=no
45500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45501$as_echo_n "checking for FREETYPE... " >&6; }
45502
45503if test -n "$FREETYPE_CFLAGS"; then
45504    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45505 elif test -n "$PKG_CONFIG"; then
45506    if test -n "$PKG_CONFIG" && \
45507    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45508  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45509  ac_status=$?
45510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45511  test $ac_status = 0; }; then
45512  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45513else
45514  pkg_failed=yes
45515fi
45516 else
45517    pkg_failed=untried
45518fi
45519if test -n "$FREETYPE_LIBS"; then
45520    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45521 elif test -n "$PKG_CONFIG"; then
45522    if test -n "$PKG_CONFIG" && \
45523    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45524  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45525  ac_status=$?
45526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45527  test $ac_status = 0; }; then
45528  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45529else
45530  pkg_failed=yes
45531fi
45532 else
45533    pkg_failed=untried
45534fi
45535
45536
45537
45538if test $pkg_failed = yes; then
45539
45540if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45541        _pkg_short_errors_supported=yes
45542else
45543        _pkg_short_errors_supported=no
45544fi
45545        if test $_pkg_short_errors_supported = yes; then
45546	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45547        else
45548	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45549        fi
45550	# Put the nasty error message in config.log where it belongs
45551	echo "$FREETYPE_PKG_ERRORS" >&5
45552
45553	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45554$as_echo "no" >&6; }
45555                FOUND_FREETYPE=no
45556elif test $pkg_failed = untried; then
45557	FOUND_FREETYPE=no
45558else
45559	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45560	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45562$as_echo "yes" >&6; }
45563	FOUND_FREETYPE=yes
45564fi
45565            if test "x$FOUND_FREETYPE" = xyes; then
45566              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45567              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45568              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45569              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45570                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45571              fi
45572              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45573              if test "x$BUNDLE_FREETYPE" = xyes; then
45574                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45575$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45576                FOUND_FREETYPE=no
45577              else
45578                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45579$as_echo_n "checking for freetype... " >&6; }
45580                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45581$as_echo "yes (using pkg-config)" >&6; }
45582              fi
45583            fi
45584          fi
45585        fi
45586      fi
45587
45588      if test "x$FOUND_FREETYPE" != xyes; then
45589        # Check in well-known locations
45590        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45591          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45592
45593  windows_path="$FREETYPE_BASE_DIR"
45594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45595    unix_path=`$CYGPATH -u "$windows_path"`
45596    FREETYPE_BASE_DIR="$unix_path"
45597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45599    FREETYPE_BASE_DIR="$unix_path"
45600  fi
45601
45602
45603  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45604  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45605  METHOD="well-known location"
45606
45607  # Let's start with an optimistic view of the world :-)
45608  FOUND_FREETYPE=yes
45609
45610  # First look for the canonical freetype main include file ft2build.h.
45611  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45612    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45613    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45614    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45615      # Fail.
45616      FOUND_FREETYPE=no
45617    fi
45618  fi
45619
45620  if test "x$FOUND_FREETYPE" = xyes; then
45621    # Include file found, let's continue the sanity check.
45622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45623$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45624
45625    # Reset to default value
45626    FREETYPE_BASE_NAME=freetype
45627    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45628    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45629      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45631        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45632        # for the .6 version explicitly.
45633        FREETYPE_BASE_NAME=freetype.6
45634        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45635        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45636$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45637      else
45638        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45640        FOUND_FREETYPE=no
45641      fi
45642    else
45643      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45644        # On Windows, we will need both .lib and .dll file.
45645        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45646          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45647$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45648          FOUND_FREETYPE=no
45649        fi
45650      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45652        # Found lib in isa dir, use that instead.
45653        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45654        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45655$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45656      fi
45657    fi
45658  fi
45659
45660  if test "x$FOUND_FREETYPE" = xyes; then
45661
45662  # Only process if variable expands to non-empty
45663
45664  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45666
45667  # Input might be given as Windows format, start by converting to
45668  # unix format.
45669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45670  new_path=`$CYGPATH -u "$path"`
45671
45672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45675  # "foo.exe" is OK but "foo" is an error.
45676  #
45677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45678  # It is also a way to make sure we got the proper file name for the real test later on.
45679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45680  if test "x$test_shortpath" = x; then
45681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45684  fi
45685
45686  # Call helper function which possibly converts this using DOS-style short mode.
45687  # If so, the updated path is stored in $new_path.
45688
45689  input_path="$new_path"
45690  # Check if we need to convert this using DOS-style short mode. If the path
45691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45692  # take no chances and rewrite it.
45693  # Note: m4 eats our [], so we need to use [ and ] instead.
45694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45695  if test "x$has_forbidden_chars" != x; then
45696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45700      # Going to short mode and back again did indeed matter. Since short mode is
45701      # case insensitive, let's make it lowercase to improve readability.
45702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45703      # Now convert it back to Unix-style (cygpath)
45704      input_path=`$CYGPATH -u "$shortmode_path"`
45705      new_path="$input_path"
45706    fi
45707  fi
45708
45709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45710  if test "x$test_cygdrive_prefix" = x; then
45711    # As a simple fix, exclude /usr/bin since it's not a real path.
45712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45714      # a path prefixed by /cygdrive for fixpath to work.
45715      new_path="$CYGWIN_ROOT_PATH$input_path"
45716    fi
45717  fi
45718
45719
45720  if test "x$path" != "x$new_path"; then
45721    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45724  fi
45725
45726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45727
45728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45729  has_colon=`$ECHO $path | $GREP ^.:`
45730  new_path="$path"
45731  if test "x$has_colon" = x; then
45732    # Not in mixed or Windows style, start by that.
45733    new_path=`cmd //c echo $path`
45734  fi
45735
45736
45737  input_path="$new_path"
45738  # Check if we need to convert this using DOS-style short mode. If the path
45739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45740  # take no chances and rewrite it.
45741  # Note: m4 eats our [], so we need to use [ and ] instead.
45742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45743  if test "x$has_forbidden_chars" != x; then
45744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45746  fi
45747
45748
45749  windows_path="$new_path"
45750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45751    unix_path=`$CYGPATH -u "$windows_path"`
45752    new_path="$unix_path"
45753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45755    new_path="$unix_path"
45756  fi
45757
45758  if test "x$path" != "x$new_path"; then
45759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45762  fi
45763
45764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45766
45767    else
45768      # We're on a unix platform. Hooray! :)
45769      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45770      has_space=`$ECHO "$path" | $GREP " "`
45771      if test "x$has_space" != x; then
45772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45775      fi
45776
45777      # Use eval to expand a potential ~
45778      eval path="$path"
45779      if test ! -f "$path" && test ! -d "$path"; then
45780        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45781      fi
45782
45783      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45784    fi
45785  fi
45786
45787
45788  # Only process if variable expands to non-empty
45789
45790  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45792
45793  # Input might be given as Windows format, start by converting to
45794  # unix format.
45795  path="$POTENTIAL_FREETYPE_LIB_PATH"
45796  new_path=`$CYGPATH -u "$path"`
45797
45798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45801  # "foo.exe" is OK but "foo" is an error.
45802  #
45803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45804  # It is also a way to make sure we got the proper file name for the real test later on.
45805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45806  if test "x$test_shortpath" = x; then
45807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45809    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45810  fi
45811
45812  # Call helper function which possibly converts this using DOS-style short mode.
45813  # If so, the updated path is stored in $new_path.
45814
45815  input_path="$new_path"
45816  # Check if we need to convert this using DOS-style short mode. If the path
45817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45818  # take no chances and rewrite it.
45819  # Note: m4 eats our [], so we need to use [ and ] instead.
45820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45821  if test "x$has_forbidden_chars" != x; then
45822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45826      # Going to short mode and back again did indeed matter. Since short mode is
45827      # case insensitive, let's make it lowercase to improve readability.
45828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45829      # Now convert it back to Unix-style (cygpath)
45830      input_path=`$CYGPATH -u "$shortmode_path"`
45831      new_path="$input_path"
45832    fi
45833  fi
45834
45835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45836  if test "x$test_cygdrive_prefix" = x; then
45837    # As a simple fix, exclude /usr/bin since it's not a real path.
45838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45840      # a path prefixed by /cygdrive for fixpath to work.
45841      new_path="$CYGWIN_ROOT_PATH$input_path"
45842    fi
45843  fi
45844
45845
45846  if test "x$path" != "x$new_path"; then
45847    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45850  fi
45851
45852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45853
45854  path="$POTENTIAL_FREETYPE_LIB_PATH"
45855  has_colon=`$ECHO $path | $GREP ^.:`
45856  new_path="$path"
45857  if test "x$has_colon" = x; then
45858    # Not in mixed or Windows style, start by that.
45859    new_path=`cmd //c echo $path`
45860  fi
45861
45862
45863  input_path="$new_path"
45864  # Check if we need to convert this using DOS-style short mode. If the path
45865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45866  # take no chances and rewrite it.
45867  # Note: m4 eats our [], so we need to use [ and ] instead.
45868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45869  if test "x$has_forbidden_chars" != x; then
45870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45872  fi
45873
45874
45875  windows_path="$new_path"
45876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45877    unix_path=`$CYGPATH -u "$windows_path"`
45878    new_path="$unix_path"
45879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45881    new_path="$unix_path"
45882  fi
45883
45884  if test "x$path" != "x$new_path"; then
45885    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45888  fi
45889
45890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45892
45893    else
45894      # We're on a unix platform. Hooray! :)
45895      path="$POTENTIAL_FREETYPE_LIB_PATH"
45896      has_space=`$ECHO "$path" | $GREP " "`
45897      if test "x$has_space" != x; then
45898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45901      fi
45902
45903      # Use eval to expand a potential ~
45904      eval path="$path"
45905      if test ! -f "$path" && test ! -d "$path"; then
45906        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45907      fi
45908
45909      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45910    fi
45911  fi
45912
45913
45914    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45916$as_echo_n "checking for freetype includes... " >&6; }
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45918$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45919    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45921$as_echo_n "checking for freetype libraries... " >&6; }
45922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45923$as_echo "$FREETYPE_LIB_PATH" >&6; }
45924  fi
45925
45926          if test "x$FOUND_FREETYPE" != xyes; then
45927            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45928
45929  windows_path="$FREETYPE_BASE_DIR"
45930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45931    unix_path=`$CYGPATH -u "$windows_path"`
45932    FREETYPE_BASE_DIR="$unix_path"
45933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45935    FREETYPE_BASE_DIR="$unix_path"
45936  fi
45937
45938
45939  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45940  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45941  METHOD="well-known location"
45942
45943  # Let's start with an optimistic view of the world :-)
45944  FOUND_FREETYPE=yes
45945
45946  # First look for the canonical freetype main include file ft2build.h.
45947  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45948    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45949    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45950    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45951      # Fail.
45952      FOUND_FREETYPE=no
45953    fi
45954  fi
45955
45956  if test "x$FOUND_FREETYPE" = xyes; then
45957    # Include file found, let's continue the sanity check.
45958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45959$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45960
45961    # Reset to default value
45962    FREETYPE_BASE_NAME=freetype
45963    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45964    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45965      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45966          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45967        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45968        # for the .6 version explicitly.
45969        FREETYPE_BASE_NAME=freetype.6
45970        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45971        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45972$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45973      else
45974        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45975$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45976        FOUND_FREETYPE=no
45977      fi
45978    else
45979      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45980        # On Windows, we will need both .lib and .dll file.
45981        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45982          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45984          FOUND_FREETYPE=no
45985        fi
45986      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45987          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45988        # Found lib in isa dir, use that instead.
45989        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45990        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45991$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45992      fi
45993    fi
45994  fi
45995
45996  if test "x$FOUND_FREETYPE" = xyes; then
45997
45998  # Only process if variable expands to non-empty
45999
46000  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46002
46003  # Input might be given as Windows format, start by converting to
46004  # unix format.
46005  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46006  new_path=`$CYGPATH -u "$path"`
46007
46008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46011  # "foo.exe" is OK but "foo" is an error.
46012  #
46013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46014  # It is also a way to make sure we got the proper file name for the real test later on.
46015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46016  if test "x$test_shortpath" = x; then
46017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46019    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46020  fi
46021
46022  # Call helper function which possibly converts this using DOS-style short mode.
46023  # If so, the updated path is stored in $new_path.
46024
46025  input_path="$new_path"
46026  # Check if we need to convert this using DOS-style short mode. If the path
46027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46028  # take no chances and rewrite it.
46029  # Note: m4 eats our [], so we need to use [ and ] instead.
46030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46031  if test "x$has_forbidden_chars" != x; then
46032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46036      # Going to short mode and back again did indeed matter. Since short mode is
46037      # case insensitive, let's make it lowercase to improve readability.
46038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46039      # Now convert it back to Unix-style (cygpath)
46040      input_path=`$CYGPATH -u "$shortmode_path"`
46041      new_path="$input_path"
46042    fi
46043  fi
46044
46045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46046  if test "x$test_cygdrive_prefix" = x; then
46047    # As a simple fix, exclude /usr/bin since it's not a real path.
46048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46050      # a path prefixed by /cygdrive for fixpath to work.
46051      new_path="$CYGWIN_ROOT_PATH$input_path"
46052    fi
46053  fi
46054
46055
46056  if test "x$path" != "x$new_path"; then
46057    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46060  fi
46061
46062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46063
46064  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46065  has_colon=`$ECHO $path | $GREP ^.:`
46066  new_path="$path"
46067  if test "x$has_colon" = x; then
46068    # Not in mixed or Windows style, start by that.
46069    new_path=`cmd //c echo $path`
46070  fi
46071
46072
46073  input_path="$new_path"
46074  # Check if we need to convert this using DOS-style short mode. If the path
46075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46076  # take no chances and rewrite it.
46077  # Note: m4 eats our [], so we need to use [ and ] instead.
46078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46079  if test "x$has_forbidden_chars" != x; then
46080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46082  fi
46083
46084
46085  windows_path="$new_path"
46086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46087    unix_path=`$CYGPATH -u "$windows_path"`
46088    new_path="$unix_path"
46089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46091    new_path="$unix_path"
46092  fi
46093
46094  if test "x$path" != "x$new_path"; then
46095    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46098  fi
46099
46100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46102
46103    else
46104      # We're on a unix platform. Hooray! :)
46105      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46106      has_space=`$ECHO "$path" | $GREP " "`
46107      if test "x$has_space" != x; then
46108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46111      fi
46112
46113      # Use eval to expand a potential ~
46114      eval path="$path"
46115      if test ! -f "$path" && test ! -d "$path"; then
46116        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46117      fi
46118
46119      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46120    fi
46121  fi
46122
46123
46124  # Only process if variable expands to non-empty
46125
46126  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46128
46129  # Input might be given as Windows format, start by converting to
46130  # unix format.
46131  path="$POTENTIAL_FREETYPE_LIB_PATH"
46132  new_path=`$CYGPATH -u "$path"`
46133
46134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46137  # "foo.exe" is OK but "foo" is an error.
46138  #
46139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46140  # It is also a way to make sure we got the proper file name for the real test later on.
46141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46142  if test "x$test_shortpath" = x; then
46143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46145    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46146  fi
46147
46148  # Call helper function which possibly converts this using DOS-style short mode.
46149  # If so, the updated path is stored in $new_path.
46150
46151  input_path="$new_path"
46152  # Check if we need to convert this using DOS-style short mode. If the path
46153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46154  # take no chances and rewrite it.
46155  # Note: m4 eats our [], so we need to use [ and ] instead.
46156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46157  if test "x$has_forbidden_chars" != x; then
46158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46162      # Going to short mode and back again did indeed matter. Since short mode is
46163      # case insensitive, let's make it lowercase to improve readability.
46164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46165      # Now convert it back to Unix-style (cygpath)
46166      input_path=`$CYGPATH -u "$shortmode_path"`
46167      new_path="$input_path"
46168    fi
46169  fi
46170
46171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46172  if test "x$test_cygdrive_prefix" = x; then
46173    # As a simple fix, exclude /usr/bin since it's not a real path.
46174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46176      # a path prefixed by /cygdrive for fixpath to work.
46177      new_path="$CYGWIN_ROOT_PATH$input_path"
46178    fi
46179  fi
46180
46181
46182  if test "x$path" != "x$new_path"; then
46183    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46185$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46186  fi
46187
46188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46189
46190  path="$POTENTIAL_FREETYPE_LIB_PATH"
46191  has_colon=`$ECHO $path | $GREP ^.:`
46192  new_path="$path"
46193  if test "x$has_colon" = x; then
46194    # Not in mixed or Windows style, start by that.
46195    new_path=`cmd //c echo $path`
46196  fi
46197
46198
46199  input_path="$new_path"
46200  # Check if we need to convert this using DOS-style short mode. If the path
46201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46202  # take no chances and rewrite it.
46203  # Note: m4 eats our [], so we need to use [ and ] instead.
46204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46205  if test "x$has_forbidden_chars" != x; then
46206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46208  fi
46209
46210
46211  windows_path="$new_path"
46212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46213    unix_path=`$CYGPATH -u "$windows_path"`
46214    new_path="$unix_path"
46215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46217    new_path="$unix_path"
46218  fi
46219
46220  if test "x$path" != "x$new_path"; then
46221    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46223$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46224  fi
46225
46226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46228
46229    else
46230      # We're on a unix platform. Hooray! :)
46231      path="$POTENTIAL_FREETYPE_LIB_PATH"
46232      has_space=`$ECHO "$path" | $GREP " "`
46233      if test "x$has_space" != x; then
46234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46237      fi
46238
46239      # Use eval to expand a potential ~
46240      eval path="$path"
46241      if test ! -f "$path" && test ! -d "$path"; then
46242        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46243      fi
46244
46245      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46246    fi
46247  fi
46248
46249
46250    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46252$as_echo_n "checking for freetype includes... " >&6; }
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46254$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46255    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46257$as_echo_n "checking for freetype libraries... " >&6; }
46258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46259$as_echo "$FREETYPE_LIB_PATH" >&6; }
46260  fi
46261
46262          fi
46263        else
46264          FREETYPE_BASE_DIR="$SYSROOT/usr"
46265
46266  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46267  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46268  METHOD="well-known location"
46269
46270  # Let's start with an optimistic view of the world :-)
46271  FOUND_FREETYPE=yes
46272
46273  # First look for the canonical freetype main include file ft2build.h.
46274  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46275    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46276    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46277    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46278      # Fail.
46279      FOUND_FREETYPE=no
46280    fi
46281  fi
46282
46283  if test "x$FOUND_FREETYPE" = xyes; then
46284    # Include file found, let's continue the sanity check.
46285    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46286$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46287
46288    # Reset to default value
46289    FREETYPE_BASE_NAME=freetype
46290    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46291    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46292      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46294        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46295        # for the .6 version explicitly.
46296        FREETYPE_BASE_NAME=freetype.6
46297        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46298        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46299$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46300      else
46301        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46303        FOUND_FREETYPE=no
46304      fi
46305    else
46306      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46307        # On Windows, we will need both .lib and .dll file.
46308        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46309          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46311          FOUND_FREETYPE=no
46312        fi
46313      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46315        # Found lib in isa dir, use that instead.
46316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46317        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46318$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46319      fi
46320    fi
46321  fi
46322
46323  if test "x$FOUND_FREETYPE" = xyes; then
46324
46325  # Only process if variable expands to non-empty
46326
46327  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329
46330  # Input might be given as Windows format, start by converting to
46331  # unix format.
46332  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46333  new_path=`$CYGPATH -u "$path"`
46334
46335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46338  # "foo.exe" is OK but "foo" is an error.
46339  #
46340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46341  # It is also a way to make sure we got the proper file name for the real test later on.
46342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46343  if test "x$test_shortpath" = x; then
46344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46347  fi
46348
46349  # Call helper function which possibly converts this using DOS-style short mode.
46350  # If so, the updated path is stored in $new_path.
46351
46352  input_path="$new_path"
46353  # Check if we need to convert this using DOS-style short mode. If the path
46354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46355  # take no chances and rewrite it.
46356  # Note: m4 eats our [], so we need to use [ and ] instead.
46357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46358  if test "x$has_forbidden_chars" != x; then
46359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46363      # Going to short mode and back again did indeed matter. Since short mode is
46364      # case insensitive, let's make it lowercase to improve readability.
46365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46366      # Now convert it back to Unix-style (cygpath)
46367      input_path=`$CYGPATH -u "$shortmode_path"`
46368      new_path="$input_path"
46369    fi
46370  fi
46371
46372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46373  if test "x$test_cygdrive_prefix" = x; then
46374    # As a simple fix, exclude /usr/bin since it's not a real path.
46375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46377      # a path prefixed by /cygdrive for fixpath to work.
46378      new_path="$CYGWIN_ROOT_PATH$input_path"
46379    fi
46380  fi
46381
46382
46383  if test "x$path" != "x$new_path"; then
46384    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46387  fi
46388
46389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46390
46391  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46392  has_colon=`$ECHO $path | $GREP ^.:`
46393  new_path="$path"
46394  if test "x$has_colon" = x; then
46395    # Not in mixed or Windows style, start by that.
46396    new_path=`cmd //c echo $path`
46397  fi
46398
46399
46400  input_path="$new_path"
46401  # Check if we need to convert this using DOS-style short mode. If the path
46402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46403  # take no chances and rewrite it.
46404  # Note: m4 eats our [], so we need to use [ and ] instead.
46405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46406  if test "x$has_forbidden_chars" != x; then
46407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46409  fi
46410
46411
46412  windows_path="$new_path"
46413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46414    unix_path=`$CYGPATH -u "$windows_path"`
46415    new_path="$unix_path"
46416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46418    new_path="$unix_path"
46419  fi
46420
46421  if test "x$path" != "x$new_path"; then
46422    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46425  fi
46426
46427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46429
46430    else
46431      # We're on a unix platform. Hooray! :)
46432      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46433      has_space=`$ECHO "$path" | $GREP " "`
46434      if test "x$has_space" != x; then
46435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46438      fi
46439
46440      # Use eval to expand a potential ~
46441      eval path="$path"
46442      if test ! -f "$path" && test ! -d "$path"; then
46443        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46444      fi
46445
46446      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46447    fi
46448  fi
46449
46450
46451  # Only process if variable expands to non-empty
46452
46453  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455
46456  # Input might be given as Windows format, start by converting to
46457  # unix format.
46458  path="$POTENTIAL_FREETYPE_LIB_PATH"
46459  new_path=`$CYGPATH -u "$path"`
46460
46461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46464  # "foo.exe" is OK but "foo" is an error.
46465  #
46466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46467  # It is also a way to make sure we got the proper file name for the real test later on.
46468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46469  if test "x$test_shortpath" = x; then
46470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46473  fi
46474
46475  # Call helper function which possibly converts this using DOS-style short mode.
46476  # If so, the updated path is stored in $new_path.
46477
46478  input_path="$new_path"
46479  # Check if we need to convert this using DOS-style short mode. If the path
46480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46481  # take no chances and rewrite it.
46482  # Note: m4 eats our [], so we need to use [ and ] instead.
46483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46484  if test "x$has_forbidden_chars" != x; then
46485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46489      # Going to short mode and back again did indeed matter. Since short mode is
46490      # case insensitive, let's make it lowercase to improve readability.
46491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46492      # Now convert it back to Unix-style (cygpath)
46493      input_path=`$CYGPATH -u "$shortmode_path"`
46494      new_path="$input_path"
46495    fi
46496  fi
46497
46498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46499  if test "x$test_cygdrive_prefix" = x; then
46500    # As a simple fix, exclude /usr/bin since it's not a real path.
46501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46503      # a path prefixed by /cygdrive for fixpath to work.
46504      new_path="$CYGWIN_ROOT_PATH$input_path"
46505    fi
46506  fi
46507
46508
46509  if test "x$path" != "x$new_path"; then
46510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46513  fi
46514
46515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46516
46517  path="$POTENTIAL_FREETYPE_LIB_PATH"
46518  has_colon=`$ECHO $path | $GREP ^.:`
46519  new_path="$path"
46520  if test "x$has_colon" = x; then
46521    # Not in mixed or Windows style, start by that.
46522    new_path=`cmd //c echo $path`
46523  fi
46524
46525
46526  input_path="$new_path"
46527  # Check if we need to convert this using DOS-style short mode. If the path
46528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46529  # take no chances and rewrite it.
46530  # Note: m4 eats our [], so we need to use [ and ] instead.
46531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46532  if test "x$has_forbidden_chars" != x; then
46533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46535  fi
46536
46537
46538  windows_path="$new_path"
46539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46540    unix_path=`$CYGPATH -u "$windows_path"`
46541    new_path="$unix_path"
46542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46544    new_path="$unix_path"
46545  fi
46546
46547  if test "x$path" != "x$new_path"; then
46548    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46551  fi
46552
46553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46555
46556    else
46557      # We're on a unix platform. Hooray! :)
46558      path="$POTENTIAL_FREETYPE_LIB_PATH"
46559      has_space=`$ECHO "$path" | $GREP " "`
46560      if test "x$has_space" != x; then
46561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46564      fi
46565
46566      # Use eval to expand a potential ~
46567      eval path="$path"
46568      if test ! -f "$path" && test ! -d "$path"; then
46569        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46570      fi
46571
46572      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46573    fi
46574  fi
46575
46576
46577    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46579$as_echo_n "checking for freetype includes... " >&6; }
46580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46581$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46582    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46584$as_echo_n "checking for freetype libraries... " >&6; }
46585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46586$as_echo "$FREETYPE_LIB_PATH" >&6; }
46587  fi
46588
46589
46590          if test "x$FOUND_FREETYPE" != xyes; then
46591            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46592
46593  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46594  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46595  METHOD="well-known location"
46596
46597  # Let's start with an optimistic view of the world :-)
46598  FOUND_FREETYPE=yes
46599
46600  # First look for the canonical freetype main include file ft2build.h.
46601  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46602    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46603    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46604    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46605      # Fail.
46606      FOUND_FREETYPE=no
46607    fi
46608  fi
46609
46610  if test "x$FOUND_FREETYPE" = xyes; then
46611    # Include file found, let's continue the sanity check.
46612    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46613$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46614
46615    # Reset to default value
46616    FREETYPE_BASE_NAME=freetype
46617    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46618    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46619      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46620          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46621        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46622        # for the .6 version explicitly.
46623        FREETYPE_BASE_NAME=freetype.6
46624        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46625        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46626$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46627      else
46628        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46629$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46630        FOUND_FREETYPE=no
46631      fi
46632    else
46633      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46634        # On Windows, we will need both .lib and .dll file.
46635        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46636          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46637$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46638          FOUND_FREETYPE=no
46639        fi
46640      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46641          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46642        # Found lib in isa dir, use that instead.
46643        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46644        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46645$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46646      fi
46647    fi
46648  fi
46649
46650  if test "x$FOUND_FREETYPE" = xyes; then
46651
46652  # Only process if variable expands to non-empty
46653
46654  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46656
46657  # Input might be given as Windows format, start by converting to
46658  # unix format.
46659  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46660  new_path=`$CYGPATH -u "$path"`
46661
46662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46665  # "foo.exe" is OK but "foo" is an error.
46666  #
46667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46668  # It is also a way to make sure we got the proper file name for the real test later on.
46669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46670  if test "x$test_shortpath" = x; then
46671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46672$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46673    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46674  fi
46675
46676  # Call helper function which possibly converts this using DOS-style short mode.
46677  # If so, the updated path is stored in $new_path.
46678
46679  input_path="$new_path"
46680  # Check if we need to convert this using DOS-style short mode. If the path
46681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46682  # take no chances and rewrite it.
46683  # Note: m4 eats our [], so we need to use [ and ] instead.
46684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46685  if test "x$has_forbidden_chars" != x; then
46686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46690      # Going to short mode and back again did indeed matter. Since short mode is
46691      # case insensitive, let's make it lowercase to improve readability.
46692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46693      # Now convert it back to Unix-style (cygpath)
46694      input_path=`$CYGPATH -u "$shortmode_path"`
46695      new_path="$input_path"
46696    fi
46697  fi
46698
46699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46700  if test "x$test_cygdrive_prefix" = x; then
46701    # As a simple fix, exclude /usr/bin since it's not a real path.
46702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46704      # a path prefixed by /cygdrive for fixpath to work.
46705      new_path="$CYGWIN_ROOT_PATH$input_path"
46706    fi
46707  fi
46708
46709
46710  if test "x$path" != "x$new_path"; then
46711    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46713$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46714  fi
46715
46716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46717
46718  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46719  has_colon=`$ECHO $path | $GREP ^.:`
46720  new_path="$path"
46721  if test "x$has_colon" = x; then
46722    # Not in mixed or Windows style, start by that.
46723    new_path=`cmd //c echo $path`
46724  fi
46725
46726
46727  input_path="$new_path"
46728  # Check if we need to convert this using DOS-style short mode. If the path
46729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46730  # take no chances and rewrite it.
46731  # Note: m4 eats our [], so we need to use [ and ] instead.
46732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46733  if test "x$has_forbidden_chars" != x; then
46734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46736  fi
46737
46738
46739  windows_path="$new_path"
46740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46741    unix_path=`$CYGPATH -u "$windows_path"`
46742    new_path="$unix_path"
46743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46745    new_path="$unix_path"
46746  fi
46747
46748  if test "x$path" != "x$new_path"; then
46749    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46751$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46752  fi
46753
46754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46756
46757    else
46758      # We're on a unix platform. Hooray! :)
46759      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46760      has_space=`$ECHO "$path" | $GREP " "`
46761      if test "x$has_space" != x; then
46762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46763$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46765      fi
46766
46767      # Use eval to expand a potential ~
46768      eval path="$path"
46769      if test ! -f "$path" && test ! -d "$path"; then
46770        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46771      fi
46772
46773      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46774    fi
46775  fi
46776
46777
46778  # Only process if variable expands to non-empty
46779
46780  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46782
46783  # Input might be given as Windows format, start by converting to
46784  # unix format.
46785  path="$POTENTIAL_FREETYPE_LIB_PATH"
46786  new_path=`$CYGPATH -u "$path"`
46787
46788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46791  # "foo.exe" is OK but "foo" is an error.
46792  #
46793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46794  # It is also a way to make sure we got the proper file name for the real test later on.
46795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46796  if test "x$test_shortpath" = x; then
46797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46800  fi
46801
46802  # Call helper function which possibly converts this using DOS-style short mode.
46803  # If so, the updated path is stored in $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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46816      # Going to short mode and back again did indeed matter. Since short mode is
46817      # case insensitive, let's make it lowercase to improve readability.
46818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46819      # Now convert it back to Unix-style (cygpath)
46820      input_path=`$CYGPATH -u "$shortmode_path"`
46821      new_path="$input_path"
46822    fi
46823  fi
46824
46825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46826  if test "x$test_cygdrive_prefix" = x; then
46827    # As a simple fix, exclude /usr/bin since it's not a real path.
46828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46830      # a path prefixed by /cygdrive for fixpath to work.
46831      new_path="$CYGWIN_ROOT_PATH$input_path"
46832    fi
46833  fi
46834
46835
46836  if test "x$path" != "x$new_path"; then
46837    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46840  fi
46841
46842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46843
46844  path="$POTENTIAL_FREETYPE_LIB_PATH"
46845  has_colon=`$ECHO $path | $GREP ^.:`
46846  new_path="$path"
46847  if test "x$has_colon" = x; then
46848    # Not in mixed or Windows style, start by that.
46849    new_path=`cmd //c echo $path`
46850  fi
46851
46852
46853  input_path="$new_path"
46854  # Check if we need to convert this using DOS-style short mode. If the path
46855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46856  # take no chances and rewrite it.
46857  # Note: m4 eats our [], so we need to use [ and ] instead.
46858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46859  if test "x$has_forbidden_chars" != x; then
46860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46862  fi
46863
46864
46865  windows_path="$new_path"
46866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46867    unix_path=`$CYGPATH -u "$windows_path"`
46868    new_path="$unix_path"
46869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46871    new_path="$unix_path"
46872  fi
46873
46874  if test "x$path" != "x$new_path"; then
46875    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46878  fi
46879
46880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46882
46883    else
46884      # We're on a unix platform. Hooray! :)
46885      path="$POTENTIAL_FREETYPE_LIB_PATH"
46886      has_space=`$ECHO "$path" | $GREP " "`
46887      if test "x$has_space" != x; then
46888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46891      fi
46892
46893      # Use eval to expand a potential ~
46894      eval path="$path"
46895      if test ! -f "$path" && test ! -d "$path"; then
46896        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46897      fi
46898
46899      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46900    fi
46901  fi
46902
46903
46904    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46906$as_echo_n "checking for freetype includes... " >&6; }
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46908$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46909    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46911$as_echo_n "checking for freetype libraries... " >&6; }
46912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46913$as_echo "$FREETYPE_LIB_PATH" >&6; }
46914  fi
46915
46916          fi
46917
46918          if test "x$FOUND_FREETYPE" != xyes; then
46919            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46920
46921  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46922  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46923  METHOD="well-known location"
46924
46925  # Let's start with an optimistic view of the world :-)
46926  FOUND_FREETYPE=yes
46927
46928  # First look for the canonical freetype main include file ft2build.h.
46929  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46930    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46931    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46932    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46933      # Fail.
46934      FOUND_FREETYPE=no
46935    fi
46936  fi
46937
46938  if test "x$FOUND_FREETYPE" = xyes; then
46939    # Include file found, let's continue the sanity check.
46940    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46941$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46942
46943    # Reset to default value
46944    FREETYPE_BASE_NAME=freetype
46945    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46946    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46947      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46948          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46949        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46950        # for the .6 version explicitly.
46951        FREETYPE_BASE_NAME=freetype.6
46952        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46953        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46954$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46955      else
46956        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46957$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46958        FOUND_FREETYPE=no
46959      fi
46960    else
46961      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46962        # On Windows, we will need both .lib and .dll file.
46963        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46964          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46965$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46966          FOUND_FREETYPE=no
46967        fi
46968      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46969          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46970        # Found lib in isa dir, use that instead.
46971        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46972        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46973$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46974      fi
46975    fi
46976  fi
46977
46978  if test "x$FOUND_FREETYPE" = xyes; then
46979
46980  # Only process if variable expands to non-empty
46981
46982  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46984
46985  # Input might be given as Windows format, start by converting to
46986  # unix format.
46987  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46988  new_path=`$CYGPATH -u "$path"`
46989
46990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46993  # "foo.exe" is OK but "foo" is an error.
46994  #
46995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46996  # It is also a way to make sure we got the proper file name for the real test later on.
46997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46998  if test "x$test_shortpath" = x; then
46999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47001    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47002  fi
47003
47004  # Call helper function which possibly converts this using DOS-style short mode.
47005  # If so, the updated path is stored in $new_path.
47006
47007  input_path="$new_path"
47008  # Check if we need to convert this using DOS-style short mode. If the path
47009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47010  # take no chances and rewrite it.
47011  # Note: m4 eats our [], so we need to use [ and ] instead.
47012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47013  if test "x$has_forbidden_chars" != x; then
47014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47018      # Going to short mode and back again did indeed matter. Since short mode is
47019      # case insensitive, let's make it lowercase to improve readability.
47020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47021      # Now convert it back to Unix-style (cygpath)
47022      input_path=`$CYGPATH -u "$shortmode_path"`
47023      new_path="$input_path"
47024    fi
47025  fi
47026
47027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47028  if test "x$test_cygdrive_prefix" = x; then
47029    # As a simple fix, exclude /usr/bin since it's not a real path.
47030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47032      # a path prefixed by /cygdrive for fixpath to work.
47033      new_path="$CYGWIN_ROOT_PATH$input_path"
47034    fi
47035  fi
47036
47037
47038  if test "x$path" != "x$new_path"; then
47039    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47042  fi
47043
47044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47045
47046  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47047  has_colon=`$ECHO $path | $GREP ^.:`
47048  new_path="$path"
47049  if test "x$has_colon" = x; then
47050    # Not in mixed or Windows style, start by that.
47051    new_path=`cmd //c echo $path`
47052  fi
47053
47054
47055  input_path="$new_path"
47056  # Check if we need to convert this using DOS-style short mode. If the path
47057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47058  # take no chances and rewrite it.
47059  # Note: m4 eats our [], so we need to use [ and ] instead.
47060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47061  if test "x$has_forbidden_chars" != x; then
47062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47064  fi
47065
47066
47067  windows_path="$new_path"
47068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069    unix_path=`$CYGPATH -u "$windows_path"`
47070    new_path="$unix_path"
47071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47073    new_path="$unix_path"
47074  fi
47075
47076  if test "x$path" != "x$new_path"; then
47077    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47080  fi
47081
47082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47084
47085    else
47086      # We're on a unix platform. Hooray! :)
47087      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47088      has_space=`$ECHO "$path" | $GREP " "`
47089      if test "x$has_space" != x; then
47090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47093      fi
47094
47095      # Use eval to expand a potential ~
47096      eval path="$path"
47097      if test ! -f "$path" && test ! -d "$path"; then
47098        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47099      fi
47100
47101      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47102    fi
47103  fi
47104
47105
47106  # Only process if variable expands to non-empty
47107
47108  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47110
47111  # Input might be given as Windows format, start by converting to
47112  # unix format.
47113  path="$POTENTIAL_FREETYPE_LIB_PATH"
47114  new_path=`$CYGPATH -u "$path"`
47115
47116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47119  # "foo.exe" is OK but "foo" is an error.
47120  #
47121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47122  # It is also a way to make sure we got the proper file name for the real test later on.
47123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47124  if test "x$test_shortpath" = x; then
47125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47127    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47128  fi
47129
47130  # Call helper function which possibly converts this using DOS-style short mode.
47131  # If so, the updated path is stored in $new_path.
47132
47133  input_path="$new_path"
47134  # Check if we need to convert this using DOS-style short mode. If the path
47135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47136  # take no chances and rewrite it.
47137  # Note: m4 eats our [], so we need to use [ and ] instead.
47138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47139  if test "x$has_forbidden_chars" != x; then
47140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47144      # Going to short mode and back again did indeed matter. Since short mode is
47145      # case insensitive, let's make it lowercase to improve readability.
47146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47147      # Now convert it back to Unix-style (cygpath)
47148      input_path=`$CYGPATH -u "$shortmode_path"`
47149      new_path="$input_path"
47150    fi
47151  fi
47152
47153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47154  if test "x$test_cygdrive_prefix" = x; then
47155    # As a simple fix, exclude /usr/bin since it's not a real path.
47156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47158      # a path prefixed by /cygdrive for fixpath to work.
47159      new_path="$CYGWIN_ROOT_PATH$input_path"
47160    fi
47161  fi
47162
47163
47164  if test "x$path" != "x$new_path"; then
47165    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47168  fi
47169
47170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47171
47172  path="$POTENTIAL_FREETYPE_LIB_PATH"
47173  has_colon=`$ECHO $path | $GREP ^.:`
47174  new_path="$path"
47175  if test "x$has_colon" = x; then
47176    # Not in mixed or Windows style, start by that.
47177    new_path=`cmd //c echo $path`
47178  fi
47179
47180
47181  input_path="$new_path"
47182  # Check if we need to convert this using DOS-style short mode. If the path
47183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47184  # take no chances and rewrite it.
47185  # Note: m4 eats our [], so we need to use [ and ] instead.
47186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47187  if test "x$has_forbidden_chars" != x; then
47188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47190  fi
47191
47192
47193  windows_path="$new_path"
47194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47195    unix_path=`$CYGPATH -u "$windows_path"`
47196    new_path="$unix_path"
47197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47199    new_path="$unix_path"
47200  fi
47201
47202  if test "x$path" != "x$new_path"; then
47203    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47206  fi
47207
47208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47210
47211    else
47212      # We're on a unix platform. Hooray! :)
47213      path="$POTENTIAL_FREETYPE_LIB_PATH"
47214      has_space=`$ECHO "$path" | $GREP " "`
47215      if test "x$has_space" != x; then
47216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47219      fi
47220
47221      # Use eval to expand a potential ~
47222      eval path="$path"
47223      if test ! -f "$path" && test ! -d "$path"; then
47224        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47225      fi
47226
47227      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47228    fi
47229  fi
47230
47231
47232    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47234$as_echo_n "checking for freetype includes... " >&6; }
47235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47236$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47237    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47239$as_echo_n "checking for freetype libraries... " >&6; }
47240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47241$as_echo "$FREETYPE_LIB_PATH" >&6; }
47242  fi
47243
47244          fi
47245
47246          if test "x$FOUND_FREETYPE" != xyes; then
47247            FREETYPE_BASE_DIR="$SYSROOT/usr"
47248            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47249
47250  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47251  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47252  METHOD="well-known location"
47253
47254  # Let's start with an optimistic view of the world :-)
47255  FOUND_FREETYPE=yes
47256
47257  # First look for the canonical freetype main include file ft2build.h.
47258  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47259    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47260    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47261    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47262      # Fail.
47263      FOUND_FREETYPE=no
47264    fi
47265  fi
47266
47267  if test "x$FOUND_FREETYPE" = xyes; then
47268    # Include file found, let's continue the sanity check.
47269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47270$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47271
47272    # Reset to default value
47273    FREETYPE_BASE_NAME=freetype
47274    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47275    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47276      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47277          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47278        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47279        # for the .6 version explicitly.
47280        FREETYPE_BASE_NAME=freetype.6
47281        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47282        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47283$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47284      else
47285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47286$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47287        FOUND_FREETYPE=no
47288      fi
47289    else
47290      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47291        # On Windows, we will need both .lib and .dll file.
47292        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47293          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47294$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47295          FOUND_FREETYPE=no
47296        fi
47297      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47298          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47299        # Found lib in isa dir, use that instead.
47300        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47301        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47302$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47303      fi
47304    fi
47305  fi
47306
47307  if test "x$FOUND_FREETYPE" = xyes; then
47308
47309  # Only process if variable expands to non-empty
47310
47311  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47313
47314  # Input might be given as Windows format, start by converting to
47315  # unix format.
47316  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47317  new_path=`$CYGPATH -u "$path"`
47318
47319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47322  # "foo.exe" is OK but "foo" is an error.
47323  #
47324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47325  # It is also a way to make sure we got the proper file name for the real test later on.
47326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47327  if test "x$test_shortpath" = x; then
47328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47331  fi
47332
47333  # Call helper function which possibly converts this using DOS-style short mode.
47334  # If so, the updated path is stored in $new_path.
47335
47336  input_path="$new_path"
47337  # Check if we need to convert this using DOS-style short mode. If the path
47338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47339  # take no chances and rewrite it.
47340  # Note: m4 eats our [], so we need to use [ and ] instead.
47341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47342  if test "x$has_forbidden_chars" != x; then
47343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47347      # Going to short mode and back again did indeed matter. Since short mode is
47348      # case insensitive, let's make it lowercase to improve readability.
47349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47350      # Now convert it back to Unix-style (cygpath)
47351      input_path=`$CYGPATH -u "$shortmode_path"`
47352      new_path="$input_path"
47353    fi
47354  fi
47355
47356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47357  if test "x$test_cygdrive_prefix" = x; then
47358    # As a simple fix, exclude /usr/bin since it's not a real path.
47359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47361      # a path prefixed by /cygdrive for fixpath to work.
47362      new_path="$CYGWIN_ROOT_PATH$input_path"
47363    fi
47364  fi
47365
47366
47367  if test "x$path" != "x$new_path"; then
47368    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47371  fi
47372
47373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47374
47375  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47376  has_colon=`$ECHO $path | $GREP ^.:`
47377  new_path="$path"
47378  if test "x$has_colon" = x; then
47379    # Not in mixed or Windows style, start by that.
47380    new_path=`cmd //c echo $path`
47381  fi
47382
47383
47384  input_path="$new_path"
47385  # Check if we need to convert this using DOS-style short mode. If the path
47386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47387  # take no chances and rewrite it.
47388  # Note: m4 eats our [], so we need to use [ and ] instead.
47389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47390  if test "x$has_forbidden_chars" != x; then
47391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47393  fi
47394
47395
47396  windows_path="$new_path"
47397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47398    unix_path=`$CYGPATH -u "$windows_path"`
47399    new_path="$unix_path"
47400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47402    new_path="$unix_path"
47403  fi
47404
47405  if test "x$path" != "x$new_path"; then
47406    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47409  fi
47410
47411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47413
47414    else
47415      # We're on a unix platform. Hooray! :)
47416      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47417      has_space=`$ECHO "$path" | $GREP " "`
47418      if test "x$has_space" != x; then
47419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47422      fi
47423
47424      # Use eval to expand a potential ~
47425      eval path="$path"
47426      if test ! -f "$path" && test ! -d "$path"; then
47427        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47428      fi
47429
47430      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47431    fi
47432  fi
47433
47434
47435  # Only process if variable expands to non-empty
47436
47437  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47439
47440  # Input might be given as Windows format, start by converting to
47441  # unix format.
47442  path="$POTENTIAL_FREETYPE_LIB_PATH"
47443  new_path=`$CYGPATH -u "$path"`
47444
47445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47448  # "foo.exe" is OK but "foo" is an error.
47449  #
47450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47451  # It is also a way to make sure we got the proper file name for the real test later on.
47452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47453  if test "x$test_shortpath" = x; then
47454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47455$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47456    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47457  fi
47458
47459  # Call helper function which possibly converts this using DOS-style short mode.
47460  # If so, the updated path is stored in $new_path.
47461
47462  input_path="$new_path"
47463  # Check if we need to convert this using DOS-style short mode. If the path
47464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47465  # take no chances and rewrite it.
47466  # Note: m4 eats our [], so we need to use [ and ] instead.
47467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47468  if test "x$has_forbidden_chars" != x; then
47469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47473      # Going to short mode and back again did indeed matter. Since short mode is
47474      # case insensitive, let's make it lowercase to improve readability.
47475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47476      # Now convert it back to Unix-style (cygpath)
47477      input_path=`$CYGPATH -u "$shortmode_path"`
47478      new_path="$input_path"
47479    fi
47480  fi
47481
47482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47483  if test "x$test_cygdrive_prefix" = x; then
47484    # As a simple fix, exclude /usr/bin since it's not a real path.
47485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47487      # a path prefixed by /cygdrive for fixpath to work.
47488      new_path="$CYGWIN_ROOT_PATH$input_path"
47489    fi
47490  fi
47491
47492
47493  if test "x$path" != "x$new_path"; then
47494    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47496$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47497  fi
47498
47499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47500
47501  path="$POTENTIAL_FREETYPE_LIB_PATH"
47502  has_colon=`$ECHO $path | $GREP ^.:`
47503  new_path="$path"
47504  if test "x$has_colon" = x; then
47505    # Not in mixed or Windows style, start by that.
47506    new_path=`cmd //c echo $path`
47507  fi
47508
47509
47510  input_path="$new_path"
47511  # Check if we need to convert this using DOS-style short mode. If the path
47512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47513  # take no chances and rewrite it.
47514  # Note: m4 eats our [], so we need to use [ and ] instead.
47515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47516  if test "x$has_forbidden_chars" != x; then
47517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47519  fi
47520
47521
47522  windows_path="$new_path"
47523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47524    unix_path=`$CYGPATH -u "$windows_path"`
47525    new_path="$unix_path"
47526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47528    new_path="$unix_path"
47529  fi
47530
47531  if test "x$path" != "x$new_path"; then
47532    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47535  fi
47536
47537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47539
47540    else
47541      # We're on a unix platform. Hooray! :)
47542      path="$POTENTIAL_FREETYPE_LIB_PATH"
47543      has_space=`$ECHO "$path" | $GREP " "`
47544      if test "x$has_space" != x; then
47545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47548      fi
47549
47550      # Use eval to expand a potential ~
47551      eval path="$path"
47552      if test ! -f "$path" && test ! -d "$path"; then
47553        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47554      fi
47555
47556      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47557    fi
47558  fi
47559
47560
47561    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47563$as_echo_n "checking for freetype includes... " >&6; }
47564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47565$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47566    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47568$as_echo_n "checking for freetype libraries... " >&6; }
47569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47570$as_echo "$FREETYPE_LIB_PATH" >&6; }
47571  fi
47572
47573            else
47574
47575  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47576  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47577  METHOD="well-known location"
47578
47579  # Let's start with an optimistic view of the world :-)
47580  FOUND_FREETYPE=yes
47581
47582  # First look for the canonical freetype main include file ft2build.h.
47583  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47584    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47585    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47586    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47587      # Fail.
47588      FOUND_FREETYPE=no
47589    fi
47590  fi
47591
47592  if test "x$FOUND_FREETYPE" = xyes; then
47593    # Include file found, let's continue the sanity check.
47594    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47595$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47596
47597    # Reset to default value
47598    FREETYPE_BASE_NAME=freetype
47599    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47600    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47601      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47602          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47603        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47604        # for the .6 version explicitly.
47605        FREETYPE_BASE_NAME=freetype.6
47606        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47607        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47608$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47609      else
47610        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47612        FOUND_FREETYPE=no
47613      fi
47614    else
47615      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47616        # On Windows, we will need both .lib and .dll file.
47617        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47618          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47619$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47620          FOUND_FREETYPE=no
47621        fi
47622      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47623          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47624        # Found lib in isa dir, use that instead.
47625        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47626        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47627$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47628      fi
47629    fi
47630  fi
47631
47632  if test "x$FOUND_FREETYPE" = xyes; then
47633
47634  # Only process if variable expands to non-empty
47635
47636  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47638
47639  # Input might be given as Windows format, start by converting to
47640  # unix format.
47641  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47642  new_path=`$CYGPATH -u "$path"`
47643
47644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47647  # "foo.exe" is OK but "foo" is an error.
47648  #
47649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47650  # It is also a way to make sure we got the proper file name for the real test later on.
47651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47652  if test "x$test_shortpath" = x; then
47653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47655    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47656  fi
47657
47658  # Call helper function which possibly converts this using DOS-style short mode.
47659  # If so, the updated path is stored in $new_path.
47660
47661  input_path="$new_path"
47662  # Check if we need to convert this using DOS-style short mode. If the path
47663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47664  # take no chances and rewrite it.
47665  # Note: m4 eats our [], so we need to use [ and ] instead.
47666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47667  if test "x$has_forbidden_chars" != x; then
47668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47672      # Going to short mode and back again did indeed matter. Since short mode is
47673      # case insensitive, let's make it lowercase to improve readability.
47674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47675      # Now convert it back to Unix-style (cygpath)
47676      input_path=`$CYGPATH -u "$shortmode_path"`
47677      new_path="$input_path"
47678    fi
47679  fi
47680
47681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47682  if test "x$test_cygdrive_prefix" = x; then
47683    # As a simple fix, exclude /usr/bin since it's not a real path.
47684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47686      # a path prefixed by /cygdrive for fixpath to work.
47687      new_path="$CYGWIN_ROOT_PATH$input_path"
47688    fi
47689  fi
47690
47691
47692  if test "x$path" != "x$new_path"; then
47693    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47696  fi
47697
47698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47699
47700  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47701  has_colon=`$ECHO $path | $GREP ^.:`
47702  new_path="$path"
47703  if test "x$has_colon" = x; then
47704    # Not in mixed or Windows style, start by that.
47705    new_path=`cmd //c echo $path`
47706  fi
47707
47708
47709  input_path="$new_path"
47710  # Check if we need to convert this using DOS-style short mode. If the path
47711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47712  # take no chances and rewrite it.
47713  # Note: m4 eats our [], so we need to use [ and ] instead.
47714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47715  if test "x$has_forbidden_chars" != x; then
47716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47718  fi
47719
47720
47721  windows_path="$new_path"
47722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47723    unix_path=`$CYGPATH -u "$windows_path"`
47724    new_path="$unix_path"
47725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47727    new_path="$unix_path"
47728  fi
47729
47730  if test "x$path" != "x$new_path"; then
47731    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47734  fi
47735
47736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47738
47739    else
47740      # We're on a unix platform. Hooray! :)
47741      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47742      has_space=`$ECHO "$path" | $GREP " "`
47743      if test "x$has_space" != x; then
47744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47747      fi
47748
47749      # Use eval to expand a potential ~
47750      eval path="$path"
47751      if test ! -f "$path" && test ! -d "$path"; then
47752        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47753      fi
47754
47755      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47756    fi
47757  fi
47758
47759
47760  # Only process if variable expands to non-empty
47761
47762  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47764
47765  # Input might be given as Windows format, start by converting to
47766  # unix format.
47767  path="$POTENTIAL_FREETYPE_LIB_PATH"
47768  new_path=`$CYGPATH -u "$path"`
47769
47770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47773  # "foo.exe" is OK but "foo" is an error.
47774  #
47775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47776  # It is also a way to make sure we got the proper file name for the real test later on.
47777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47778  if test "x$test_shortpath" = x; then
47779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47781    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47782  fi
47783
47784  # Call helper function which possibly converts this using DOS-style short mode.
47785  # If so, the updated path is stored in $new_path.
47786
47787  input_path="$new_path"
47788  # Check if we need to convert this using DOS-style short mode. If the path
47789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47790  # take no chances and rewrite it.
47791  # Note: m4 eats our [], so we need to use [ and ] instead.
47792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47793  if test "x$has_forbidden_chars" != x; then
47794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47798      # Going to short mode and back again did indeed matter. Since short mode is
47799      # case insensitive, let's make it lowercase to improve readability.
47800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47801      # Now convert it back to Unix-style (cygpath)
47802      input_path=`$CYGPATH -u "$shortmode_path"`
47803      new_path="$input_path"
47804    fi
47805  fi
47806
47807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47808  if test "x$test_cygdrive_prefix" = x; then
47809    # As a simple fix, exclude /usr/bin since it's not a real path.
47810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47812      # a path prefixed by /cygdrive for fixpath to work.
47813      new_path="$CYGWIN_ROOT_PATH$input_path"
47814    fi
47815  fi
47816
47817
47818  if test "x$path" != "x$new_path"; then
47819    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47822  fi
47823
47824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47825
47826  path="$POTENTIAL_FREETYPE_LIB_PATH"
47827  has_colon=`$ECHO $path | $GREP ^.:`
47828  new_path="$path"
47829  if test "x$has_colon" = x; then
47830    # Not in mixed or Windows style, start by that.
47831    new_path=`cmd //c echo $path`
47832  fi
47833
47834
47835  input_path="$new_path"
47836  # Check if we need to convert this using DOS-style short mode. If the path
47837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47838  # take no chances and rewrite it.
47839  # Note: m4 eats our [], so we need to use [ and ] instead.
47840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47841  if test "x$has_forbidden_chars" != x; then
47842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47844  fi
47845
47846
47847  windows_path="$new_path"
47848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47849    unix_path=`$CYGPATH -u "$windows_path"`
47850    new_path="$unix_path"
47851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47853    new_path="$unix_path"
47854  fi
47855
47856  if test "x$path" != "x$new_path"; then
47857    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47860  fi
47861
47862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47864
47865    else
47866      # We're on a unix platform. Hooray! :)
47867      path="$POTENTIAL_FREETYPE_LIB_PATH"
47868      has_space=`$ECHO "$path" | $GREP " "`
47869      if test "x$has_space" != x; then
47870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47873      fi
47874
47875      # Use eval to expand a potential ~
47876      eval path="$path"
47877      if test ! -f "$path" && test ! -d "$path"; then
47878        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47879      fi
47880
47881      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47882    fi
47883  fi
47884
47885
47886    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47888$as_echo_n "checking for freetype includes... " >&6; }
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47890$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47891    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47893$as_echo_n "checking for freetype libraries... " >&6; }
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47895$as_echo "$FREETYPE_LIB_PATH" >&6; }
47896  fi
47897
47898              if test "x$FOUND_FREETYPE" != xyes; then
47899
47900  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47901  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47902  METHOD="well-known location"
47903
47904  # Let's start with an optimistic view of the world :-)
47905  FOUND_FREETYPE=yes
47906
47907  # First look for the canonical freetype main include file ft2build.h.
47908  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47909    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47910    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47911    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47912      # Fail.
47913      FOUND_FREETYPE=no
47914    fi
47915  fi
47916
47917  if test "x$FOUND_FREETYPE" = xyes; then
47918    # Include file found, let's continue the sanity check.
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47920$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47921
47922    # Reset to default value
47923    FREETYPE_BASE_NAME=freetype
47924    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47925    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47926      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47927          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47928        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47929        # for the .6 version explicitly.
47930        FREETYPE_BASE_NAME=freetype.6
47931        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47932        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47933$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47934      else
47935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47936$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47937        FOUND_FREETYPE=no
47938      fi
47939    else
47940      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47941        # On Windows, we will need both .lib and .dll file.
47942        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47943          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47944$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47945          FOUND_FREETYPE=no
47946        fi
47947      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47948          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47949        # Found lib in isa dir, use that instead.
47950        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47951        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47952$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47953      fi
47954    fi
47955  fi
47956
47957  if test "x$FOUND_FREETYPE" = xyes; then
47958
47959  # Only process if variable expands to non-empty
47960
47961  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47963
47964  # Input might be given as Windows format, start by converting to
47965  # unix format.
47966  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47967  new_path=`$CYGPATH -u "$path"`
47968
47969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47972  # "foo.exe" is OK but "foo" is an error.
47973  #
47974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47975  # It is also a way to make sure we got the proper file name for the real test later on.
47976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47977  if test "x$test_shortpath" = x; then
47978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47981  fi
47982
47983  # Call helper function which possibly converts this using DOS-style short mode.
47984  # If so, the updated path is stored in $new_path.
47985
47986  input_path="$new_path"
47987  # Check if we need to convert this using DOS-style short mode. If the path
47988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47989  # take no chances and rewrite it.
47990  # Note: m4 eats our [], so we need to use [ and ] instead.
47991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47992  if test "x$has_forbidden_chars" != x; then
47993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47997      # Going to short mode and back again did indeed matter. Since short mode is
47998      # case insensitive, let's make it lowercase to improve readability.
47999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48000      # Now convert it back to Unix-style (cygpath)
48001      input_path=`$CYGPATH -u "$shortmode_path"`
48002      new_path="$input_path"
48003    fi
48004  fi
48005
48006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48007  if test "x$test_cygdrive_prefix" = x; then
48008    # As a simple fix, exclude /usr/bin since it's not a real path.
48009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48011      # a path prefixed by /cygdrive for fixpath to work.
48012      new_path="$CYGWIN_ROOT_PATH$input_path"
48013    fi
48014  fi
48015
48016
48017  if test "x$path" != "x$new_path"; then
48018    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48021  fi
48022
48023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48024
48025  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48026  has_colon=`$ECHO $path | $GREP ^.:`
48027  new_path="$path"
48028  if test "x$has_colon" = x; then
48029    # Not in mixed or Windows style, start by that.
48030    new_path=`cmd //c echo $path`
48031  fi
48032
48033
48034  input_path="$new_path"
48035  # Check if we need to convert this using DOS-style short mode. If the path
48036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48037  # take no chances and rewrite it.
48038  # Note: m4 eats our [], so we need to use [ and ] instead.
48039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48040  if test "x$has_forbidden_chars" != x; then
48041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48043  fi
48044
48045
48046  windows_path="$new_path"
48047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48048    unix_path=`$CYGPATH -u "$windows_path"`
48049    new_path="$unix_path"
48050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48052    new_path="$unix_path"
48053  fi
48054
48055  if test "x$path" != "x$new_path"; then
48056    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48059  fi
48060
48061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48063
48064    else
48065      # We're on a unix platform. Hooray! :)
48066      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48067      has_space=`$ECHO "$path" | $GREP " "`
48068      if test "x$has_space" != x; then
48069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48072      fi
48073
48074      # Use eval to expand a potential ~
48075      eval path="$path"
48076      if test ! -f "$path" && test ! -d "$path"; then
48077        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48078      fi
48079
48080      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48081    fi
48082  fi
48083
48084
48085  # Only process if variable expands to non-empty
48086
48087  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48089
48090  # Input might be given as Windows format, start by converting to
48091  # unix format.
48092  path="$POTENTIAL_FREETYPE_LIB_PATH"
48093  new_path=`$CYGPATH -u "$path"`
48094
48095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48098  # "foo.exe" is OK but "foo" is an error.
48099  #
48100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48101  # It is also a way to make sure we got the proper file name for the real test later on.
48102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48103  if test "x$test_shortpath" = x; then
48104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48106    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48107  fi
48108
48109  # Call helper function which possibly converts this using DOS-style short mode.
48110  # If so, the updated path is stored in $new_path.
48111
48112  input_path="$new_path"
48113  # Check if we need to convert this using DOS-style short mode. If the path
48114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48115  # take no chances and rewrite it.
48116  # Note: m4 eats our [], so we need to use [ and ] instead.
48117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48118  if test "x$has_forbidden_chars" != x; then
48119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48123      # Going to short mode and back again did indeed matter. Since short mode is
48124      # case insensitive, let's make it lowercase to improve readability.
48125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48126      # Now convert it back to Unix-style (cygpath)
48127      input_path=`$CYGPATH -u "$shortmode_path"`
48128      new_path="$input_path"
48129    fi
48130  fi
48131
48132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48133  if test "x$test_cygdrive_prefix" = x; then
48134    # As a simple fix, exclude /usr/bin since it's not a real path.
48135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48137      # a path prefixed by /cygdrive for fixpath to work.
48138      new_path="$CYGWIN_ROOT_PATH$input_path"
48139    fi
48140  fi
48141
48142
48143  if test "x$path" != "x$new_path"; then
48144    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48146$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48147  fi
48148
48149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48150
48151  path="$POTENTIAL_FREETYPE_LIB_PATH"
48152  has_colon=`$ECHO $path | $GREP ^.:`
48153  new_path="$path"
48154  if test "x$has_colon" = x; then
48155    # Not in mixed or Windows style, start by that.
48156    new_path=`cmd //c echo $path`
48157  fi
48158
48159
48160  input_path="$new_path"
48161  # Check if we need to convert this using DOS-style short mode. If the path
48162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48163  # take no chances and rewrite it.
48164  # Note: m4 eats our [], so we need to use [ and ] instead.
48165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48166  if test "x$has_forbidden_chars" != x; then
48167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48169  fi
48170
48171
48172  windows_path="$new_path"
48173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48174    unix_path=`$CYGPATH -u "$windows_path"`
48175    new_path="$unix_path"
48176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48178    new_path="$unix_path"
48179  fi
48180
48181  if test "x$path" != "x$new_path"; then
48182    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48184$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48185  fi
48186
48187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48189
48190    else
48191      # We're on a unix platform. Hooray! :)
48192      path="$POTENTIAL_FREETYPE_LIB_PATH"
48193      has_space=`$ECHO "$path" | $GREP " "`
48194      if test "x$has_space" != x; then
48195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48198      fi
48199
48200      # Use eval to expand a potential ~
48201      eval path="$path"
48202      if test ! -f "$path" && test ! -d "$path"; then
48203        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48204      fi
48205
48206      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48207    fi
48208  fi
48209
48210
48211    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48213$as_echo_n "checking for freetype includes... " >&6; }
48214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48215$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48216    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48218$as_echo_n "checking for freetype libraries... " >&6; }
48219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48220$as_echo "$FREETYPE_LIB_PATH" >&6; }
48221  fi
48222
48223              fi
48224            fi
48225          fi
48226        fi
48227      fi # end check in well-known locations
48228
48229      if test "x$FOUND_FREETYPE" != xyes; then
48230
48231  # Print a helpful message on how to acquire the necessary build dependency.
48232  # freetype is the help tag: freetype, cups, pulse, alsa etc
48233  MISSING_DEPENDENCY=freetype
48234
48235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48236    cygwin_help $MISSING_DEPENDENCY
48237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48238    msys_help $MISSING_DEPENDENCY
48239  else
48240    PKGHANDLER_COMMAND=
48241
48242    case $PKGHANDLER in
48243      apt-get)
48244        apt_help     $MISSING_DEPENDENCY ;;
48245      yum)
48246        yum_help     $MISSING_DEPENDENCY ;;
48247      port)
48248        port_help    $MISSING_DEPENDENCY ;;
48249      pkgutil)
48250        pkgutil_help $MISSING_DEPENDENCY ;;
48251      pkgadd)
48252        pkgadd_help  $MISSING_DEPENDENCY ;;
48253    esac
48254
48255    if test "x$PKGHANDLER_COMMAND" != x; then
48256      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48257    fi
48258  fi
48259
48260        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48261      fi
48262    fi # end user specified settings
48263
48264    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48265    if test "x$FREETYPE_CFLAGS" = x; then
48266
48267  # Only process if variable expands to non-empty
48268
48269  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48271
48272  # Input might be given as Windows format, start by converting to
48273  # unix format.
48274  path="$FREETYPE_INCLUDE_PATH"
48275  new_path=`$CYGPATH -u "$path"`
48276
48277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48280  # "foo.exe" is OK but "foo" is an error.
48281  #
48282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48283  # It is also a way to make sure we got the proper file name for the real test later on.
48284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48285  if test "x$test_shortpath" = x; then
48286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48287$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48288    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48289  fi
48290
48291  # Call helper function which possibly converts this using DOS-style short mode.
48292  # If so, the updated path is stored in $new_path.
48293
48294  input_path="$new_path"
48295  # Check if we need to convert this using DOS-style short mode. If the path
48296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48297  # take no chances and rewrite it.
48298  # Note: m4 eats our [], so we need to use [ and ] instead.
48299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48300  if test "x$has_forbidden_chars" != x; then
48301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48305      # Going to short mode and back again did indeed matter. Since short mode is
48306      # case insensitive, let's make it lowercase to improve readability.
48307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48308      # Now convert it back to Unix-style (cygpath)
48309      input_path=`$CYGPATH -u "$shortmode_path"`
48310      new_path="$input_path"
48311    fi
48312  fi
48313
48314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48315  if test "x$test_cygdrive_prefix" = x; then
48316    # As a simple fix, exclude /usr/bin since it's not a real path.
48317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48319      # a path prefixed by /cygdrive for fixpath to work.
48320      new_path="$CYGWIN_ROOT_PATH$input_path"
48321    fi
48322  fi
48323
48324
48325  if test "x$path" != "x$new_path"; then
48326    FREETYPE_INCLUDE_PATH="$new_path"
48327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48328$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48329  fi
48330
48331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48332
48333  path="$FREETYPE_INCLUDE_PATH"
48334  has_colon=`$ECHO $path | $GREP ^.:`
48335  new_path="$path"
48336  if test "x$has_colon" = x; then
48337    # Not in mixed or Windows style, start by that.
48338    new_path=`cmd //c echo $path`
48339  fi
48340
48341
48342  input_path="$new_path"
48343  # Check if we need to convert this using DOS-style short mode. If the path
48344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48345  # take no chances and rewrite it.
48346  # Note: m4 eats our [], so we need to use [ and ] instead.
48347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48348  if test "x$has_forbidden_chars" != x; then
48349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48351  fi
48352
48353
48354  windows_path="$new_path"
48355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48356    unix_path=`$CYGPATH -u "$windows_path"`
48357    new_path="$unix_path"
48358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48360    new_path="$unix_path"
48361  fi
48362
48363  if test "x$path" != "x$new_path"; then
48364    FREETYPE_INCLUDE_PATH="$new_path"
48365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48366$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48367  fi
48368
48369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48371
48372    else
48373      # We're on a unix platform. Hooray! :)
48374      path="$FREETYPE_INCLUDE_PATH"
48375      has_space=`$ECHO "$path" | $GREP " "`
48376      if test "x$has_space" != x; then
48377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48378$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48379        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48380      fi
48381
48382      # Use eval to expand a potential ~
48383      eval path="$path"
48384      if test ! -f "$path" && test ! -d "$path"; then
48385        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48386      fi
48387
48388      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48389    fi
48390  fi
48391
48392      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48393        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48394      else
48395        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48396      fi
48397    fi
48398
48399    if test "x$FREETYPE_LIBS" = x; then
48400
48401  # Only process if variable expands to non-empty
48402
48403  if test "x$FREETYPE_LIB_PATH" != x; then
48404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48405
48406  # Input might be given as Windows format, start by converting to
48407  # unix format.
48408  path="$FREETYPE_LIB_PATH"
48409  new_path=`$CYGPATH -u "$path"`
48410
48411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48414  # "foo.exe" is OK but "foo" is an error.
48415  #
48416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48417  # It is also a way to make sure we got the proper file name for the real test later on.
48418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48419  if test "x$test_shortpath" = x; then
48420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48421$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48422    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48423  fi
48424
48425  # Call helper function which possibly converts this using DOS-style short mode.
48426  # If so, the updated path is stored in $new_path.
48427
48428  input_path="$new_path"
48429  # Check if we need to convert this using DOS-style short mode. If the path
48430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48431  # take no chances and rewrite it.
48432  # Note: m4 eats our [], so we need to use [ and ] instead.
48433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48434  if test "x$has_forbidden_chars" != x; then
48435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48439      # Going to short mode and back again did indeed matter. Since short mode is
48440      # case insensitive, let's make it lowercase to improve readability.
48441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48442      # Now convert it back to Unix-style (cygpath)
48443      input_path=`$CYGPATH -u "$shortmode_path"`
48444      new_path="$input_path"
48445    fi
48446  fi
48447
48448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48449  if test "x$test_cygdrive_prefix" = x; then
48450    # As a simple fix, exclude /usr/bin since it's not a real path.
48451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48453      # a path prefixed by /cygdrive for fixpath to work.
48454      new_path="$CYGWIN_ROOT_PATH$input_path"
48455    fi
48456  fi
48457
48458
48459  if test "x$path" != "x$new_path"; then
48460    FREETYPE_LIB_PATH="$new_path"
48461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48462$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48463  fi
48464
48465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48466
48467  path="$FREETYPE_LIB_PATH"
48468  has_colon=`$ECHO $path | $GREP ^.:`
48469  new_path="$path"
48470  if test "x$has_colon" = x; then
48471    # Not in mixed or Windows style, start by that.
48472    new_path=`cmd //c echo $path`
48473  fi
48474
48475
48476  input_path="$new_path"
48477  # Check if we need to convert this using DOS-style short mode. If the path
48478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48479  # take no chances and rewrite it.
48480  # Note: m4 eats our [], so we need to use [ and ] instead.
48481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48482  if test "x$has_forbidden_chars" != x; then
48483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48485  fi
48486
48487
48488  windows_path="$new_path"
48489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48490    unix_path=`$CYGPATH -u "$windows_path"`
48491    new_path="$unix_path"
48492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48494    new_path="$unix_path"
48495  fi
48496
48497  if test "x$path" != "x$new_path"; then
48498    FREETYPE_LIB_PATH="$new_path"
48499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48500$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48501  fi
48502
48503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48505
48506    else
48507      # We're on a unix platform. Hooray! :)
48508      path="$FREETYPE_LIB_PATH"
48509      has_space=`$ECHO "$path" | $GREP " "`
48510      if test "x$has_space" != x; then
48511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48512$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48514      fi
48515
48516      # Use eval to expand a potential ~
48517      eval path="$path"
48518      if test ! -f "$path" && test ! -d "$path"; then
48519        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48520      fi
48521
48522      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48523    fi
48524  fi
48525
48526      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48527        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48528      else
48529        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48530      fi
48531    fi
48532
48533    # Try to compile it
48534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48535$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48536    ac_ext=cpp
48537ac_cpp='$CXXCPP $CPPFLAGS'
48538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48541
48542    PREV_CXXCFLAGS="$CXXFLAGS"
48543    PREV_LIBS="$LIBS"
48544    PREV_CXX="$CXX"
48545    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48546    LIBS="$LIBS $FREETYPE_LIBS"
48547    CXX="$FIXPATH $CXX"
48548    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48549/* end confdefs.h.  */
48550
48551          #include<ft2build.h>
48552          #include FT_FREETYPE_H
48553          int main () {
48554            FT_Init_FreeType(NULL);
48555            return 0;
48556          }
48557
48558_ACEOF
48559if ac_fn_cxx_try_link "$LINENO"; then :
48560
48561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48562$as_echo "yes" >&6; }
48563
48564else
48565
48566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48567$as_echo "no" >&6; }
48568          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48569$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48570          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48571$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48572
48573
48574  # Print a helpful message on how to acquire the necessary build dependency.
48575  # freetype is the help tag: freetype, cups, pulse, alsa etc
48576  MISSING_DEPENDENCY=freetype
48577
48578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48579    cygwin_help $MISSING_DEPENDENCY
48580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48581    msys_help $MISSING_DEPENDENCY
48582  else
48583    PKGHANDLER_COMMAND=
48584
48585    case $PKGHANDLER in
48586      apt-get)
48587        apt_help     $MISSING_DEPENDENCY ;;
48588      yum)
48589        yum_help     $MISSING_DEPENDENCY ;;
48590      port)
48591        port_help    $MISSING_DEPENDENCY ;;
48592      pkgutil)
48593        pkgutil_help $MISSING_DEPENDENCY ;;
48594      pkgadd)
48595        pkgadd_help  $MISSING_DEPENDENCY ;;
48596    esac
48597
48598    if test "x$PKGHANDLER_COMMAND" != x; then
48599      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48600    fi
48601  fi
48602
48603
48604          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48605
48606
48607fi
48608rm -f core conftest.err conftest.$ac_objext \
48609    conftest$ac_exeext conftest.$ac_ext
48610    CXXCFLAGS="$PREV_CXXFLAGS"
48611    LIBS="$PREV_LIBS"
48612    CXX="$PREV_CXX"
48613    ac_ext=cpp
48614ac_cpp='$CXXCPP $CPPFLAGS'
48615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48618
48619
48620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48621$as_echo_n "checking if we should bundle freetype... " >&6; }
48622    if test "x$BUNDLE_FREETYPE" = xyes; then
48623      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48624    fi
48625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48626$as_echo "$BUNDLE_FREETYPE" >&6; }
48627
48628  fi # end freetype needed
48629
48630
48631
48632
48633
48634
48635
48636  ###############################################################################
48637  #
48638  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48639  #
48640
48641# Check whether --with-alsa was given.
48642if test "${with_alsa+set}" = set; then :
48643  withval=$with_alsa;
48644fi
48645
48646
48647# Check whether --with-alsa-include was given.
48648if test "${with_alsa_include+set}" = set; then :
48649  withval=$with_alsa_include;
48650fi
48651
48652
48653# Check whether --with-alsa-lib was given.
48654if test "${with_alsa_lib+set}" = set; then :
48655  withval=$with_alsa_lib;
48656fi
48657
48658
48659  if test "x$ALSA_NOT_NEEDED" = xyes; then
48660    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48661      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48662$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48663    fi
48664    ALSA_CFLAGS=
48665    ALSA_LIBS=
48666  else
48667    ALSA_FOUND=no
48668
48669    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48670      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48671    fi
48672
48673    if test "x${with_alsa}" != x; then
48674      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48675      ALSA_CFLAGS="-I${with_alsa}/include"
48676      ALSA_FOUND=yes
48677    fi
48678    if test "x${with_alsa_include}" != x; then
48679      ALSA_CFLAGS="-I${with_alsa_include}"
48680      ALSA_FOUND=yes
48681    fi
48682    if test "x${with_alsa_lib}" != x; then
48683      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48684      ALSA_FOUND=yes
48685    fi
48686    if test "x$ALSA_FOUND" = xno; then
48687
48688
48689  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48690    # Source the builddeps file again, to make sure it uses the latest variables!
48691    . $builddepsfile
48692    # Look for a target and build machine specific resource!
48693    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48694    if test "x$resource" = x; then
48695      # Ok, lets instead look for a target specific resource
48696      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48697    fi
48698    if test "x$resource" = x; then
48699      # Ok, lets instead look for a build specific resource
48700      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48701    fi
48702    if test "x$resource" = x; then
48703      # Ok, lets instead look for a generic resource
48704      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48705      resource=${builddep_alsa}
48706    fi
48707    if test "x$resource" != x; then
48708      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48709$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48710      # If the resource in the builddeps.conf file is an existing directory,
48711      # for example /java/linux/cups
48712      if test -d ${resource}; then
48713        depdir=${resource}
48714      else
48715
48716  # alsa is for example mymodule
48717  # $resource is for example libs/general/libmymod_1_2_3.zip
48718  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48719  # $with_builddeps_dir is for example /localhome/builddeps
48720  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48721  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48722  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48723  filename=`basename $resource`
48724  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48725  filebase=${filename%%.*}
48726  extension=${filename#*.}
48727  installdir=$with_builddeps_dir/$filebase
48728  if test ! -f $installdir/$filename.unpacked; then
48729    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48730$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48731    if test ! -d $installdir; then
48732      mkdir -p $installdir
48733    fi
48734    if test ! -d $installdir; then
48735      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48736    fi
48737    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48738    touch $tmpfile
48739    if test ! -f $tmpfile; then
48740      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48741    fi
48742
48743  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48744  # $tmpfile is the local file name for the downloaded file.
48745  VALID_TOOL=no
48746  if test "x$BDEPS_FTP" = xwget; then
48747    VALID_TOOL=yes
48748    wget -O $tmpfile $with_builddeps_server/$resource
48749  fi
48750  if test "x$BDEPS_FTP" = xlftp; then
48751    VALID_TOOL=yes
48752    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48753  fi
48754  if test "x$BDEPS_FTP" = xftp; then
48755    VALID_TOOL=yes
48756    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48757    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48758    FTPUSERPWD=${FTPSERVER%%@*}
48759    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48760      FTPUSER=${userpwd%%:*}
48761      FTPPWD=${userpwd#*@}
48762      FTPSERVER=${FTPSERVER#*@}
48763    else
48764      FTPUSER=ftp
48765      FTPPWD=ftp
48766    fi
48767    # the "pass" command does not work on some
48768    # ftp clients (read ftp.exe) but if it works,
48769    # passive mode is better!
48770    ( \
48771        echo "user $FTPUSER $FTPPWD"        ; \
48772        echo "pass"                         ; \
48773        echo "bin"                          ; \
48774        echo "get $FTPPATH $tmpfile"              ; \
48775    ) | ftp -in $FTPSERVER
48776  fi
48777  if test "x$VALID_TOOL" != xyes; then
48778    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48779  fi
48780
48781    mv $tmpfile $installdir/$filename
48782    if test ! -s $installdir/$filename; then
48783      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48784    fi
48785    case "$extension" in
48786      zip)  echo "Unzipping $installdir/$filename..."
48787        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48788        ;;
48789      tar.gz) echo "Untaring $installdir/$filename..."
48790        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48791        ;;
48792      tgz) echo "Untaring $installdir/$filename..."
48793        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48794        ;;
48795      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48796        ;;
48797    esac
48798  fi
48799  if test -f $installdir/$filename.unpacked; then
48800    depdir=$installdir
48801  fi
48802
48803      fi
48804      # Source the builddeps file again, because in the previous command, the depdir
48805      # was updated to point at the current build dependency install directory.
48806      . $builddepsfile
48807      # Now extract variables from the builddeps.conf files.
48808      theroot=${builddep_alsa_ROOT}
48809      thecflags=${builddep_alsa_CFLAGS}
48810      thelibs=${builddep_alsa_LIBS}
48811      if test "x$depdir" = x; then
48812        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48813      fi
48814      ALSA=$depdir
48815      if test "x$theroot" != x; then
48816        ALSA="$theroot"
48817      fi
48818      if test "x$thecflags" != x; then
48819        ALSA_CFLAGS="$thecflags"
48820      fi
48821      if test "x$thelibs" != x; then
48822        ALSA_LIBS="$thelibs"
48823      fi
48824      ALSA_FOUND=yes
48825      else ALSA_FOUND=no
48826
48827    fi
48828    else ALSA_FOUND=no
48829
48830  fi
48831
48832    fi
48833    # Do not try pkg-config if we have a sysroot set.
48834    if test "x$SYSROOT" = x; then
48835      if test "x$ALSA_FOUND" = xno; then
48836
48837pkg_failed=no
48838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48839$as_echo_n "checking for ALSA... " >&6; }
48840
48841if test -n "$ALSA_CFLAGS"; then
48842    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48843 elif test -n "$PKG_CONFIG"; then
48844    if test -n "$PKG_CONFIG" && \
48845    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48846  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48847  ac_status=$?
48848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48849  test $ac_status = 0; }; then
48850  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48851else
48852  pkg_failed=yes
48853fi
48854 else
48855    pkg_failed=untried
48856fi
48857if test -n "$ALSA_LIBS"; then
48858    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48859 elif test -n "$PKG_CONFIG"; then
48860    if test -n "$PKG_CONFIG" && \
48861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48862  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48863  ac_status=$?
48864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48865  test $ac_status = 0; }; then
48866  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48867else
48868  pkg_failed=yes
48869fi
48870 else
48871    pkg_failed=untried
48872fi
48873
48874
48875
48876if test $pkg_failed = yes; then
48877
48878if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48879        _pkg_short_errors_supported=yes
48880else
48881        _pkg_short_errors_supported=no
48882fi
48883        if test $_pkg_short_errors_supported = yes; then
48884	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48885        else
48886	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48887        fi
48888	# Put the nasty error message in config.log where it belongs
48889	echo "$ALSA_PKG_ERRORS" >&5
48890
48891	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48892$as_echo "no" >&6; }
48893                ALSA_FOUND=no
48894elif test $pkg_failed = untried; then
48895	ALSA_FOUND=no
48896else
48897	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48898	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48900$as_echo "yes" >&6; }
48901	ALSA_FOUND=yes
48902fi
48903      fi
48904    fi
48905    if test "x$ALSA_FOUND" = xno; then
48906      for ac_header in alsa/asoundlib.h
48907do :
48908  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48909if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48910  cat >>confdefs.h <<_ACEOF
48911#define HAVE_ALSA_ASOUNDLIB_H 1
48912_ACEOF
48913
48914            ALSA_FOUND=yes
48915            ALSA_CFLAGS=-Iignoreme
48916            ALSA_LIBS=-lasound
48917            DEFAULT_ALSA=yes
48918
48919else
48920  ALSA_FOUND=no
48921fi
48922
48923done
48924
48925    fi
48926    if test "x$ALSA_FOUND" = xno; then
48927
48928  # Print a helpful message on how to acquire the necessary build dependency.
48929  # alsa is the help tag: freetype, cups, pulse, alsa etc
48930  MISSING_DEPENDENCY=alsa
48931
48932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48933    cygwin_help $MISSING_DEPENDENCY
48934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48935    msys_help $MISSING_DEPENDENCY
48936  else
48937    PKGHANDLER_COMMAND=
48938
48939    case $PKGHANDLER in
48940      apt-get)
48941        apt_help     $MISSING_DEPENDENCY ;;
48942      yum)
48943        yum_help     $MISSING_DEPENDENCY ;;
48944      port)
48945        port_help    $MISSING_DEPENDENCY ;;
48946      pkgutil)
48947        pkgutil_help $MISSING_DEPENDENCY ;;
48948      pkgadd)
48949        pkgadd_help  $MISSING_DEPENDENCY ;;
48950    esac
48951
48952    if test "x$PKGHANDLER_COMMAND" != x; then
48953      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48954    fi
48955  fi
48956
48957      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48958    fi
48959  fi
48960
48961
48962
48963
48964
48965
48966  ###############################################################################
48967  #
48968  # Check for the jpeg library
48969  #
48970
48971
48972# Check whether --with-libjpeg was given.
48973if test "${with_libjpeg+set}" = set; then :
48974  withval=$with_libjpeg;
48975fi
48976
48977
48978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48979$as_echo_n "checking for which libjpeg to use... " >&6; }
48980
48981  # default is bundled
48982  DEFAULT_LIBJPEG=bundled
48983
48984  #
48985  # if user didn't specify, use DEFAULT_LIBJPEG
48986  #
48987  if test "x${with_libjpeg}" = "x"; then
48988    with_libjpeg=${DEFAULT_LIBJPEG}
48989  fi
48990
48991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48992$as_echo "${with_libjpeg}" >&6; }
48993
48994  if test "x${with_libjpeg}" = "xbundled"; then
48995    USE_EXTERNAL_LIBJPEG=false
48996  elif test "x${with_libjpeg}" = "xsystem"; then
48997    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48998if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48999
49000else
49001   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49002fi
49003
49004
49005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49006$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49007if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49008  $as_echo_n "(cached) " >&6
49009else
49010  ac_check_lib_save_LIBS=$LIBS
49011LIBS="-ljpeg  $LIBS"
49012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49013/* end confdefs.h.  */
49014
49015/* Override any GCC internal prototype to avoid an error.
49016   Use char because int might match the return type of a GCC
49017   builtin and then its argument prototype would still apply.  */
49018#ifdef __cplusplus
49019extern "C"
49020#endif
49021char jpeg_CreateDecompress ();
49022int
49023main ()
49024{
49025return jpeg_CreateDecompress ();
49026  ;
49027  return 0;
49028}
49029_ACEOF
49030if ac_fn_cxx_try_link "$LINENO"; then :
49031  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49032else
49033  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49034fi
49035rm -f core conftest.err conftest.$ac_objext \
49036    conftest$ac_exeext conftest.$ac_ext
49037LIBS=$ac_check_lib_save_LIBS
49038fi
49039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49040$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49041if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49042  cat >>confdefs.h <<_ACEOF
49043#define HAVE_LIBJPEG 1
49044_ACEOF
49045
49046  LIBS="-ljpeg $LIBS"
49047
49048else
49049   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49050fi
49051
49052
49053    USE_EXTERNAL_LIBJPEG=true
49054  else
49055    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49056  fi
49057
49058
49059
49060  ###############################################################################
49061  #
49062  # Check for the gif library
49063  #
49064
49065
49066# Check whether --with-giflib was given.
49067if test "${with_giflib+set}" = set; then :
49068  withval=$with_giflib;
49069fi
49070
49071
49072
49073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49074$as_echo_n "checking for which giflib to use... " >&6; }
49075
49076  # default is bundled
49077  DEFAULT_GIFLIB=bundled
49078
49079  #
49080  # if user didn't specify, use DEFAULT_GIFLIB
49081  #
49082  if test "x${with_giflib}" = "x"; then
49083    with_giflib=${DEFAULT_GIFLIB}
49084  fi
49085
49086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49087$as_echo "${with_giflib}" >&6; }
49088
49089  if test "x${with_giflib}" = "xbundled"; then
49090    USE_EXTERNAL_LIBGIF=false
49091  elif test "x${with_giflib}" = "xsystem"; then
49092    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49093if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49094
49095else
49096   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49097fi
49098
49099
49100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49101$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49102if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49103  $as_echo_n "(cached) " >&6
49104else
49105  ac_check_lib_save_LIBS=$LIBS
49106LIBS="-lgif  $LIBS"
49107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49108/* end confdefs.h.  */
49109
49110/* Override any GCC internal prototype to avoid an error.
49111   Use char because int might match the return type of a GCC
49112   builtin and then its argument prototype would still apply.  */
49113#ifdef __cplusplus
49114extern "C"
49115#endif
49116char DGifGetCode ();
49117int
49118main ()
49119{
49120return DGifGetCode ();
49121  ;
49122  return 0;
49123}
49124_ACEOF
49125if ac_fn_cxx_try_link "$LINENO"; then :
49126  ac_cv_lib_gif_DGifGetCode=yes
49127else
49128  ac_cv_lib_gif_DGifGetCode=no
49129fi
49130rm -f core conftest.err conftest.$ac_objext \
49131    conftest$ac_exeext conftest.$ac_ext
49132LIBS=$ac_check_lib_save_LIBS
49133fi
49134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49135$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49136if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49137  cat >>confdefs.h <<_ACEOF
49138#define HAVE_LIBGIF 1
49139_ACEOF
49140
49141  LIBS="-lgif $LIBS"
49142
49143else
49144   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49145fi
49146
49147
49148    USE_EXTERNAL_LIBGIF=true
49149  else
49150    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49151  fi
49152
49153
49154  ###############################################################################
49155  #
49156  # Check for the lcms2 library
49157  #
49158
49159
49160# Check whether --with-lcms was given.
49161if test "${with_lcms+set}" = set; then :
49162  withval=$with_lcms;
49163fi
49164
49165
49166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49167$as_echo_n "checking for which lcms to use... " >&6; }
49168
49169  DEFAULT_LCMS=bundled
49170
49171  #
49172  # If user didn't specify, use DEFAULT_LCMS
49173  #
49174  if test "x${with_lcms}" = "x"; then
49175      with_lcms=${DEFAULT_LCMS}
49176  fi
49177
49178  if test "x${with_lcms}" = "xbundled"; then
49179    USE_EXTERNAL_LCMS=false
49180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49181$as_echo "bundled" >&6; }
49182  elif test "x${with_lcms}" = "xsystem"; then
49183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49184$as_echo "system" >&6; }
49185
49186pkg_failed=no
49187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49188$as_echo_n "checking for LCMS... " >&6; }
49189
49190if test -n "$LCMS_CFLAGS"; then
49191    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49192 elif test -n "$PKG_CONFIG"; then
49193    if test -n "$PKG_CONFIG" && \
49194    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49195  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49196  ac_status=$?
49197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49198  test $ac_status = 0; }; then
49199  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49200else
49201  pkg_failed=yes
49202fi
49203 else
49204    pkg_failed=untried
49205fi
49206if test -n "$LCMS_LIBS"; then
49207    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49208 elif test -n "$PKG_CONFIG"; then
49209    if test -n "$PKG_CONFIG" && \
49210    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49211  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49212  ac_status=$?
49213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49214  test $ac_status = 0; }; then
49215  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49216else
49217  pkg_failed=yes
49218fi
49219 else
49220    pkg_failed=untried
49221fi
49222
49223
49224
49225if test $pkg_failed = yes; then
49226
49227if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49228        _pkg_short_errors_supported=yes
49229else
49230        _pkg_short_errors_supported=no
49231fi
49232        if test $_pkg_short_errors_supported = yes; then
49233	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49234        else
49235	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49236        fi
49237	# Put the nasty error message in config.log where it belongs
49238	echo "$LCMS_PKG_ERRORS" >&5
49239
49240	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49241$as_echo "no" >&6; }
49242                LCMS_FOUND=no
49243elif test $pkg_failed = untried; then
49244	LCMS_FOUND=no
49245else
49246	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49247	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49249$as_echo "yes" >&6; }
49250	LCMS_FOUND=yes
49251fi
49252    if test "x${LCMS_FOUND}" = "xyes"; then
49253      USE_EXTERNAL_LCMS=true
49254    else
49255      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49256    fi
49257  else
49258    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49259  fi
49260
49261
49262
49263  ###############################################################################
49264  #
49265  # Check for the png library
49266  #
49267
49268
49269# Check whether --with-libpng was given.
49270if test "${with_libpng+set}" = set; then :
49271  withval=$with_libpng;
49272fi
49273
49274
49275
49276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49277$as_echo_n "checking for which libpng to use... " >&6; }
49278
49279  # default is bundled
49280  DEFAULT_LIBPNG=bundled
49281
49282  #
49283  # if user didn't specify, use DEFAULT_LIBPNG
49284  #
49285  if test "x${with_libpng}" = "x"; then
49286      with_libpng=${DEFAULT_LIBPNG}
49287  fi
49288
49289  if test "x${with_libpng}" = "xbundled"; then
49290      USE_EXTERNAL_LIBPNG=false
49291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49292$as_echo "bundled" >&6; }
49293  elif test "x${with_libpng}" = "xsystem"; then
49294
49295pkg_failed=no
49296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49297$as_echo_n "checking for PNG... " >&6; }
49298
49299if test -n "$PNG_CFLAGS"; then
49300    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49301 elif test -n "$PKG_CONFIG"; then
49302    if test -n "$PKG_CONFIG" && \
49303    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49304  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49305  ac_status=$?
49306  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49307  test $ac_status = 0; }; then
49308  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49309else
49310  pkg_failed=yes
49311fi
49312 else
49313    pkg_failed=untried
49314fi
49315if test -n "$PNG_LIBS"; then
49316    pkg_cv_PNG_LIBS="$PNG_LIBS"
49317 elif test -n "$PKG_CONFIG"; then
49318    if test -n "$PKG_CONFIG" && \
49319    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49320  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49321  ac_status=$?
49322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49323  test $ac_status = 0; }; then
49324  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49325else
49326  pkg_failed=yes
49327fi
49328 else
49329    pkg_failed=untried
49330fi
49331
49332
49333
49334if test $pkg_failed = yes; then
49335
49336if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49337        _pkg_short_errors_supported=yes
49338else
49339        _pkg_short_errors_supported=no
49340fi
49341        if test $_pkg_short_errors_supported = yes; then
49342	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49343        else
49344	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49345        fi
49346	# Put the nasty error message in config.log where it belongs
49347	echo "$PNG_PKG_ERRORS" >&5
49348
49349	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49350$as_echo "no" >&6; }
49351                 LIBPNG_FOUND=no
49352elif test $pkg_failed = untried; then
49353	 LIBPNG_FOUND=no
49354else
49355	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49356	PNG_LIBS=$pkg_cv_PNG_LIBS
49357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49358$as_echo "yes" >&6; }
49359	 LIBPNG_FOUND=yes
49360fi
49361      if test "x${LIBPNG_FOUND}" = "xyes"; then
49362          USE_EXTERNAL_LIBPNG=true
49363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49364$as_echo "system" >&6; }
49365      else
49366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49367$as_echo "system not found" >&6; }
49368          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49369      fi
49370  else
49371      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49372  fi
49373
49374
49375  ###############################################################################
49376  #
49377  # Check for the zlib library
49378  #
49379
49380
49381# Check whether --with-zlib was given.
49382if test "${with_zlib+set}" = set; then :
49383  withval=$with_zlib;
49384fi
49385
49386
49387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49388$as_echo_n "checking for compress in -lz... " >&6; }
49389if ${ac_cv_lib_z_compress+:} false; then :
49390  $as_echo_n "(cached) " >&6
49391else
49392  ac_check_lib_save_LIBS=$LIBS
49393LIBS="-lz  $LIBS"
49394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49395/* end confdefs.h.  */
49396
49397/* Override any GCC internal prototype to avoid an error.
49398   Use char because int might match the return type of a GCC
49399   builtin and then its argument prototype would still apply.  */
49400#ifdef __cplusplus
49401extern "C"
49402#endif
49403char compress ();
49404int
49405main ()
49406{
49407return compress ();
49408  ;
49409  return 0;
49410}
49411_ACEOF
49412if ac_fn_cxx_try_link "$LINENO"; then :
49413  ac_cv_lib_z_compress=yes
49414else
49415  ac_cv_lib_z_compress=no
49416fi
49417rm -f core conftest.err conftest.$ac_objext \
49418    conftest$ac_exeext conftest.$ac_ext
49419LIBS=$ac_check_lib_save_LIBS
49420fi
49421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49422$as_echo "$ac_cv_lib_z_compress" >&6; }
49423if test "x$ac_cv_lib_z_compress" = xyes; then :
49424   ZLIB_FOUND=yes
49425else
49426   ZLIB_FOUND=no
49427fi
49428
49429
49430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49431$as_echo_n "checking for which zlib to use... " >&6; }
49432
49433  DEFAULT_ZLIB=bundled
49434  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49435    #
49436    # On macosx default is system...on others default is
49437    #
49438    DEFAULT_ZLIB=system
49439  fi
49440
49441  if test "x${ZLIB_FOUND}" != "xyes"; then
49442    #
49443    # If we don't find any system...set default to bundled
49444    #
49445    DEFAULT_ZLIB=bundled
49446  fi
49447
49448  #
49449  # If user didn't specify, use DEFAULT_ZLIB
49450  #
49451  if test "x${with_zlib}" = "x"; then
49452    with_zlib=${DEFAULT_ZLIB}
49453  fi
49454
49455  if test "x${with_zlib}" = "xbundled"; then
49456    USE_EXTERNAL_LIBZ=false
49457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49458$as_echo "bundled" >&6; }
49459  elif test "x${with_zlib}" = "xsystem"; then
49460    if test "x${ZLIB_FOUND}" = "xyes"; then
49461      USE_EXTERNAL_LIBZ=true
49462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49463$as_echo "system" >&6; }
49464    else
49465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49466$as_echo "system not found" >&6; }
49467      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49468    fi
49469  else
49470    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49471  fi
49472
49473
49474
49475  ###############################################################################
49476  LIBZIP_CAN_USE_MMAP=true
49477
49478
49479
49480  ###############################################################################
49481  #
49482  # Check if altzone exists in time.h
49483  #
49484
49485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49486/* end confdefs.h.  */
49487#include <time.h>
49488int
49489main ()
49490{
49491return (int)altzone;
49492  ;
49493  return 0;
49494}
49495_ACEOF
49496if ac_fn_cxx_try_link "$LINENO"; then :
49497  has_altzone=yes
49498else
49499  has_altzone=no
49500fi
49501rm -f core conftest.err conftest.$ac_objext \
49502    conftest$ac_exeext conftest.$ac_ext
49503  if test "x$has_altzone" = xyes; then
49504
49505$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49506
49507  fi
49508
49509  ###############################################################################
49510  #
49511  # Check the maths library
49512  #
49513
49514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49515$as_echo_n "checking for cos in -lm... " >&6; }
49516if ${ac_cv_lib_m_cos+:} false; then :
49517  $as_echo_n "(cached) " >&6
49518else
49519  ac_check_lib_save_LIBS=$LIBS
49520LIBS="-lm  $LIBS"
49521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49522/* end confdefs.h.  */
49523
49524/* Override any GCC internal prototype to avoid an error.
49525   Use char because int might match the return type of a GCC
49526   builtin and then its argument prototype would still apply.  */
49527#ifdef __cplusplus
49528extern "C"
49529#endif
49530char cos ();
49531int
49532main ()
49533{
49534return cos ();
49535  ;
49536  return 0;
49537}
49538_ACEOF
49539if ac_fn_cxx_try_link "$LINENO"; then :
49540  ac_cv_lib_m_cos=yes
49541else
49542  ac_cv_lib_m_cos=no
49543fi
49544rm -f core conftest.err conftest.$ac_objext \
49545    conftest$ac_exeext conftest.$ac_ext
49546LIBS=$ac_check_lib_save_LIBS
49547fi
49548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49549$as_echo "$ac_cv_lib_m_cos" >&6; }
49550if test "x$ac_cv_lib_m_cos" = xyes; then :
49551  cat >>confdefs.h <<_ACEOF
49552#define HAVE_LIBM 1
49553_ACEOF
49554
49555  LIBS="-lm $LIBS"
49556
49557else
49558
49559        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49560$as_echo "$as_me: Maths library was not found" >&6;}
49561
49562
49563fi
49564
49565
49566
49567  ###############################################################################
49568  #
49569  # Check for libdl.so
49570
49571  save_LIBS="$LIBS"
49572  LIBS=""
49573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49574$as_echo_n "checking for dlopen in -ldl... " >&6; }
49575if ${ac_cv_lib_dl_dlopen+:} false; then :
49576  $as_echo_n "(cached) " >&6
49577else
49578  ac_check_lib_save_LIBS=$LIBS
49579LIBS="-ldl  $LIBS"
49580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49581/* end confdefs.h.  */
49582
49583/* Override any GCC internal prototype to avoid an error.
49584   Use char because int might match the return type of a GCC
49585   builtin and then its argument prototype would still apply.  */
49586#ifdef __cplusplus
49587extern "C"
49588#endif
49589char dlopen ();
49590int
49591main ()
49592{
49593return dlopen ();
49594  ;
49595  return 0;
49596}
49597_ACEOF
49598if ac_fn_cxx_try_link "$LINENO"; then :
49599  ac_cv_lib_dl_dlopen=yes
49600else
49601  ac_cv_lib_dl_dlopen=no
49602fi
49603rm -f core conftest.err conftest.$ac_objext \
49604    conftest$ac_exeext conftest.$ac_ext
49605LIBS=$ac_check_lib_save_LIBS
49606fi
49607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49608$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49609if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49610  cat >>confdefs.h <<_ACEOF
49611#define HAVE_LIBDL 1
49612_ACEOF
49613
49614  LIBS="-ldl $LIBS"
49615
49616fi
49617
49618  LIBDL="$LIBS"
49619
49620  LIBS="$save_LIBS"
49621
49622
49623  ###############################################################################
49624  #
49625  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49626  # dynamic build is configured on command line.
49627  #
49628
49629# Check whether --with-stdc++lib was given.
49630if test "${with_stdc__lib+set}" = set; then :
49631  withval=$with_stdc__lib;
49632        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49633                && test "x$with_stdc__lib" != xdefault; then
49634          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49635        fi
49636
49637else
49638  with_stdc__lib=default
49639
49640fi
49641
49642
49643  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49644    # Test if -lstdc++ works.
49645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49646$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49647    ac_ext=cpp
49648ac_cpp='$CXXCPP $CPPFLAGS'
49649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49652
49653    OLD_CXXFLAGS="$CXXFLAGS"
49654    CXXFLAGS="$CXXFLAGS -lstdc++"
49655    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49656/* end confdefs.h.  */
49657
49658int
49659main ()
49660{
49661return 0;
49662  ;
49663  return 0;
49664}
49665_ACEOF
49666if ac_fn_cxx_try_link "$LINENO"; then :
49667  has_dynamic_libstdcxx=yes
49668else
49669  has_dynamic_libstdcxx=no
49670fi
49671rm -f core conftest.err conftest.$ac_objext \
49672    conftest$ac_exeext conftest.$ac_ext
49673    CXXFLAGS="$OLD_CXXFLAGS"
49674    ac_ext=cpp
49675ac_cpp='$CXXCPP $CPPFLAGS'
49676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49679
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49681$as_echo "$has_dynamic_libstdcxx" >&6; }
49682
49683    # Test if stdc++ can be linked statically.
49684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49685$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49686    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49687    ac_ext=cpp
49688ac_cpp='$CXXCPP $CPPFLAGS'
49689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49692
49693    OLD_LIBS="$LIBS"
49694    OLD_CXX="$CXX"
49695    LIBS="$STATIC_STDCXX_FLAGS"
49696    CXX="$CC"
49697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49698/* end confdefs.h.  */
49699
49700int
49701main ()
49702{
49703return 0;
49704  ;
49705  return 0;
49706}
49707_ACEOF
49708if ac_fn_cxx_try_link "$LINENO"; then :
49709  has_static_libstdcxx=yes
49710else
49711  has_static_libstdcxx=no
49712fi
49713rm -f core conftest.err conftest.$ac_objext \
49714    conftest$ac_exeext conftest.$ac_ext
49715    LIBS="$OLD_LIBS"
49716    CXX="$OLD_CXX"
49717    ac_ext=cpp
49718ac_cpp='$CXXCPP $CPPFLAGS'
49719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49722
49723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49724$as_echo "$has_static_libstdcxx" >&6; }
49725
49726    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49727      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49728    fi
49729
49730    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49731      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49732    fi
49733
49734    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49735      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49736    fi
49737
49738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49739$as_echo_n "checking how to link with libstdc++... " >&6; }
49740    # If dynamic was requested, it's available since it would fail above otherwise.
49741    # If dynamic wasn't requested, go with static unless it isn't available.
49742    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49743      LIBCXX="$LIBCXX -lstdc++"
49744      LDCXX="$CXX"
49745      STATIC_CXX_SETTING="STATIC_CXX=false"
49746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49747$as_echo "dynamic" >&6; }
49748    else
49749      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49750      LDCXX="$CC"
49751      STATIC_CXX_SETTING="STATIC_CXX=true"
49752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49753$as_echo "static" >&6; }
49754    fi
49755  fi
49756
49757
49758  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49759    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49760
49761pkg_failed=no
49762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49763$as_echo_n "checking for LIBFFI... " >&6; }
49764
49765if test -n "$LIBFFI_CFLAGS"; then
49766    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49767 elif test -n "$PKG_CONFIG"; then
49768    if test -n "$PKG_CONFIG" && \
49769    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49770  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49771  ac_status=$?
49772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49773  test $ac_status = 0; }; then
49774  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49775else
49776  pkg_failed=yes
49777fi
49778 else
49779    pkg_failed=untried
49780fi
49781if test -n "$LIBFFI_LIBS"; then
49782    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49783 elif test -n "$PKG_CONFIG"; then
49784    if test -n "$PKG_CONFIG" && \
49785    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49786  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49787  ac_status=$?
49788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49789  test $ac_status = 0; }; then
49790  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49791else
49792  pkg_failed=yes
49793fi
49794 else
49795    pkg_failed=untried
49796fi
49797
49798
49799
49800if test $pkg_failed = yes; then
49801
49802if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49803        _pkg_short_errors_supported=yes
49804else
49805        _pkg_short_errors_supported=no
49806fi
49807        if test $_pkg_short_errors_supported = yes; then
49808	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49809        else
49810	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49811        fi
49812	# Put the nasty error message in config.log where it belongs
49813	echo "$LIBFFI_PKG_ERRORS" >&5
49814
49815	as_fn_error $? "Package requirements (libffi) were not met:
49816
49817$LIBFFI_PKG_ERRORS
49818
49819Consider adjusting the PKG_CONFIG_PATH environment variable if you
49820installed software in a non-standard prefix.
49821
49822Alternatively, you may set the environment variables LIBFFI_CFLAGS
49823and LIBFFI_LIBS to avoid the need to call pkg-config.
49824See the pkg-config man page for more details.
49825" "$LINENO" 5
49826elif test $pkg_failed = untried; then
49827	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49829as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49830is in your PATH or set the PKG_CONFIG environment variable to the full
49831path to pkg-config.
49832
49833Alternatively, you may set the environment variables LIBFFI_CFLAGS
49834and LIBFFI_LIBS to avoid the need to call pkg-config.
49835See the pkg-config man page for more details.
49836
49837To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49838See \`config.log' for more details" "$LINENO" 5; }
49839else
49840	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49841	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49843$as_echo "yes" >&6; }
49844	:
49845fi
49846
49847  fi
49848
49849  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49850    # Extract the first word of "llvm-config", so it can be a program name with args.
49851set dummy llvm-config; ac_word=$2
49852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49853$as_echo_n "checking for $ac_word... " >&6; }
49854if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49855  $as_echo_n "(cached) " >&6
49856else
49857  if test -n "$LLVM_CONFIG"; then
49858  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49859else
49860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49861for as_dir in $PATH
49862do
49863  IFS=$as_save_IFS
49864  test -z "$as_dir" && as_dir=.
49865    for ac_exec_ext in '' $ac_executable_extensions; do
49866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49867    ac_cv_prog_LLVM_CONFIG="llvm-config"
49868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49869    break 2
49870  fi
49871done
49872  done
49873IFS=$as_save_IFS
49874
49875fi
49876fi
49877LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49878if test -n "$LLVM_CONFIG"; then
49879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49880$as_echo "$LLVM_CONFIG" >&6; }
49881else
49882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49883$as_echo "no" >&6; }
49884fi
49885
49886
49887
49888    if test "x$LLVM_CONFIG" != xllvm-config; then
49889      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49890    fi
49891
49892    llvm_components="jit mcjit engine nativecodegen native"
49893    unset LLVM_CFLAGS
49894    for flag in $("$LLVM_CONFIG" --cxxflags); do
49895      if echo "${flag}" | grep -q '^-[ID]'; then
49896        if test "${flag}" != "-D_DEBUG" ; then
49897          if test "${LLVM_CFLAGS}" != "" ; then
49898            LLVM_CFLAGS="${LLVM_CFLAGS} "
49899          fi
49900          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49901        fi
49902      fi
49903    done
49904    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49905    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49906
49907    unset LLVM_LDFLAGS
49908    for flag in $("${LLVM_CONFIG}" --ldflags); do
49909      if echo "${flag}" | grep -q '^-L'; then
49910        if test "${LLVM_LDFLAGS}" != ""; then
49911          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49912        fi
49913        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49914      fi
49915    done
49916
49917    unset LLVM_LIBS
49918    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49919      if echo "${flag}" | grep -q '^-l'; then
49920        if test "${LLVM_LIBS}" != ""; then
49921          LLVM_LIBS="${LLVM_LIBS} "
49922        fi
49923        LLVM_LIBS="${LLVM_LIBS}${flag}"
49924      fi
49925    done
49926
49927
49928
49929
49930  fi
49931
49932  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49933  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49934    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49935  fi
49936
49937  # TODO better (platform agnostic) test
49938  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49939    LIBCXX="-lstdc++"
49940  fi
49941
49942
49943
49944
49945  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49946
49947
49948# Check whether --with-msvcr-dll was given.
49949if test "${with_msvcr_dll+set}" = set; then :
49950  withval=$with_msvcr_dll;
49951fi
49952
49953
49954  if test "x$with_msvcr_dll" != x; then
49955    # If given explicitely by user, do not probe. If not present, fail directly.
49956
49957  DLL_NAME="$MSVCR_NAME"
49958  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49959  METHOD="--with-msvcr-dll"
49960  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49961    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49962$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49963
49964    # Need to check if the found msvcr is correct architecture
49965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49966$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49967    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49969      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49970      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49972        CORRECT_MSVCR_ARCH="PE32 executable"
49973      else
49974        CORRECT_MSVCR_ARCH="PE32+ executable"
49975      fi
49976    else
49977      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49978        CORRECT_MSVCR_ARCH=386
49979      else
49980        CORRECT_MSVCR_ARCH=x86-64
49981      fi
49982    fi
49983    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49985$as_echo "ok" >&6; }
49986      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49987
49988  # Only process if variable expands to non-empty
49989
49990  if test "x$MSVC_DLL" != x; then
49991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49992
49993  # Input might be given as Windows format, start by converting to
49994  # unix format.
49995  path="$MSVC_DLL"
49996  new_path=`$CYGPATH -u "$path"`
49997
49998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50001  # "foo.exe" is OK but "foo" is an error.
50002  #
50003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50004  # It is also a way to make sure we got the proper file name for the real test later on.
50005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50006  if test "x$test_shortpath" = x; then
50007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50008$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50009    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50010  fi
50011
50012  # Call helper function which possibly converts this using DOS-style short mode.
50013  # If so, the updated path is stored in $new_path.
50014
50015  input_path="$new_path"
50016  # Check if we need to convert this using DOS-style short mode. If the path
50017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50018  # take no chances and rewrite it.
50019  # Note: m4 eats our [], so we need to use [ and ] instead.
50020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50021  if test "x$has_forbidden_chars" != x; then
50022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50026      # Going to short mode and back again did indeed matter. Since short mode is
50027      # case insensitive, let's make it lowercase to improve readability.
50028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50029      # Now convert it back to Unix-style (cygpath)
50030      input_path=`$CYGPATH -u "$shortmode_path"`
50031      new_path="$input_path"
50032    fi
50033  fi
50034
50035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50036  if test "x$test_cygdrive_prefix" = x; then
50037    # As a simple fix, exclude /usr/bin since it's not a real path.
50038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50040      # a path prefixed by /cygdrive for fixpath to work.
50041      new_path="$CYGWIN_ROOT_PATH$input_path"
50042    fi
50043  fi
50044
50045
50046  if test "x$path" != "x$new_path"; then
50047    MSVC_DLL="$new_path"
50048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50049$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50050  fi
50051
50052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50053
50054  path="$MSVC_DLL"
50055  has_colon=`$ECHO $path | $GREP ^.:`
50056  new_path="$path"
50057  if test "x$has_colon" = x; then
50058    # Not in mixed or Windows style, start by that.
50059    new_path=`cmd //c echo $path`
50060  fi
50061
50062
50063  input_path="$new_path"
50064  # Check if we need to convert this using DOS-style short mode. If the path
50065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50066  # take no chances and rewrite it.
50067  # Note: m4 eats our [], so we need to use [ and ] instead.
50068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50069  if test "x$has_forbidden_chars" != x; then
50070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50072  fi
50073
50074
50075  windows_path="$new_path"
50076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50077    unix_path=`$CYGPATH -u "$windows_path"`
50078    new_path="$unix_path"
50079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50081    new_path="$unix_path"
50082  fi
50083
50084  if test "x$path" != "x$new_path"; then
50085    MSVC_DLL="$new_path"
50086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50087$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50088  fi
50089
50090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50092
50093    else
50094      # We're on a unix platform. Hooray! :)
50095      path="$MSVC_DLL"
50096      has_space=`$ECHO "$path" | $GREP " "`
50097      if test "x$has_space" != x; then
50098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50099$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50101      fi
50102
50103      # Use eval to expand a potential ~
50104      eval path="$path"
50105      if test ! -f "$path" && test ! -d "$path"; then
50106        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50107      fi
50108
50109      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50110    fi
50111  fi
50112
50113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50114$as_echo_n "checking for $DLL_NAME... " >&6; }
50115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50116$as_echo "$MSVC_DLL" >&6; }
50117    else
50118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50119$as_echo "incorrect, ignoring" >&6; }
50120      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50121$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50122    fi
50123  fi
50124
50125    if test "x$MSVC_DLL" = x; then
50126      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50127    fi
50128    MSVCR_DLL="$MSVC_DLL"
50129  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50130
50131  DLL_NAME="$MSVCR_NAME"
50132  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50133  METHOD="devkit"
50134  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50135    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50136$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50137
50138    # Need to check if the found msvcr is correct architecture
50139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50140$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50141    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50143      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50144      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50146        CORRECT_MSVCR_ARCH="PE32 executable"
50147      else
50148        CORRECT_MSVCR_ARCH="PE32+ executable"
50149      fi
50150    else
50151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50152        CORRECT_MSVCR_ARCH=386
50153      else
50154        CORRECT_MSVCR_ARCH=x86-64
50155      fi
50156    fi
50157    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50159$as_echo "ok" >&6; }
50160      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50161
50162  # Only process if variable expands to non-empty
50163
50164  if test "x$MSVC_DLL" != x; then
50165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50166
50167  # Input might be given as Windows format, start by converting to
50168  # unix format.
50169  path="$MSVC_DLL"
50170  new_path=`$CYGPATH -u "$path"`
50171
50172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50175  # "foo.exe" is OK but "foo" is an error.
50176  #
50177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50178  # It is also a way to make sure we got the proper file name for the real test later on.
50179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50180  if test "x$test_shortpath" = x; then
50181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50182$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50183    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50184  fi
50185
50186  # Call helper function which possibly converts this using DOS-style short mode.
50187  # If so, the updated path is stored in $new_path.
50188
50189  input_path="$new_path"
50190  # Check if we need to convert this using DOS-style short mode. If the path
50191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50192  # take no chances and rewrite it.
50193  # Note: m4 eats our [], so we need to use [ and ] instead.
50194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50195  if test "x$has_forbidden_chars" != x; then
50196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50200      # Going to short mode and back again did indeed matter. Since short mode is
50201      # case insensitive, let's make it lowercase to improve readability.
50202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50203      # Now convert it back to Unix-style (cygpath)
50204      input_path=`$CYGPATH -u "$shortmode_path"`
50205      new_path="$input_path"
50206    fi
50207  fi
50208
50209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50210  if test "x$test_cygdrive_prefix" = x; then
50211    # As a simple fix, exclude /usr/bin since it's not a real path.
50212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50214      # a path prefixed by /cygdrive for fixpath to work.
50215      new_path="$CYGWIN_ROOT_PATH$input_path"
50216    fi
50217  fi
50218
50219
50220  if test "x$path" != "x$new_path"; then
50221    MSVC_DLL="$new_path"
50222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50223$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50224  fi
50225
50226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50227
50228  path="$MSVC_DLL"
50229  has_colon=`$ECHO $path | $GREP ^.:`
50230  new_path="$path"
50231  if test "x$has_colon" = x; then
50232    # Not in mixed or Windows style, start by that.
50233    new_path=`cmd //c echo $path`
50234  fi
50235
50236
50237  input_path="$new_path"
50238  # Check if we need to convert this using DOS-style short mode. If the path
50239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50240  # take no chances and rewrite it.
50241  # Note: m4 eats our [], so we need to use [ and ] instead.
50242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50243  if test "x$has_forbidden_chars" != x; then
50244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50246  fi
50247
50248
50249  windows_path="$new_path"
50250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50251    unix_path=`$CYGPATH -u "$windows_path"`
50252    new_path="$unix_path"
50253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50255    new_path="$unix_path"
50256  fi
50257
50258  if test "x$path" != "x$new_path"; then
50259    MSVC_DLL="$new_path"
50260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50261$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50262  fi
50263
50264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50266
50267    else
50268      # We're on a unix platform. Hooray! :)
50269      path="$MSVC_DLL"
50270      has_space=`$ECHO "$path" | $GREP " "`
50271      if test "x$has_space" != x; then
50272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50275      fi
50276
50277      # Use eval to expand a potential ~
50278      eval path="$path"
50279      if test ! -f "$path" && test ! -d "$path"; then
50280        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50281      fi
50282
50283      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50284    fi
50285  fi
50286
50287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50288$as_echo_n "checking for $DLL_NAME... " >&6; }
50289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50290$as_echo "$MSVC_DLL" >&6; }
50291    else
50292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50293$as_echo "incorrect, ignoring" >&6; }
50294      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50295$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50296    fi
50297  fi
50298
50299    if test "x$MSVC_DLL" = x; then
50300      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50301    fi
50302    MSVCR_DLL="$MSVC_DLL"
50303  else
50304
50305  DLL_NAME="${MSVCR_NAME}"
50306  MSVC_DLL=
50307
50308  if test "x$MSVC_DLL" = x; then
50309    # Probe: Using well-known location from Visual Studio 10.0
50310    if test "x$VCINSTALLDIR" != x; then
50311      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50312
50313  windows_path="$CYGWIN_VC_INSTALL_DIR"
50314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50315    unix_path=`$CYGPATH -u "$windows_path"`
50316    CYGWIN_VC_INSTALL_DIR="$unix_path"
50317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50319    CYGWIN_VC_INSTALL_DIR="$unix_path"
50320  fi
50321
50322      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50323        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50324      else
50325        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50326      fi
50327      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50328
50329  DLL_NAME="$DLL_NAME"
50330  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50331  METHOD="well-known location in VCINSTALLDIR"
50332  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50334$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50335
50336    # Need to check if the found msvcr is correct architecture
50337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50338$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50339    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50341      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50342      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50344        CORRECT_MSVCR_ARCH="PE32 executable"
50345      else
50346        CORRECT_MSVCR_ARCH="PE32+ executable"
50347      fi
50348    else
50349      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50350        CORRECT_MSVCR_ARCH=386
50351      else
50352        CORRECT_MSVCR_ARCH=x86-64
50353      fi
50354    fi
50355    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50357$as_echo "ok" >&6; }
50358      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50359
50360  # Only process if variable expands to non-empty
50361
50362  if test "x$MSVC_DLL" != x; then
50363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50364
50365  # Input might be given as Windows format, start by converting to
50366  # unix format.
50367  path="$MSVC_DLL"
50368  new_path=`$CYGPATH -u "$path"`
50369
50370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50373  # "foo.exe" is OK but "foo" is an error.
50374  #
50375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50376  # It is also a way to make sure we got the proper file name for the real test later on.
50377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50378  if test "x$test_shortpath" = x; then
50379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50380$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50381    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50382  fi
50383
50384  # Call helper function which possibly converts this using DOS-style short mode.
50385  # If so, the updated path is stored in $new_path.
50386
50387  input_path="$new_path"
50388  # Check if we need to convert this using DOS-style short mode. If the path
50389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50390  # take no chances and rewrite it.
50391  # Note: m4 eats our [], so we need to use [ and ] instead.
50392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50393  if test "x$has_forbidden_chars" != x; then
50394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50398      # Going to short mode and back again did indeed matter. Since short mode is
50399      # case insensitive, let's make it lowercase to improve readability.
50400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50401      # Now convert it back to Unix-style (cygpath)
50402      input_path=`$CYGPATH -u "$shortmode_path"`
50403      new_path="$input_path"
50404    fi
50405  fi
50406
50407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50408  if test "x$test_cygdrive_prefix" = x; then
50409    # As a simple fix, exclude /usr/bin since it's not a real path.
50410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50412      # a path prefixed by /cygdrive for fixpath to work.
50413      new_path="$CYGWIN_ROOT_PATH$input_path"
50414    fi
50415  fi
50416
50417
50418  if test "x$path" != "x$new_path"; then
50419    MSVC_DLL="$new_path"
50420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50421$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50422  fi
50423
50424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50425
50426  path="$MSVC_DLL"
50427  has_colon=`$ECHO $path | $GREP ^.:`
50428  new_path="$path"
50429  if test "x$has_colon" = x; then
50430    # Not in mixed or Windows style, start by that.
50431    new_path=`cmd //c echo $path`
50432  fi
50433
50434
50435  input_path="$new_path"
50436  # Check if we need to convert this using DOS-style short mode. If the path
50437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50438  # take no chances and rewrite it.
50439  # Note: m4 eats our [], so we need to use [ and ] instead.
50440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50441  if test "x$has_forbidden_chars" != x; then
50442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50444  fi
50445
50446
50447  windows_path="$new_path"
50448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50449    unix_path=`$CYGPATH -u "$windows_path"`
50450    new_path="$unix_path"
50451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50453    new_path="$unix_path"
50454  fi
50455
50456  if test "x$path" != "x$new_path"; then
50457    MSVC_DLL="$new_path"
50458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50459$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50460  fi
50461
50462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50464
50465    else
50466      # We're on a unix platform. Hooray! :)
50467      path="$MSVC_DLL"
50468      has_space=`$ECHO "$path" | $GREP " "`
50469      if test "x$has_space" != x; then
50470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50471$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50473      fi
50474
50475      # Use eval to expand a potential ~
50476      eval path="$path"
50477      if test ! -f "$path" && test ! -d "$path"; then
50478        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50479      fi
50480
50481      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50482    fi
50483  fi
50484
50485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50486$as_echo_n "checking for $DLL_NAME... " >&6; }
50487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50488$as_echo "$MSVC_DLL" >&6; }
50489    else
50490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50491$as_echo "incorrect, ignoring" >&6; }
50492      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50493$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50494    fi
50495  fi
50496
50497    fi
50498  fi
50499
50500  if test "x$MSVC_DLL" = x; then
50501    # Probe: Check in the Boot JDK directory.
50502    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50503
50504  DLL_NAME="$DLL_NAME"
50505  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50506  METHOD="well-known location in Boot JDK"
50507  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50508    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50509$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50510
50511    # Need to check if the found msvcr is correct architecture
50512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50513$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50514    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50516      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50517      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50518      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50519        CORRECT_MSVCR_ARCH="PE32 executable"
50520      else
50521        CORRECT_MSVCR_ARCH="PE32+ executable"
50522      fi
50523    else
50524      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50525        CORRECT_MSVCR_ARCH=386
50526      else
50527        CORRECT_MSVCR_ARCH=x86-64
50528      fi
50529    fi
50530    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50532$as_echo "ok" >&6; }
50533      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50534
50535  # Only process if variable expands to non-empty
50536
50537  if test "x$MSVC_DLL" != x; then
50538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50539
50540  # Input might be given as Windows format, start by converting to
50541  # unix format.
50542  path="$MSVC_DLL"
50543  new_path=`$CYGPATH -u "$path"`
50544
50545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50548  # "foo.exe" is OK but "foo" is an error.
50549  #
50550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50551  # It is also a way to make sure we got the proper file name for the real test later on.
50552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50553  if test "x$test_shortpath" = x; then
50554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50555$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50556    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50557  fi
50558
50559  # Call helper function which possibly converts this using DOS-style short mode.
50560  # If so, the updated path is stored in $new_path.
50561
50562  input_path="$new_path"
50563  # Check if we need to convert this using DOS-style short mode. If the path
50564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50565  # take no chances and rewrite it.
50566  # Note: m4 eats our [], so we need to use [ and ] instead.
50567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50568  if test "x$has_forbidden_chars" != x; then
50569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50573      # Going to short mode and back again did indeed matter. Since short mode is
50574      # case insensitive, let's make it lowercase to improve readability.
50575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50576      # Now convert it back to Unix-style (cygpath)
50577      input_path=`$CYGPATH -u "$shortmode_path"`
50578      new_path="$input_path"
50579    fi
50580  fi
50581
50582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50583  if test "x$test_cygdrive_prefix" = x; then
50584    # As a simple fix, exclude /usr/bin since it's not a real path.
50585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50587      # a path prefixed by /cygdrive for fixpath to work.
50588      new_path="$CYGWIN_ROOT_PATH$input_path"
50589    fi
50590  fi
50591
50592
50593  if test "x$path" != "x$new_path"; then
50594    MSVC_DLL="$new_path"
50595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50596$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50597  fi
50598
50599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50600
50601  path="$MSVC_DLL"
50602  has_colon=`$ECHO $path | $GREP ^.:`
50603  new_path="$path"
50604  if test "x$has_colon" = x; then
50605    # Not in mixed or Windows style, start by that.
50606    new_path=`cmd //c echo $path`
50607  fi
50608
50609
50610  input_path="$new_path"
50611  # Check if we need to convert this using DOS-style short mode. If the path
50612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50613  # take no chances and rewrite it.
50614  # Note: m4 eats our [], so we need to use [ and ] instead.
50615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50616  if test "x$has_forbidden_chars" != x; then
50617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50619  fi
50620
50621
50622  windows_path="$new_path"
50623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50624    unix_path=`$CYGPATH -u "$windows_path"`
50625    new_path="$unix_path"
50626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50628    new_path="$unix_path"
50629  fi
50630
50631  if test "x$path" != "x$new_path"; then
50632    MSVC_DLL="$new_path"
50633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50634$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50635  fi
50636
50637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50639
50640    else
50641      # We're on a unix platform. Hooray! :)
50642      path="$MSVC_DLL"
50643      has_space=`$ECHO "$path" | $GREP " "`
50644      if test "x$has_space" != x; then
50645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50646$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50648      fi
50649
50650      # Use eval to expand a potential ~
50651      eval path="$path"
50652      if test ! -f "$path" && test ! -d "$path"; then
50653        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50654      fi
50655
50656      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50657    fi
50658  fi
50659
50660      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50661$as_echo_n "checking for $DLL_NAME... " >&6; }
50662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50663$as_echo "$MSVC_DLL" >&6; }
50664    else
50665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50666$as_echo "incorrect, ignoring" >&6; }
50667      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50668$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50669    fi
50670  fi
50671
50672  fi
50673
50674  if test "x$MSVC_DLL" = x; then
50675    # Probe: Look in the Windows system32 directory
50676    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50677
50678  windows_path="$CYGWIN_SYSTEMROOT"
50679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50680    unix_path=`$CYGPATH -u "$windows_path"`
50681    CYGWIN_SYSTEMROOT="$unix_path"
50682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50684    CYGWIN_SYSTEMROOT="$unix_path"
50685  fi
50686
50687    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50688
50689  DLL_NAME="$DLL_NAME"
50690  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50691  METHOD="well-known location in SYSTEMROOT"
50692  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50693    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50694$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50695
50696    # Need to check if the found msvcr is correct architecture
50697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50698$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50699    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50701      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50702      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50704        CORRECT_MSVCR_ARCH="PE32 executable"
50705      else
50706        CORRECT_MSVCR_ARCH="PE32+ executable"
50707      fi
50708    else
50709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50710        CORRECT_MSVCR_ARCH=386
50711      else
50712        CORRECT_MSVCR_ARCH=x86-64
50713      fi
50714    fi
50715    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50717$as_echo "ok" >&6; }
50718      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50719
50720  # Only process if variable expands to non-empty
50721
50722  if test "x$MSVC_DLL" != x; then
50723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50724
50725  # Input might be given as Windows format, start by converting to
50726  # unix format.
50727  path="$MSVC_DLL"
50728  new_path=`$CYGPATH -u "$path"`
50729
50730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50733  # "foo.exe" is OK but "foo" is an error.
50734  #
50735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50736  # It is also a way to make sure we got the proper file name for the real test later on.
50737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50738  if test "x$test_shortpath" = x; then
50739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50740$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50741    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50742  fi
50743
50744  # Call helper function which possibly converts this using DOS-style short mode.
50745  # If so, the updated path is stored in $new_path.
50746
50747  input_path="$new_path"
50748  # Check if we need to convert this using DOS-style short mode. If the path
50749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50750  # take no chances and rewrite it.
50751  # Note: m4 eats our [], so we need to use [ and ] instead.
50752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50753  if test "x$has_forbidden_chars" != x; then
50754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50758      # Going to short mode and back again did indeed matter. Since short mode is
50759      # case insensitive, let's make it lowercase to improve readability.
50760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50761      # Now convert it back to Unix-style (cygpath)
50762      input_path=`$CYGPATH -u "$shortmode_path"`
50763      new_path="$input_path"
50764    fi
50765  fi
50766
50767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50768  if test "x$test_cygdrive_prefix" = x; then
50769    # As a simple fix, exclude /usr/bin since it's not a real path.
50770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50772      # a path prefixed by /cygdrive for fixpath to work.
50773      new_path="$CYGWIN_ROOT_PATH$input_path"
50774    fi
50775  fi
50776
50777
50778  if test "x$path" != "x$new_path"; then
50779    MSVC_DLL="$new_path"
50780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50781$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50782  fi
50783
50784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50785
50786  path="$MSVC_DLL"
50787  has_colon=`$ECHO $path | $GREP ^.:`
50788  new_path="$path"
50789  if test "x$has_colon" = x; then
50790    # Not in mixed or Windows style, start by that.
50791    new_path=`cmd //c echo $path`
50792  fi
50793
50794
50795  input_path="$new_path"
50796  # Check if we need to convert this using DOS-style short mode. If the path
50797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50798  # take no chances and rewrite it.
50799  # Note: m4 eats our [], so we need to use [ and ] instead.
50800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50801  if test "x$has_forbidden_chars" != x; then
50802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50804  fi
50805
50806
50807  windows_path="$new_path"
50808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50809    unix_path=`$CYGPATH -u "$windows_path"`
50810    new_path="$unix_path"
50811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50813    new_path="$unix_path"
50814  fi
50815
50816  if test "x$path" != "x$new_path"; then
50817    MSVC_DLL="$new_path"
50818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50819$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50820  fi
50821
50822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50824
50825    else
50826      # We're on a unix platform. Hooray! :)
50827      path="$MSVC_DLL"
50828      has_space=`$ECHO "$path" | $GREP " "`
50829      if test "x$has_space" != x; then
50830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50831$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50833      fi
50834
50835      # Use eval to expand a potential ~
50836      eval path="$path"
50837      if test ! -f "$path" && test ! -d "$path"; then
50838        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50839      fi
50840
50841      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50842    fi
50843  fi
50844
50845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50846$as_echo_n "checking for $DLL_NAME... " >&6; }
50847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50848$as_echo "$MSVC_DLL" >&6; }
50849    else
50850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50851$as_echo "incorrect, ignoring" >&6; }
50852      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50853$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50854    fi
50855  fi
50856
50857  fi
50858
50859  if test "x$MSVC_DLL" = x; then
50860    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50861    if test "x$VS100COMNTOOLS" != x; then
50862      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50863
50864  windows_path="$CYGWIN_VS_TOOLS_DIR"
50865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50866    unix_path=`$CYGPATH -u "$windows_path"`
50867    CYGWIN_VS_TOOLS_DIR="$unix_path"
50868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50870    CYGWIN_VS_TOOLS_DIR="$unix_path"
50871  fi
50872
50873      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50874        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50875	    | $GREP -i /x64/ | $HEAD --lines 1`
50876      else
50877        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50878	    | $GREP -i /x86/ | $HEAD --lines 1`
50879      fi
50880
50881  DLL_NAME="$DLL_NAME"
50882  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50883  METHOD="search of VS100COMNTOOLS"
50884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50887
50888    # Need to check if the found msvcr is correct architecture
50889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50896        CORRECT_MSVCR_ARCH="PE32 executable"
50897      else
50898        CORRECT_MSVCR_ARCH="PE32+ executable"
50899      fi
50900    else
50901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50902        CORRECT_MSVCR_ARCH=386
50903      else
50904        CORRECT_MSVCR_ARCH=x86-64
50905      fi
50906    fi
50907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50909$as_echo "ok" >&6; }
50910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50911
50912  # Only process if variable expands to non-empty
50913
50914  if test "x$MSVC_DLL" != x; then
50915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50916
50917  # Input might be given as Windows format, start by converting to
50918  # unix format.
50919  path="$MSVC_DLL"
50920  new_path=`$CYGPATH -u "$path"`
50921
50922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50925  # "foo.exe" is OK but "foo" is an error.
50926  #
50927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50928  # It is also a way to make sure we got the proper file name for the real test later on.
50929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50930  if test "x$test_shortpath" = x; then
50931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50934  fi
50935
50936  # Call helper function which possibly converts this using DOS-style short mode.
50937  # If so, the updated path is stored in $new_path.
50938
50939  input_path="$new_path"
50940  # Check if we need to convert this using DOS-style short mode. If the path
50941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50942  # take no chances and rewrite it.
50943  # Note: m4 eats our [], so we need to use [ and ] instead.
50944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50945  if test "x$has_forbidden_chars" != x; then
50946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50950      # Going to short mode and back again did indeed matter. Since short mode is
50951      # case insensitive, let's make it lowercase to improve readability.
50952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50953      # Now convert it back to Unix-style (cygpath)
50954      input_path=`$CYGPATH -u "$shortmode_path"`
50955      new_path="$input_path"
50956    fi
50957  fi
50958
50959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50960  if test "x$test_cygdrive_prefix" = x; then
50961    # As a simple fix, exclude /usr/bin since it's not a real path.
50962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50964      # a path prefixed by /cygdrive for fixpath to work.
50965      new_path="$CYGWIN_ROOT_PATH$input_path"
50966    fi
50967  fi
50968
50969
50970  if test "x$path" != "x$new_path"; then
50971    MSVC_DLL="$new_path"
50972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50974  fi
50975
50976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50977
50978  path="$MSVC_DLL"
50979  has_colon=`$ECHO $path | $GREP ^.:`
50980  new_path="$path"
50981  if test "x$has_colon" = x; then
50982    # Not in mixed or Windows style, start by that.
50983    new_path=`cmd //c echo $path`
50984  fi
50985
50986
50987  input_path="$new_path"
50988  # Check if we need to convert this using DOS-style short mode. If the path
50989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50990  # take no chances and rewrite it.
50991  # Note: m4 eats our [], so we need to use [ and ] instead.
50992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50993  if test "x$has_forbidden_chars" != x; then
50994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50996  fi
50997
50998
50999  windows_path="$new_path"
51000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51001    unix_path=`$CYGPATH -u "$windows_path"`
51002    new_path="$unix_path"
51003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51005    new_path="$unix_path"
51006  fi
51007
51008  if test "x$path" != "x$new_path"; then
51009    MSVC_DLL="$new_path"
51010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51012  fi
51013
51014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51016
51017    else
51018      # We're on a unix platform. Hooray! :)
51019      path="$MSVC_DLL"
51020      has_space=`$ECHO "$path" | $GREP " "`
51021      if test "x$has_space" != x; then
51022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51025      fi
51026
51027      # Use eval to expand a potential ~
51028      eval path="$path"
51029      if test ! -f "$path" && test ! -d "$path"; then
51030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51031      fi
51032
51033      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51034    fi
51035  fi
51036
51037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51038$as_echo_n "checking for $DLL_NAME... " >&6; }
51039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51040$as_echo "$MSVC_DLL" >&6; }
51041    else
51042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51043$as_echo "incorrect, ignoring" >&6; }
51044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51046    fi
51047  fi
51048
51049    fi
51050  fi
51051
51052  if test "x$MSVC_DLL" = x; then
51053    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51054    # (This was the original behaviour; kept since it might turn something up)
51055    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51056      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51057        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51058	    | $GREP x64 | $HEAD --lines 1`
51059      else
51060        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51061	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51062        if test "x$POSSIBLE_MSVC_DLL" = x; then
51063          # We're grasping at straws now...
51064          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51065	      | $HEAD --lines 1`
51066        fi
51067      fi
51068
51069
51070  DLL_NAME="$DLL_NAME"
51071  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51072  METHOD="search of VCINSTALLDIR"
51073  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51074    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51075$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51076
51077    # Need to check if the found msvcr is correct architecture
51078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51079$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51080    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51082      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51083      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51084      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51085        CORRECT_MSVCR_ARCH="PE32 executable"
51086      else
51087        CORRECT_MSVCR_ARCH="PE32+ executable"
51088      fi
51089    else
51090      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51091        CORRECT_MSVCR_ARCH=386
51092      else
51093        CORRECT_MSVCR_ARCH=x86-64
51094      fi
51095    fi
51096    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51098$as_echo "ok" >&6; }
51099      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51100
51101  # Only process if variable expands to non-empty
51102
51103  if test "x$MSVC_DLL" != x; then
51104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51105
51106  # Input might be given as Windows format, start by converting to
51107  # unix format.
51108  path="$MSVC_DLL"
51109  new_path=`$CYGPATH -u "$path"`
51110
51111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51114  # "foo.exe" is OK but "foo" is an error.
51115  #
51116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51117  # It is also a way to make sure we got the proper file name for the real test later on.
51118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51119  if test "x$test_shortpath" = x; then
51120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51121$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51122    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51123  fi
51124
51125  # Call helper function which possibly converts this using DOS-style short mode.
51126  # If so, the updated path is stored in $new_path.
51127
51128  input_path="$new_path"
51129  # Check if we need to convert this using DOS-style short mode. If the path
51130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51131  # take no chances and rewrite it.
51132  # Note: m4 eats our [], so we need to use [ and ] instead.
51133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51134  if test "x$has_forbidden_chars" != x; then
51135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51139      # Going to short mode and back again did indeed matter. Since short mode is
51140      # case insensitive, let's make it lowercase to improve readability.
51141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51142      # Now convert it back to Unix-style (cygpath)
51143      input_path=`$CYGPATH -u "$shortmode_path"`
51144      new_path="$input_path"
51145    fi
51146  fi
51147
51148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51149  if test "x$test_cygdrive_prefix" = x; then
51150    # As a simple fix, exclude /usr/bin since it's not a real path.
51151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51153      # a path prefixed by /cygdrive for fixpath to work.
51154      new_path="$CYGWIN_ROOT_PATH$input_path"
51155    fi
51156  fi
51157
51158
51159  if test "x$path" != "x$new_path"; then
51160    MSVC_DLL="$new_path"
51161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51162$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51163  fi
51164
51165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51166
51167  path="$MSVC_DLL"
51168  has_colon=`$ECHO $path | $GREP ^.:`
51169  new_path="$path"
51170  if test "x$has_colon" = x; then
51171    # Not in mixed or Windows style, start by that.
51172    new_path=`cmd //c echo $path`
51173  fi
51174
51175
51176  input_path="$new_path"
51177  # Check if we need to convert this using DOS-style short mode. If the path
51178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51179  # take no chances and rewrite it.
51180  # Note: m4 eats our [], so we need to use [ and ] instead.
51181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51182  if test "x$has_forbidden_chars" != x; then
51183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51185  fi
51186
51187
51188  windows_path="$new_path"
51189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51190    unix_path=`$CYGPATH -u "$windows_path"`
51191    new_path="$unix_path"
51192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51194    new_path="$unix_path"
51195  fi
51196
51197  if test "x$path" != "x$new_path"; then
51198    MSVC_DLL="$new_path"
51199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51200$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51201  fi
51202
51203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51205
51206    else
51207      # We're on a unix platform. Hooray! :)
51208      path="$MSVC_DLL"
51209      has_space=`$ECHO "$path" | $GREP " "`
51210      if test "x$has_space" != x; then
51211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51212$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51214      fi
51215
51216      # Use eval to expand a potential ~
51217      eval path="$path"
51218      if test ! -f "$path" && test ! -d "$path"; then
51219        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51220      fi
51221
51222      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51223    fi
51224  fi
51225
51226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51227$as_echo_n "checking for $DLL_NAME... " >&6; }
51228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51229$as_echo "$MSVC_DLL" >&6; }
51230    else
51231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51232$as_echo "incorrect, ignoring" >&6; }
51233      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51234$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51235    fi
51236  fi
51237
51238    fi
51239  fi
51240
51241  if test "x$MSVC_DLL" = x; then
51242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51243$as_echo_n "checking for $DLL_NAME... " >&6; }
51244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51245$as_echo "no" >&6; }
51246    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51247  fi
51248
51249    MSVCR_DLL="$MSVC_DLL"
51250  fi
51251
51252
51253
51254# Check whether --with-msvcp-dll was given.
51255if test "${with_msvcp_dll+set}" = set; then :
51256  withval=$with_msvcp_dll;
51257fi
51258
51259
51260  if test "x$MSVCP_NAME" != "x"; then
51261    if test "x$with_msvcp_dll" != x; then
51262      # If given explicitely by user, do not probe. If not present, fail directly.
51263
51264  DLL_NAME="$MSVCP_NAME"
51265  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51266  METHOD="--with-msvcp-dll"
51267  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51268    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51269$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51270
51271    # Need to check if the found msvcr is correct architecture
51272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51273$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51274    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51276      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51277      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51278      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51279        CORRECT_MSVCR_ARCH="PE32 executable"
51280      else
51281        CORRECT_MSVCR_ARCH="PE32+ executable"
51282      fi
51283    else
51284      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51285        CORRECT_MSVCR_ARCH=386
51286      else
51287        CORRECT_MSVCR_ARCH=x86-64
51288      fi
51289    fi
51290    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51292$as_echo "ok" >&6; }
51293      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51294
51295  # Only process if variable expands to non-empty
51296
51297  if test "x$MSVC_DLL" != x; then
51298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51299
51300  # Input might be given as Windows format, start by converting to
51301  # unix format.
51302  path="$MSVC_DLL"
51303  new_path=`$CYGPATH -u "$path"`
51304
51305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51308  # "foo.exe" is OK but "foo" is an error.
51309  #
51310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51311  # It is also a way to make sure we got the proper file name for the real test later on.
51312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51313  if test "x$test_shortpath" = x; then
51314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51315$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51316    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51317  fi
51318
51319  # Call helper function which possibly converts this using DOS-style short mode.
51320  # If so, the updated path is stored in $new_path.
51321
51322  input_path="$new_path"
51323  # Check if we need to convert this using DOS-style short mode. If the path
51324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51325  # take no chances and rewrite it.
51326  # Note: m4 eats our [], so we need to use [ and ] instead.
51327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51328  if test "x$has_forbidden_chars" != x; then
51329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51333      # Going to short mode and back again did indeed matter. Since short mode is
51334      # case insensitive, let's make it lowercase to improve readability.
51335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51336      # Now convert it back to Unix-style (cygpath)
51337      input_path=`$CYGPATH -u "$shortmode_path"`
51338      new_path="$input_path"
51339    fi
51340  fi
51341
51342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51343  if test "x$test_cygdrive_prefix" = x; then
51344    # As a simple fix, exclude /usr/bin since it's not a real path.
51345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51347      # a path prefixed by /cygdrive for fixpath to work.
51348      new_path="$CYGWIN_ROOT_PATH$input_path"
51349    fi
51350  fi
51351
51352
51353  if test "x$path" != "x$new_path"; then
51354    MSVC_DLL="$new_path"
51355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51356$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51357  fi
51358
51359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51360
51361  path="$MSVC_DLL"
51362  has_colon=`$ECHO $path | $GREP ^.:`
51363  new_path="$path"
51364  if test "x$has_colon" = x; then
51365    # Not in mixed or Windows style, start by that.
51366    new_path=`cmd //c echo $path`
51367  fi
51368
51369
51370  input_path="$new_path"
51371  # Check if we need to convert this using DOS-style short mode. If the path
51372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51373  # take no chances and rewrite it.
51374  # Note: m4 eats our [], so we need to use [ and ] instead.
51375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51376  if test "x$has_forbidden_chars" != x; then
51377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51379  fi
51380
51381
51382  windows_path="$new_path"
51383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51384    unix_path=`$CYGPATH -u "$windows_path"`
51385    new_path="$unix_path"
51386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51388    new_path="$unix_path"
51389  fi
51390
51391  if test "x$path" != "x$new_path"; then
51392    MSVC_DLL="$new_path"
51393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51394$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51395  fi
51396
51397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51399
51400    else
51401      # We're on a unix platform. Hooray! :)
51402      path="$MSVC_DLL"
51403      has_space=`$ECHO "$path" | $GREP " "`
51404      if test "x$has_space" != x; then
51405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51406$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51408      fi
51409
51410      # Use eval to expand a potential ~
51411      eval path="$path"
51412      if test ! -f "$path" && test ! -d "$path"; then
51413        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51414      fi
51415
51416      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51417    fi
51418  fi
51419
51420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51421$as_echo_n "checking for $DLL_NAME... " >&6; }
51422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51423$as_echo "$MSVC_DLL" >&6; }
51424    else
51425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51426$as_echo "incorrect, ignoring" >&6; }
51427      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51428$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51429    fi
51430  fi
51431
51432      if test "x$MSVC_DLL" = x; then
51433        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51434      fi
51435      MSVCP_DLL="$MSVC_DLL"
51436    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51437
51438  DLL_NAME="$MSVCP_NAME"
51439  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51440  METHOD="devkit"
51441  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51443$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51444
51445    # Need to check if the found msvcr is correct architecture
51446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51447$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51448    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51450      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51451      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51453        CORRECT_MSVCR_ARCH="PE32 executable"
51454      else
51455        CORRECT_MSVCR_ARCH="PE32+ executable"
51456      fi
51457    else
51458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51459        CORRECT_MSVCR_ARCH=386
51460      else
51461        CORRECT_MSVCR_ARCH=x86-64
51462      fi
51463    fi
51464    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51466$as_echo "ok" >&6; }
51467      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51468
51469  # Only process if variable expands to non-empty
51470
51471  if test "x$MSVC_DLL" != x; then
51472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51473
51474  # Input might be given as Windows format, start by converting to
51475  # unix format.
51476  path="$MSVC_DLL"
51477  new_path=`$CYGPATH -u "$path"`
51478
51479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51482  # "foo.exe" is OK but "foo" is an error.
51483  #
51484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51485  # It is also a way to make sure we got the proper file name for the real test later on.
51486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51487  if test "x$test_shortpath" = x; then
51488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51489$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51490    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51491  fi
51492
51493  # Call helper function which possibly converts this using DOS-style short mode.
51494  # If so, the updated path is stored in $new_path.
51495
51496  input_path="$new_path"
51497  # Check if we need to convert this using DOS-style short mode. If the path
51498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51499  # take no chances and rewrite it.
51500  # Note: m4 eats our [], so we need to use [ and ] instead.
51501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51502  if test "x$has_forbidden_chars" != x; then
51503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51507      # Going to short mode and back again did indeed matter. Since short mode is
51508      # case insensitive, let's make it lowercase to improve readability.
51509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51510      # Now convert it back to Unix-style (cygpath)
51511      input_path=`$CYGPATH -u "$shortmode_path"`
51512      new_path="$input_path"
51513    fi
51514  fi
51515
51516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51517  if test "x$test_cygdrive_prefix" = x; then
51518    # As a simple fix, exclude /usr/bin since it's not a real path.
51519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51521      # a path prefixed by /cygdrive for fixpath to work.
51522      new_path="$CYGWIN_ROOT_PATH$input_path"
51523    fi
51524  fi
51525
51526
51527  if test "x$path" != "x$new_path"; then
51528    MSVC_DLL="$new_path"
51529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51530$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51531  fi
51532
51533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51534
51535  path="$MSVC_DLL"
51536  has_colon=`$ECHO $path | $GREP ^.:`
51537  new_path="$path"
51538  if test "x$has_colon" = x; then
51539    # Not in mixed or Windows style, start by that.
51540    new_path=`cmd //c echo $path`
51541  fi
51542
51543
51544  input_path="$new_path"
51545  # Check if we need to convert this using DOS-style short mode. If the path
51546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51547  # take no chances and rewrite it.
51548  # Note: m4 eats our [], so we need to use [ and ] instead.
51549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51550  if test "x$has_forbidden_chars" != x; then
51551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51553  fi
51554
51555
51556  windows_path="$new_path"
51557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51558    unix_path=`$CYGPATH -u "$windows_path"`
51559    new_path="$unix_path"
51560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51562    new_path="$unix_path"
51563  fi
51564
51565  if test "x$path" != "x$new_path"; then
51566    MSVC_DLL="$new_path"
51567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51568$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51569  fi
51570
51571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51573
51574    else
51575      # We're on a unix platform. Hooray! :)
51576      path="$MSVC_DLL"
51577      has_space=`$ECHO "$path" | $GREP " "`
51578      if test "x$has_space" != x; then
51579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51580$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51582      fi
51583
51584      # Use eval to expand a potential ~
51585      eval path="$path"
51586      if test ! -f "$path" && test ! -d "$path"; then
51587        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51588      fi
51589
51590      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51591    fi
51592  fi
51593
51594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51595$as_echo_n "checking for $DLL_NAME... " >&6; }
51596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51597$as_echo "$MSVC_DLL" >&6; }
51598    else
51599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51600$as_echo "incorrect, ignoring" >&6; }
51601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51603    fi
51604  fi
51605
51606      if test "x$MSVC_DLL" = x; then
51607        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51608      fi
51609      MSVCP_DLL="$MSVC_DLL"
51610    else
51611
51612  DLL_NAME="${MSVCP_NAME}"
51613  MSVC_DLL=
51614
51615  if test "x$MSVC_DLL" = x; then
51616    # Probe: Using well-known location from Visual Studio 10.0
51617    if test "x$VCINSTALLDIR" != x; then
51618      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51619
51620  windows_path="$CYGWIN_VC_INSTALL_DIR"
51621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51622    unix_path=`$CYGPATH -u "$windows_path"`
51623    CYGWIN_VC_INSTALL_DIR="$unix_path"
51624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51626    CYGWIN_VC_INSTALL_DIR="$unix_path"
51627  fi
51628
51629      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51630        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51631      else
51632        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51633      fi
51634      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51635
51636  DLL_NAME="$DLL_NAME"
51637  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51638  METHOD="well-known location in VCINSTALLDIR"
51639  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51641$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51642
51643    # Need to check if the found msvcr is correct architecture
51644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51645$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51646    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51648      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51649      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51651        CORRECT_MSVCR_ARCH="PE32 executable"
51652      else
51653        CORRECT_MSVCR_ARCH="PE32+ executable"
51654      fi
51655    else
51656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51657        CORRECT_MSVCR_ARCH=386
51658      else
51659        CORRECT_MSVCR_ARCH=x86-64
51660      fi
51661    fi
51662    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51664$as_echo "ok" >&6; }
51665      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51666
51667  # Only process if variable expands to non-empty
51668
51669  if test "x$MSVC_DLL" != x; then
51670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51671
51672  # Input might be given as Windows format, start by converting to
51673  # unix format.
51674  path="$MSVC_DLL"
51675  new_path=`$CYGPATH -u "$path"`
51676
51677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51680  # "foo.exe" is OK but "foo" is an error.
51681  #
51682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51683  # It is also a way to make sure we got the proper file name for the real test later on.
51684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51685  if test "x$test_shortpath" = x; then
51686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51687$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51688    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51689  fi
51690
51691  # Call helper function which possibly converts this using DOS-style short mode.
51692  # If so, the updated path is stored in $new_path.
51693
51694  input_path="$new_path"
51695  # Check if we need to convert this using DOS-style short mode. If the path
51696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51697  # take no chances and rewrite it.
51698  # Note: m4 eats our [], so we need to use [ and ] instead.
51699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51700  if test "x$has_forbidden_chars" != x; then
51701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51705      # Going to short mode and back again did indeed matter. Since short mode is
51706      # case insensitive, let's make it lowercase to improve readability.
51707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51708      # Now convert it back to Unix-style (cygpath)
51709      input_path=`$CYGPATH -u "$shortmode_path"`
51710      new_path="$input_path"
51711    fi
51712  fi
51713
51714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51715  if test "x$test_cygdrive_prefix" = x; then
51716    # As a simple fix, exclude /usr/bin since it's not a real path.
51717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51719      # a path prefixed by /cygdrive for fixpath to work.
51720      new_path="$CYGWIN_ROOT_PATH$input_path"
51721    fi
51722  fi
51723
51724
51725  if test "x$path" != "x$new_path"; then
51726    MSVC_DLL="$new_path"
51727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51728$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51729  fi
51730
51731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51732
51733  path="$MSVC_DLL"
51734  has_colon=`$ECHO $path | $GREP ^.:`
51735  new_path="$path"
51736  if test "x$has_colon" = x; then
51737    # Not in mixed or Windows style, start by that.
51738    new_path=`cmd //c echo $path`
51739  fi
51740
51741
51742  input_path="$new_path"
51743  # Check if we need to convert this using DOS-style short mode. If the path
51744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51745  # take no chances and rewrite it.
51746  # Note: m4 eats our [], so we need to use [ and ] instead.
51747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51748  if test "x$has_forbidden_chars" != x; then
51749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51751  fi
51752
51753
51754  windows_path="$new_path"
51755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51756    unix_path=`$CYGPATH -u "$windows_path"`
51757    new_path="$unix_path"
51758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51760    new_path="$unix_path"
51761  fi
51762
51763  if test "x$path" != "x$new_path"; then
51764    MSVC_DLL="$new_path"
51765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51767  fi
51768
51769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51771
51772    else
51773      # We're on a unix platform. Hooray! :)
51774      path="$MSVC_DLL"
51775      has_space=`$ECHO "$path" | $GREP " "`
51776      if test "x$has_space" != x; then
51777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51778$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51780      fi
51781
51782      # Use eval to expand a potential ~
51783      eval path="$path"
51784      if test ! -f "$path" && test ! -d "$path"; then
51785        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51786      fi
51787
51788      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51789    fi
51790  fi
51791
51792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51793$as_echo_n "checking for $DLL_NAME... " >&6; }
51794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51795$as_echo "$MSVC_DLL" >&6; }
51796    else
51797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51798$as_echo "incorrect, ignoring" >&6; }
51799      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51800$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51801    fi
51802  fi
51803
51804    fi
51805  fi
51806
51807  if test "x$MSVC_DLL" = x; then
51808    # Probe: Check in the Boot JDK directory.
51809    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51810
51811  DLL_NAME="$DLL_NAME"
51812  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51813  METHOD="well-known location in Boot JDK"
51814  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51815    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51816$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51817
51818    # Need to check if the found msvcr is correct architecture
51819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51820$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51821    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51823      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51824      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51825      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51826        CORRECT_MSVCR_ARCH="PE32 executable"
51827      else
51828        CORRECT_MSVCR_ARCH="PE32+ executable"
51829      fi
51830    else
51831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51832        CORRECT_MSVCR_ARCH=386
51833      else
51834        CORRECT_MSVCR_ARCH=x86-64
51835      fi
51836    fi
51837    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51839$as_echo "ok" >&6; }
51840      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51841
51842  # Only process if variable expands to non-empty
51843
51844  if test "x$MSVC_DLL" != x; then
51845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51846
51847  # Input might be given as Windows format, start by converting to
51848  # unix format.
51849  path="$MSVC_DLL"
51850  new_path=`$CYGPATH -u "$path"`
51851
51852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51855  # "foo.exe" is OK but "foo" is an error.
51856  #
51857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51858  # It is also a way to make sure we got the proper file name for the real test later on.
51859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51860  if test "x$test_shortpath" = x; then
51861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51862$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51863    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51864  fi
51865
51866  # Call helper function which possibly converts this using DOS-style short mode.
51867  # If so, the updated path is stored in $new_path.
51868
51869  input_path="$new_path"
51870  # Check if we need to convert this using DOS-style short mode. If the path
51871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51872  # take no chances and rewrite it.
51873  # Note: m4 eats our [], so we need to use [ and ] instead.
51874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51875  if test "x$has_forbidden_chars" != x; then
51876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51880      # Going to short mode and back again did indeed matter. Since short mode is
51881      # case insensitive, let's make it lowercase to improve readability.
51882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51883      # Now convert it back to Unix-style (cygpath)
51884      input_path=`$CYGPATH -u "$shortmode_path"`
51885      new_path="$input_path"
51886    fi
51887  fi
51888
51889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51890  if test "x$test_cygdrive_prefix" = x; then
51891    # As a simple fix, exclude /usr/bin since it's not a real path.
51892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51894      # a path prefixed by /cygdrive for fixpath to work.
51895      new_path="$CYGWIN_ROOT_PATH$input_path"
51896    fi
51897  fi
51898
51899
51900  if test "x$path" != "x$new_path"; then
51901    MSVC_DLL="$new_path"
51902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51903$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51904  fi
51905
51906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51907
51908  path="$MSVC_DLL"
51909  has_colon=`$ECHO $path | $GREP ^.:`
51910  new_path="$path"
51911  if test "x$has_colon" = x; then
51912    # Not in mixed or Windows style, start by that.
51913    new_path=`cmd //c echo $path`
51914  fi
51915
51916
51917  input_path="$new_path"
51918  # Check if we need to convert this using DOS-style short mode. If the path
51919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51920  # take no chances and rewrite it.
51921  # Note: m4 eats our [], so we need to use [ and ] instead.
51922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51923  if test "x$has_forbidden_chars" != x; then
51924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51926  fi
51927
51928
51929  windows_path="$new_path"
51930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51931    unix_path=`$CYGPATH -u "$windows_path"`
51932    new_path="$unix_path"
51933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51935    new_path="$unix_path"
51936  fi
51937
51938  if test "x$path" != "x$new_path"; then
51939    MSVC_DLL="$new_path"
51940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51941$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51942  fi
51943
51944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51946
51947    else
51948      # We're on a unix platform. Hooray! :)
51949      path="$MSVC_DLL"
51950      has_space=`$ECHO "$path" | $GREP " "`
51951      if test "x$has_space" != x; then
51952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51953$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51955      fi
51956
51957      # Use eval to expand a potential ~
51958      eval path="$path"
51959      if test ! -f "$path" && test ! -d "$path"; then
51960        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51961      fi
51962
51963      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51964    fi
51965  fi
51966
51967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51968$as_echo_n "checking for $DLL_NAME... " >&6; }
51969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51970$as_echo "$MSVC_DLL" >&6; }
51971    else
51972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51973$as_echo "incorrect, ignoring" >&6; }
51974      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51975$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51976    fi
51977  fi
51978
51979  fi
51980
51981  if test "x$MSVC_DLL" = x; then
51982    # Probe: Look in the Windows system32 directory
51983    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51984
51985  windows_path="$CYGWIN_SYSTEMROOT"
51986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51987    unix_path=`$CYGPATH -u "$windows_path"`
51988    CYGWIN_SYSTEMROOT="$unix_path"
51989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51991    CYGWIN_SYSTEMROOT="$unix_path"
51992  fi
51993
51994    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51995
51996  DLL_NAME="$DLL_NAME"
51997  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51998  METHOD="well-known location in SYSTEMROOT"
51999  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52001$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52002
52003    # Need to check if the found msvcr is correct architecture
52004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52005$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52006    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52008      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52009      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52011        CORRECT_MSVCR_ARCH="PE32 executable"
52012      else
52013        CORRECT_MSVCR_ARCH="PE32+ executable"
52014      fi
52015    else
52016      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52017        CORRECT_MSVCR_ARCH=386
52018      else
52019        CORRECT_MSVCR_ARCH=x86-64
52020      fi
52021    fi
52022    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52024$as_echo "ok" >&6; }
52025      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52026
52027  # Only process if variable expands to non-empty
52028
52029  if test "x$MSVC_DLL" != x; then
52030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52031
52032  # Input might be given as Windows format, start by converting to
52033  # unix format.
52034  path="$MSVC_DLL"
52035  new_path=`$CYGPATH -u "$path"`
52036
52037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52040  # "foo.exe" is OK but "foo" is an error.
52041  #
52042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52043  # It is also a way to make sure we got the proper file name for the real test later on.
52044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52045  if test "x$test_shortpath" = x; then
52046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52048    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52049  fi
52050
52051  # Call helper function which possibly converts this using DOS-style short mode.
52052  # If so, the updated path is stored in $new_path.
52053
52054  input_path="$new_path"
52055  # Check if we need to convert this using DOS-style short mode. If the path
52056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52057  # take no chances and rewrite it.
52058  # Note: m4 eats our [], so we need to use [ and ] instead.
52059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52060  if test "x$has_forbidden_chars" != x; then
52061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52065      # Going to short mode and back again did indeed matter. Since short mode is
52066      # case insensitive, let's make it lowercase to improve readability.
52067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52068      # Now convert it back to Unix-style (cygpath)
52069      input_path=`$CYGPATH -u "$shortmode_path"`
52070      new_path="$input_path"
52071    fi
52072  fi
52073
52074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52075  if test "x$test_cygdrive_prefix" = x; then
52076    # As a simple fix, exclude /usr/bin since it's not a real path.
52077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52079      # a path prefixed by /cygdrive for fixpath to work.
52080      new_path="$CYGWIN_ROOT_PATH$input_path"
52081    fi
52082  fi
52083
52084
52085  if test "x$path" != "x$new_path"; then
52086    MSVC_DLL="$new_path"
52087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52089  fi
52090
52091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52092
52093  path="$MSVC_DLL"
52094  has_colon=`$ECHO $path | $GREP ^.:`
52095  new_path="$path"
52096  if test "x$has_colon" = x; then
52097    # Not in mixed or Windows style, start by that.
52098    new_path=`cmd //c echo $path`
52099  fi
52100
52101
52102  input_path="$new_path"
52103  # Check if we need to convert this using DOS-style short mode. If the path
52104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52105  # take no chances and rewrite it.
52106  # Note: m4 eats our [], so we need to use [ and ] instead.
52107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52108  if test "x$has_forbidden_chars" != x; then
52109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52111  fi
52112
52113
52114  windows_path="$new_path"
52115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52116    unix_path=`$CYGPATH -u "$windows_path"`
52117    new_path="$unix_path"
52118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52120    new_path="$unix_path"
52121  fi
52122
52123  if test "x$path" != "x$new_path"; then
52124    MSVC_DLL="$new_path"
52125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52127  fi
52128
52129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52131
52132    else
52133      # We're on a unix platform. Hooray! :)
52134      path="$MSVC_DLL"
52135      has_space=`$ECHO "$path" | $GREP " "`
52136      if test "x$has_space" != x; then
52137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52138$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52140      fi
52141
52142      # Use eval to expand a potential ~
52143      eval path="$path"
52144      if test ! -f "$path" && test ! -d "$path"; then
52145        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52146      fi
52147
52148      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52149    fi
52150  fi
52151
52152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52153$as_echo_n "checking for $DLL_NAME... " >&6; }
52154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52155$as_echo "$MSVC_DLL" >&6; }
52156    else
52157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52158$as_echo "incorrect, ignoring" >&6; }
52159      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52160$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52161    fi
52162  fi
52163
52164  fi
52165
52166  if test "x$MSVC_DLL" = x; then
52167    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52168    if test "x$VS100COMNTOOLS" != x; then
52169      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52170
52171  windows_path="$CYGWIN_VS_TOOLS_DIR"
52172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52173    unix_path=`$CYGPATH -u "$windows_path"`
52174    CYGWIN_VS_TOOLS_DIR="$unix_path"
52175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52177    CYGWIN_VS_TOOLS_DIR="$unix_path"
52178  fi
52179
52180      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52181        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52182	    | $GREP -i /x64/ | $HEAD --lines 1`
52183      else
52184        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52185	    | $GREP -i /x86/ | $HEAD --lines 1`
52186      fi
52187
52188  DLL_NAME="$DLL_NAME"
52189  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52190  METHOD="search of VS100COMNTOOLS"
52191  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52193$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52194
52195    # Need to check if the found msvcr is correct architecture
52196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52197$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52198    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52200      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52201      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52203        CORRECT_MSVCR_ARCH="PE32 executable"
52204      else
52205        CORRECT_MSVCR_ARCH="PE32+ executable"
52206      fi
52207    else
52208      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52209        CORRECT_MSVCR_ARCH=386
52210      else
52211        CORRECT_MSVCR_ARCH=x86-64
52212      fi
52213    fi
52214    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52216$as_echo "ok" >&6; }
52217      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52218
52219  # Only process if variable expands to non-empty
52220
52221  if test "x$MSVC_DLL" != x; then
52222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52223
52224  # Input might be given as Windows format, start by converting to
52225  # unix format.
52226  path="$MSVC_DLL"
52227  new_path=`$CYGPATH -u "$path"`
52228
52229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52232  # "foo.exe" is OK but "foo" is an error.
52233  #
52234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52235  # It is also a way to make sure we got the proper file name for the real test later on.
52236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52237  if test "x$test_shortpath" = x; then
52238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52240    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52241  fi
52242
52243  # Call helper function which possibly converts this using DOS-style short mode.
52244  # If so, the updated path is stored in $new_path.
52245
52246  input_path="$new_path"
52247  # Check if we need to convert this using DOS-style short mode. If the path
52248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52249  # take no chances and rewrite it.
52250  # Note: m4 eats our [], so we need to use [ and ] instead.
52251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52252  if test "x$has_forbidden_chars" != x; then
52253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52257      # Going to short mode and back again did indeed matter. Since short mode is
52258      # case insensitive, let's make it lowercase to improve readability.
52259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52260      # Now convert it back to Unix-style (cygpath)
52261      input_path=`$CYGPATH -u "$shortmode_path"`
52262      new_path="$input_path"
52263    fi
52264  fi
52265
52266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52267  if test "x$test_cygdrive_prefix" = x; then
52268    # As a simple fix, exclude /usr/bin since it's not a real path.
52269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52271      # a path prefixed by /cygdrive for fixpath to work.
52272      new_path="$CYGWIN_ROOT_PATH$input_path"
52273    fi
52274  fi
52275
52276
52277  if test "x$path" != "x$new_path"; then
52278    MSVC_DLL="$new_path"
52279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52281  fi
52282
52283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52284
52285  path="$MSVC_DLL"
52286  has_colon=`$ECHO $path | $GREP ^.:`
52287  new_path="$path"
52288  if test "x$has_colon" = x; then
52289    # Not in mixed or Windows style, start by that.
52290    new_path=`cmd //c echo $path`
52291  fi
52292
52293
52294  input_path="$new_path"
52295  # Check if we need to convert this using DOS-style short mode. If the path
52296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52297  # take no chances and rewrite it.
52298  # Note: m4 eats our [], so we need to use [ and ] instead.
52299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52300  if test "x$has_forbidden_chars" != x; then
52301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52303  fi
52304
52305
52306  windows_path="$new_path"
52307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52308    unix_path=`$CYGPATH -u "$windows_path"`
52309    new_path="$unix_path"
52310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52312    new_path="$unix_path"
52313  fi
52314
52315  if test "x$path" != "x$new_path"; then
52316    MSVC_DLL="$new_path"
52317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52319  fi
52320
52321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52323
52324    else
52325      # We're on a unix platform. Hooray! :)
52326      path="$MSVC_DLL"
52327      has_space=`$ECHO "$path" | $GREP " "`
52328      if test "x$has_space" != x; then
52329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52332      fi
52333
52334      # Use eval to expand a potential ~
52335      eval path="$path"
52336      if test ! -f "$path" && test ! -d "$path"; then
52337        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52338      fi
52339
52340      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52341    fi
52342  fi
52343
52344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52345$as_echo_n "checking for $DLL_NAME... " >&6; }
52346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52347$as_echo "$MSVC_DLL" >&6; }
52348    else
52349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52350$as_echo "incorrect, ignoring" >&6; }
52351      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52352$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52353    fi
52354  fi
52355
52356    fi
52357  fi
52358
52359  if test "x$MSVC_DLL" = x; then
52360    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52361    # (This was the original behaviour; kept since it might turn something up)
52362    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52363      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52364        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52365	    | $GREP x64 | $HEAD --lines 1`
52366      else
52367        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52368	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52369        if test "x$POSSIBLE_MSVC_DLL" = x; then
52370          # We're grasping at straws now...
52371          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52372	      | $HEAD --lines 1`
52373        fi
52374      fi
52375
52376
52377  DLL_NAME="$DLL_NAME"
52378  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52379  METHOD="search of VCINSTALLDIR"
52380  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52381    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52382$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52383
52384    # Need to check if the found msvcr is correct architecture
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52386$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52387    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52389      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52390      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52391      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52392        CORRECT_MSVCR_ARCH="PE32 executable"
52393      else
52394        CORRECT_MSVCR_ARCH="PE32+ executable"
52395      fi
52396    else
52397      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52398        CORRECT_MSVCR_ARCH=386
52399      else
52400        CORRECT_MSVCR_ARCH=x86-64
52401      fi
52402    fi
52403    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52405$as_echo "ok" >&6; }
52406      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52407
52408  # Only process if variable expands to non-empty
52409
52410  if test "x$MSVC_DLL" != x; then
52411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52412
52413  # Input might be given as Windows format, start by converting to
52414  # unix format.
52415  path="$MSVC_DLL"
52416  new_path=`$CYGPATH -u "$path"`
52417
52418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52421  # "foo.exe" is OK but "foo" is an error.
52422  #
52423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52424  # It is also a way to make sure we got the proper file name for the real test later on.
52425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52426  if test "x$test_shortpath" = x; then
52427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52428$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52429    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52430  fi
52431
52432  # Call helper function which possibly converts this using DOS-style short mode.
52433  # If so, the updated path is stored in $new_path.
52434
52435  input_path="$new_path"
52436  # Check if we need to convert this using DOS-style short mode. If the path
52437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52438  # take no chances and rewrite it.
52439  # Note: m4 eats our [], so we need to use [ and ] instead.
52440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52441  if test "x$has_forbidden_chars" != x; then
52442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52446      # Going to short mode and back again did indeed matter. Since short mode is
52447      # case insensitive, let's make it lowercase to improve readability.
52448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52449      # Now convert it back to Unix-style (cygpath)
52450      input_path=`$CYGPATH -u "$shortmode_path"`
52451      new_path="$input_path"
52452    fi
52453  fi
52454
52455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52456  if test "x$test_cygdrive_prefix" = x; then
52457    # As a simple fix, exclude /usr/bin since it's not a real path.
52458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52460      # a path prefixed by /cygdrive for fixpath to work.
52461      new_path="$CYGWIN_ROOT_PATH$input_path"
52462    fi
52463  fi
52464
52465
52466  if test "x$path" != "x$new_path"; then
52467    MSVC_DLL="$new_path"
52468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52469$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52470  fi
52471
52472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52473
52474  path="$MSVC_DLL"
52475  has_colon=`$ECHO $path | $GREP ^.:`
52476  new_path="$path"
52477  if test "x$has_colon" = x; then
52478    # Not in mixed or Windows style, start by that.
52479    new_path=`cmd //c echo $path`
52480  fi
52481
52482
52483  input_path="$new_path"
52484  # Check if we need to convert this using DOS-style short mode. If the path
52485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52486  # take no chances and rewrite it.
52487  # Note: m4 eats our [], so we need to use [ and ] instead.
52488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52489  if test "x$has_forbidden_chars" != x; then
52490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52492  fi
52493
52494
52495  windows_path="$new_path"
52496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52497    unix_path=`$CYGPATH -u "$windows_path"`
52498    new_path="$unix_path"
52499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52501    new_path="$unix_path"
52502  fi
52503
52504  if test "x$path" != "x$new_path"; then
52505    MSVC_DLL="$new_path"
52506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52507$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52508  fi
52509
52510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52512
52513    else
52514      # We're on a unix platform. Hooray! :)
52515      path="$MSVC_DLL"
52516      has_space=`$ECHO "$path" | $GREP " "`
52517      if test "x$has_space" != x; then
52518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52519$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52521      fi
52522
52523      # Use eval to expand a potential ~
52524      eval path="$path"
52525      if test ! -f "$path" && test ! -d "$path"; then
52526        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52527      fi
52528
52529      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52530    fi
52531  fi
52532
52533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52534$as_echo_n "checking for $DLL_NAME... " >&6; }
52535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52536$as_echo "$MSVC_DLL" >&6; }
52537    else
52538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52539$as_echo "incorrect, ignoring" >&6; }
52540      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52541$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52542    fi
52543  fi
52544
52545    fi
52546  fi
52547
52548  if test "x$MSVC_DLL" = x; then
52549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52550$as_echo_n "checking for $DLL_NAME... " >&6; }
52551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52552$as_echo "no" >&6; }
52553    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52554  fi
52555
52556      MSVCP_DLL="$MSVC_DLL"
52557    fi
52558
52559  fi
52560
52561
52562
52563# Check whether --with-dxsdk was given.
52564if test "${with_dxsdk+set}" = set; then :
52565  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52566$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52567fi
52568
52569
52570
52571
52572# Check whether --with-dxsdk-lib was given.
52573if test "${with_dxsdk_lib+set}" = set; then :
52574  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52575$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52576fi
52577
52578
52579
52580
52581# Check whether --with-dxsdk-include was given.
52582if test "${with_dxsdk_include+set}" = set; then :
52583  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52584$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52585fi
52586
52587
52588  fi
52589
52590
52591###############################################################################
52592#
52593# We need to do some final tweaking, when everything else is done.
52594#
52595###############################################################################
52596
52597
52598  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52599
52600
52601  # The name of the Service Agent jar.
52602  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52603  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52604    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52605  fi
52606
52607
52608
52609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52610$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52611
52612    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52613      ENABLE_INTREE_EC=yes
52614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52615$as_echo "yes" >&6; }
52616    else
52617      ENABLE_INTREE_EC=no
52618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52619$as_echo "no" >&6; }
52620    fi
52621
52622
52623
52624
52625###############################################################################
52626#
52627# Configure parts of the build that only affect the build performance,
52628# not the result.
52629#
52630###############################################################################
52631
52632
52633  # How many cores do we have on this build system?
52634
52635# Check whether --with-num-cores was given.
52636if test "${with_num_cores+set}" = set; then :
52637  withval=$with_num_cores;
52638fi
52639
52640  if test "x$with_num_cores" = x; then
52641    # The number of cores were not specified, try to probe them.
52642
52643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52644$as_echo_n "checking for number of cores... " >&6; }
52645  NUM_CORES=1
52646  FOUND_CORES=no
52647
52648  if test -f /proc/cpuinfo; then
52649    # Looks like a Linux (or cygwin) system
52650    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52651    FOUND_CORES=yes
52652  elif test -x /usr/sbin/psrinfo; then
52653    # Looks like a Solaris system
52654    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52655    FOUND_CORES=yes
52656  elif test -x /usr/sbin/system_profiler; then
52657    # Looks like a MacOSX system
52658    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52659    FOUND_CORES=yes
52660  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52661    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52662    FOUND_CORES=yes
52663  elif test -n "$NUMBER_OF_PROCESSORS"; then
52664    # On windows, look in the env
52665    NUM_CORES=$NUMBER_OF_PROCESSORS
52666    FOUND_CORES=yes
52667  fi
52668
52669  if test "x$FOUND_CORES" = xyes; then
52670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52671$as_echo "$NUM_CORES" >&6; }
52672  else
52673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52674$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52676$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52677  fi
52678
52679  else
52680    NUM_CORES=$with_num_cores
52681  fi
52682
52683
52684
52685  # How much memory do we have on this build system?
52686
52687# Check whether --with-memory-size was given.
52688if test "${with_memory_size+set}" = set; then :
52689  withval=$with_memory_size;
52690fi
52691
52692  if test "x$with_memory_size" = x; then
52693    # The memory size was not specified, try to probe it.
52694
52695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52696$as_echo_n "checking for memory size... " >&6; }
52697  # Default to 1024 MB
52698  MEMORY_SIZE=1024
52699  FOUND_MEM=no
52700
52701  if test -f /proc/meminfo; then
52702    # Looks like a Linux (or cygwin) system
52703    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52704    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52705    FOUND_MEM=yes
52706  elif test -x /usr/sbin/prtconf; then
52707    # Looks like a Solaris or AIX system
52708    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52709    FOUND_MEM=yes
52710  elif test -x /usr/sbin/system_profiler; then
52711    # Looks like a MacOSX system
52712    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52713    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52714    FOUND_MEM=yes
52715  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52716    # Windows, but without cygwin
52717    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52718    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52719    FOUND_MEM=yes
52720  fi
52721
52722  if test "x$FOUND_MEM" = xyes; then
52723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52724$as_echo "$MEMORY_SIZE MB" >&6; }
52725  else
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52727$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52729$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52730  fi
52731
52732  else
52733    MEMORY_SIZE=$with_memory_size
52734  fi
52735
52736
52737
52738  # Provide a decent default number of parallel jobs for make depending on
52739  # number of cores, amount of memory and machine architecture.
52740
52741# Check whether --with-jobs was given.
52742if test "${with_jobs+set}" = set; then :
52743  withval=$with_jobs;
52744fi
52745
52746  if test "x$with_jobs" = x; then
52747    # Number of jobs was not specified, calculate.
52748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52749$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52750    # Approximate memory in GB.
52751    memory_gb=`expr $MEMORY_SIZE / 1024`
52752    # Pick the lowest of memory in gb and number of cores.
52753    if test "$memory_gb" -lt "$NUM_CORES"; then
52754      JOBS="$memory_gb"
52755    else
52756      JOBS="$NUM_CORES"
52757      # On bigger machines, leave some room for other processes to run
52758      if test "$JOBS" -gt "4"; then
52759        JOBS=`expr $JOBS '*' 90 / 100`
52760      fi
52761    fi
52762    # Cap number of jobs to 16
52763    if test "$JOBS" -gt "16"; then
52764      JOBS=16
52765    fi
52766    if test "$JOBS" -eq "0"; then
52767      JOBS=1
52768    fi
52769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52770$as_echo "$JOBS" >&6; }
52771  else
52772    JOBS=$with_jobs
52773  fi
52774
52775
52776
52777# Setup arguments for the boot jdk (after cores and memory have been setup)
52778
52779  ##############################################################################
52780  #
52781  # Specify jvm options for anything that is run with the Boot JDK.
52782  # Not all JVM:s accept the same arguments on the command line.
52783  #
52784
52785# Check whether --with-boot-jdk-jvmargs was given.
52786if test "${with_boot_jdk_jvmargs+set}" = set; then :
52787  withval=$with_boot_jdk_jvmargs;
52788fi
52789
52790
52791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52792$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52793
52794  # Disable special log output when a debug build is used as Boot JDK...
52795
52796  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52797  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52798  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52799  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52800  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52801  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52802    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52803    JVM_ARG_OK=true
52804  else
52805    $ECHO "Arg failed:" >&5
52806    $ECHO "$OUTPUT" >&5
52807    JVM_ARG_OK=false
52808  fi
52809
52810
52811  # Apply user provided options.
52812
52813  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52814  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52815  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52816  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52817  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52818  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52819    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52820    JVM_ARG_OK=true
52821  else
52822    $ECHO "Arg failed:" >&5
52823    $ECHO "$OUTPUT" >&5
52824    JVM_ARG_OK=false
52825  fi
52826
52827
52828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52829$as_echo "$boot_jdk_jvmargs" >&6; }
52830
52831  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52832  JAVA_FLAGS=$boot_jdk_jvmargs
52833
52834
52835
52836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52837$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52838
52839  # Starting amount of heap memory.
52840
52841  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52842  $ECHO "Command: $JAVA -Xms64M -version" >&5
52843  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52844  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52845  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52846  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52847    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52848    JVM_ARG_OK=true
52849  else
52850    $ECHO "Arg failed:" >&5
52851    $ECHO "$OUTPUT" >&5
52852    JVM_ARG_OK=false
52853  fi
52854
52855
52856  # Maximum amount of heap memory.
52857  # Maximum stack size.
52858  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52859  if test "x$BUILD_NUM_BITS" = x32; then
52860    if test "$JVM_MAX_HEAP" -gt "1100"; then
52861      JVM_MAX_HEAP=1100
52862    elif test "$JVM_MAX_HEAP" -lt "512"; then
52863      JVM_MAX_HEAP=512
52864    fi
52865    STACK_SIZE=768
52866  else
52867    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52868    # pointers are used. Apparently, we need to increase the heap and stack
52869    # space for the jvm. More specifically, when running javac to build huge
52870    # jdk batch
52871    if test "$JVM_MAX_HEAP" -gt "1600"; then
52872      JVM_MAX_HEAP=1600
52873    elif test "$JVM_MAX_HEAP" -lt "512"; then
52874      JVM_MAX_HEAP=512
52875    fi
52876    STACK_SIZE=1536
52877  fi
52878
52879  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52880  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52881  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52882  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52883  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52884  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52885    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52886    JVM_ARG_OK=true
52887  else
52888    $ECHO "Arg failed:" >&5
52889    $ECHO "$OUTPUT" >&5
52890    JVM_ARG_OK=false
52891  fi
52892
52893
52894  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52895  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52896  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52897  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52898  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52899  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52900    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52901    JVM_ARG_OK=true
52902  else
52903    $ECHO "Arg failed:" >&5
52904    $ECHO "$OUTPUT" >&5
52905    JVM_ARG_OK=false
52906  fi
52907
52908
52909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52910$as_echo "$boot_jdk_jvmargs_big" >&6; }
52911
52912  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52913
52914
52915
52916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52917$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52918
52919  # Use serial gc for small short lived tools if possible
52920
52921  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52922  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52923  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52924  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52925  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52926  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52927    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52928    JVM_ARG_OK=true
52929  else
52930    $ECHO "Arg failed:" >&5
52931    $ECHO "$OUTPUT" >&5
52932    JVM_ARG_OK=false
52933  fi
52934
52935
52936  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52937  $ECHO "Command: $JAVA -Xms32M -version" >&5
52938  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52939  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52940  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52941  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52942    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52943    JVM_ARG_OK=true
52944  else
52945    $ECHO "Arg failed:" >&5
52946    $ECHO "$OUTPUT" >&5
52947    JVM_ARG_OK=false
52948  fi
52949
52950
52951  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52952  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52953  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52954  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52955  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52956  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52957    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52958    JVM_ARG_OK=true
52959  else
52960    $ECHO "Arg failed:" >&5
52961    $ECHO "$OUTPUT" >&5
52962    JVM_ARG_OK=false
52963  fi
52964
52965
52966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52967$as_echo "$boot_jdk_jvmargs_small" >&6; }
52968
52969  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52970
52971
52972  JAVA_TOOL_FLAGS_SMALL=""
52973  for f in $JAVA_FLAGS_SMALL; do
52974    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52975  done
52976
52977
52978
52979# Setup smart javac (after cores and memory have been setup)
52980
52981
52982# Check whether --with-sjavac-server-java was given.
52983if test "${with_sjavac_server_java+set}" = set; then :
52984  withval=$with_sjavac_server_java;
52985fi
52986
52987
52988  if test "x$with_sjavac_server_java" != x; then
52989    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52990    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52991    if test "x$FOUND_VERSION" = x; then
52992      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52993    fi
52994  else
52995    SJAVAC_SERVER_JAVA="$JAVA"
52996  fi
52997
52998
52999  if test "$MEMORY_SIZE" -gt "3000"; then
53000
53001  $ECHO "Check if jvm arg is ok: -d64" >&5
53002  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53003  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53004  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53005  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53006  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53007    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53008    JVM_ARG_OK=true
53009  else
53010    $ECHO "Arg failed:" >&5
53011    $ECHO "$OUTPUT" >&5
53012    JVM_ARG_OK=false
53013  fi
53014
53015    if test "$JVM_ARG_OK" = true; then
53016      JVM_64BIT=true
53017      JVM_ARG_OK=false
53018    fi
53019  fi
53020
53021  MX_VALUE=`expr $MEMORY_SIZE / 2`
53022  if test "$JVM_64BIT" = true; then
53023    # Set ms lower than mx since more than one instance of the server might
53024    # get launched at the same time before they figure out which instance won.
53025    MS_VALUE=512
53026    if test "$MX_VALUE" -gt "2048"; then
53027      MX_VALUE=2048
53028    fi
53029  else
53030    MS_VALUE=256
53031    if test "$MX_VALUE" -gt "1500"; then
53032      MX_VALUE=1500
53033    fi
53034  fi
53035  if test "$MX_VALUE" -lt "512"; then
53036    MX_VALUE=512
53037  fi
53038
53039  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53040  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53041  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53042  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53043  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53044  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53045    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53046    JVM_ARG_OK=true
53047  else
53048    $ECHO "Arg failed:" >&5
53049    $ECHO "$OUTPUT" >&5
53050    JVM_ARG_OK=false
53051  fi
53052
53053
53054
53055  # Check whether --enable-sjavac was given.
53056if test "${enable_sjavac+set}" = set; then :
53057  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53058else
53059  ENABLE_SJAVAC='no'
53060fi
53061
53062  if test "x$JVM_ARG_OK" = "xfalse"; then
53063    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53064$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53065    ENABLE_SJAVAC=no;
53066  fi
53067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53068$as_echo_n "checking whether to use sjavac... " >&6; }
53069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53070$as_echo "$ENABLE_SJAVAC" >&6; }
53071
53072
53073
53074# Can the C/C++ compiler use precompiled headers?
53075
53076
53077  ###############################################################################
53078  #
53079  # Can the C/C++ compiler use precompiled headers?
53080  #
53081  # Check whether --enable-precompiled-headers was given.
53082if test "${enable_precompiled_headers+set}" = set; then :
53083  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53084else
53085  ENABLE_PRECOMPH=yes
53086fi
53087
53088
53089  USE_PRECOMPILED_HEADER=1
53090  if test "x$ENABLE_PRECOMPH" = xno; then
53091    USE_PRECOMPILED_HEADER=0
53092  fi
53093
53094  if test "x$ENABLE_PRECOMPH" = xyes; then
53095    # Check that the compiler actually supports precomp headers.
53096    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53098$as_echo_n "checking that precompiled headers work... " >&6; }
53099      echo "int alfa();" > conftest.h
53100      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53101      if test ! -f conftest.hpp.gch; then
53102        USE_PRECOMPILED_HEADER=0
53103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53104$as_echo "no" >&6; }
53105      else
53106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53107$as_echo "yes" >&6; }
53108      fi
53109      rm -f conftest.h conftest.hpp.gch
53110    fi
53111  fi
53112
53113
53114
53115
53116# Setup use of ccache, if available
53117
53118  # Check whether --enable-ccache was given.
53119if test "${enable_ccache+set}" = set; then :
53120  enableval=$enable_ccache;
53121fi
53122
53123
53124  CCACHE=
53125  CCACHE_STATUS=
53126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53127$as_echo_n "checking is ccache enabled... " >&6; }
53128  if test "x$enable_ccache" = xyes; then
53129    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53131$as_echo "yes" >&6; }
53132      OLD_PATH="$PATH"
53133      if test "x$TOOLCHAIN_PATH" != x; then
53134        PATH=$TOOLCHAIN_PATH:$PATH
53135      fi
53136
53137
53138
53139  # Publish this variable in the help.
53140
53141
53142  if test "x$CCACHE" = x; then
53143    # The variable is not set by user, try to locate tool using the code snippet
53144    for ac_prog in ccache
53145do
53146  # Extract the first word of "$ac_prog", so it can be a program name with args.
53147set dummy $ac_prog; ac_word=$2
53148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53149$as_echo_n "checking for $ac_word... " >&6; }
53150if ${ac_cv_path_CCACHE+:} false; then :
53151  $as_echo_n "(cached) " >&6
53152else
53153  case $CCACHE in
53154  [\\/]* | ?:[\\/]*)
53155  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53156  ;;
53157  *)
53158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53159for as_dir in $PATH
53160do
53161  IFS=$as_save_IFS
53162  test -z "$as_dir" && as_dir=.
53163    for ac_exec_ext in '' $ac_executable_extensions; do
53164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53165    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53167    break 2
53168  fi
53169done
53170  done
53171IFS=$as_save_IFS
53172
53173  ;;
53174esac
53175fi
53176CCACHE=$ac_cv_path_CCACHE
53177if test -n "$CCACHE"; then
53178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53179$as_echo "$CCACHE" >&6; }
53180else
53181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53182$as_echo "no" >&6; }
53183fi
53184
53185
53186  test -n "$CCACHE" && break
53187done
53188
53189  else
53190    # The variable is set, but is it from the command line or the environment?
53191
53192    # Try to remove the string !CCACHE! from our list.
53193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53195      # If it failed, the variable was not from the command line. Ignore it,
53196      # but warn the user (except for BASH, which is always set by the calling BASH).
53197      if test "xCCACHE" != xBASH; then
53198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53199$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53200      fi
53201      # Try to locate tool using the code snippet
53202      for ac_prog in ccache
53203do
53204  # Extract the first word of "$ac_prog", so it can be a program name with args.
53205set dummy $ac_prog; ac_word=$2
53206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53207$as_echo_n "checking for $ac_word... " >&6; }
53208if ${ac_cv_path_CCACHE+:} false; then :
53209  $as_echo_n "(cached) " >&6
53210else
53211  case $CCACHE in
53212  [\\/]* | ?:[\\/]*)
53213  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53214  ;;
53215  *)
53216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53217for as_dir in $PATH
53218do
53219  IFS=$as_save_IFS
53220  test -z "$as_dir" && as_dir=.
53221    for ac_exec_ext in '' $ac_executable_extensions; do
53222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53223    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53225    break 2
53226  fi
53227done
53228  done
53229IFS=$as_save_IFS
53230
53231  ;;
53232esac
53233fi
53234CCACHE=$ac_cv_path_CCACHE
53235if test -n "$CCACHE"; then
53236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53237$as_echo "$CCACHE" >&6; }
53238else
53239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53240$as_echo "no" >&6; }
53241fi
53242
53243
53244  test -n "$CCACHE" && break
53245done
53246
53247    else
53248      # If it succeeded, then it was overridden by the user. We will use it
53249      # for the tool.
53250
53251      # First remove it from the list of overridden variables, so we can test
53252      # for unknown variables in the end.
53253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53254
53255      # Check if the provided tool contains a complete path.
53256      tool_specified="$CCACHE"
53257      tool_basename="${tool_specified##*/}"
53258      if test "x$tool_basename" = "x$tool_specified"; then
53259        # A command without a complete path is provided, search $PATH.
53260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53261$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53262        # Extract the first word of "$tool_basename", so it can be a program name with args.
53263set dummy $tool_basename; ac_word=$2
53264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53265$as_echo_n "checking for $ac_word... " >&6; }
53266if ${ac_cv_path_CCACHE+:} false; then :
53267  $as_echo_n "(cached) " >&6
53268else
53269  case $CCACHE in
53270  [\\/]* | ?:[\\/]*)
53271  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53272  ;;
53273  *)
53274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53275for as_dir in $PATH
53276do
53277  IFS=$as_save_IFS
53278  test -z "$as_dir" && as_dir=.
53279    for ac_exec_ext in '' $ac_executable_extensions; do
53280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53281    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53283    break 2
53284  fi
53285done
53286  done
53287IFS=$as_save_IFS
53288
53289  ;;
53290esac
53291fi
53292CCACHE=$ac_cv_path_CCACHE
53293if test -n "$CCACHE"; then
53294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53295$as_echo "$CCACHE" >&6; }
53296else
53297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53298$as_echo "no" >&6; }
53299fi
53300
53301
53302        if test "x$CCACHE" = x; then
53303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53304        fi
53305      else
53306        # Otherwise we believe it is a complete path. Use it as it is.
53307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53308$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53310$as_echo_n "checking for CCACHE... " >&6; }
53311        if test ! -x "$tool_specified"; then
53312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53313$as_echo "not found" >&6; }
53314          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53315        fi
53316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53317$as_echo "$tool_specified" >&6; }
53318      fi
53319    fi
53320  fi
53321
53322
53323
53324  if test "x$CCACHE" = x; then
53325    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53326  fi
53327
53328
53329      PATH="$OLD_PATH"
53330      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53331      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53332    else
53333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53334$as_echo "no" >&6; }
53335      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53336$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53337    fi
53338  elif test "x$enable_ccache" = xno; then
53339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53340$as_echo "no, explicitly disabled" >&6; }
53341    CCACHE_STATUS="Disabled"
53342  elif test "x$enable_ccache" = x; then
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53344$as_echo "no" >&6; }
53345  else
53346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53347$as_echo "unknown" >&6; }
53348    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53349  fi
53350
53351
53352
53353# Check whether --with-ccache-dir was given.
53354if test "${with_ccache_dir+set}" = set; then :
53355  withval=$with_ccache_dir;
53356fi
53357
53358
53359  if test "x$with_ccache_dir" != x; then
53360    # When using a non home ccache directory, assume the use is to share ccache files
53361    # with other users. Thus change the umask.
53362    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53363    if test "x$CCACHE" = x; then
53364      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53365$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53366    fi
53367  fi
53368
53369  if test "x$CCACHE" != x; then
53370
53371  if test "x$CCACHE" != x; then
53372    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53373      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53374          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53375      if test "x$HAS_BAD_CCACHE" != "x"; then
53376        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53377      fi
53378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53379$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53380      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53381      PUSHED_FLAGS="$CXXFLAGS"
53382      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53383      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53384/* end confdefs.h.  */
53385
53386int
53387main ()
53388{
53389
53390  ;
53391  return 0;
53392}
53393_ACEOF
53394if ac_fn_cxx_try_compile "$LINENO"; then :
53395  CC_KNOWS_CCACHE_TRICK=yes
53396else
53397  CC_KNOWS_CCACHE_TRICK=no
53398fi
53399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53400      CXXFLAGS="$PUSHED_FLAGS"
53401      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53403$as_echo "yes" >&6; }
53404        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53405
53406        CCACHE_SLOPPINESS=pch_defines,time_macros
53407      else
53408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53409$as_echo "no" >&6; }
53410        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53411      fi
53412    fi
53413
53414    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53415        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53416
53417    if test "x$SET_CCACHE_DIR" != x; then
53418      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53419      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53420    fi
53421  fi
53422
53423  fi
53424
53425
53426###############################################################################
53427#
53428# And now the finish...
53429#
53430###############################################################################
53431
53432# Check for some common pitfalls
53433
53434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53435    file_to_test="$SRC_ROOT/LICENSE"
53436    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53437      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
53438    fi
53439  fi
53440
53441
53442  # Did user specify any unknown variables?
53443
53444  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53445    # Replace the separating ! with spaces before presenting for end user.
53446    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53448$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53449  fi
53450
53451
53452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53453$as_echo_n "checking if build directory is on local disk... " >&6; }
53454
53455  # df -l lists only local disks; if the given directory is not found then
53456  # a non-zero exit code is given
53457  if test "x$DF" = x; then
53458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53459      # msys does not have df; use Windows "net use" instead.
53460      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53461      if test "x$IS_NETWORK_DISK" = x; then
53462        OUTPUT_DIR_IS_LOCAL="yes"
53463      else
53464        OUTPUT_DIR_IS_LOCAL="no"
53465      fi
53466    else
53467      # No df here, say it's local
53468      OUTPUT_DIR_IS_LOCAL="yes"
53469    fi
53470  else
53471    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53472      OUTPUT_DIR_IS_LOCAL="yes"
53473    else
53474      OUTPUT_DIR_IS_LOCAL="no"
53475    fi
53476  fi
53477
53478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53479$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53480
53481
53482
53483  # Check if the user has any old-style ALT_ variables set.
53484  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53485
53486  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53487  # Since we can't properly handle the dependencies for this, warn the user about the situation
53488  if test -e $OUTPUT_ROOT/spec.gmk; then
53489    IS_RECONFIGURE=yes
53490  else
53491    IS_RECONFIGURE=no
53492  fi
53493
53494
53495# At the end, call the custom hook. (Dummy macro if no custom sources available)
53496
53497
53498# We're messing a bit with internal autoconf variables to put the config.status
53499# in the output directory instead of the current directory.
53500CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53501
53502# Create the actual output files. Now the main work of configure is done.
53503cat >confcache <<\_ACEOF
53504# This file is a shell script that caches the results of configure
53505# tests run on this system so they can be shared between configure
53506# scripts and configure runs, see configure's option --config-cache.
53507# It is not useful on other systems.  If it contains results you don't
53508# want to keep, you may remove or edit it.
53509#
53510# config.status only pays attention to the cache file if you give it
53511# the --recheck option to rerun configure.
53512#
53513# `ac_cv_env_foo' variables (set or unset) will be overridden when
53514# loading this file, other *unset* `ac_cv_foo' will be assigned the
53515# following values.
53516
53517_ACEOF
53518
53519# The following way of writing the cache mishandles newlines in values,
53520# but we know of no workaround that is simple, portable, and efficient.
53521# So, we kill variables containing newlines.
53522# Ultrix sh set writes to stderr and can't be redirected directly,
53523# and sets the high bit in the cache file unless we assign to the vars.
53524(
53525  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53526    eval ac_val=\$$ac_var
53527    case $ac_val in #(
53528    *${as_nl}*)
53529      case $ac_var in #(
53530      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53531$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53532      esac
53533      case $ac_var in #(
53534      _ | IFS | as_nl) ;; #(
53535      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53536      *) { eval $ac_var=; unset $ac_var;} ;;
53537      esac ;;
53538    esac
53539  done
53540
53541  (set) 2>&1 |
53542    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53543    *${as_nl}ac_space=\ *)
53544      # `set' does not quote correctly, so add quotes: double-quote
53545      # substitution turns \\\\ into \\, and sed turns \\ into \.
53546      sed -n \
53547	"s/'/'\\\\''/g;
53548	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53549      ;; #(
53550    *)
53551      # `set' quotes correctly as required by POSIX, so do not add quotes.
53552      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53553      ;;
53554    esac |
53555    sort
53556) |
53557  sed '
53558     /^ac_cv_env_/b end
53559     t clear
53560     :clear
53561     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53562     t end
53563     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53564     :end' >>confcache
53565if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53566  if test -w "$cache_file"; then
53567    if test "x$cache_file" != "x/dev/null"; then
53568      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53569$as_echo "$as_me: updating cache $cache_file" >&6;}
53570      if test ! -f "$cache_file" || test -h "$cache_file"; then
53571	cat confcache >"$cache_file"
53572      else
53573        case $cache_file in #(
53574        */* | ?:*)
53575	  mv -f confcache "$cache_file"$$ &&
53576	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53577        *)
53578	  mv -f confcache "$cache_file" ;;
53579	esac
53580      fi
53581    fi
53582  else
53583    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53584$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53585  fi
53586fi
53587rm -f confcache
53588
53589test "x$prefix" = xNONE && prefix=$ac_default_prefix
53590# Let make expand exec_prefix.
53591test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53592
53593# Transform confdefs.h into DEFS.
53594# Protect against shell expansion while executing Makefile rules.
53595# Protect against Makefile macro expansion.
53596#
53597# If the first sed substitution is executed (which looks for macros that
53598# take arguments), then branch to the quote section.  Otherwise,
53599# look for a macro that doesn't take arguments.
53600ac_script='
53601:mline
53602/\\$/{
53603 N
53604 s,\\\n,,
53605 b mline
53606}
53607t clear
53608:clear
53609s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53610t quote
53611s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53612t quote
53613b any
53614:quote
53615s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53616s/\[/\\&/g
53617s/\]/\\&/g
53618s/\$/$$/g
53619H
53620:any
53621${
53622	g
53623	s/^\n//
53624	s/\n/ /g
53625	p
53626}
53627'
53628DEFS=`sed -n "$ac_script" confdefs.h`
53629
53630
53631ac_libobjs=
53632ac_ltlibobjs=
53633U=
53634for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53635  # 1. Remove the extension, and $U if already installed.
53636  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53637  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53638  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53639  #    will be set to the directory where LIBOBJS objects are built.
53640  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53641  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53642done
53643LIBOBJS=$ac_libobjs
53644
53645LTLIBOBJS=$ac_ltlibobjs
53646
53647
53648
53649: "${CONFIG_STATUS=./config.status}"
53650ac_write_fail=0
53651ac_clean_files_save=$ac_clean_files
53652ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53653{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53654$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53655as_write_fail=0
53656cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53657#! $SHELL
53658# Generated by $as_me.
53659# Run this file to recreate the current configuration.
53660# Compiler output produced by configure, useful for debugging
53661# configure, is in config.log if it exists.
53662
53663debug=false
53664ac_cs_recheck=false
53665ac_cs_silent=false
53666
53667SHELL=\${CONFIG_SHELL-$SHELL}
53668export SHELL
53669_ASEOF
53670cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53671## -------------------- ##
53672## M4sh Initialization. ##
53673## -------------------- ##
53674
53675# Be more Bourne compatible
53676DUALCASE=1; export DUALCASE # for MKS sh
53677if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53678  emulate sh
53679  NULLCMD=:
53680  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53681  # is contrary to our usage.  Disable this feature.
53682  alias -g '${1+"$@"}'='"$@"'
53683  setopt NO_GLOB_SUBST
53684else
53685  case `(set -o) 2>/dev/null` in #(
53686  *posix*) :
53687    set -o posix ;; #(
53688  *) :
53689     ;;
53690esac
53691fi
53692
53693
53694as_nl='
53695'
53696export as_nl
53697# Printing a long string crashes Solaris 7 /usr/bin/printf.
53698as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53699as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53700as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53701# Prefer a ksh shell builtin over an external printf program on Solaris,
53702# but without wasting forks for bash or zsh.
53703if test -z "$BASH_VERSION$ZSH_VERSION" \
53704    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53705  as_echo='print -r --'
53706  as_echo_n='print -rn --'
53707elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53708  as_echo='printf %s\n'
53709  as_echo_n='printf %s'
53710else
53711  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53712    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53713    as_echo_n='/usr/ucb/echo -n'
53714  else
53715    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53716    as_echo_n_body='eval
53717      arg=$1;
53718      case $arg in #(
53719      *"$as_nl"*)
53720	expr "X$arg" : "X\\(.*\\)$as_nl";
53721	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53722      esac;
53723      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53724    '
53725    export as_echo_n_body
53726    as_echo_n='sh -c $as_echo_n_body as_echo'
53727  fi
53728  export as_echo_body
53729  as_echo='sh -c $as_echo_body as_echo'
53730fi
53731
53732# The user is always right.
53733if test "${PATH_SEPARATOR+set}" != set; then
53734  PATH_SEPARATOR=:
53735  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53736    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53737      PATH_SEPARATOR=';'
53738  }
53739fi
53740
53741
53742# IFS
53743# We need space, tab and new line, in precisely that order.  Quoting is
53744# there to prevent editors from complaining about space-tab.
53745# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53746# splitting by setting IFS to empty value.)
53747IFS=" ""	$as_nl"
53748
53749# Find who we are.  Look in the path if we contain no directory separator.
53750as_myself=
53751case $0 in #((
53752  *[\\/]* ) as_myself=$0 ;;
53753  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53754for as_dir in $PATH
53755do
53756  IFS=$as_save_IFS
53757  test -z "$as_dir" && as_dir=.
53758    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53759  done
53760IFS=$as_save_IFS
53761
53762     ;;
53763esac
53764# We did not find ourselves, most probably we were run as `sh COMMAND'
53765# in which case we are not to be found in the path.
53766if test "x$as_myself" = x; then
53767  as_myself=$0
53768fi
53769if test ! -f "$as_myself"; then
53770  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53771  exit 1
53772fi
53773
53774# Unset variables that we do not need and which cause bugs (e.g. in
53775# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53776# suppresses any "Segmentation fault" message there.  '((' could
53777# trigger a bug in pdksh 5.2.14.
53778for as_var in BASH_ENV ENV MAIL MAILPATH
53779do eval test x\${$as_var+set} = xset \
53780  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53781done
53782PS1='$ '
53783PS2='> '
53784PS4='+ '
53785
53786# NLS nuisances.
53787LC_ALL=C
53788export LC_ALL
53789LANGUAGE=C
53790export LANGUAGE
53791
53792# CDPATH.
53793(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53794
53795
53796# as_fn_error STATUS ERROR [LINENO LOG_FD]
53797# ----------------------------------------
53798# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53799# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53800# script with STATUS, using 1 if that was 0.
53801as_fn_error ()
53802{
53803  as_status=$1; test $as_status -eq 0 && as_status=1
53804  if test "$4"; then
53805    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53806    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53807  fi
53808  $as_echo "$as_me: error: $2" >&2
53809  as_fn_exit $as_status
53810} # as_fn_error
53811
53812
53813# as_fn_set_status STATUS
53814# -----------------------
53815# Set $? to STATUS, without forking.
53816as_fn_set_status ()
53817{
53818  return $1
53819} # as_fn_set_status
53820
53821# as_fn_exit STATUS
53822# -----------------
53823# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53824as_fn_exit ()
53825{
53826  set +e
53827  as_fn_set_status $1
53828  exit $1
53829} # as_fn_exit
53830
53831# as_fn_unset VAR
53832# ---------------
53833# Portably unset VAR.
53834as_fn_unset ()
53835{
53836  { eval $1=; unset $1;}
53837}
53838as_unset=as_fn_unset
53839# as_fn_append VAR VALUE
53840# ----------------------
53841# Append the text in VALUE to the end of the definition contained in VAR. Take
53842# advantage of any shell optimizations that allow amortized linear growth over
53843# repeated appends, instead of the typical quadratic growth present in naive
53844# implementations.
53845if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53846  eval 'as_fn_append ()
53847  {
53848    eval $1+=\$2
53849  }'
53850else
53851  as_fn_append ()
53852  {
53853    eval $1=\$$1\$2
53854  }
53855fi # as_fn_append
53856
53857# as_fn_arith ARG...
53858# ------------------
53859# Perform arithmetic evaluation on the ARGs, and store the result in the
53860# global $as_val. Take advantage of shells that can avoid forks. The arguments
53861# must be portable across $(()) and expr.
53862if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53863  eval 'as_fn_arith ()
53864  {
53865    as_val=$(( $* ))
53866  }'
53867else
53868  as_fn_arith ()
53869  {
53870    as_val=`expr "$@" || test $? -eq 1`
53871  }
53872fi # as_fn_arith
53873
53874
53875if expr a : '\(a\)' >/dev/null 2>&1 &&
53876   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53877  as_expr=expr
53878else
53879  as_expr=false
53880fi
53881
53882if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53883  as_basename=basename
53884else
53885  as_basename=false
53886fi
53887
53888if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53889  as_dirname=dirname
53890else
53891  as_dirname=false
53892fi
53893
53894as_me=`$as_basename -- "$0" ||
53895$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53896	 X"$0" : 'X\(//\)$' \| \
53897	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53898$as_echo X/"$0" |
53899    sed '/^.*\/\([^/][^/]*\)\/*$/{
53900	    s//\1/
53901	    q
53902	  }
53903	  /^X\/\(\/\/\)$/{
53904	    s//\1/
53905	    q
53906	  }
53907	  /^X\/\(\/\).*/{
53908	    s//\1/
53909	    q
53910	  }
53911	  s/.*/./; q'`
53912
53913# Avoid depending upon Character Ranges.
53914as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53915as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53916as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53917as_cr_digits='0123456789'
53918as_cr_alnum=$as_cr_Letters$as_cr_digits
53919
53920ECHO_C= ECHO_N= ECHO_T=
53921case `echo -n x` in #(((((
53922-n*)
53923  case `echo 'xy\c'` in
53924  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53925  xy)  ECHO_C='\c';;
53926  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53927       ECHO_T='	';;
53928  esac;;
53929*)
53930  ECHO_N='-n';;
53931esac
53932
53933rm -f conf$$ conf$$.exe conf$$.file
53934if test -d conf$$.dir; then
53935  rm -f conf$$.dir/conf$$.file
53936else
53937  rm -f conf$$.dir
53938  mkdir conf$$.dir 2>/dev/null
53939fi
53940if (echo >conf$$.file) 2>/dev/null; then
53941  if ln -s conf$$.file conf$$ 2>/dev/null; then
53942    as_ln_s='ln -s'
53943    # ... but there are two gotchas:
53944    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53945    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53946    # In both cases, we have to default to `cp -pR'.
53947    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53948      as_ln_s='cp -pR'
53949  elif ln conf$$.file conf$$ 2>/dev/null; then
53950    as_ln_s=ln
53951  else
53952    as_ln_s='cp -pR'
53953  fi
53954else
53955  as_ln_s='cp -pR'
53956fi
53957rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53958rmdir conf$$.dir 2>/dev/null
53959
53960
53961# as_fn_mkdir_p
53962# -------------
53963# Create "$as_dir" as a directory, including parents if necessary.
53964as_fn_mkdir_p ()
53965{
53966
53967  case $as_dir in #(
53968  -*) as_dir=./$as_dir;;
53969  esac
53970  test -d "$as_dir" || eval $as_mkdir_p || {
53971    as_dirs=
53972    while :; do
53973      case $as_dir in #(
53974      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53975      *) as_qdir=$as_dir;;
53976      esac
53977      as_dirs="'$as_qdir' $as_dirs"
53978      as_dir=`$as_dirname -- "$as_dir" ||
53979$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53980	 X"$as_dir" : 'X\(//\)[^/]' \| \
53981	 X"$as_dir" : 'X\(//\)$' \| \
53982	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53983$as_echo X"$as_dir" |
53984    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53985	    s//\1/
53986	    q
53987	  }
53988	  /^X\(\/\/\)[^/].*/{
53989	    s//\1/
53990	    q
53991	  }
53992	  /^X\(\/\/\)$/{
53993	    s//\1/
53994	    q
53995	  }
53996	  /^X\(\/\).*/{
53997	    s//\1/
53998	    q
53999	  }
54000	  s/.*/./; q'`
54001      test -d "$as_dir" && break
54002    done
54003    test -z "$as_dirs" || eval "mkdir $as_dirs"
54004  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54005
54006
54007} # as_fn_mkdir_p
54008if mkdir -p . 2>/dev/null; then
54009  as_mkdir_p='mkdir -p "$as_dir"'
54010else
54011  test -d ./-p && rmdir ./-p
54012  as_mkdir_p=false
54013fi
54014
54015
54016# as_fn_executable_p FILE
54017# -----------------------
54018# Test if FILE is an executable regular file.
54019as_fn_executable_p ()
54020{
54021  test -f "$1" && test -x "$1"
54022} # as_fn_executable_p
54023as_test_x='test -x'
54024as_executable_p=as_fn_executable_p
54025
54026# Sed expression to map a string onto a valid CPP name.
54027as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54028
54029# Sed expression to map a string onto a valid variable name.
54030as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54031
54032
54033exec 6>&1
54034## ----------------------------------- ##
54035## Main body of $CONFIG_STATUS script. ##
54036## ----------------------------------- ##
54037_ASEOF
54038test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54039
54040cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54041# Save the log message, to keep $0 and so on meaningful, and to
54042# report actual input values of CONFIG_FILES etc. instead of their
54043# values after options handling.
54044ac_log="
54045This file was extended by OpenJDK $as_me jdk9, which was
54046generated by GNU Autoconf 2.69.  Invocation command line was
54047
54048  CONFIG_FILES    = $CONFIG_FILES
54049  CONFIG_HEADERS  = $CONFIG_HEADERS
54050  CONFIG_LINKS    = $CONFIG_LINKS
54051  CONFIG_COMMANDS = $CONFIG_COMMANDS
54052  $ $0 $@
54053
54054on `(hostname || uname -n) 2>/dev/null | sed 1q`
54055"
54056
54057_ACEOF
54058
54059case $ac_config_files in *"
54060"*) set x $ac_config_files; shift; ac_config_files=$*;;
54061esac
54062
54063
54064
54065cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54066# Files that config.status was made for.
54067config_files="$ac_config_files"
54068
54069_ACEOF
54070
54071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54072ac_cs_usage="\
54073\`$as_me' instantiates files and other configuration actions
54074from templates according to the current configuration.  Unless the files
54075and actions are specified as TAGs, all are instantiated by default.
54076
54077Usage: $0 [OPTION]... [TAG]...
54078
54079  -h, --help       print this help, then exit
54080  -V, --version    print version number and configuration settings, then exit
54081      --config     print configuration, then exit
54082  -q, --quiet, --silent
54083                   do not print progress messages
54084  -d, --debug      don't remove temporary files
54085      --recheck    update $as_me by reconfiguring in the same conditions
54086      --file=FILE[:TEMPLATE]
54087                   instantiate the configuration file FILE
54088
54089Configuration files:
54090$config_files
54091
54092Report bugs to <build-dev@openjdk.java.net>.
54093OpenJDK home page: <http://openjdk.java.net>."
54094
54095_ACEOF
54096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54097ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54098ac_cs_version="\\
54099OpenJDK config.status jdk9
54100configured by $0, generated by GNU Autoconf 2.69,
54101  with options \\"\$ac_cs_config\\"
54102
54103Copyright (C) 2012 Free Software Foundation, Inc.
54104This config.status script is free software; the Free Software Foundation
54105gives unlimited permission to copy, distribute and modify it."
54106
54107ac_pwd='$ac_pwd'
54108srcdir='$srcdir'
54109AWK='$AWK'
54110test -n "\$AWK" || AWK=awk
54111_ACEOF
54112
54113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54114# The default lists apply if the user does not specify any file.
54115ac_need_defaults=:
54116while test $# != 0
54117do
54118  case $1 in
54119  --*=?*)
54120    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54121    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54122    ac_shift=:
54123    ;;
54124  --*=)
54125    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54126    ac_optarg=
54127    ac_shift=:
54128    ;;
54129  *)
54130    ac_option=$1
54131    ac_optarg=$2
54132    ac_shift=shift
54133    ;;
54134  esac
54135
54136  case $ac_option in
54137  # Handling of the options.
54138  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54139    ac_cs_recheck=: ;;
54140  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54141    $as_echo "$ac_cs_version"; exit ;;
54142  --config | --confi | --conf | --con | --co | --c )
54143    $as_echo "$ac_cs_config"; exit ;;
54144  --debug | --debu | --deb | --de | --d | -d )
54145    debug=: ;;
54146  --file | --fil | --fi | --f )
54147    $ac_shift
54148    case $ac_optarg in
54149    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54150    '') as_fn_error $? "missing file argument" ;;
54151    esac
54152    as_fn_append CONFIG_FILES " '$ac_optarg'"
54153    ac_need_defaults=false;;
54154  --he | --h |  --help | --hel | -h )
54155    $as_echo "$ac_cs_usage"; exit ;;
54156  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54157  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54158    ac_cs_silent=: ;;
54159
54160  # This is an error.
54161  -*) as_fn_error $? "unrecognized option: \`$1'
54162Try \`$0 --help' for more information." ;;
54163
54164  *) as_fn_append ac_config_targets " $1"
54165     ac_need_defaults=false ;;
54166
54167  esac
54168  shift
54169done
54170
54171ac_configure_extra_args=
54172
54173if $ac_cs_silent; then
54174  exec 6>/dev/null
54175  ac_configure_extra_args="$ac_configure_extra_args --silent"
54176fi
54177
54178_ACEOF
54179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54180if \$ac_cs_recheck; then
54181  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54182  shift
54183  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54184  CONFIG_SHELL='$SHELL'
54185  export CONFIG_SHELL
54186  exec "\$@"
54187fi
54188
54189_ACEOF
54190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54191exec 5>>config.log
54192{
54193  echo
54194  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54195## Running $as_me. ##
54196_ASBOX
54197  $as_echo "$ac_log"
54198} >&5
54199
54200_ACEOF
54201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54202_ACEOF
54203
54204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54205
54206# Handling of arguments.
54207for ac_config_target in $ac_config_targets
54208do
54209  case $ac_config_target in
54210    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54211    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54212    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54213    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54214    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54215
54216  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54217  esac
54218done
54219
54220
54221# If the user did not use the arguments to specify the items to instantiate,
54222# then the envvar interface is used.  Set only those that are not.
54223# We use the long form for the default assignment because of an extremely
54224# bizarre bug on SunOS 4.1.3.
54225if $ac_need_defaults; then
54226  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54227fi
54228
54229# Have a temporary directory for convenience.  Make it in the build tree
54230# simply because there is no reason against having it here, and in addition,
54231# creating and moving files from /tmp can sometimes cause problems.
54232# Hook for its removal unless debugging.
54233# Note that there is a small window in which the directory will not be cleaned:
54234# after its creation but before its name has been assigned to `$tmp'.
54235$debug ||
54236{
54237  tmp= ac_tmp=
54238  trap 'exit_status=$?
54239  : "${ac_tmp:=$tmp}"
54240  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54241' 0
54242  trap 'as_fn_exit 1' 1 2 13 15
54243}
54244# Create a (secure) tmp directory for tmp files.
54245
54246{
54247  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54248  test -d "$tmp"
54249}  ||
54250{
54251  tmp=./conf$$-$RANDOM
54252  (umask 077 && mkdir "$tmp")
54253} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54254ac_tmp=$tmp
54255
54256# Set up the scripts for CONFIG_FILES section.
54257# No need to generate them if there are no CONFIG_FILES.
54258# This happens for instance with `./config.status config.h'.
54259if test -n "$CONFIG_FILES"; then
54260
54261
54262ac_cr=`echo X | tr X '\015'`
54263# On cygwin, bash can eat \r inside `` if the user requested igncr.
54264# But we know of no other shell where ac_cr would be empty at this
54265# point, so we can use a bashism as a fallback.
54266if test "x$ac_cr" = x; then
54267  eval ac_cr=\$\'\\r\'
54268fi
54269ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54270if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54271  ac_cs_awk_cr='\\r'
54272else
54273  ac_cs_awk_cr=$ac_cr
54274fi
54275
54276echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54277_ACEOF
54278
54279
54280{
54281  echo "cat >conf$$subs.awk <<_ACEOF" &&
54282  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54283  echo "_ACEOF"
54284} >conf$$subs.sh ||
54285  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54286ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54287ac_delim='%!_!# '
54288for ac_last_try in false false false false false :; do
54289  . ./conf$$subs.sh ||
54290    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54291
54292  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54293  if test $ac_delim_n = $ac_delim_num; then
54294    break
54295  elif $ac_last_try; then
54296    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54297  else
54298    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54299  fi
54300done
54301rm -f conf$$subs.sh
54302
54303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54304cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54305_ACEOF
54306sed -n '
54307h
54308s/^/S["/; s/!.*/"]=/
54309p
54310g
54311s/^[^!]*!//
54312:repl
54313t repl
54314s/'"$ac_delim"'$//
54315t delim
54316:nl
54317h
54318s/\(.\{148\}\)..*/\1/
54319t more1
54320s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54321p
54322n
54323b repl
54324:more1
54325s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54326p
54327g
54328s/.\{148\}//
54329t nl
54330:delim
54331h
54332s/\(.\{148\}\)..*/\1/
54333t more2
54334s/["\\]/\\&/g; s/^/"/; s/$/"/
54335p
54336b
54337:more2
54338s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54339p
54340g
54341s/.\{148\}//
54342t delim
54343' <conf$$subs.awk | sed '
54344/^[^""]/{
54345  N
54346  s/\n//
54347}
54348' >>$CONFIG_STATUS || ac_write_fail=1
54349rm -f conf$$subs.awk
54350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54351_ACAWK
54352cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54353  for (key in S) S_is_set[key] = 1
54354  FS = ""
54355
54356}
54357{
54358  line = $ 0
54359  nfields = split(line, field, "@")
54360  substed = 0
54361  len = length(field[1])
54362  for (i = 2; i < nfields; i++) {
54363    key = field[i]
54364    keylen = length(key)
54365    if (S_is_set[key]) {
54366      value = S[key]
54367      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54368      len += length(value) + length(field[++i])
54369      substed = 1
54370    } else
54371      len += 1 + keylen
54372  }
54373
54374  print line
54375}
54376
54377_ACAWK
54378_ACEOF
54379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54380if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54381  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54382else
54383  cat
54384fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54385  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54386_ACEOF
54387
54388# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54389# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54390# trailing colons and then remove the whole line if VPATH becomes empty
54391# (actually we leave an empty line to preserve line numbers).
54392if test "x$srcdir" = x.; then
54393  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54394h
54395s///
54396s/^/:/
54397s/[	 ]*$/:/
54398s/:\$(srcdir):/:/g
54399s/:\${srcdir}:/:/g
54400s/:@srcdir@:/:/g
54401s/^:*//
54402s/:*$//
54403x
54404s/\(=[	 ]*\).*/\1/
54405G
54406s/\n//
54407s/^[^=]*=[	 ]*$//
54408}'
54409fi
54410
54411cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54412fi # test -n "$CONFIG_FILES"
54413
54414
54415eval set X "  :F $CONFIG_FILES      "
54416shift
54417for ac_tag
54418do
54419  case $ac_tag in
54420  :[FHLC]) ac_mode=$ac_tag; continue;;
54421  esac
54422  case $ac_mode$ac_tag in
54423  :[FHL]*:*);;
54424  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54425  :[FH]-) ac_tag=-:-;;
54426  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54427  esac
54428  ac_save_IFS=$IFS
54429  IFS=:
54430  set x $ac_tag
54431  IFS=$ac_save_IFS
54432  shift
54433  ac_file=$1
54434  shift
54435
54436  case $ac_mode in
54437  :L) ac_source=$1;;
54438  :[FH])
54439    ac_file_inputs=
54440    for ac_f
54441    do
54442      case $ac_f in
54443      -) ac_f="$ac_tmp/stdin";;
54444      *) # Look for the file first in the build tree, then in the source tree
54445	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54446	 # because $ac_f cannot contain `:'.
54447	 test -f "$ac_f" ||
54448	   case $ac_f in
54449	   [\\/$]*) false;;
54450	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54451	   esac ||
54452	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54453      esac
54454      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54455      as_fn_append ac_file_inputs " '$ac_f'"
54456    done
54457
54458    # Let's still pretend it is `configure' which instantiates (i.e., don't
54459    # use $as_me), people would be surprised to read:
54460    #    /* config.h.  Generated by config.status.  */
54461    configure_input='Generated from '`
54462	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54463	`' by configure.'
54464    if test x"$ac_file" != x-; then
54465      configure_input="$ac_file.  $configure_input"
54466      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54467$as_echo "$as_me: creating $ac_file" >&6;}
54468    fi
54469    # Neutralize special characters interpreted by sed in replacement strings.
54470    case $configure_input in #(
54471    *\&* | *\|* | *\\* )
54472       ac_sed_conf_input=`$as_echo "$configure_input" |
54473       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54474    *) ac_sed_conf_input=$configure_input;;
54475    esac
54476
54477    case $ac_tag in
54478    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54479      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54480    esac
54481    ;;
54482  esac
54483
54484  ac_dir=`$as_dirname -- "$ac_file" ||
54485$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54486	 X"$ac_file" : 'X\(//\)[^/]' \| \
54487	 X"$ac_file" : 'X\(//\)$' \| \
54488	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54489$as_echo X"$ac_file" |
54490    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54491	    s//\1/
54492	    q
54493	  }
54494	  /^X\(\/\/\)[^/].*/{
54495	    s//\1/
54496	    q
54497	  }
54498	  /^X\(\/\/\)$/{
54499	    s//\1/
54500	    q
54501	  }
54502	  /^X\(\/\).*/{
54503	    s//\1/
54504	    q
54505	  }
54506	  s/.*/./; q'`
54507  as_dir="$ac_dir"; as_fn_mkdir_p
54508  ac_builddir=.
54509
54510case "$ac_dir" in
54511.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54512*)
54513  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54514  # A ".." for each directory in $ac_dir_suffix.
54515  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54516  case $ac_top_builddir_sub in
54517  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54518  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54519  esac ;;
54520esac
54521ac_abs_top_builddir=$ac_pwd
54522ac_abs_builddir=$ac_pwd$ac_dir_suffix
54523# for backward compatibility:
54524ac_top_builddir=$ac_top_build_prefix
54525
54526case $srcdir in
54527  .)  # We are building in place.
54528    ac_srcdir=.
54529    ac_top_srcdir=$ac_top_builddir_sub
54530    ac_abs_top_srcdir=$ac_pwd ;;
54531  [\\/]* | ?:[\\/]* )  # Absolute name.
54532    ac_srcdir=$srcdir$ac_dir_suffix;
54533    ac_top_srcdir=$srcdir
54534    ac_abs_top_srcdir=$srcdir ;;
54535  *) # Relative name.
54536    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54537    ac_top_srcdir=$ac_top_build_prefix$srcdir
54538    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54539esac
54540ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54541
54542
54543  case $ac_mode in
54544  :F)
54545  #
54546  # CONFIG_FILE
54547  #
54548
54549_ACEOF
54550
54551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54552# If the template does not know about datarootdir, expand it.
54553# FIXME: This hack should be removed a few years after 2.60.
54554ac_datarootdir_hack=; ac_datarootdir_seen=
54555ac_sed_dataroot='
54556/datarootdir/ {
54557  p
54558  q
54559}
54560/@datadir@/p
54561/@docdir@/p
54562/@infodir@/p
54563/@localedir@/p
54564/@mandir@/p'
54565case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54566*datarootdir*) ac_datarootdir_seen=yes;;
54567*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54568  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54569$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54570_ACEOF
54571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54572  ac_datarootdir_hack='
54573  s&@datadir@&$datadir&g
54574  s&@docdir@&$docdir&g
54575  s&@infodir@&$infodir&g
54576  s&@localedir@&$localedir&g
54577  s&@mandir@&$mandir&g
54578  s&\\\${datarootdir}&$datarootdir&g' ;;
54579esac
54580_ACEOF
54581
54582# Neutralize VPATH when `$srcdir' = `.'.
54583# Shell code in configure.ac might set extrasub.
54584# FIXME: do we really want to maintain this feature?
54585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54586ac_sed_extra="$ac_vpsub
54587$extrasub
54588_ACEOF
54589cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54590:t
54591/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54592s|@configure_input@|$ac_sed_conf_input|;t t
54593s&@top_builddir@&$ac_top_builddir_sub&;t t
54594s&@top_build_prefix@&$ac_top_build_prefix&;t t
54595s&@srcdir@&$ac_srcdir&;t t
54596s&@abs_srcdir@&$ac_abs_srcdir&;t t
54597s&@top_srcdir@&$ac_top_srcdir&;t t
54598s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54599s&@builddir@&$ac_builddir&;t t
54600s&@abs_builddir@&$ac_abs_builddir&;t t
54601s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54602$ac_datarootdir_hack
54603"
54604eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54605  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54606
54607test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54608  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54609  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54610      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54611  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54612which seems to be undefined.  Please make sure it is defined" >&5
54613$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54614which seems to be undefined.  Please make sure it is defined" >&2;}
54615
54616  rm -f "$ac_tmp/stdin"
54617  case $ac_file in
54618  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54619  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54620  esac \
54621  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54622 ;;
54623
54624
54625
54626  esac
54627
54628done # for ac_tag
54629
54630
54631as_fn_exit 0
54632_ACEOF
54633ac_clean_files=$ac_clean_files_save
54634
54635test $ac_write_fail = 0 ||
54636  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54637
54638
54639# configure is writing to config.log, and then calls config.status.
54640# config.status does its own redirection, appending to config.log.
54641# Unfortunately, on DOS this fails, as config.log is still kept open
54642# by configure, so config.status won't be able to write to it; its
54643# output is simply discarded.  So we exec the FD to /dev/null,
54644# effectively closing config.log, so it can be properly (re)opened and
54645# appended to by config.status.  When coming back to configure, we
54646# need to make the FD available again.
54647if test "$no_create" != yes; then
54648  ac_cs_success=:
54649  ac_config_status_args=
54650  test "$silent" = yes &&
54651    ac_config_status_args="$ac_config_status_args --quiet"
54652  exec 5>/dev/null
54653  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54654  exec 5>>config.log
54655  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54656  # would make configure fail if this is the last instruction.
54657  $ac_cs_success || as_fn_exit 1
54658fi
54659if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54660  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54661$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54662fi
54663
54664
54665
54666# Try to move the config.log file to the output directory.
54667if test -e ./config.log; then
54668  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54669fi
54670
54671# Make the compare script executable
54672$CHMOD +x $OUTPUT_ROOT/compare.sh
54673
54674# Finally output some useful information to the user
54675
54676  # Finally output some useful information to the user
54677
54678  printf "\n"
54679  printf "====================================================\n"
54680  if test "x$no_create" != "xyes"; then
54681    if test "x$IS_RECONFIGURE" != "xyes"; then
54682      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54683    else
54684      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54685    fi
54686  else
54687    if test "x$IS_RECONFIGURE" != "xyes"; then
54688      printf "A configuration has been successfully checked but not created\n"
54689    else
54690      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54691    fi
54692  fi
54693  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54694    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54695  else
54696    printf "using default settings.\n"
54697  fi
54698
54699  printf "\n"
54700  printf "Configuration summary:\n"
54701  printf "* Debug level:    $DEBUG_LEVEL\n"
54702  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54703  printf "* JDK variant:    $JDK_VARIANT\n"
54704  printf "* JVM variants:   $with_jvm_variants\n"
54705  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54706
54707  printf "\n"
54708  printf "Tools summary:\n"
54709  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54710    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54711  fi
54712  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54713  if test "x$TOOLCHAIN_VERSION" != "x"; then
54714    print_version=" $TOOLCHAIN_VERSION"
54715  fi
54716  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54717  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54718  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54719
54720  printf "\n"
54721  printf "Build performance summary:\n"
54722  printf "* Cores to use:   $JOBS\n"
54723  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54724  if test "x$CCACHE_STATUS" != "x"; then
54725    printf "* ccache status:  $CCACHE_STATUS\n"
54726  fi
54727  printf "\n"
54728
54729  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54730    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54731    printf "will result in longer build times.\n"
54732    printf "\n"
54733  fi
54734
54735  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54736    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54737    printf "These are not respected, and will be ignored. It is recommended\n"
54738    printf "that you clean your environment. The following variables are set:\n"
54739    printf "$FOUND_ALT_VARIABLES\n"
54740    printf "\n"
54741  fi
54742
54743  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54744    printf "WARNING: Your build output directory is not on a local disk.\n"
54745    printf "This will severely degrade build performance!\n"
54746    printf "It is recommended that you create an output directory on a local disk,\n"
54747    printf "and run the configure script again from that directory.\n"
54748    printf "\n"
54749  fi
54750
54751  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54752    printf "WARNING: The result of this configuration has overridden an older\n"
54753    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54754    printf "proper build. Failure to do so might result in strange build problems.\n"
54755    printf "\n"
54756  fi
54757
54758  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54759    printf "WARNING: The result of this configuration was not saved.\n"
54760    printf "You should run without '--no-create | -n' to create the configuration.\n"
54761    printf "\n"
54762  fi
54763
54764
54765
54766if test -e "$OUTPUT_ROOT/config.log"; then
54767  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
54768  if test $? -eq 0; then
54769    printf "The following warnings were produced. Repeated here for convenience:\n"
54770    # We must quote sed expression (using []) to stop m4 from eating the [].
54771    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
54772    printf "\n"
54773  fi
54774fi
54775
54776
54777