generated-configure.sh revision 540:6b93e7a4401d
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94as_myself=
95case $0 in #((
96  *[\\/]* ) as_myself=$0 ;;
97  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100  IFS=$as_save_IFS
101  test -z "$as_dir" && as_dir=.
102    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103  done
104IFS=$as_save_IFS
105
106     ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111  as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115  exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there.  '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141  emulate sh
142  NULLCMD=:
143  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144  # is contrary to our usage.  Disable this feature.
145  alias -g '\${1+\"\$@\"}'='\"\$@\"'
146  setopt NO_GLOB_SUBST
147else
148  case \`(set -o) 2>/dev/null\` in #(
149  *posix*) :
150    set -o posix ;; #(
151  *) :
152     ;;
153esac
154fi
155"
156  as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170  exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178  if (eval "$as_required") 2>/dev/null; then :
179  as_have_required=yes
180else
181  as_have_required=no
182fi
183  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190  IFS=$as_save_IFS
191  test -z "$as_dir" && as_dir=.
192  as_found=:
193  case $as_dir in #(
194	 /*)
195	   for as_base in sh bash ksh sh5; do
196	     # Try only shells that exist, to save several forks.
197	     as_shell=$as_dir/$as_base
198	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200  CONFIG_SHELL=$as_shell as_have_required=yes
201		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202  break 2
203fi
204fi
205	   done;;
206       esac
207  as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211  CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216      if test "x$CONFIG_SHELL" != x; then :
217  # We cannot yet assume a decent shell, so we have to provide a
218	# neutralization value for shells without unset; and this also
219	# works around shells that cannot unset nonexistent variables.
220	# Preserve -v and -x to the replacement shell.
221	BASH_ENV=/dev/null
222	ENV=/dev/null
223	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224	export CONFIG_SHELL
225	case $- in # ((((
226	  *v*x* | *x*v* ) as_opts=-vx ;;
227	  *v* ) as_opts=-v ;;
228	  *x* ) as_opts=-x ;;
229	  * ) as_opts= ;;
230	esac
231	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232fi
233
234    if test x$as_have_required = xno; then :
235  $as_echo "$0: This script requires a shell more modern than all"
236  $as_echo "$0: the shells that I found on your system."
237  if test x${ZSH_VERSION+set} = xset ; then
238    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240  else
241    $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: build-dev@openjdk.java.net about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246  fi
247  exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265  { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274  return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282  set +e
283  as_fn_set_status $1
284  exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293  case $as_dir in #(
294  -*) as_dir=./$as_dir;;
295  esac
296  test -d "$as_dir" || eval $as_mkdir_p || {
297    as_dirs=
298    while :; do
299      case $as_dir in #(
300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301      *) as_qdir=$as_dir;;
302      esac
303      as_dirs="'$as_qdir' $as_dirs"
304      as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306	 X"$as_dir" : 'X\(//\)[^/]' \| \
307	 X"$as_dir" : 'X\(//\)$' \| \
308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\/\)[^/].*/{
315	    s//\1/
316	    q
317	  }
318	  /^X\(\/\/\)$/{
319	    s//\1/
320	    q
321	  }
322	  /^X\(\/\).*/{
323	    s//\1/
324	    q
325	  }
326	  s/.*/./; q'`
327      test -d "$as_dir" && break
328    done
329    test -z "$as_dirs" || eval "mkdir $as_dirs"
330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341  eval 'as_fn_append ()
342  {
343    eval $1+=\$2
344  }'
345else
346  as_fn_append ()
347  {
348    eval $1=\$$1\$2
349  }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358  eval 'as_fn_arith ()
359  {
360    as_val=$(( $* ))
361  }'
362else
363  as_fn_arith ()
364  {
365    as_val=`expr "$@" || test $? -eq 1`
366  }
367fi # as_fn_arith
368
369
370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374# script with STATUS, using 1 if that was 0.
375as_fn_error ()
376{
377  as_status=$1; test $as_status -eq 0 && as_status=1
378  if test "$4"; then
379    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381  fi
382  $as_echo "$as_me: error: $2" >&2
383  as_fn_exit $as_status
384} # as_fn_error
385
386if expr a : '\(a\)' >/dev/null 2>&1 &&
387   test "X`expr 00001 : '.*\(...\)'`" = X001; then
388  as_expr=expr
389else
390  as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394  as_basename=basename
395else
396  as_basename=false
397fi
398
399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400  as_dirname=dirname
401else
402  as_dirname=false
403fi
404
405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407	 X"$0" : 'X\(//\)$' \| \
408	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409$as_echo X/"$0" |
410    sed '/^.*\/\([^/][^/]*\)\/*$/{
411	    s//\1/
412	    q
413	  }
414	  /^X\/\(\/\/\)$/{
415	    s//\1/
416	    q
417	  }
418	  /^X\/\(\/\).*/{
419	    s//\1/
420	    q
421	  }
422	  s/.*/./; q'`
423
424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432  as_lineno_1=$LINENO as_lineno_1a=$LINENO
433  as_lineno_2=$LINENO as_lineno_2a=$LINENO
434  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
437  sed -n '
438    p
439    /[$]LINENO/=
440  ' <$as_myself |
441    sed '
442      s/[$]LINENO.*/&-/
443      t lineno
444      b
445      :lineno
446      N
447      :loop
448      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449      t loop
450      s/-\n.*//
451    ' >$as_me.lineno &&
452  chmod +x "$as_me.lineno" ||
453    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455  # Don't try to exec as it changes $[0], causing all sort of problems
456  # (the dirname of $[0] is not the place where we might find the
457  # original and so on.  Autoconf is especially sensitive to this).
458  . "./$as_me.lineno"
459  # Exit status is that of the last command.
460  exit
461}
462
463ECHO_C= ECHO_N= ECHO_T=
464case `echo -n x` in #(((((
465-n*)
466  case `echo 'xy\c'` in
467  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
468  xy)  ECHO_C='\c';;
469  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
470       ECHO_T='	';;
471  esac;;
472*)
473  ECHO_N='-n';;
474esac
475
476rm -f conf$$ conf$$.exe conf$$.file
477if test -d conf$$.dir; then
478  rm -f conf$$.dir/conf$$.file
479else
480  rm -f conf$$.dir
481  mkdir conf$$.dir 2>/dev/null
482fi
483if (echo >conf$$.file) 2>/dev/null; then
484  if ln -s conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s='ln -s'
486    # ... but there are two gotchas:
487    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489    # In both cases, we have to default to `cp -p'.
490    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491      as_ln_s='cp -p'
492  elif ln conf$$.file conf$$ 2>/dev/null; then
493    as_ln_s=ln
494  else
495    as_ln_s='cp -p'
496  fi
497else
498  as_ln_s='cp -p'
499fi
500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
502
503if mkdir -p . 2>/dev/null; then
504  as_mkdir_p='mkdir -p "$as_dir"'
505else
506  test -d ./-p && rmdir ./-p
507  as_mkdir_p=false
508fi
509
510if test -x / >/dev/null 2>&1; then
511  as_test_x='test -x'
512else
513  if ls -dL / >/dev/null 2>&1; then
514    as_ls_L_option=L
515  else
516    as_ls_L_option=
517  fi
518  as_test_x='
519    eval sh -c '\''
520      if test -d "$1"; then
521	test -d "$1/.";
522      else
523	case $1 in #(
524	-*)set "./$1";;
525	esac;
526	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527	???[sx]*):;;*)false;;esac;fi
528    '\'' sh
529  '
530fi
531as_executable_p=$as_test_x
532
533# Sed expression to map a string onto a valid CPP name.
534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536# Sed expression to map a string onto a valid variable name.
537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
542
543# Name of the host.
544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548#
549# Initializations.
550#
551ac_default_prefix=/usr/local
552ac_clean_files=
553ac_config_libobj_dir=.
554LIBOBJS=
555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
559
560# Identity of this package.
561PACKAGE_NAME='OpenJDK'
562PACKAGE_TARNAME='openjdk'
563PACKAGE_VERSION='jdk8'
564PACKAGE_STRING='OpenJDK jdk8'
565PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
566PACKAGE_URL='http://openjdk.java.net'
567
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#ifdef HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#ifdef HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#ifdef STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# ifdef HAVE_STDLIB_H
582#  include <stdlib.h>
583# endif
584#endif
585#ifdef HAVE_STRING_H
586# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
587#  include <memory.h>
588# endif
589# include <string.h>
590#endif
591#ifdef HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#ifdef HAVE_INTTYPES_H
595# include <inttypes.h>
596#endif
597#ifdef HAVE_STDINT_H
598# include <stdint.h>
599#endif
600#ifdef HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
604ac_subst_vars='LTLIBOBJS
605LIBOBJS
606CCACHE
607USE_PRECOMPILED_HEADER
608SJAVAC_SERVER_DIR
609ENABLE_SJAVAC
610SJAVAC_SERVER_CORES
611SJAVAC_SERVER_JAVA
612MEMORY_SIZE
613CONCURRENT_BUILD_JOBS
614NUM_CORES
615SALIB_NAME
616HOTSPOT_MAKE_ARGS
617FIXPATH
618LIBCXX
619STATIC_CXX_SETTING
620LIBDL
621LIBM
622LIBZIP_CAN_USE_MMAP
623USE_EXTERNAL_LIBZ
624USE_EXTERNAL_LIBGIF
625USE_EXTERNAL_LIBJPEG
626ALSA_LIBS
627ALSA_CFLAGS
628FREETYPE2_LIB_PATH
629USING_SYSTEM_FT_LIB
630FREETYPE2_LIBS
631FREETYPE2_CFLAGS
632CUPS_CFLAGS
633OPENWIN_HOME
634X_EXTRA_LIBS
635X_LIBS
636X_PRE_LIBS
637X_CFLAGS
638XMKMF
639CXXFLAGS_DEBUG_SYMBOLS
640CFLAGS_DEBUG_SYMBOLS
641ZIP_DEBUGINFO_FILES
642ENABLE_DEBUG_SYMBOLS
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652PACKAGE_PATH
653LEGACY_EXTRA_LDFLAGS
654LEGACY_EXTRA_CXXFLAGS
655LEGACY_EXTRA_CFLAGS
656CXX_FLAG_DEPS
657C_FLAG_DEPS
658CXX_O_FLAG_NONE
659CXX_O_FLAG_NORM
660CXX_O_FLAG_HI
661CXX_O_FLAG_HIGHEST
662C_O_FLAG_NONE
663C_O_FLAG_NORM
664C_O_FLAG_HI
665C_O_FLAG_HIGHEST
666POST_MCS_CMD
667POST_STRIP_CMD
668SET_EXECUTABLE_ORIGIN
669SET_SHARED_LIBRARY_ORIGIN
670CXX_FLAG_REORDER
671C_FLAG_REORDER
672SET_SHARED_LIBRARY_MAPFILE
673SET_SHARED_LIBRARY_NAME
674SHARED_LIBRARY_FLAGS
675EXE_SUFFIX
676STATIC_LIBRARY_SUFFIX
677SHARED_LIBRARY_SUFFIX
678LIBRARY_PREFIX
679STATIC_LIBRARY
680SHARED_LIBRARY
681OBJ_SUFFIX
682LIPO
683ac_ct_OBJDUMP
684OBJDUMP
685ac_ct_OBJCOPY
686OBJCOPY
687MCS
688STRIP
689NM
690AS
691CXXCPP
692CPP
693COMPILER_TYPE
694RC_FLAGS
695DUMPBIN
696WINAR
697HOTSPOT_RC
698HOTSPOT_MT
699RC
700MT
701WINLD
702HOTSPOT_LD
703HOTSPOT_CXX
704ARFLAGS
705AR
706LDEXECXX
707LDCXX
708LDEXE
709LD
710ac_ct_OBJC
711OBJCFLAGS
712OBJC
713ac_ct_CXX
714CXXFLAGS
715CXX
716ac_ct_PROPER_COMPILER_CXX
717PROPER_COMPILER_CXX
718POTENTIAL_CXX
719TOOLS_DIR_CXX
720OBJEXT
721EXEEXT
722ac_ct_CC
723CPPFLAGS
724LDFLAGS
725CFLAGS
726CC
727ac_ct_PROPER_COMPILER_CC
728PROPER_COMPILER_CC
729POTENTIAL_CC
730TOOLS_DIR_CC
731BUILD_LD
732BUILD_CXX
733BUILD_CC
734MSVCR_DLL
735VS_PATH
736VS_LIB
737VS_INCLUDE
738CYGWIN_LINK
739AR_OUT_OPTION
740LD_OUT_OPTION
741EXE_OUT_OPTION
742CC_OUT_OPTION
743BUILD_HOTSPOT
744HOTSPOT_DIST
745BUILD_OUTPUT
746OVERRIDE_SRC_ROOT
747ADD_SRC_ROOT
748JDK_TOPDIR
749HOTSPOT_TOPDIR
750JAXWS_TOPDIR
751JAXP_TOPDIR
752CORBA_TOPDIR
753LANGTOOLS_TOPDIR
754BOOT_JDK_JVMARGS
755JAVAC_FLAGS
756BOOT_JDK_SOURCETARGET
757BOOT_JDK
758BOOT_TOOLSJAR
759BOOT_RTJAR
760JAVA_CHECK
761JAVAC_CHECK
762COOKED_BUILD_NUMBER
763FULL_VERSION
764RELEASE
765JDK_VERSION
766RUNTIME_NAME
767COPYRIGHT_YEAR
768MACOSX_BUNDLE_ID_BASE
769MACOSX_BUNDLE_NAME_BASE
770COMPANY_NAME
771JDK_RC_PLATFORM_NAME
772PRODUCT_SUFFIX
773PRODUCT_NAME
774LAUNCHER_NAME
775MILESTONE
776JDK_BUILD_NUMBER
777JDK_UPDATE_VERSION
778JDK_MICRO_VERSION
779JDK_MINOR_VERSION
780JDK_MAJOR_VERSION
781COMPRESS_JARS
782UNLIMITED_CRYPTO
783CACERTS_FILE
784TEST_IN_BUILD
785BUILD_HEADLESS
786SUPPORT_HEADFUL
787SUPPORT_HEADLESS
788SET_OPENJDK
789BDEPS_FTP
790BDEPS_UNZIP
791OS_VERSION_MICRO
792OS_VERSION_MINOR
793OS_VERSION_MAJOR
794PKG_CONFIG
795COMM
796TIME
797STAT
798HG
799READELF
800OTOOL
801LDD
802ZIP
803UNZIP
804FIND_DELETE
805MAKE
806CHECK_TOOLSDIR_MAKE
807CHECK_TOOLSDIR_GMAKE
808CHECK_MAKE
809CHECK_GMAKE
810PKGHANDLER
811OUTPUT_ROOT
812CONF_NAME
813SPEC
814BUILD_VARIANT_RELEASE
815DEBUG_CLASSFILES
816FASTDEBUG
817VARIANT
818DEBUG_LEVEL
819MACOSX_UNIVERSAL
820JVM_VARIANT_ZEROSHARK
821JVM_VARIANT_ZERO
822JVM_VARIANT_KERNEL
823JVM_VARIANT_MINIMAL1
824JVM_VARIANT_CLIENT
825JVM_VARIANT_SERVER
826JVM_VARIANTS
827JDK_VARIANT
828BUILD_LOG_WRAPPER
829BUILD_LOG_PREVIOUS
830BUILD_LOG
831SYS_ROOT
832PATH_SEP
833SRC_ROOT
834DEFINE_CROSS_COMPILE_ARCH
835LP64
836OPENJDK_TARGET_OS_API_DIR
837OPENJDK_TARGET_CPU_JLI_CFLAGS
838OPENJDK_TARGET_CPU_OSARCH
839OPENJDK_TARGET_CPU_ISADIR
840OPENJDK_TARGET_CPU_LIBDIR
841OPENJDK_TARGET_CPU_LEGACY_LIB
842OPENJDK_TARGET_CPU_LEGACY
843REQUIRED_OS_VERSION
844REQUIRED_OS_NAME
845COMPILE_TYPE
846OPENJDK_TARGET_CPU_ENDIAN
847OPENJDK_TARGET_CPU_BITS
848OPENJDK_TARGET_CPU_ARCH
849OPENJDK_TARGET_CPU
850OPENJDK_TARGET_OS_API
851OPENJDK_TARGET_OS
852OPENJDK_BUILD_CPU_ENDIAN
853OPENJDK_BUILD_CPU_BITS
854OPENJDK_BUILD_CPU_ARCH
855OPENJDK_BUILD_CPU
856OPENJDK_BUILD_OS_API
857OPENJDK_BUILD_OS
858OPENJDK_BUILD_AUTOCONF_NAME
859OPENJDK_TARGET_AUTOCONF_NAME
860target_os
861target_vendor
862target_cpu
863target
864host_os
865host_vendor
866host_cpu
867host
868build_os
869build_vendor
870build_cpu
871build
872SETFILE
873DF
874READLINK
875CYGPATH
876NAWK
877SED
878FGREP
879EGREP
880GREP
881AWK
882XARGS
883WHICH
884WC
885UNIQ
886UNAME
887TR
888TOUCH
889TEE
890TAR
891TAIL
892SORT
893SH
894RM
895THEPWDCMD
896PRINTF
897MV
898MKTEMP
899MKDIR
900LS
901LN
902HEAD
903FIND
904FILE
905EXPR
906ECHO
907DIRNAME
908DIFF
909DATE
910CUT
911CP
912CMP
913CHMOD
914CAT
915BASH
916BASENAME
917DATE_WHEN_CONFIGURED
918CONFIGURE_COMMAND_LINE
919CUSTOM_MAKE_DIR
920target_alias
921host_alias
922build_alias
923LIBS
924ECHO_T
925ECHO_N
926ECHO_C
927DEFS
928mandir
929localedir
930libdir
931psdir
932pdfdir
933dvidir
934htmldir
935infodir
936docdir
937oldincludedir
938includedir
939localstatedir
940sharedstatedir
941sysconfdir
942datadir
943datarootdir
944libexecdir
945sbindir
946bindir
947program_transform_name
948prefix
949exec_prefix
950PACKAGE_URL
951PACKAGE_BUGREPORT
952PACKAGE_STRING
953PACKAGE_VERSION
954PACKAGE_TARNAME
955PACKAGE_NAME
956PATH_SEPARATOR
957SHELL'
958ac_subst_files=''
959ac_user_opts='
960enable_option_checking
961with_custom_make_dir
962with_target_bits
963with_sys_root
964with_tools_dir
965with_devkit
966with_jdk_variant
967with_jvm_variants
968enable_debug
969with_debug_level
970with_conf_name
971with_builddeps_conf
972with_builddeps_server
973with_builddeps_dir
974with_builddeps_group
975enable_openjdk_only
976enable_headful
977enable_hotspot_test_in_build
978with_cacerts_file
979enable_unlimited_crypto
980with_boot_jdk
981with_boot_jdk_jvmargs
982with_add_source_root
983with_override_source_root
984with_adds_and_overrides
985with_override_langtools
986with_override_corba
987with_override_jaxp
988with_override_jaxws
989with_override_hotspot
990with_override_jdk
991with_import_hotspot
992with_msvcr_dll
993with_extra_cflags
994with_extra_cxxflags
995with_extra_ldflags
996enable_debug_symbols
997enable_zip_debug_info
998enable_macosx_runtime_support
999with_x
1000with_cups
1001with_cups_include
1002with_freetype
1003with_alsa
1004with_alsa_include
1005with_alsa_lib
1006with_zlib
1007with_stdc__lib
1008with_num_cores
1009with_memory_size
1010with_sjavac_server_java
1011with_sjavac_server_cores
1012enable_sjavac
1013enable_precompiled_headers
1014enable_ccache
1015with_ccache_dir
1016'
1017      ac_precious_vars='build_alias
1018host_alias
1019target_alias
1020PKG_CONFIG
1021CC
1022CFLAGS
1023LDFLAGS
1024LIBS
1025CPPFLAGS
1026CXX
1027CXXFLAGS
1028CCC
1029OBJC
1030OBJCFLAGS
1031CPP
1032CXXCPP
1033XMKMF
1034FREETYPE2_CFLAGS
1035FREETYPE2_LIBS
1036ALSA_CFLAGS
1037ALSA_LIBS'
1038
1039
1040# Initialize some variables set by options.
1041ac_init_help=
1042ac_init_version=false
1043ac_unrecognized_opts=
1044ac_unrecognized_sep=
1045# The variables have the same names as the options, with
1046# dashes changed to underlines.
1047cache_file=/dev/null
1048exec_prefix=NONE
1049no_create=
1050no_recursion=
1051prefix=NONE
1052program_prefix=NONE
1053program_suffix=NONE
1054program_transform_name=s,x,x,
1055silent=
1056site=
1057srcdir=
1058verbose=
1059x_includes=NONE
1060x_libraries=NONE
1061
1062# Installation directory options.
1063# These are left unexpanded so users can "make install exec_prefix=/foo"
1064# and all the variables that are supposed to be based on exec_prefix
1065# by default will actually change.
1066# Use braces instead of parens because sh, perl, etc. also accept them.
1067# (The list follows the same order as the GNU Coding Standards.)
1068bindir='${exec_prefix}/bin'
1069sbindir='${exec_prefix}/sbin'
1070libexecdir='${exec_prefix}/libexec'
1071datarootdir='${prefix}/share'
1072datadir='${datarootdir}'
1073sysconfdir='${prefix}/etc'
1074sharedstatedir='${prefix}/com'
1075localstatedir='${prefix}/var'
1076includedir='${prefix}/include'
1077oldincludedir='/usr/include'
1078docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1079infodir='${datarootdir}/info'
1080htmldir='${docdir}'
1081dvidir='${docdir}'
1082pdfdir='${docdir}'
1083psdir='${docdir}'
1084libdir='${exec_prefix}/lib'
1085localedir='${datarootdir}/locale'
1086mandir='${datarootdir}/man'
1087
1088ac_prev=
1089ac_dashdash=
1090for ac_option
1091do
1092  # If the previous option needs an argument, assign it.
1093  if test -n "$ac_prev"; then
1094    eval $ac_prev=\$ac_option
1095    ac_prev=
1096    continue
1097  fi
1098
1099  case $ac_option in
1100  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1101  *=)   ac_optarg= ;;
1102  *)    ac_optarg=yes ;;
1103  esac
1104
1105  # Accept the important Cygnus configure options, so we can diagnose typos.
1106
1107  case $ac_dashdash$ac_option in
1108  --)
1109    ac_dashdash=yes ;;
1110
1111  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1112    ac_prev=bindir ;;
1113  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1114    bindir=$ac_optarg ;;
1115
1116  -build | --build | --buil | --bui | --bu)
1117    ac_prev=build_alias ;;
1118  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1119    build_alias=$ac_optarg ;;
1120
1121  -cache-file | --cache-file | --cache-fil | --cache-fi \
1122  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1123    ac_prev=cache_file ;;
1124  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1125  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1126    cache_file=$ac_optarg ;;
1127
1128  --config-cache | -C)
1129    cache_file=config.cache ;;
1130
1131  -datadir | --datadir | --datadi | --datad)
1132    ac_prev=datadir ;;
1133  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1134    datadir=$ac_optarg ;;
1135
1136  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1137  | --dataroo | --dataro | --datar)
1138    ac_prev=datarootdir ;;
1139  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1140  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1141    datarootdir=$ac_optarg ;;
1142
1143  -disable-* | --disable-*)
1144    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1145    # Reject names that are not valid shell variable names.
1146    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1147      as_fn_error $? "invalid feature name: $ac_useropt"
1148    ac_useropt_orig=$ac_useropt
1149    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1150    case $ac_user_opts in
1151      *"
1152"enable_$ac_useropt"
1153"*) ;;
1154      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1155	 ac_unrecognized_sep=', ';;
1156    esac
1157    eval enable_$ac_useropt=no ;;
1158
1159  -docdir | --docdir | --docdi | --doc | --do)
1160    ac_prev=docdir ;;
1161  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1162    docdir=$ac_optarg ;;
1163
1164  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1165    ac_prev=dvidir ;;
1166  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1167    dvidir=$ac_optarg ;;
1168
1169  -enable-* | --enable-*)
1170    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1171    # Reject names that are not valid shell variable names.
1172    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173      as_fn_error $? "invalid feature name: $ac_useropt"
1174    ac_useropt_orig=$ac_useropt
1175    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176    case $ac_user_opts in
1177      *"
1178"enable_$ac_useropt"
1179"*) ;;
1180      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1181	 ac_unrecognized_sep=', ';;
1182    esac
1183    eval enable_$ac_useropt=\$ac_optarg ;;
1184
1185  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1186  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1187  | --exec | --exe | --ex)
1188    ac_prev=exec_prefix ;;
1189  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1190  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1191  | --exec=* | --exe=* | --ex=*)
1192    exec_prefix=$ac_optarg ;;
1193
1194  -gas | --gas | --ga | --g)
1195    # Obsolete; use --with-gas.
1196    with_gas=yes ;;
1197
1198  -help | --help | --hel | --he | -h)
1199    ac_init_help=long ;;
1200  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1201    ac_init_help=recursive ;;
1202  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1203    ac_init_help=short ;;
1204
1205  -host | --host | --hos | --ho)
1206    ac_prev=host_alias ;;
1207  -host=* | --host=* | --hos=* | --ho=*)
1208    host_alias=$ac_optarg ;;
1209
1210  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1211    ac_prev=htmldir ;;
1212  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1213  | --ht=*)
1214    htmldir=$ac_optarg ;;
1215
1216  -includedir | --includedir | --includedi | --included | --include \
1217  | --includ | --inclu | --incl | --inc)
1218    ac_prev=includedir ;;
1219  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1220  | --includ=* | --inclu=* | --incl=* | --inc=*)
1221    includedir=$ac_optarg ;;
1222
1223  -infodir | --infodir | --infodi | --infod | --info | --inf)
1224    ac_prev=infodir ;;
1225  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1226    infodir=$ac_optarg ;;
1227
1228  -libdir | --libdir | --libdi | --libd)
1229    ac_prev=libdir ;;
1230  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1231    libdir=$ac_optarg ;;
1232
1233  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1234  | --libexe | --libex | --libe)
1235    ac_prev=libexecdir ;;
1236  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1237  | --libexe=* | --libex=* | --libe=*)
1238    libexecdir=$ac_optarg ;;
1239
1240  -localedir | --localedir | --localedi | --localed | --locale)
1241    ac_prev=localedir ;;
1242  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1243    localedir=$ac_optarg ;;
1244
1245  -localstatedir | --localstatedir | --localstatedi | --localstated \
1246  | --localstate | --localstat | --localsta | --localst | --locals)
1247    ac_prev=localstatedir ;;
1248  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1249  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1250    localstatedir=$ac_optarg ;;
1251
1252  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1253    ac_prev=mandir ;;
1254  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1255    mandir=$ac_optarg ;;
1256
1257  -nfp | --nfp | --nf)
1258    # Obsolete; use --without-fp.
1259    with_fp=no ;;
1260
1261  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1262  | --no-cr | --no-c | -n)
1263    no_create=yes ;;
1264
1265  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1266  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1267    no_recursion=yes ;;
1268
1269  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1270  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1271  | --oldin | --oldi | --old | --ol | --o)
1272    ac_prev=oldincludedir ;;
1273  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1274  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1275  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1276    oldincludedir=$ac_optarg ;;
1277
1278  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1279    ac_prev=prefix ;;
1280  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1281    prefix=$ac_optarg ;;
1282
1283  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1284  | --program-pre | --program-pr | --program-p)
1285    ac_prev=program_prefix ;;
1286  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1287  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1288    program_prefix=$ac_optarg ;;
1289
1290  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1291  | --program-suf | --program-su | --program-s)
1292    ac_prev=program_suffix ;;
1293  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1294  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1295    program_suffix=$ac_optarg ;;
1296
1297  -program-transform-name | --program-transform-name \
1298  | --program-transform-nam | --program-transform-na \
1299  | --program-transform-n | --program-transform- \
1300  | --program-transform | --program-transfor \
1301  | --program-transfo | --program-transf \
1302  | --program-trans | --program-tran \
1303  | --progr-tra | --program-tr | --program-t)
1304    ac_prev=program_transform_name ;;
1305  -program-transform-name=* | --program-transform-name=* \
1306  | --program-transform-nam=* | --program-transform-na=* \
1307  | --program-transform-n=* | --program-transform-=* \
1308  | --program-transform=* | --program-transfor=* \
1309  | --program-transfo=* | --program-transf=* \
1310  | --program-trans=* | --program-tran=* \
1311  | --progr-tra=* | --program-tr=* | --program-t=*)
1312    program_transform_name=$ac_optarg ;;
1313
1314  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1315    ac_prev=pdfdir ;;
1316  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1317    pdfdir=$ac_optarg ;;
1318
1319  -psdir | --psdir | --psdi | --psd | --ps)
1320    ac_prev=psdir ;;
1321  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1322    psdir=$ac_optarg ;;
1323
1324  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1325  | -silent | --silent | --silen | --sile | --sil)
1326    silent=yes ;;
1327
1328  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1329    ac_prev=sbindir ;;
1330  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1331  | --sbi=* | --sb=*)
1332    sbindir=$ac_optarg ;;
1333
1334  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1335  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1336  | --sharedst | --shareds | --shared | --share | --shar \
1337  | --sha | --sh)
1338    ac_prev=sharedstatedir ;;
1339  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1340  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1341  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1342  | --sha=* | --sh=*)
1343    sharedstatedir=$ac_optarg ;;
1344
1345  -site | --site | --sit)
1346    ac_prev=site ;;
1347  -site=* | --site=* | --sit=*)
1348    site=$ac_optarg ;;
1349
1350  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1351    ac_prev=srcdir ;;
1352  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1353    srcdir=$ac_optarg ;;
1354
1355  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1356  | --syscon | --sysco | --sysc | --sys | --sy)
1357    ac_prev=sysconfdir ;;
1358  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1359  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1360    sysconfdir=$ac_optarg ;;
1361
1362  -target | --target | --targe | --targ | --tar | --ta | --t)
1363    ac_prev=target_alias ;;
1364  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1365    target_alias=$ac_optarg ;;
1366
1367  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1368    verbose=yes ;;
1369
1370  -version | --version | --versio | --versi | --vers | -V)
1371    ac_init_version=: ;;
1372
1373  -with-* | --with-*)
1374    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1375    # Reject names that are not valid shell variable names.
1376    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1377      as_fn_error $? "invalid package name: $ac_useropt"
1378    ac_useropt_orig=$ac_useropt
1379    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1380    case $ac_user_opts in
1381      *"
1382"with_$ac_useropt"
1383"*) ;;
1384      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1385	 ac_unrecognized_sep=', ';;
1386    esac
1387    eval with_$ac_useropt=\$ac_optarg ;;
1388
1389  -without-* | --without-*)
1390    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1391    # Reject names that are not valid shell variable names.
1392    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1393      as_fn_error $? "invalid package name: $ac_useropt"
1394    ac_useropt_orig=$ac_useropt
1395    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1396    case $ac_user_opts in
1397      *"
1398"with_$ac_useropt"
1399"*) ;;
1400      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1401	 ac_unrecognized_sep=', ';;
1402    esac
1403    eval with_$ac_useropt=no ;;
1404
1405  --x)
1406    # Obsolete; use --with-x.
1407    with_x=yes ;;
1408
1409  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1410  | --x-incl | --x-inc | --x-in | --x-i)
1411    ac_prev=x_includes ;;
1412  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1413  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1414    x_includes=$ac_optarg ;;
1415
1416  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1417  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1418    ac_prev=x_libraries ;;
1419  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1420  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1421    x_libraries=$ac_optarg ;;
1422
1423  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1424Try \`$0 --help' for more information"
1425    ;;
1426
1427  *=*)
1428    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1429    # Reject names that are not valid shell variable names.
1430    case $ac_envvar in #(
1431      '' | [0-9]* | *[!_$as_cr_alnum]* )
1432      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1433    esac
1434    eval $ac_envvar=\$ac_optarg
1435    export $ac_envvar ;;
1436
1437  *)
1438    # FIXME: should be removed in autoconf 3.0.
1439    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1440    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1441      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1442    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1443    ;;
1444
1445  esac
1446done
1447
1448if test -n "$ac_prev"; then
1449  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1450  as_fn_error $? "missing argument to $ac_option"
1451fi
1452
1453if test -n "$ac_unrecognized_opts"; then
1454  case $enable_option_checking in
1455    no) ;;
1456    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1457    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1458  esac
1459fi
1460
1461# Check all directory arguments for consistency.
1462for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1463		datadir sysconfdir sharedstatedir localstatedir includedir \
1464		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1465		libdir localedir mandir
1466do
1467  eval ac_val=\$$ac_var
1468  # Remove trailing slashes.
1469  case $ac_val in
1470    */ )
1471      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1472      eval $ac_var=\$ac_val;;
1473  esac
1474  # Be sure to have absolute directory names.
1475  case $ac_val in
1476    [\\/$]* | ?:[\\/]* )  continue;;
1477    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1478  esac
1479  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1480done
1481
1482# There might be people who depend on the old broken behavior: `$host'
1483# used to hold the argument of --host etc.
1484# FIXME: To remove some day.
1485build=$build_alias
1486host=$host_alias
1487target=$target_alias
1488
1489# FIXME: To remove some day.
1490if test "x$host_alias" != x; then
1491  if test "x$build_alias" = x; then
1492    cross_compiling=maybe
1493    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1494    If a cross compiler is detected then cross compile mode will be used" >&2
1495  elif test "x$build_alias" != "x$host_alias"; then
1496    cross_compiling=yes
1497  fi
1498fi
1499
1500ac_tool_prefix=
1501test -n "$host_alias" && ac_tool_prefix=$host_alias-
1502
1503test "$silent" = yes && exec 6>/dev/null
1504
1505
1506ac_pwd=`pwd` && test -n "$ac_pwd" &&
1507ac_ls_di=`ls -di .` &&
1508ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1509  as_fn_error $? "working directory cannot be determined"
1510test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1511  as_fn_error $? "pwd does not report name of working directory"
1512
1513
1514# Find the source files, if location was not specified.
1515if test -z "$srcdir"; then
1516  ac_srcdir_defaulted=yes
1517  # Try the directory containing this script, then the parent directory.
1518  ac_confdir=`$as_dirname -- "$as_myself" ||
1519$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1520	 X"$as_myself" : 'X\(//\)[^/]' \| \
1521	 X"$as_myself" : 'X\(//\)$' \| \
1522	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1523$as_echo X"$as_myself" |
1524    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1525	    s//\1/
1526	    q
1527	  }
1528	  /^X\(\/\/\)[^/].*/{
1529	    s//\1/
1530	    q
1531	  }
1532	  /^X\(\/\/\)$/{
1533	    s//\1/
1534	    q
1535	  }
1536	  /^X\(\/\).*/{
1537	    s//\1/
1538	    q
1539	  }
1540	  s/.*/./; q'`
1541  srcdir=$ac_confdir
1542  if test ! -r "$srcdir/$ac_unique_file"; then
1543    srcdir=..
1544  fi
1545else
1546  ac_srcdir_defaulted=no
1547fi
1548if test ! -r "$srcdir/$ac_unique_file"; then
1549  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1550  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1551fi
1552ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1553ac_abs_confdir=`(
1554	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1555	pwd)`
1556# When building in place, set srcdir=.
1557if test "$ac_abs_confdir" = "$ac_pwd"; then
1558  srcdir=.
1559fi
1560# Remove unnecessary trailing slashes from srcdir.
1561# Double slashes in file names in object file debugging info
1562# mess up M-x gdb in Emacs.
1563case $srcdir in
1564*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1565esac
1566for ac_var in $ac_precious_vars; do
1567  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1568  eval ac_env_${ac_var}_value=\$${ac_var}
1569  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1570  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1571done
1572
1573#
1574# Report the --help message.
1575#
1576if test "$ac_init_help" = "long"; then
1577  # Omit some internal or obsolete options to make the list less imposing.
1578  # This message is too long to be a string in the A/UX 3.1 sh.
1579  cat <<_ACEOF
1580\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1581
1582Usage: $0 [OPTION]... [VAR=VALUE]...
1583
1584To assign environment variables (e.g., CC, CFLAGS...), specify them as
1585VAR=VALUE.  See below for descriptions of some of the useful variables.
1586
1587Defaults for the options are specified in brackets.
1588
1589Configuration:
1590  -h, --help              display this help and exit
1591      --help=short        display options specific to this package
1592      --help=recursive    display the short help of all the included packages
1593  -V, --version           display version information and exit
1594  -q, --quiet, --silent   do not print \`checking ...' messages
1595      --cache-file=FILE   cache test results in FILE [disabled]
1596  -C, --config-cache      alias for \`--cache-file=config.cache'
1597  -n, --no-create         do not create output files
1598      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1599
1600Installation directories:
1601  --prefix=PREFIX         install architecture-independent files in PREFIX
1602                          [$ac_default_prefix]
1603  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1604                          [PREFIX]
1605
1606By default, \`make install' will install all the files in
1607\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1608an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1609for instance \`--prefix=\$HOME'.
1610
1611For better control, use the options below.
1612
1613Fine tuning of the installation directories:
1614  --bindir=DIR            user executables [EPREFIX/bin]
1615  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1616  --libexecdir=DIR        program executables [EPREFIX/libexec]
1617  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1618  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1619  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1620  --libdir=DIR            object code libraries [EPREFIX/lib]
1621  --includedir=DIR        C header files [PREFIX/include]
1622  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1623  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1624  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1625  --infodir=DIR           info documentation [DATAROOTDIR/info]
1626  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1627  --mandir=DIR            man documentation [DATAROOTDIR/man]
1628  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1629  --htmldir=DIR           html documentation [DOCDIR]
1630  --dvidir=DIR            dvi documentation [DOCDIR]
1631  --pdfdir=DIR            pdf documentation [DOCDIR]
1632  --psdir=DIR             ps documentation [DOCDIR]
1633_ACEOF
1634
1635  cat <<\_ACEOF
1636
1637X features:
1638  --x-includes=DIR    X include files are in DIR
1639  --x-libraries=DIR   X library files are in DIR
1640
1641System types:
1642  --build=BUILD     configure for building on BUILD [guessed]
1643  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1644  --target=TARGET   configure for building compilers for TARGET [HOST]
1645_ACEOF
1646fi
1647
1648if test -n "$ac_init_help"; then
1649  case $ac_init_help in
1650     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1651   esac
1652  cat <<\_ACEOF
1653
1654Optional Features:
1655  --disable-option-checking  ignore unrecognized --enable/--with options
1656  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1657  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1658  --enable-debug          set the debug level to fastdebug (shorthand for
1659                          --with-debug-level=fastdebug) [disabled]
1660  --enable-openjdk-only   supress building closed source even if present
1661                          [disabled]
1662  --disable-headful       disable building headful support (graphical UI
1663                          support) [enabled]
1664  --enable-hotspot-test-in-build
1665                          run the Queens test after Hotspot build [disabled]
1666  --enable-unlimited-crypto
1667                          Enable unlimited crypto policy [disabled]
1668  --disable-debug-symbols disable generation of debug symbols [enabled]
1669  --disable-zip-debug-info
1670                          disable zipping of debug-info files [enabled]
1671  --disable-macosx-runtime-support
1672                          disable the use of MacOSX Java runtime support
1673                          framework [enabled]
1674  --enable-sjavac         use sjavac to do fast incremental compiles
1675                          [disabled]
1676  --disable-precompiled-headers
1677                          disable using precompiled headers when compiling C++
1678                          [enabled]
1679  --disable-ccache        disable using ccache to speed up recompilations
1680                          [enabled]
1681
1682Optional Packages:
1683  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1684  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1685  --with-custom-make-dir  use this directory for custom build/make files
1686  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1687                          support it), e.g. --with-target-bits=32 [guessed]
1688  --with-sys-root         pass this sys-root to the compilers and tools (for
1689                          cross-compiling)
1690  --with-tools-dir        search this directory for compilers and tools (for
1691                          cross-compiling)
1692  --with-devkit           use this directory as base for tools-dir and
1693                          sys-root (for cross-compiling)
1694  --with-jdk-variant      JDK variant to build (normal) [normal]
1695  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1696                          client, minimal1, kernel, zero, zeroshark) [server]
1697  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1698                          [release]
1699  --with-conf-name        use this as the name of the configuration [generated
1700                          from important configuration options]
1701  --with-builddeps-conf   use this configuration file for the builddeps
1702  --with-builddeps-server download and use build dependencies from this server
1703                          url
1704  --with-builddeps-dir    store downloaded build dependencies here
1705                          [/localhome/builddeps]
1706  --with-builddeps-group  chgrp the downloaded build dependencies to this
1707                          group
1708  --with-cacerts-file     specify alternative cacerts file
1709  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1710  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1711                          invocations of the Boot JDK, overriding the default
1712                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1713                          -enableassertions"
1714  --with-add-source-root  for each and every source directory, look in this
1715                          additional source root for the same directory; if it
1716                          exists and have files in it, include it in the build
1717  --with-override-source-root
1718                          for each and every source directory, look in this
1719                          override source root for the same directory; if it
1720                          exists, use that directory instead and ignore the
1721                          directory in the original source root
1722  --with-adds-and-overrides
1723                          use the subdirs 'adds' and 'overrides' in the
1724                          specified directory as add-source-root and
1725                          override-source-root
1726  --with-override-langtools
1727                          use this langtools dir for the build
1728  --with-override-corba   use this corba dir for the build
1729  --with-override-jaxp    use this jaxp dir for the build
1730  --with-override-jaxws   use this jaxws dir for the build
1731  --with-override-hotspot use this hotspot dir for the build
1732  --with-override-jdk     use this jdk dir for the build
1733  --with-import-hotspot   import hotspot binaries from this jdk image or
1734                          hotspot build dist dir instead of building from
1735                          source
1736  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1737                          only) [probed]
1738  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1739  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1740  --with-extra-ldflags    extra flags to be used when linking jdk
1741  --with-x                use the X Window System
1742  --with-cups             specify prefix directory for the cups package
1743                          (expecting the headers under PATH/include)
1744  --with-cups-include     specify directory for the cups include files
1745  --with-freetype         specify prefix directory for the freetype2 package
1746                          (expecting the libraries under PATH/lib and the
1747                          headers under PATH/include)
1748  --with-alsa             specify prefix directory for the alsa package
1749                          (expecting the libraries under PATH/lib and the
1750                          headers under PATH/include)
1751  --with-alsa-include     specify directory for the alsa include files
1752  --with-alsa-lib         specify directory for the alsa library
1753  --with-zlib             use zlib from build system or OpenJDK source
1754                          (system, bundled) [bundled]
1755  --with-stdc++lib=<static>,<dynamic>,<default>
1756                          force linking of the C++ runtime on Linux to either
1757                          static or dynamic, default is static with dynamic as
1758                          fallback
1759  --with-num-cores        number of cores in the build system, e.g.
1760                          --with-num-cores=8 [probed]
1761  --with-memory-size      memory (in MB) available in the build system, e.g.
1762                          --with-memory-size=1024 [probed]
1763  --with-sjavac-server-java
1764                          use this java binary for running the sjavac
1765                          background server [Boot JDK java]
1766  --with-sjavac-server-cores
1767                          use at most this number of concurrent threads on the
1768                          sjavac server [probed]
1769  --with-ccache-dir       where to store ccache files [~/.ccache]
1770
1771Some influential environment variables:
1772  PKG_CONFIG  path to pkg-config utility
1773  CC          C compiler command
1774  CFLAGS      C compiler flags
1775  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1776              nonstandard directory <lib dir>
1777  LIBS        libraries to pass to the linker, e.g. -l<library>
1778  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1779              you have headers in a nonstandard directory <include dir>
1780  CXX         C++ compiler command
1781  CXXFLAGS    C++ compiler flags
1782  OBJC        Objective C compiler command
1783  OBJCFLAGS   Objective C compiler flags
1784  CPP         C preprocessor
1785  CXXCPP      C++ preprocessor
1786  XMKMF       Path to xmkmf, Makefile generator for X Window System
1787  FREETYPE2_CFLAGS
1788              C compiler flags for FREETYPE2, overriding pkg-config
1789  FREETYPE2_LIBS
1790              linker flags for FREETYPE2, overriding pkg-config
1791  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1792  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1793
1794Use these variables to override the choices made by `configure' or to help
1795it to find libraries and programs with nonstandard names/locations.
1796
1797Report bugs to <build-dev@openjdk.java.net>.
1798OpenJDK home page: <http://openjdk.java.net>.
1799_ACEOF
1800ac_status=$?
1801fi
1802
1803if test "$ac_init_help" = "recursive"; then
1804  # If there are subdirs, report their specific --help.
1805  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1806    test -d "$ac_dir" ||
1807      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1808      continue
1809    ac_builddir=.
1810
1811case "$ac_dir" in
1812.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1813*)
1814  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1815  # A ".." for each directory in $ac_dir_suffix.
1816  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1817  case $ac_top_builddir_sub in
1818  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1819  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1820  esac ;;
1821esac
1822ac_abs_top_builddir=$ac_pwd
1823ac_abs_builddir=$ac_pwd$ac_dir_suffix
1824# for backward compatibility:
1825ac_top_builddir=$ac_top_build_prefix
1826
1827case $srcdir in
1828  .)  # We are building in place.
1829    ac_srcdir=.
1830    ac_top_srcdir=$ac_top_builddir_sub
1831    ac_abs_top_srcdir=$ac_pwd ;;
1832  [\\/]* | ?:[\\/]* )  # Absolute name.
1833    ac_srcdir=$srcdir$ac_dir_suffix;
1834    ac_top_srcdir=$srcdir
1835    ac_abs_top_srcdir=$srcdir ;;
1836  *) # Relative name.
1837    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1838    ac_top_srcdir=$ac_top_build_prefix$srcdir
1839    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1840esac
1841ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1842
1843    cd "$ac_dir" || { ac_status=$?; continue; }
1844    # Check for guested configure.
1845    if test -f "$ac_srcdir/configure.gnu"; then
1846      echo &&
1847      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1848    elif test -f "$ac_srcdir/configure"; then
1849      echo &&
1850      $SHELL "$ac_srcdir/configure" --help=recursive
1851    else
1852      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1853    fi || ac_status=$?
1854    cd "$ac_pwd" || { ac_status=$?; break; }
1855  done
1856fi
1857
1858test -n "$ac_init_help" && exit $ac_status
1859if $ac_init_version; then
1860  cat <<\_ACEOF
1861OpenJDK configure jdk8
1862generated by GNU Autoconf 2.68
1863
1864Copyright (C) 2010 Free Software Foundation, Inc.
1865This configure script is free software; the Free Software Foundation
1866gives unlimited permission to copy, distribute and modify it.
1867_ACEOF
1868  exit
1869fi
1870
1871## ------------------------ ##
1872## Autoconf initialization. ##
1873## ------------------------ ##
1874
1875# ac_fn_c_try_compile LINENO
1876# --------------------------
1877# Try to compile conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_compile ()
1879{
1880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881  rm -f conftest.$ac_objext
1882  if { { ac_try="$ac_compile"
1883case "(($ac_try" in
1884  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885  *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889  (eval "$ac_compile") 2>conftest.err
1890  ac_status=$?
1891  if test -s conftest.err; then
1892    grep -v '^ *+' conftest.err >conftest.er1
1893    cat conftest.er1 >&5
1894    mv -f conftest.er1 conftest.err
1895  fi
1896  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897  test $ac_status = 0; } && {
1898	 test -z "$ac_c_werror_flag" ||
1899	 test ! -s conftest.err
1900       } && test -s conftest.$ac_objext; then :
1901  ac_retval=0
1902else
1903  $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
1905
1906	ac_retval=1
1907fi
1908  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1909  as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_compile
1912
1913# ac_fn_cxx_try_compile LINENO
1914# ----------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_cxx_try_compile ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext
1920  if { { ac_try="$ac_compile"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927  (eval "$ac_compile") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_cxx_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest.$ac_objext; then :
1939  ac_retval=0
1940else
1941  $as_echo "$as_me: failed program was:" >&5
1942sed 's/^/| /' conftest.$ac_ext >&5
1943
1944	ac_retval=1
1945fi
1946  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1947  as_fn_set_status $ac_retval
1948
1949} # ac_fn_cxx_try_compile
1950
1951# ac_fn_objc_try_compile LINENO
1952# -----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_objc_try_compile ()
1955{
1956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957  rm -f conftest.$ac_objext
1958  if { { ac_try="$ac_compile"
1959case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_compile") 2>conftest.err
1966  ac_status=$?
1967  if test -s conftest.err; then
1968    grep -v '^ *+' conftest.err >conftest.er1
1969    cat conftest.er1 >&5
1970    mv -f conftest.er1 conftest.err
1971  fi
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && {
1974	 test -z "$ac_objc_werror_flag" ||
1975	 test ! -s conftest.err
1976       } && test -s conftest.$ac_objext; then :
1977  ac_retval=0
1978else
1979  $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982	ac_retval=1
1983fi
1984  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1985  as_fn_set_status $ac_retval
1986
1987} # ac_fn_objc_try_compile
1988
1989# ac_fn_c_try_cpp LINENO
1990# ----------------------
1991# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_c_try_cpp ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  if { { ac_try="$ac_cpp conftest.$ac_ext"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } > conftest.i && {
2011	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2012	 test ! -s conftest.err
2013       }; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019    ac_retval=1
2020fi
2021  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_c_try_cpp
2025
2026# ac_fn_cxx_try_cpp LINENO
2027# ------------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_cxx_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_cxx_try_cpp
2062
2063# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2064# ---------------------------------------------------------
2065# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2066# the include files in INCLUDES and setting the cache variable VAR
2067# accordingly.
2068ac_fn_cxx_check_header_mongrel ()
2069{
2070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071  if eval \${$3+:} false; then :
2072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073$as_echo_n "checking for $2... " >&6; }
2074if eval \${$3+:} false; then :
2075  $as_echo_n "(cached) " >&6
2076fi
2077eval ac_res=\$$3
2078	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079$as_echo "$ac_res" >&6; }
2080else
2081  # Is the header compilable?
2082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2083$as_echo_n "checking $2 usability... " >&6; }
2084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h.  */
2086$4
2087#include <$2>
2088_ACEOF
2089if ac_fn_cxx_try_compile "$LINENO"; then :
2090  ac_header_compiler=yes
2091else
2092  ac_header_compiler=no
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2096$as_echo "$ac_header_compiler" >&6; }
2097
2098# Is the header present?
2099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2100$as_echo_n "checking $2 presence... " >&6; }
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h.  */
2103#include <$2>
2104_ACEOF
2105if ac_fn_cxx_try_cpp "$LINENO"; then :
2106  ac_header_preproc=yes
2107else
2108  ac_header_preproc=no
2109fi
2110rm -f conftest.err conftest.i conftest.$ac_ext
2111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2112$as_echo "$ac_header_preproc" >&6; }
2113
2114# So?  What about this header?
2115case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2116  yes:no: )
2117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2118$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2119    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2120$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2121    ;;
2122  no:yes:* )
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2124$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2126$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2128$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2130$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133( $as_echo "## ----------------------------------------- ##
2134## Report this to build-dev@openjdk.java.net ##
2135## ----------------------------------------- ##"
2136     ) | sed "s/^/$as_me: WARNING:     /" >&2
2137    ;;
2138esac
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if eval \${$3+:} false; then :
2142  $as_echo_n "(cached) " >&6
2143else
2144  eval "$3=\$ac_header_compiler"
2145fi
2146eval ac_res=\$$3
2147	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148$as_echo "$ac_res" >&6; }
2149fi
2150  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2151
2152} # ac_fn_cxx_check_header_mongrel
2153
2154# ac_fn_cxx_try_run LINENO
2155# ------------------------
2156# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2157# that executables *can* be run.
2158ac_fn_cxx_try_run ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  if { { ac_try="$ac_link"
2162case "(($ac_try" in
2163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2164  *) ac_try_echo=$ac_try;;
2165esac
2166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2167$as_echo "$ac_try_echo"; } >&5
2168  (eval "$ac_link") 2>&5
2169  ac_status=$?
2170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2171  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2172  { { case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_try") 2>&5
2179  ac_status=$?
2180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2181  test $ac_status = 0; }; }; then :
2182  ac_retval=0
2183else
2184  $as_echo "$as_me: program exited with status $ac_status" >&5
2185       $as_echo "$as_me: failed program was:" >&5
2186sed 's/^/| /' conftest.$ac_ext >&5
2187
2188       ac_retval=$ac_status
2189fi
2190  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2191  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2192  as_fn_set_status $ac_retval
2193
2194} # ac_fn_cxx_try_run
2195
2196# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2197# ---------------------------------------------------------
2198# Tests whether HEADER exists and can be compiled using the include files in
2199# INCLUDES, setting the cache variable VAR accordingly.
2200ac_fn_cxx_check_header_compile ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2204$as_echo_n "checking for $2... " >&6; }
2205if eval \${$3+:} false; then :
2206  $as_echo_n "(cached) " >&6
2207else
2208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211#include <$2>
2212_ACEOF
2213if ac_fn_cxx_try_compile "$LINENO"; then :
2214  eval "$3=yes"
2215else
2216  eval "$3=no"
2217fi
2218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
2223  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224
2225} # ac_fn_cxx_check_header_compile
2226
2227# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2228# ----------------------------------------------
2229# Tries to find the compile-time value of EXPR in a program that includes
2230# INCLUDES, setting VAR accordingly. Returns whether the value could be
2231# computed
2232ac_fn_cxx_compute_int ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  if test "$cross_compiling" = yes; then
2236    # Depending upon the size, compute the lo and hi bounds.
2237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h.  */
2239$4
2240int
2241main ()
2242{
2243static int test_array [1 - 2 * !(($2) >= 0)];
2244test_array [0] = 0
2245
2246  ;
2247  return 0;
2248}
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  ac_lo=0 ac_mid=0
2252  while :; do
2253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h.  */
2255$4
2256int
2257main ()
2258{
2259static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2260test_array [0] = 0
2261
2262  ;
2263  return 0;
2264}
2265_ACEOF
2266if ac_fn_cxx_try_compile "$LINENO"; then :
2267  ac_hi=$ac_mid; break
2268else
2269  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2270			if test $ac_lo -le $ac_mid; then
2271			  ac_lo= ac_hi=
2272			  break
2273			fi
2274			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277  done
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) < 0)];
2286test_array [0] = 0
2287
2288  ;
2289  return 0;
2290}
2291_ACEOF
2292if ac_fn_cxx_try_compile "$LINENO"; then :
2293  ac_hi=-1 ac_mid=-1
2294  while :; do
2295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h.  */
2297$4
2298int
2299main ()
2300{
2301static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2302test_array [0] = 0
2303
2304  ;
2305  return 0;
2306}
2307_ACEOF
2308if ac_fn_cxx_try_compile "$LINENO"; then :
2309  ac_lo=$ac_mid; break
2310else
2311  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312			if test $ac_mid -le $ac_hi; then
2313			  ac_lo= ac_hi=
2314			  break
2315			fi
2316			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319  done
2320else
2321  ac_lo= ac_hi=
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326# Binary search between lo and hi bounds.
2327while test "x$ac_lo" != "x$ac_hi"; do
2328  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_cxx_try_compile "$LINENO"; then :
2343  ac_hi=$ac_mid
2344else
2345  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349case $ac_lo in #((
2350?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351'') ac_retval=1 ;;
2352esac
2353  else
2354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357static long int longval () { return $2; }
2358static unsigned long int ulongval () { return $2; }
2359#include <stdio.h>
2360#include <stdlib.h>
2361int
2362main ()
2363{
2364
2365  FILE *f = fopen ("conftest.val", "w");
2366  if (! f)
2367    return 1;
2368  if (($2) < 0)
2369    {
2370      long int i = longval ();
2371      if (i != ($2))
2372	return 1;
2373      fprintf (f, "%ld", i);
2374    }
2375  else
2376    {
2377      unsigned long int i = ulongval ();
2378      if (i != ($2))
2379	return 1;
2380      fprintf (f, "%lu", i);
2381    }
2382  /* Do not output a trailing newline, as this causes \r\n confusion
2383     on some platforms.  */
2384  return ferror (f) || fclose (f) != 0;
2385
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_cxx_try_run "$LINENO"; then :
2391  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392else
2393  ac_retval=1
2394fi
2395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396  conftest.$ac_objext conftest.beam conftest.$ac_ext
2397rm -f conftest.val
2398
2399  fi
2400  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401  as_fn_set_status $ac_retval
2402
2403} # ac_fn_cxx_compute_int
2404
2405# ac_fn_cxx_try_link LINENO
2406# -------------------------
2407# Try to link conftest.$ac_ext, and return whether this succeeded.
2408ac_fn_cxx_try_link ()
2409{
2410  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411  rm -f conftest.$ac_objext conftest$ac_exeext
2412  if { { ac_try="$ac_link"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_link") 2>conftest.err
2420  ac_status=$?
2421  if test -s conftest.err; then
2422    grep -v '^ *+' conftest.err >conftest.er1
2423    cat conftest.er1 >&5
2424    mv -f conftest.er1 conftest.err
2425  fi
2426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427  test $ac_status = 0; } && {
2428	 test -z "$ac_cxx_werror_flag" ||
2429	 test ! -s conftest.err
2430       } && test -s conftest$ac_exeext && {
2431	 test "$cross_compiling" = yes ||
2432	 $as_test_x conftest$ac_exeext
2433       }; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439	ac_retval=1
2440fi
2441  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2442  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2443  # interfere with the next link command; also delete a directory that is
2444  # left behind by Apple's compiler.  We do this before executing the actions.
2445  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2446  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_cxx_try_link
2450
2451# ac_fn_cxx_check_func LINENO FUNC VAR
2452# ------------------------------------
2453# Tests whether FUNC exists, setting the cache variable VAR accordingly
2454ac_fn_cxx_check_func ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458$as_echo_n "checking for $2... " >&6; }
2459if eval \${$3+:} false; then :
2460  $as_echo_n "(cached) " >&6
2461else
2462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2465   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2466#define $2 innocuous_$2
2467
2468/* System header to define __stub macros and hopefully few prototypes,
2469    which can conflict with char $2 (); below.
2470    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2471    <limits.h> exists even on freestanding compilers.  */
2472
2473#ifdef __STDC__
2474# include <limits.h>
2475#else
2476# include <assert.h>
2477#endif
2478
2479#undef $2
2480
2481/* Override any GCC internal prototype to avoid an error.
2482   Use char because int might match the return type of a GCC
2483   builtin and then its argument prototype would still apply.  */
2484#ifdef __cplusplus
2485extern "C"
2486#endif
2487char $2 ();
2488/* The GNU C library defines this for functions which it implements
2489    to always fail with ENOSYS.  Some functions are actually named
2490    something starting with __ and the normal name is an alias.  */
2491#if defined __stub_$2 || defined __stub___$2
2492choke me
2493#endif
2494
2495int
2496main ()
2497{
2498return $2 ();
2499  ;
2500  return 0;
2501}
2502_ACEOF
2503if ac_fn_cxx_try_link "$LINENO"; then :
2504  eval "$3=yes"
2505else
2506  eval "$3=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext \
2509    conftest$ac_exeext conftest.$ac_ext
2510fi
2511eval ac_res=\$$3
2512	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513$as_echo "$ac_res" >&6; }
2514  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516} # ac_fn_cxx_check_func
2517
2518# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2519# -------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_c_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval \${$3+:} false; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_c_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546
2547} # ac_fn_c_check_header_compile
2548cat >config.log <<_ACEOF
2549This file contains any messages produced by compilers while
2550running configure, to aid debugging if configure makes a mistake.
2551
2552It was created by OpenJDK $as_me jdk8, which was
2553generated by GNU Autoconf 2.68.  Invocation command line was
2554
2555  $ $0 $@
2556
2557_ACEOF
2558exec 5>>config.log
2559{
2560cat <<_ASUNAME
2561## --------- ##
2562## Platform. ##
2563## --------- ##
2564
2565hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2566uname -m = `(uname -m) 2>/dev/null || echo unknown`
2567uname -r = `(uname -r) 2>/dev/null || echo unknown`
2568uname -s = `(uname -s) 2>/dev/null || echo unknown`
2569uname -v = `(uname -v) 2>/dev/null || echo unknown`
2570
2571/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2572/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2573
2574/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2575/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2576/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2577/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2578/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2579/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2580/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2581
2582_ASUNAME
2583
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587  IFS=$as_save_IFS
2588  test -z "$as_dir" && as_dir=.
2589    $as_echo "PATH: $as_dir"
2590  done
2591IFS=$as_save_IFS
2592
2593} >&5
2594
2595cat >&5 <<_ACEOF
2596
2597
2598## ----------- ##
2599## Core tests. ##
2600## ----------- ##
2601
2602_ACEOF
2603
2604
2605# Keep a trace of the command line.
2606# Strip out --no-create and --no-recursion so they do not pile up.
2607# Strip out --silent because we don't want to record it for future runs.
2608# Also quote any args containing shell meta-characters.
2609# Make two passes to allow for proper duplicate-argument suppression.
2610ac_configure_args=
2611ac_configure_args0=
2612ac_configure_args1=
2613ac_must_keep_next=false
2614for ac_pass in 1 2
2615do
2616  for ac_arg
2617  do
2618    case $ac_arg in
2619    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2620    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2621    | -silent | --silent | --silen | --sile | --sil)
2622      continue ;;
2623    *\'*)
2624      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2625    esac
2626    case $ac_pass in
2627    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2628    2)
2629      as_fn_append ac_configure_args1 " '$ac_arg'"
2630      if test $ac_must_keep_next = true; then
2631	ac_must_keep_next=false # Got value, back to normal.
2632      else
2633	case $ac_arg in
2634	  *=* | --config-cache | -C | -disable-* | --disable-* \
2635	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2636	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2637	  | -with-* | --with-* | -without-* | --without-* | --x)
2638	    case "$ac_configure_args0 " in
2639	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2640	    esac
2641	    ;;
2642	  -* ) ac_must_keep_next=true ;;
2643	esac
2644      fi
2645      as_fn_append ac_configure_args " '$ac_arg'"
2646      ;;
2647    esac
2648  done
2649done
2650{ ac_configure_args0=; unset ac_configure_args0;}
2651{ ac_configure_args1=; unset ac_configure_args1;}
2652
2653# When interrupted or exit'd, cleanup temporary files, and complete
2654# config.log.  We remove comments because anyway the quotes in there
2655# would cause problems or look ugly.
2656# WARNING: Use '\'' to represent an apostrophe within the trap.
2657# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2658trap 'exit_status=$?
2659  # Save into config.log some information that might help in debugging.
2660  {
2661    echo
2662
2663    $as_echo "## ---------------- ##
2664## Cache variables. ##
2665## ---------------- ##"
2666    echo
2667    # The following way of writing the cache mishandles newlines in values,
2668(
2669  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2670    eval ac_val=\$$ac_var
2671    case $ac_val in #(
2672    *${as_nl}*)
2673      case $ac_var in #(
2674      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2675$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2676      esac
2677      case $ac_var in #(
2678      _ | IFS | as_nl) ;; #(
2679      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2680      *) { eval $ac_var=; unset $ac_var;} ;;
2681      esac ;;
2682    esac
2683  done
2684  (set) 2>&1 |
2685    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2686    *${as_nl}ac_space=\ *)
2687      sed -n \
2688	"s/'\''/'\''\\\\'\'''\''/g;
2689	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2690      ;; #(
2691    *)
2692      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2693      ;;
2694    esac |
2695    sort
2696)
2697    echo
2698
2699    $as_echo "## ----------------- ##
2700## Output variables. ##
2701## ----------------- ##"
2702    echo
2703    for ac_var in $ac_subst_vars
2704    do
2705      eval ac_val=\$$ac_var
2706      case $ac_val in
2707      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2708      esac
2709      $as_echo "$ac_var='\''$ac_val'\''"
2710    done | sort
2711    echo
2712
2713    if test -n "$ac_subst_files"; then
2714      $as_echo "## ------------------- ##
2715## File substitutions. ##
2716## ------------------- ##"
2717      echo
2718      for ac_var in $ac_subst_files
2719      do
2720	eval ac_val=\$$ac_var
2721	case $ac_val in
2722	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2723	esac
2724	$as_echo "$ac_var='\''$ac_val'\''"
2725      done | sort
2726      echo
2727    fi
2728
2729    if test -s confdefs.h; then
2730      $as_echo "## ----------- ##
2731## confdefs.h. ##
2732## ----------- ##"
2733      echo
2734      cat confdefs.h
2735      echo
2736    fi
2737    test "$ac_signal" != 0 &&
2738      $as_echo "$as_me: caught signal $ac_signal"
2739    $as_echo "$as_me: exit $exit_status"
2740  } >&5
2741  rm -f core *.core core.conftest.* &&
2742    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2743    exit $exit_status
2744' 0
2745for ac_signal in 1 2 13 15; do
2746  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2747done
2748ac_signal=0
2749
2750# confdefs.h avoids OS command line length limits that DEFS can exceed.
2751rm -f -r conftest* confdefs.h
2752
2753$as_echo "/* confdefs.h */" > confdefs.h
2754
2755# Predefined preprocessor variables.
2756
2757cat >>confdefs.h <<_ACEOF
2758#define PACKAGE_NAME "$PACKAGE_NAME"
2759_ACEOF
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_VERSION "$PACKAGE_VERSION"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_STRING "$PACKAGE_STRING"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_URL "$PACKAGE_URL"
2779_ACEOF
2780
2781
2782# Let the site file select an alternate cache file if it wants to.
2783# Prefer an explicitly selected file to automatically selected ones.
2784ac_site_file1=NONE
2785ac_site_file2=NONE
2786if test -n "$CONFIG_SITE"; then
2787  # We do not want a PATH search for config.site.
2788  case $CONFIG_SITE in #((
2789    -*)  ac_site_file1=./$CONFIG_SITE;;
2790    */*) ac_site_file1=$CONFIG_SITE;;
2791    *)   ac_site_file1=./$CONFIG_SITE;;
2792  esac
2793elif test "x$prefix" != xNONE; then
2794  ac_site_file1=$prefix/share/config.site
2795  ac_site_file2=$prefix/etc/config.site
2796else
2797  ac_site_file1=$ac_default_prefix/share/config.site
2798  ac_site_file2=$ac_default_prefix/etc/config.site
2799fi
2800for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2801do
2802  test "x$ac_site_file" = xNONE && continue
2803  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2804    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2805$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2806    sed 's/^/| /' "$ac_site_file" >&5
2807    . "$ac_site_file" \
2808      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2810as_fn_error $? "failed to load site script $ac_site_file
2811See \`config.log' for more details" "$LINENO" 5; }
2812  fi
2813done
2814
2815if test -r "$cache_file"; then
2816  # Some versions of bash will fail to source /dev/null (special files
2817  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2818  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2819    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2820$as_echo "$as_me: loading cache $cache_file" >&6;}
2821    case $cache_file in
2822      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2823      *)                      . "./$cache_file";;
2824    esac
2825  fi
2826else
2827  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2828$as_echo "$as_me: creating cache $cache_file" >&6;}
2829  >$cache_file
2830fi
2831
2832# Check that the precious variables saved in the cache have kept the same
2833# value.
2834ac_cache_corrupted=false
2835for ac_var in $ac_precious_vars; do
2836  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2837  eval ac_new_set=\$ac_env_${ac_var}_set
2838  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2839  eval ac_new_val=\$ac_env_${ac_var}_value
2840  case $ac_old_set,$ac_new_set in
2841    set,)
2842      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2843$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2844      ac_cache_corrupted=: ;;
2845    ,set)
2846      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2847$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2848      ac_cache_corrupted=: ;;
2849    ,);;
2850    *)
2851      if test "x$ac_old_val" != "x$ac_new_val"; then
2852	# differences in whitespace do not lead to failure.
2853	ac_old_val_w=`echo x $ac_old_val`
2854	ac_new_val_w=`echo x $ac_new_val`
2855	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2856	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2857$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2858	  ac_cache_corrupted=:
2859	else
2860	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2861$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2862	  eval $ac_var=\$ac_old_val
2863	fi
2864	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2865$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2866	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2867$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2868      fi;;
2869  esac
2870  # Pass precious variables to config.status.
2871  if test "$ac_new_set" = set; then
2872    case $ac_new_val in
2873    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2874    *) ac_arg=$ac_var=$ac_new_val ;;
2875    esac
2876    case " $ac_configure_args " in
2877      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2878      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2879    esac
2880  fi
2881done
2882if $ac_cache_corrupted; then
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2885  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2886$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2887  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2888fi
2889## -------------------- ##
2890## Main body of script. ##
2891## -------------------- ##
2892
2893ac_ext=c
2894ac_cpp='$CPP $CPPFLAGS'
2895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898
2899
2900
2901ac_aux_dir=
2902for ac_dir in build-aux "$srcdir"/build-aux; do
2903  if test -f "$ac_dir/install-sh"; then
2904    ac_aux_dir=$ac_dir
2905    ac_install_sh="$ac_aux_dir/install-sh -c"
2906    break
2907  elif test -f "$ac_dir/install.sh"; then
2908    ac_aux_dir=$ac_dir
2909    ac_install_sh="$ac_aux_dir/install.sh -c"
2910    break
2911  elif test -f "$ac_dir/shtool"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/shtool install -c"
2914    break
2915  fi
2916done
2917if test -z "$ac_aux_dir"; then
2918  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2919fi
2920
2921# These three variables are undocumented and unsupported,
2922# and are intended to be withdrawn in a future Autoconf release.
2923# They can cause serious problems if a builder's source tree is in a directory
2924# whose full name contains unusual characters.
2925ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2926ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2927ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2928
2929
2930# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2931#
2932# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2933#
2934# This program is free software; you can redistribute it and/or modify
2935# it under the terms of the GNU General Public License as published by
2936# the Free Software Foundation; either version 2 of the License, or
2937# (at your option) any later version.
2938#
2939# This program is distributed in the hope that it will be useful, but
2940# WITHOUT ANY WARRANTY; without even the implied warranty of
2941# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2942# General Public License for more details.
2943#
2944# You should have received a copy of the GNU General Public License
2945# along with this program; if not, write to the Free Software
2946# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2947#
2948# As a special exception to the GNU General Public License, if you
2949# distribute this file as part of a program that contains a
2950# configuration script generated by Autoconf, you may include it under
2951# the same distribution terms that you use for the rest of that program.
2952
2953# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2954# ----------------------------------
2955# PKG_PROG_PKG_CONFIG
2956
2957# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2958#
2959# Check to see whether a particular set of modules exists.  Similar
2960# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2961#
2962#
2963# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2964# this or PKG_CHECK_MODULES is called, or make sure to call
2965# PKG_CHECK_EXISTS manually
2966# --------------------------------------------------------------
2967
2968
2969
2970# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2971# ---------------------------------------------
2972# _PKG_CONFIG
2973
2974# _PKG_SHORT_ERRORS_SUPPORTED
2975# -----------------------------
2976# _PKG_SHORT_ERRORS_SUPPORTED
2977
2978
2979# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2980# [ACTION-IF-NOT-FOUND])
2981#
2982#
2983# Note that if there is a possibility the first call to
2984# PKG_CHECK_MODULES might not happen, you should be sure to include an
2985# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2986#
2987#
2988# --------------------------------------------------------------
2989# PKG_CHECK_MODULES
2990
2991
2992# Include these first...
2993#
2994# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2996#
2997# This code is free software; you can redistribute it and/or modify it
2998# under the terms of the GNU General Public License version 2 only, as
2999# published by the Free Software Foundation.  Oracle designates this
3000# particular file as subject to the "Classpath" exception as provided
3001# by Oracle in the LICENSE file that accompanied this code.
3002#
3003# This code is distributed in the hope that it will be useful, but WITHOUT
3004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3006# version 2 for more details (a copy is included in the LICENSE file that
3007# accompanied this code).
3008#
3009# You should have received a copy of the GNU General Public License version
3010# 2 along with this work; if not, write to the Free Software Foundation,
3011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3012#
3013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3014# or visit www.oracle.com if you need additional information or have any
3015# questions.
3016#
3017
3018
3019
3020# This will make sure the given variable points to a full and proper
3021# path. This means:
3022# 1) There will be no spaces in the path. On posix platforms,
3023#    spaces in the path will result in an error. On Windows,
3024#    the path will be rewritten using short-style to be space-free.
3025# 2) The path will be absolute, and it will be in unix-style (on
3026#     cygwin).
3027# $1: The name of the variable to fix
3028
3029
3030# This will make sure the given variable points to a executable
3031# with a full and proper path. This means:
3032# 1) There will be no spaces in the path. On posix platforms,
3033#    spaces in the path will result in an error. On Windows,
3034#    the path will be rewritten using short-style to be space-free.
3035# 2) The path will be absolute, and it will be in unix-style (on
3036#     cygwin).
3037# Any arguments given to the executable is preserved.
3038# If the input variable does not have a directory specification, then
3039# it need to be in the PATH.
3040# $1: The name of the variable to fix
3041
3042
3043
3044
3045
3046
3047# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3048# $1: variable to check
3049# $2: executable name to print in warning (optional)
3050
3051
3052# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3053# Arguments as AC_PATH_PROG:
3054# $1: variable to set
3055# $2: executable name to look for
3056
3057
3058# Setup the most fundamental tools that relies on not much else to set up,
3059# but is used by much of the early bootstrap code.
3060
3061
3062# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3063
3064
3065
3066
3067
3068
3069
3070#%%% Simple tools %%%
3071
3072# Check if we have found a usable version of make
3073# $1: the path to a potential make binary (or empty)
3074# $2: the description on how we found this
3075
3076
3077# Goes looking for a usable version of GNU make.
3078
3079
3080
3081
3082
3083
3084# Check if build directory is on local disk. If not possible to determine,
3085# we prefer to claim it's local.
3086# Argument 1: directory to test
3087# Argument 2: what to do if it is on local disk
3088# Argument 3: what to do otherwise (remote disk or failure)
3089
3090
3091
3092
3093#
3094# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3095# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3096#
3097# This code is free software; you can redistribute it and/or modify it
3098# under the terms of the GNU General Public License version 2 only, as
3099# published by the Free Software Foundation.  Oracle designates this
3100# particular file as subject to the "Classpath" exception as provided
3101# by Oracle in the LICENSE file that accompanied this code.
3102#
3103# This code is distributed in the hope that it will be useful, but WITHOUT
3104# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3105# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3106# version 2 for more details (a copy is included in the LICENSE file that
3107# accompanied this code).
3108#
3109# You should have received a copy of the GNU General Public License version
3110# 2 along with this work; if not, write to the Free Software Foundation,
3111# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3112#
3113# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3114# or visit www.oracle.com if you need additional information or have any
3115# questions.
3116#
3117
3118
3119
3120
3121
3122# Helper function which possibly converts a path using DOS-style short mode.
3123# If so, the updated path is stored in $new_path.
3124# $1: The path to check
3125
3126
3127# Helper function which possibly converts a path using DOS-style short mode.
3128# If so, the updated path is stored in $new_path.
3129# $1: The path to check
3130
3131
3132# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3133# and could probably be heavily simplified. However, all changes in this
3134# area tend to need lot of testing in different scenarios, and in lack of
3135# proper unit testing, cleaning this up has not been deemed worth the effort
3136# at the moment.
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3147
3148
3149
3150
3151#
3152# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3153# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3154#
3155# This code is free software; you can redistribute it and/or modify it
3156# under the terms of the GNU General Public License version 2 only, as
3157# published by the Free Software Foundation.  Oracle designates this
3158# particular file as subject to the "Classpath" exception as provided
3159# by Oracle in the LICENSE file that accompanied this code.
3160#
3161# This code is distributed in the hope that it will be useful, but WITHOUT
3162# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3163# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3164# version 2 for more details (a copy is included in the LICENSE file that
3165# accompanied this code).
3166#
3167# You should have received a copy of the GNU General Public License version
3168# 2 along with this work; if not, write to the Free Software Foundation,
3169# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3170#
3171# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3172# or visit www.oracle.com if you need additional information or have any
3173# questions.
3174#
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186# ... then the rest
3187#
3188# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3189# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3190#
3191# This code is free software; you can redistribute it and/or modify it
3192# under the terms of the GNU General Public License version 2 only, as
3193# published by the Free Software Foundation.  Oracle designates this
3194# particular file as subject to the "Classpath" exception as provided
3195# by Oracle in the LICENSE file that accompanied this code.
3196#
3197# This code is distributed in the hope that it will be useful, but WITHOUT
3198# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3199# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3200# version 2 for more details (a copy is included in the LICENSE file that
3201# accompanied this code).
3202#
3203# You should have received a copy of the GNU General Public License version
3204# 2 along with this work; if not, write to the Free Software Foundation,
3205# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3206#
3207# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3208# or visit www.oracle.com if you need additional information or have any
3209# questions.
3210#
3211
3212# Execute the check given as argument, and verify the result
3213# If the Boot JDK was previously found, do nothing
3214# $1 A command line (typically autoconf macro) to execute
3215
3216
3217# Test: Is bootjdk explicitely set by command line arguments?
3218
3219
3220# Test: Is bootjdk available from builddeps?
3221
3222
3223# Test: Is $JAVA_HOME set?
3224
3225
3226# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3227
3228
3229# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3230
3231
3232# Look for a jdk in the given path. If there are multiple, try to select the newest.
3233# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3234# $1 = Path to directory containing jdk installations.
3235# $2 = String to append to the found JDK directory to get the proper JDK home
3236
3237
3238# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3239# environmental variable as base for where to look.
3240# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3241
3242
3243# Test: Is there a JDK installed in default, well-known locations?
3244
3245
3246# Check that a command-line tool in the Boot JDK is correct
3247# $1 = name of variable to assign
3248# $2 = name of binary
3249
3250
3251###############################################################################
3252#
3253# We need a Boot JDK to bootstrap the build.
3254#
3255
3256
3257
3258
3259
3260#
3261# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3262# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3263#
3264# This code is free software; you can redistribute it and/or modify it
3265# under the terms of the GNU General Public License version 2 only, as
3266# published by the Free Software Foundation.  Oracle designates this
3267# particular file as subject to the "Classpath" exception as provided
3268# by Oracle in the LICENSE file that accompanied this code.
3269#
3270# This code is distributed in the hope that it will be useful, but WITHOUT
3271# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3272# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3273# version 2 for more details (a copy is included in the LICENSE file that
3274# accompanied this code).
3275#
3276# You should have received a copy of the GNU General Public License version
3277# 2 along with this work; if not, write to the Free Software Foundation,
3278# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3279#
3280# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3281# or visit www.oracle.com if you need additional information or have any
3282# questions.
3283#
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302#
3303# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3304# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3305#
3306# This code is free software; you can redistribute it and/or modify it
3307# under the terms of the GNU General Public License version 2 only, as
3308# published by the Free Software Foundation.  Oracle designates this
3309# particular file as subject to the "Classpath" exception as provided
3310# by Oracle in the LICENSE file that accompanied this code.
3311#
3312# This code is distributed in the hope that it will be useful, but WITHOUT
3313# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3314# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3315# version 2 for more details (a copy is included in the LICENSE file that
3316# accompanied this code).
3317#
3318# You should have received a copy of the GNU General Public License version
3319# 2 along with this work; if not, write to the Free Software Foundation,
3320# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3321#
3322# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3323# or visit www.oracle.com if you need additional information or have any
3324# questions.
3325#
3326
3327
3328
3329
3330
3331cygwin_help() {
3332    case $1 in
3333    unzip)
3334        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3335    zip)
3336        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3337    make)
3338        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3339    * )
3340       break ;;
3341    esac
3342}
3343
3344apt_help() {
3345    case $1 in
3346    devkit)
3347        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3348    openjdk)
3349        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3350    alsa)
3351        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3352    cups)
3353        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3354    freetype2)
3355        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3356    pulse)
3357        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3358    x11)
3359        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3360    ccache)
3361        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3362    * )
3363       break ;;
3364    esac
3365}
3366
3367yum_help() {
3368    case $1 in
3369    devkit)
3370        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3371    openjdk)
3372        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3373    alsa)
3374        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3375    cups)
3376        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3377    freetype2)
3378        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3379    pulse)
3380        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3381    x11)
3382        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3383    ccache)
3384        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3385    * )
3386       break ;;
3387    esac
3388}
3389
3390port_help() {
3391    PKGHANDLER_COMMAND=""
3392}
3393
3394pkgutil_help() {
3395    PKGHANDLER_COMMAND=""
3396}
3397
3398pkgadd_help() {
3399    PKGHANDLER_COMMAND=""
3400}
3401
3402
3403
3404#
3405# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3406# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3407#
3408# This code is free software; you can redistribute it and/or modify it
3409# under the terms of the GNU General Public License version 2 only, as
3410# published by the Free Software Foundation.  Oracle designates this
3411# particular file as subject to the "Classpath" exception as provided
3412# by Oracle in the LICENSE file that accompanied this code.
3413#
3414# This code is distributed in the hope that it will be useful, but WITHOUT
3415# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3416# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3417# version 2 for more details (a copy is included in the LICENSE file that
3418# accompanied this code).
3419#
3420# You should have received a copy of the GNU General Public License version
3421# 2 along with this work; if not, write to the Free Software Foundation,
3422# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3423#
3424# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3425# or visit www.oracle.com if you need additional information or have any
3426# questions.
3427#
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443# Support for customization of the build process. Some build files
3444# will include counterparts from this location, if they exist. This allows
3445# for a degree of customization of the build targets and the rules/recipes
3446# to create them
3447
3448# Check whether --with-custom-make-dir was given.
3449if test "${with_custom_make_dir+set}" = set; then :
3450  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3451fi
3452
3453
3454
3455#
3456# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3457# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3458#
3459# This code is free software; you can redistribute it and/or modify it
3460# under the terms of the GNU General Public License version 2 only, as
3461# published by the Free Software Foundation.  Oracle designates this
3462# particular file as subject to the "Classpath" exception as provided
3463# by Oracle in the LICENSE file that accompanied this code.
3464#
3465# This code is distributed in the hope that it will be useful, but WITHOUT
3466# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3467# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3468# version 2 for more details (a copy is included in the LICENSE file that
3469# accompanied this code).
3470#
3471# You should have received a copy of the GNU General Public License version
3472# 2 along with this work; if not, write to the Free Software Foundation,
3473# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3474#
3475# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3476# or visit www.oracle.com if you need additional information or have any
3477# questions.
3478#
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494#
3495# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3496# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3497#
3498# This code is free software; you can redistribute it and/or modify it
3499# under the terms of the GNU General Public License version 2 only, as
3500# published by the Free Software Foundation.  Oracle designates this
3501# particular file as subject to the "Classpath" exception as provided
3502# by Oracle in the LICENSE file that accompanied this code.
3503#
3504# This code is distributed in the hope that it will be useful, but WITHOUT
3505# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3506# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3507# version 2 for more details (a copy is included in the LICENSE file that
3508# accompanied this code).
3509#
3510# You should have received a copy of the GNU General Public License version
3511# 2 along with this work; if not, write to the Free Software Foundation,
3512# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3513#
3514# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3515# or visit www.oracle.com if you need additional information or have any
3516# questions.
3517#
3518
3519# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3520# Converts autoconf style CPU name to OpenJDK style, into
3521# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3522
3523
3524# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3525# Converts autoconf style OS name to OpenJDK style, into
3526# VAR_OS and VAR_OS_API.
3527
3528
3529# Expects $host_os $host_cpu $build_os and $build_cpu
3530# and $with_target_bits to have been setup!
3531#
3532# Translate the standard triplet(quadruplet) definition
3533# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3534# OPENJDK_BUILD_OS, etc.
3535
3536
3537# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3538# accordingly. Must be done after setting up build and target system, but before
3539# doing anything else with these values.
3540
3541
3542    # Setup the legacy variables, for controlling the old makefiles.
3543    #
3544
3545
3546
3547
3548#%%% Build and target systems %%%
3549
3550
3551
3552
3553# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3554# Add -mX to various FLAGS variables.
3555
3556
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# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3596#
3597# This code is free software; you can redistribute it and/or modify it
3598# under the terms of the GNU General Public License version 2 only, as
3599# published by the Free Software Foundation.  Oracle designates this
3600# particular file as subject to the "Classpath" exception as provided
3601# by Oracle in the LICENSE file that accompanied this code.
3602#
3603# This code is distributed in the hope that it will be useful, but WITHOUT
3604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3606# version 2 for more details (a copy is included in the LICENSE file that
3607# accompanied this code).
3608#
3609# You should have received a copy of the GNU General Public License version
3610# 2 along with this work; if not, write to the Free Software Foundation,
3611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3612#
3613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3614# or visit www.oracle.com if you need additional information or have any
3615# questions.
3616#
3617
3618# $1 = compiler to test (CC or CXX)
3619# $2 = human readable name of compiler (C or C++)
3620
3621
3622
3623
3624
3625# $1 = compiler to test (CC or CXX)
3626# $2 = human readable name of compiler (C or C++)
3627# $3 = list of compiler names to search for
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640#
3641# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3642# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3643#
3644# This code is free software; you can redistribute it and/or modify it
3645# under the terms of the GNU General Public License version 2 only, as
3646# published by the Free Software Foundation.  Oracle designates this
3647# particular file as subject to the "Classpath" exception as provided
3648# by Oracle in the LICENSE file that accompanied this code.
3649#
3650# This code is distributed in the hope that it will be useful, but WITHOUT
3651# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3652# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3653# version 2 for more details (a copy is included in the LICENSE file that
3654# accompanied this code).
3655#
3656# You should have received a copy of the GNU General Public License version
3657# 2 along with this work; if not, write to the Free Software Foundation,
3658# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3659#
3660# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3661# or visit www.oracle.com if you need additional information or have any
3662# questions.
3663#
3664
3665
3666
3667
3668
3669
3670
3671# Check if the VS env variables were setup prior to running configure.
3672# If not, then find vcvarsall.bat and run it automatically, and integrate
3673# the set env variables into the spec file.
3674
3675
3676
3677
3678
3679
3680# This line needs to be here, verbatim, after all includes and the dummy hook
3681# definitions. It is replaced with custom functionality when building
3682# custom sources.
3683#CUSTOM_AUTOCONF_INCLUDE
3684
3685# Do not change or remove the following line, it is needed for consistency checks:
3686DATE_WHEN_GENERATED=1355963953
3687
3688###############################################################################
3689#
3690# Initialization / Boot-strapping
3691#
3692# The bootstrapping process needs to solve the "chicken or the egg" problem,
3693# thus it jumps back and forth, each time gaining something needed later on.
3694#
3695###############################################################################
3696
3697# Basic initialization that must happen first of all
3698
3699# Save the original command line. This is passed to us by the wrapper configure script.
3700
3701DATE_WHEN_CONFIGURED=`LANG=C date`
3702
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3704$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3706$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3707
3708
3709
3710# Start with tools that do not need have cross compilation support
3711# and can be expected to be found in the default PATH. These tools are
3712# used by configure. Nor are these tools expected to be found in the
3713# devkit from the builddeps server either, since they are
3714# needed to download the devkit.
3715
3716# First are all the simple required tools.
3717
3718    for ac_prog in basename
3719do
3720  # Extract the first word of "$ac_prog", so it can be a program name with args.
3721set dummy $ac_prog; ac_word=$2
3722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
3724if ${ac_cv_path_BASENAME+:} false; then :
3725  $as_echo_n "(cached) " >&6
3726else
3727  case $BASENAME in
3728  [\\/]* | ?:[\\/]*)
3729  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3730  ;;
3731  *)
3732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733for as_dir in $PATH
3734do
3735  IFS=$as_save_IFS
3736  test -z "$as_dir" && as_dir=.
3737    for ac_exec_ext in '' $ac_executable_extensions; do
3738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3739    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3741    break 2
3742  fi
3743done
3744  done
3745IFS=$as_save_IFS
3746
3747  ;;
3748esac
3749fi
3750BASENAME=$ac_cv_path_BASENAME
3751if test -n "$BASENAME"; then
3752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3753$as_echo "$BASENAME" >&6; }
3754else
3755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3756$as_echo "no" >&6; }
3757fi
3758
3759
3760  test -n "$BASENAME" && break
3761done
3762
3763
3764    if test "x$BASENAME" = x; then
3765        if test "xbasename" = x; then
3766          PROG_NAME=basename
3767        else
3768          PROG_NAME=basename
3769        fi
3770        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3771$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3772        as_fn_error $? "Cannot continue" "$LINENO" 5
3773    fi
3774
3775
3776
3777    for ac_prog in bash
3778do
3779  # Extract the first word of "$ac_prog", so it can be a program name with args.
3780set dummy $ac_prog; ac_word=$2
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3782$as_echo_n "checking for $ac_word... " >&6; }
3783if ${ac_cv_path_BASH+:} false; then :
3784  $as_echo_n "(cached) " >&6
3785else
3786  case $BASH in
3787  [\\/]* | ?:[\\/]*)
3788  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3789  ;;
3790  *)
3791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794  IFS=$as_save_IFS
3795  test -z "$as_dir" && as_dir=.
3796    for ac_exec_ext in '' $ac_executable_extensions; do
3797  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3798    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3800    break 2
3801  fi
3802done
3803  done
3804IFS=$as_save_IFS
3805
3806  ;;
3807esac
3808fi
3809BASH=$ac_cv_path_BASH
3810if test -n "$BASH"; then
3811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3812$as_echo "$BASH" >&6; }
3813else
3814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
3816fi
3817
3818
3819  test -n "$BASH" && break
3820done
3821
3822
3823    if test "x$BASH" = x; then
3824        if test "xbash" = x; then
3825          PROG_NAME=bash
3826        else
3827          PROG_NAME=bash
3828        fi
3829        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3830$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3831        as_fn_error $? "Cannot continue" "$LINENO" 5
3832    fi
3833
3834
3835
3836    for ac_prog in cat
3837do
3838  # Extract the first word of "$ac_prog", so it can be a program name with args.
3839set dummy $ac_prog; ac_word=$2
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3841$as_echo_n "checking for $ac_word... " >&6; }
3842if ${ac_cv_path_CAT+:} false; then :
3843  $as_echo_n "(cached) " >&6
3844else
3845  case $CAT in
3846  [\\/]* | ?:[\\/]*)
3847  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3848  ;;
3849  *)
3850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851for as_dir in $PATH
3852do
3853  IFS=$as_save_IFS
3854  test -z "$as_dir" && as_dir=.
3855    for ac_exec_ext in '' $ac_executable_extensions; do
3856  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3857    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3859    break 2
3860  fi
3861done
3862  done
3863IFS=$as_save_IFS
3864
3865  ;;
3866esac
3867fi
3868CAT=$ac_cv_path_CAT
3869if test -n "$CAT"; then
3870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3871$as_echo "$CAT" >&6; }
3872else
3873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874$as_echo "no" >&6; }
3875fi
3876
3877
3878  test -n "$CAT" && break
3879done
3880
3881
3882    if test "x$CAT" = x; then
3883        if test "xcat" = x; then
3884          PROG_NAME=cat
3885        else
3886          PROG_NAME=cat
3887        fi
3888        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3889$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3890        as_fn_error $? "Cannot continue" "$LINENO" 5
3891    fi
3892
3893
3894
3895    for ac_prog in chmod
3896do
3897  # Extract the first word of "$ac_prog", so it can be a program name with args.
3898set dummy $ac_prog; ac_word=$2
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900$as_echo_n "checking for $ac_word... " >&6; }
3901if ${ac_cv_path_CHMOD+:} false; then :
3902  $as_echo_n "(cached) " >&6
3903else
3904  case $CHMOD in
3905  [\\/]* | ?:[\\/]*)
3906  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3907  ;;
3908  *)
3909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3910for as_dir in $PATH
3911do
3912  IFS=$as_save_IFS
3913  test -z "$as_dir" && as_dir=.
3914    for ac_exec_ext in '' $ac_executable_extensions; do
3915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3916    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3918    break 2
3919  fi
3920done
3921  done
3922IFS=$as_save_IFS
3923
3924  ;;
3925esac
3926fi
3927CHMOD=$ac_cv_path_CHMOD
3928if test -n "$CHMOD"; then
3929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3930$as_echo "$CHMOD" >&6; }
3931else
3932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3933$as_echo "no" >&6; }
3934fi
3935
3936
3937  test -n "$CHMOD" && break
3938done
3939
3940
3941    if test "x$CHMOD" = x; then
3942        if test "xchmod" = x; then
3943          PROG_NAME=chmod
3944        else
3945          PROG_NAME=chmod
3946        fi
3947        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3948$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3949        as_fn_error $? "Cannot continue" "$LINENO" 5
3950    fi
3951
3952
3953
3954    for ac_prog in cmp
3955do
3956  # Extract the first word of "$ac_prog", so it can be a program name with args.
3957set dummy $ac_prog; ac_word=$2
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3959$as_echo_n "checking for $ac_word... " >&6; }
3960if ${ac_cv_path_CMP+:} false; then :
3961  $as_echo_n "(cached) " >&6
3962else
3963  case $CMP in
3964  [\\/]* | ?:[\\/]*)
3965  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3966  ;;
3967  *)
3968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3969for as_dir in $PATH
3970do
3971  IFS=$as_save_IFS
3972  test -z "$as_dir" && as_dir=.
3973    for ac_exec_ext in '' $ac_executable_extensions; do
3974  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3975    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3977    break 2
3978  fi
3979done
3980  done
3981IFS=$as_save_IFS
3982
3983  ;;
3984esac
3985fi
3986CMP=$ac_cv_path_CMP
3987if test -n "$CMP"; then
3988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3989$as_echo "$CMP" >&6; }
3990else
3991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993fi
3994
3995
3996  test -n "$CMP" && break
3997done
3998
3999
4000    if test "x$CMP" = x; then
4001        if test "xcmp" = x; then
4002          PROG_NAME=cmp
4003        else
4004          PROG_NAME=cmp
4005        fi
4006        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4007$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4008        as_fn_error $? "Cannot continue" "$LINENO" 5
4009    fi
4010
4011
4012
4013    for ac_prog in cp
4014do
4015  # Extract the first word of "$ac_prog", so it can be a program name with args.
4016set dummy $ac_prog; ac_word=$2
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4018$as_echo_n "checking for $ac_word... " >&6; }
4019if ${ac_cv_path_CP+:} false; then :
4020  $as_echo_n "(cached) " >&6
4021else
4022  case $CP in
4023  [\\/]* | ?:[\\/]*)
4024  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4025  ;;
4026  *)
4027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028for as_dir in $PATH
4029do
4030  IFS=$as_save_IFS
4031  test -z "$as_dir" && as_dir=.
4032    for ac_exec_ext in '' $ac_executable_extensions; do
4033  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4034    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4036    break 2
4037  fi
4038done
4039  done
4040IFS=$as_save_IFS
4041
4042  ;;
4043esac
4044fi
4045CP=$ac_cv_path_CP
4046if test -n "$CP"; then
4047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4048$as_echo "$CP" >&6; }
4049else
4050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051$as_echo "no" >&6; }
4052fi
4053
4054
4055  test -n "$CP" && break
4056done
4057
4058
4059    if test "x$CP" = x; then
4060        if test "xcp" = x; then
4061          PROG_NAME=cp
4062        else
4063          PROG_NAME=cp
4064        fi
4065        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4066$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4067        as_fn_error $? "Cannot continue" "$LINENO" 5
4068    fi
4069
4070
4071
4072    for ac_prog in cut
4073do
4074  # Extract the first word of "$ac_prog", so it can be a program name with args.
4075set dummy $ac_prog; ac_word=$2
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4077$as_echo_n "checking for $ac_word... " >&6; }
4078if ${ac_cv_path_CUT+:} false; then :
4079  $as_echo_n "(cached) " >&6
4080else
4081  case $CUT in
4082  [\\/]* | ?:[\\/]*)
4083  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4084  ;;
4085  *)
4086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087for as_dir in $PATH
4088do
4089  IFS=$as_save_IFS
4090  test -z "$as_dir" && as_dir=.
4091    for ac_exec_ext in '' $ac_executable_extensions; do
4092  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4093    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4095    break 2
4096  fi
4097done
4098  done
4099IFS=$as_save_IFS
4100
4101  ;;
4102esac
4103fi
4104CUT=$ac_cv_path_CUT
4105if test -n "$CUT"; then
4106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4107$as_echo "$CUT" >&6; }
4108else
4109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110$as_echo "no" >&6; }
4111fi
4112
4113
4114  test -n "$CUT" && break
4115done
4116
4117
4118    if test "x$CUT" = x; then
4119        if test "xcut" = x; then
4120          PROG_NAME=cut
4121        else
4122          PROG_NAME=cut
4123        fi
4124        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4125$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4126        as_fn_error $? "Cannot continue" "$LINENO" 5
4127    fi
4128
4129
4130
4131    for ac_prog in date
4132do
4133  # Extract the first word of "$ac_prog", so it can be a program name with args.
4134set dummy $ac_prog; ac_word=$2
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4136$as_echo_n "checking for $ac_word... " >&6; }
4137if ${ac_cv_path_DATE+:} false; then :
4138  $as_echo_n "(cached) " >&6
4139else
4140  case $DATE in
4141  [\\/]* | ?:[\\/]*)
4142  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4143  ;;
4144  *)
4145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4146for as_dir in $PATH
4147do
4148  IFS=$as_save_IFS
4149  test -z "$as_dir" && as_dir=.
4150    for ac_exec_ext in '' $ac_executable_extensions; do
4151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4152    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4154    break 2
4155  fi
4156done
4157  done
4158IFS=$as_save_IFS
4159
4160  ;;
4161esac
4162fi
4163DATE=$ac_cv_path_DATE
4164if test -n "$DATE"; then
4165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4166$as_echo "$DATE" >&6; }
4167else
4168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4169$as_echo "no" >&6; }
4170fi
4171
4172
4173  test -n "$DATE" && break
4174done
4175
4176
4177    if test "x$DATE" = x; then
4178        if test "xdate" = x; then
4179          PROG_NAME=date
4180        else
4181          PROG_NAME=date
4182        fi
4183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4184$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4185        as_fn_error $? "Cannot continue" "$LINENO" 5
4186    fi
4187
4188
4189
4190    for ac_prog in gdiff diff
4191do
4192  # Extract the first word of "$ac_prog", so it can be a program name with args.
4193set dummy $ac_prog; ac_word=$2
4194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4195$as_echo_n "checking for $ac_word... " >&6; }
4196if ${ac_cv_path_DIFF+:} false; then :
4197  $as_echo_n "(cached) " >&6
4198else
4199  case $DIFF in
4200  [\\/]* | ?:[\\/]*)
4201  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4202  ;;
4203  *)
4204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4205for as_dir in $PATH
4206do
4207  IFS=$as_save_IFS
4208  test -z "$as_dir" && as_dir=.
4209    for ac_exec_ext in '' $ac_executable_extensions; do
4210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4211    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4213    break 2
4214  fi
4215done
4216  done
4217IFS=$as_save_IFS
4218
4219  ;;
4220esac
4221fi
4222DIFF=$ac_cv_path_DIFF
4223if test -n "$DIFF"; then
4224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4225$as_echo "$DIFF" >&6; }
4226else
4227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4228$as_echo "no" >&6; }
4229fi
4230
4231
4232  test -n "$DIFF" && break
4233done
4234
4235
4236    if test "x$DIFF" = x; then
4237        if test "xgdiff diff" = x; then
4238          PROG_NAME=diff
4239        else
4240          PROG_NAME=gdiff diff
4241        fi
4242        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4243$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4244        as_fn_error $? "Cannot continue" "$LINENO" 5
4245    fi
4246
4247
4248
4249    for ac_prog in dirname
4250do
4251  # Extract the first word of "$ac_prog", so it can be a program name with args.
4252set dummy $ac_prog; ac_word=$2
4253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4254$as_echo_n "checking for $ac_word... " >&6; }
4255if ${ac_cv_path_DIRNAME+:} false; then :
4256  $as_echo_n "(cached) " >&6
4257else
4258  case $DIRNAME in
4259  [\\/]* | ?:[\\/]*)
4260  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4261  ;;
4262  *)
4263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4264for as_dir in $PATH
4265do
4266  IFS=$as_save_IFS
4267  test -z "$as_dir" && as_dir=.
4268    for ac_exec_ext in '' $ac_executable_extensions; do
4269  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4270    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4272    break 2
4273  fi
4274done
4275  done
4276IFS=$as_save_IFS
4277
4278  ;;
4279esac
4280fi
4281DIRNAME=$ac_cv_path_DIRNAME
4282if test -n "$DIRNAME"; then
4283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4284$as_echo "$DIRNAME" >&6; }
4285else
4286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4287$as_echo "no" >&6; }
4288fi
4289
4290
4291  test -n "$DIRNAME" && break
4292done
4293
4294
4295    if test "x$DIRNAME" = x; then
4296        if test "xdirname" = x; then
4297          PROG_NAME=dirname
4298        else
4299          PROG_NAME=dirname
4300        fi
4301        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4302$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4303        as_fn_error $? "Cannot continue" "$LINENO" 5
4304    fi
4305
4306
4307
4308    for ac_prog in echo
4309do
4310  # Extract the first word of "$ac_prog", so it can be a program name with args.
4311set dummy $ac_prog; ac_word=$2
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4313$as_echo_n "checking for $ac_word... " >&6; }
4314if ${ac_cv_path_ECHO+:} false; then :
4315  $as_echo_n "(cached) " >&6
4316else
4317  case $ECHO in
4318  [\\/]* | ?:[\\/]*)
4319  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4320  ;;
4321  *)
4322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4323for as_dir in $PATH
4324do
4325  IFS=$as_save_IFS
4326  test -z "$as_dir" && as_dir=.
4327    for ac_exec_ext in '' $ac_executable_extensions; do
4328  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4329    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4331    break 2
4332  fi
4333done
4334  done
4335IFS=$as_save_IFS
4336
4337  ;;
4338esac
4339fi
4340ECHO=$ac_cv_path_ECHO
4341if test -n "$ECHO"; then
4342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4343$as_echo "$ECHO" >&6; }
4344else
4345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4346$as_echo "no" >&6; }
4347fi
4348
4349
4350  test -n "$ECHO" && break
4351done
4352
4353
4354    if test "x$ECHO" = x; then
4355        if test "xecho" = x; then
4356          PROG_NAME=echo
4357        else
4358          PROG_NAME=echo
4359        fi
4360        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4361$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4362        as_fn_error $? "Cannot continue" "$LINENO" 5
4363    fi
4364
4365
4366
4367    for ac_prog in expr
4368do
4369  # Extract the first word of "$ac_prog", so it can be a program name with args.
4370set dummy $ac_prog; ac_word=$2
4371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372$as_echo_n "checking for $ac_word... " >&6; }
4373if ${ac_cv_path_EXPR+:} false; then :
4374  $as_echo_n "(cached) " >&6
4375else
4376  case $EXPR in
4377  [\\/]* | ?:[\\/]*)
4378  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4379  ;;
4380  *)
4381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4382for as_dir in $PATH
4383do
4384  IFS=$as_save_IFS
4385  test -z "$as_dir" && as_dir=.
4386    for ac_exec_ext in '' $ac_executable_extensions; do
4387  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4388    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4390    break 2
4391  fi
4392done
4393  done
4394IFS=$as_save_IFS
4395
4396  ;;
4397esac
4398fi
4399EXPR=$ac_cv_path_EXPR
4400if test -n "$EXPR"; then
4401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4402$as_echo "$EXPR" >&6; }
4403else
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4405$as_echo "no" >&6; }
4406fi
4407
4408
4409  test -n "$EXPR" && break
4410done
4411
4412
4413    if test "x$EXPR" = x; then
4414        if test "xexpr" = x; then
4415          PROG_NAME=expr
4416        else
4417          PROG_NAME=expr
4418        fi
4419        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4420$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4421        as_fn_error $? "Cannot continue" "$LINENO" 5
4422    fi
4423
4424
4425
4426    for ac_prog in file
4427do
4428  # Extract the first word of "$ac_prog", so it can be a program name with args.
4429set dummy $ac_prog; ac_word=$2
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
4432if ${ac_cv_path_FILE+:} false; then :
4433  $as_echo_n "(cached) " >&6
4434else
4435  case $FILE in
4436  [\\/]* | ?:[\\/]*)
4437  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4438  ;;
4439  *)
4440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443  IFS=$as_save_IFS
4444  test -z "$as_dir" && as_dir=.
4445    for ac_exec_ext in '' $ac_executable_extensions; do
4446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4447    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4449    break 2
4450  fi
4451done
4452  done
4453IFS=$as_save_IFS
4454
4455  ;;
4456esac
4457fi
4458FILE=$ac_cv_path_FILE
4459if test -n "$FILE"; then
4460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4461$as_echo "$FILE" >&6; }
4462else
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464$as_echo "no" >&6; }
4465fi
4466
4467
4468  test -n "$FILE" && break
4469done
4470
4471
4472    if test "x$FILE" = x; then
4473        if test "xfile" = x; then
4474          PROG_NAME=file
4475        else
4476          PROG_NAME=file
4477        fi
4478        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4479$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4480        as_fn_error $? "Cannot continue" "$LINENO" 5
4481    fi
4482
4483
4484
4485    for ac_prog in find
4486do
4487  # Extract the first word of "$ac_prog", so it can be a program name with args.
4488set dummy $ac_prog; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
4491if ${ac_cv_path_FIND+:} false; then :
4492  $as_echo_n "(cached) " >&6
4493else
4494  case $FIND in
4495  [\\/]* | ?:[\\/]*)
4496  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4497  ;;
4498  *)
4499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in $PATH
4501do
4502  IFS=$as_save_IFS
4503  test -z "$as_dir" && as_dir=.
4504    for ac_exec_ext in '' $ac_executable_extensions; do
4505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4506    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508    break 2
4509  fi
4510done
4511  done
4512IFS=$as_save_IFS
4513
4514  ;;
4515esac
4516fi
4517FIND=$ac_cv_path_FIND
4518if test -n "$FIND"; then
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4520$as_echo "$FIND" >&6; }
4521else
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
4524fi
4525
4526
4527  test -n "$FIND" && break
4528done
4529
4530
4531    if test "x$FIND" = x; then
4532        if test "xfind" = x; then
4533          PROG_NAME=find
4534        else
4535          PROG_NAME=find
4536        fi
4537        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4538$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4539        as_fn_error $? "Cannot continue" "$LINENO" 5
4540    fi
4541
4542
4543
4544    for ac_prog in head
4545do
4546  # Extract the first word of "$ac_prog", so it can be a program name with args.
4547set dummy $ac_prog; ac_word=$2
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4549$as_echo_n "checking for $ac_word... " >&6; }
4550if ${ac_cv_path_HEAD+:} false; then :
4551  $as_echo_n "(cached) " >&6
4552else
4553  case $HEAD in
4554  [\\/]* | ?:[\\/]*)
4555  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4556  ;;
4557  *)
4558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561  IFS=$as_save_IFS
4562  test -z "$as_dir" && as_dir=.
4563    for ac_exec_ext in '' $ac_executable_extensions; do
4564  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4565    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4567    break 2
4568  fi
4569done
4570  done
4571IFS=$as_save_IFS
4572
4573  ;;
4574esac
4575fi
4576HEAD=$ac_cv_path_HEAD
4577if test -n "$HEAD"; then
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4579$as_echo "$HEAD" >&6; }
4580else
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4582$as_echo "no" >&6; }
4583fi
4584
4585
4586  test -n "$HEAD" && break
4587done
4588
4589
4590    if test "x$HEAD" = x; then
4591        if test "xhead" = x; then
4592          PROG_NAME=head
4593        else
4594          PROG_NAME=head
4595        fi
4596        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4597$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4598        as_fn_error $? "Cannot continue" "$LINENO" 5
4599    fi
4600
4601
4602
4603    for ac_prog in ln
4604do
4605  # Extract the first word of "$ac_prog", so it can be a program name with args.
4606set dummy $ac_prog; ac_word=$2
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; }
4609if ${ac_cv_path_LN+:} false; then :
4610  $as_echo_n "(cached) " >&6
4611else
4612  case $LN in
4613  [\\/]* | ?:[\\/]*)
4614  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4615  ;;
4616  *)
4617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4618for as_dir in $PATH
4619do
4620  IFS=$as_save_IFS
4621  test -z "$as_dir" && as_dir=.
4622    for ac_exec_ext in '' $ac_executable_extensions; do
4623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4624    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4626    break 2
4627  fi
4628done
4629  done
4630IFS=$as_save_IFS
4631
4632  ;;
4633esac
4634fi
4635LN=$ac_cv_path_LN
4636if test -n "$LN"; then
4637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4638$as_echo "$LN" >&6; }
4639else
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
4642fi
4643
4644
4645  test -n "$LN" && break
4646done
4647
4648
4649    if test "x$LN" = x; then
4650        if test "xln" = x; then
4651          PROG_NAME=ln
4652        else
4653          PROG_NAME=ln
4654        fi
4655        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4656$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4657        as_fn_error $? "Cannot continue" "$LINENO" 5
4658    fi
4659
4660
4661
4662    for ac_prog in ls
4663do
4664  # Extract the first word of "$ac_prog", so it can be a program name with args.
4665set dummy $ac_prog; ac_word=$2
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
4668if ${ac_cv_path_LS+:} false; then :
4669  $as_echo_n "(cached) " >&6
4670else
4671  case $LS in
4672  [\\/]* | ?:[\\/]*)
4673  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4674  ;;
4675  *)
4676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in $PATH
4678do
4679  IFS=$as_save_IFS
4680  test -z "$as_dir" && as_dir=.
4681    for ac_exec_ext in '' $ac_executable_extensions; do
4682  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4683    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685    break 2
4686  fi
4687done
4688  done
4689IFS=$as_save_IFS
4690
4691  ;;
4692esac
4693fi
4694LS=$ac_cv_path_LS
4695if test -n "$LS"; then
4696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4697$as_echo "$LS" >&6; }
4698else
4699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703
4704  test -n "$LS" && break
4705done
4706
4707
4708    if test "x$LS" = x; then
4709        if test "xls" = x; then
4710          PROG_NAME=ls
4711        else
4712          PROG_NAME=ls
4713        fi
4714        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4715$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4716        as_fn_error $? "Cannot continue" "$LINENO" 5
4717    fi
4718
4719
4720
4721    for ac_prog in mkdir
4722do
4723  # Extract the first word of "$ac_prog", so it can be a program name with args.
4724set dummy $ac_prog; ac_word=$2
4725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4726$as_echo_n "checking for $ac_word... " >&6; }
4727if ${ac_cv_path_MKDIR+:} false; then :
4728  $as_echo_n "(cached) " >&6
4729else
4730  case $MKDIR in
4731  [\\/]* | ?:[\\/]*)
4732  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4733  ;;
4734  *)
4735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4736for as_dir in $PATH
4737do
4738  IFS=$as_save_IFS
4739  test -z "$as_dir" && as_dir=.
4740    for ac_exec_ext in '' $ac_executable_extensions; do
4741  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4742    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4744    break 2
4745  fi
4746done
4747  done
4748IFS=$as_save_IFS
4749
4750  ;;
4751esac
4752fi
4753MKDIR=$ac_cv_path_MKDIR
4754if test -n "$MKDIR"; then
4755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4756$as_echo "$MKDIR" >&6; }
4757else
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4759$as_echo "no" >&6; }
4760fi
4761
4762
4763  test -n "$MKDIR" && break
4764done
4765
4766
4767    if test "x$MKDIR" = x; then
4768        if test "xmkdir" = x; then
4769          PROG_NAME=mkdir
4770        else
4771          PROG_NAME=mkdir
4772        fi
4773        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4774$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4775        as_fn_error $? "Cannot continue" "$LINENO" 5
4776    fi
4777
4778
4779
4780    for ac_prog in mktemp
4781do
4782  # Extract the first word of "$ac_prog", so it can be a program name with args.
4783set dummy $ac_prog; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
4786if ${ac_cv_path_MKTEMP+:} false; then :
4787  $as_echo_n "(cached) " >&6
4788else
4789  case $MKTEMP in
4790  [\\/]* | ?:[\\/]*)
4791  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4792  ;;
4793  *)
4794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in $PATH
4796do
4797  IFS=$as_save_IFS
4798  test -z "$as_dir" && as_dir=.
4799    for ac_exec_ext in '' $ac_executable_extensions; do
4800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4801    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4803    break 2
4804  fi
4805done
4806  done
4807IFS=$as_save_IFS
4808
4809  ;;
4810esac
4811fi
4812MKTEMP=$ac_cv_path_MKTEMP
4813if test -n "$MKTEMP"; then
4814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4815$as_echo "$MKTEMP" >&6; }
4816else
4817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
4819fi
4820
4821
4822  test -n "$MKTEMP" && break
4823done
4824
4825
4826    if test "x$MKTEMP" = x; then
4827        if test "xmktemp" = x; then
4828          PROG_NAME=mktemp
4829        else
4830          PROG_NAME=mktemp
4831        fi
4832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4833$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4834        as_fn_error $? "Cannot continue" "$LINENO" 5
4835    fi
4836
4837
4838
4839    for ac_prog in mv
4840do
4841  # Extract the first word of "$ac_prog", so it can be a program name with args.
4842set dummy $ac_prog; ac_word=$2
4843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_MV+:} false; then :
4846  $as_echo_n "(cached) " >&6
4847else
4848  case $MV in
4849  [\\/]* | ?:[\\/]*)
4850  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4851  ;;
4852  *)
4853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in $PATH
4855do
4856  IFS=$as_save_IFS
4857  test -z "$as_dir" && as_dir=.
4858    for ac_exec_ext in '' $ac_executable_extensions; do
4859  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4860    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4862    break 2
4863  fi
4864done
4865  done
4866IFS=$as_save_IFS
4867
4868  ;;
4869esac
4870fi
4871MV=$ac_cv_path_MV
4872if test -n "$MV"; then
4873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4874$as_echo "$MV" >&6; }
4875else
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
4880
4881  test -n "$MV" && break
4882done
4883
4884
4885    if test "x$MV" = x; then
4886        if test "xmv" = x; then
4887          PROG_NAME=mv
4888        else
4889          PROG_NAME=mv
4890        fi
4891        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4892$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4893        as_fn_error $? "Cannot continue" "$LINENO" 5
4894    fi
4895
4896
4897
4898    for ac_prog in printf
4899do
4900  # Extract the first word of "$ac_prog", so it can be a program name with args.
4901set dummy $ac_prog; ac_word=$2
4902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903$as_echo_n "checking for $ac_word... " >&6; }
4904if ${ac_cv_path_PRINTF+:} false; then :
4905  $as_echo_n "(cached) " >&6
4906else
4907  case $PRINTF in
4908  [\\/]* | ?:[\\/]*)
4909  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4910  ;;
4911  *)
4912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4913for as_dir in $PATH
4914do
4915  IFS=$as_save_IFS
4916  test -z "$as_dir" && as_dir=.
4917    for ac_exec_ext in '' $ac_executable_extensions; do
4918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4919    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4921    break 2
4922  fi
4923done
4924  done
4925IFS=$as_save_IFS
4926
4927  ;;
4928esac
4929fi
4930PRINTF=$ac_cv_path_PRINTF
4931if test -n "$PRINTF"; then
4932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4933$as_echo "$PRINTF" >&6; }
4934else
4935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936$as_echo "no" >&6; }
4937fi
4938
4939
4940  test -n "$PRINTF" && break
4941done
4942
4943
4944    if test "x$PRINTF" = x; then
4945        if test "xprintf" = x; then
4946          PROG_NAME=printf
4947        else
4948          PROG_NAME=printf
4949        fi
4950        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4951$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4952        as_fn_error $? "Cannot continue" "$LINENO" 5
4953    fi
4954
4955
4956
4957    for ac_prog in pwd
4958do
4959  # Extract the first word of "$ac_prog", so it can be a program name with args.
4960set dummy $ac_prog; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_THEPWDCMD+:} false; then :
4964  $as_echo_n "(cached) " >&6
4965else
4966  case $THEPWDCMD in
4967  [\\/]* | ?:[\\/]*)
4968  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4969  ;;
4970  *)
4971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974  IFS=$as_save_IFS
4975  test -z "$as_dir" && as_dir=.
4976    for ac_exec_ext in '' $ac_executable_extensions; do
4977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4978    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980    break 2
4981  fi
4982done
4983  done
4984IFS=$as_save_IFS
4985
4986  ;;
4987esac
4988fi
4989THEPWDCMD=$ac_cv_path_THEPWDCMD
4990if test -n "$THEPWDCMD"; then
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4992$as_echo "$THEPWDCMD" >&6; }
4993else
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999  test -n "$THEPWDCMD" && break
5000done
5001
5002
5003    if test "x$THEPWDCMD" = x; then
5004        if test "xpwd" = x; then
5005          PROG_NAME=thepwdcmd
5006        else
5007          PROG_NAME=pwd
5008        fi
5009        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5010$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5011        as_fn_error $? "Cannot continue" "$LINENO" 5
5012    fi
5013
5014
5015
5016    for ac_prog in rm
5017do
5018  # Extract the first word of "$ac_prog", so it can be a program name with args.
5019set dummy $ac_prog; ac_word=$2
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
5022if ${ac_cv_path_RM+:} false; then :
5023  $as_echo_n "(cached) " >&6
5024else
5025  case $RM in
5026  [\\/]* | ?:[\\/]*)
5027  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5028  ;;
5029  *)
5030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033  IFS=$as_save_IFS
5034  test -z "$as_dir" && as_dir=.
5035    for ac_exec_ext in '' $ac_executable_extensions; do
5036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039    break 2
5040  fi
5041done
5042  done
5043IFS=$as_save_IFS
5044
5045  ;;
5046esac
5047fi
5048RM=$ac_cv_path_RM
5049if test -n "$RM"; then
5050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5051$as_echo "$RM" >&6; }
5052else
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
5055fi
5056
5057
5058  test -n "$RM" && break
5059done
5060
5061
5062    if test "x$RM" = x; then
5063        if test "xrm" = x; then
5064          PROG_NAME=rm
5065        else
5066          PROG_NAME=rm
5067        fi
5068        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5069$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5070        as_fn_error $? "Cannot continue" "$LINENO" 5
5071    fi
5072
5073
5074
5075    for ac_prog in sh
5076do
5077  # Extract the first word of "$ac_prog", so it can be a program name with args.
5078set dummy $ac_prog; ac_word=$2
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
5081if ${ac_cv_path_SH+:} false; then :
5082  $as_echo_n "(cached) " >&6
5083else
5084  case $SH in
5085  [\\/]* | ?:[\\/]*)
5086  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5087  ;;
5088  *)
5089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090for as_dir in $PATH
5091do
5092  IFS=$as_save_IFS
5093  test -z "$as_dir" && as_dir=.
5094    for ac_exec_ext in '' $ac_executable_extensions; do
5095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5096    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5098    break 2
5099  fi
5100done
5101  done
5102IFS=$as_save_IFS
5103
5104  ;;
5105esac
5106fi
5107SH=$ac_cv_path_SH
5108if test -n "$SH"; then
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5110$as_echo "$SH" >&6; }
5111else
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
5114fi
5115
5116
5117  test -n "$SH" && break
5118done
5119
5120
5121    if test "x$SH" = x; then
5122        if test "xsh" = x; then
5123          PROG_NAME=sh
5124        else
5125          PROG_NAME=sh
5126        fi
5127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5128$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5129        as_fn_error $? "Cannot continue" "$LINENO" 5
5130    fi
5131
5132
5133
5134    for ac_prog in sort
5135do
5136  # Extract the first word of "$ac_prog", so it can be a program name with args.
5137set dummy $ac_prog; ac_word=$2
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5139$as_echo_n "checking for $ac_word... " >&6; }
5140if ${ac_cv_path_SORT+:} false; then :
5141  $as_echo_n "(cached) " >&6
5142else
5143  case $SORT in
5144  [\\/]* | ?:[\\/]*)
5145  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5146  ;;
5147  *)
5148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5149for as_dir in $PATH
5150do
5151  IFS=$as_save_IFS
5152  test -z "$as_dir" && as_dir=.
5153    for ac_exec_ext in '' $ac_executable_extensions; do
5154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5155    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5157    break 2
5158  fi
5159done
5160  done
5161IFS=$as_save_IFS
5162
5163  ;;
5164esac
5165fi
5166SORT=$ac_cv_path_SORT
5167if test -n "$SORT"; then
5168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5169$as_echo "$SORT" >&6; }
5170else
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
5173fi
5174
5175
5176  test -n "$SORT" && break
5177done
5178
5179
5180    if test "x$SORT" = x; then
5181        if test "xsort" = x; then
5182          PROG_NAME=sort
5183        else
5184          PROG_NAME=sort
5185        fi
5186        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5187$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5188        as_fn_error $? "Cannot continue" "$LINENO" 5
5189    fi
5190
5191
5192
5193    for ac_prog in tail
5194do
5195  # Extract the first word of "$ac_prog", so it can be a program name with args.
5196set dummy $ac_prog; ac_word=$2
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5198$as_echo_n "checking for $ac_word... " >&6; }
5199if ${ac_cv_path_TAIL+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $TAIL in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5205  ;;
5206  *)
5207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210  IFS=$as_save_IFS
5211  test -z "$as_dir" && as_dir=.
5212    for ac_exec_ext in '' $ac_executable_extensions; do
5213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5214    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5216    break 2
5217  fi
5218done
5219  done
5220IFS=$as_save_IFS
5221
5222  ;;
5223esac
5224fi
5225TAIL=$ac_cv_path_TAIL
5226if test -n "$TAIL"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5228$as_echo "$TAIL" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235  test -n "$TAIL" && break
5236done
5237
5238
5239    if test "x$TAIL" = x; then
5240        if test "xtail" = x; then
5241          PROG_NAME=tail
5242        else
5243          PROG_NAME=tail
5244        fi
5245        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5246$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5247        as_fn_error $? "Cannot continue" "$LINENO" 5
5248    fi
5249
5250
5251
5252    for ac_prog in tar
5253do
5254  # Extract the first word of "$ac_prog", so it can be a program name with args.
5255set dummy $ac_prog; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257$as_echo_n "checking for $ac_word... " >&6; }
5258if ${ac_cv_path_TAR+:} false; then :
5259  $as_echo_n "(cached) " >&6
5260else
5261  case $TAR in
5262  [\\/]* | ?:[\\/]*)
5263  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5264  ;;
5265  *)
5266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269  IFS=$as_save_IFS
5270  test -z "$as_dir" && as_dir=.
5271    for ac_exec_ext in '' $ac_executable_extensions; do
5272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5273    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275    break 2
5276  fi
5277done
5278  done
5279IFS=$as_save_IFS
5280
5281  ;;
5282esac
5283fi
5284TAR=$ac_cv_path_TAR
5285if test -n "$TAR"; then
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5287$as_echo "$TAR" >&6; }
5288else
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
5294  test -n "$TAR" && break
5295done
5296
5297
5298    if test "x$TAR" = x; then
5299        if test "xtar" = x; then
5300          PROG_NAME=tar
5301        else
5302          PROG_NAME=tar
5303        fi
5304        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5305$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5306        as_fn_error $? "Cannot continue" "$LINENO" 5
5307    fi
5308
5309
5310
5311    for ac_prog in tee
5312do
5313  # Extract the first word of "$ac_prog", so it can be a program name with args.
5314set dummy $ac_prog; ac_word=$2
5315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316$as_echo_n "checking for $ac_word... " >&6; }
5317if ${ac_cv_path_TEE+:} false; then :
5318  $as_echo_n "(cached) " >&6
5319else
5320  case $TEE in
5321  [\\/]* | ?:[\\/]*)
5322  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5323  ;;
5324  *)
5325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326for as_dir in $PATH
5327do
5328  IFS=$as_save_IFS
5329  test -z "$as_dir" && as_dir=.
5330    for ac_exec_ext in '' $ac_executable_extensions; do
5331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5332    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334    break 2
5335  fi
5336done
5337  done
5338IFS=$as_save_IFS
5339
5340  ;;
5341esac
5342fi
5343TEE=$ac_cv_path_TEE
5344if test -n "$TEE"; then
5345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5346$as_echo "$TEE" >&6; }
5347else
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349$as_echo "no" >&6; }
5350fi
5351
5352
5353  test -n "$TEE" && break
5354done
5355
5356
5357    if test "x$TEE" = x; then
5358        if test "xtee" = x; then
5359          PROG_NAME=tee
5360        else
5361          PROG_NAME=tee
5362        fi
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5365        as_fn_error $? "Cannot continue" "$LINENO" 5
5366    fi
5367
5368
5369
5370    for ac_prog in touch
5371do
5372  # Extract the first word of "$ac_prog", so it can be a program name with args.
5373set dummy $ac_prog; ac_word=$2
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5375$as_echo_n "checking for $ac_word... " >&6; }
5376if ${ac_cv_path_TOUCH+:} false; then :
5377  $as_echo_n "(cached) " >&6
5378else
5379  case $TOUCH in
5380  [\\/]* | ?:[\\/]*)
5381  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5382  ;;
5383  *)
5384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385for as_dir in $PATH
5386do
5387  IFS=$as_save_IFS
5388  test -z "$as_dir" && as_dir=.
5389    for ac_exec_ext in '' $ac_executable_extensions; do
5390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5391    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5393    break 2
5394  fi
5395done
5396  done
5397IFS=$as_save_IFS
5398
5399  ;;
5400esac
5401fi
5402TOUCH=$ac_cv_path_TOUCH
5403if test -n "$TOUCH"; then
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5405$as_echo "$TOUCH" >&6; }
5406else
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408$as_echo "no" >&6; }
5409fi
5410
5411
5412  test -n "$TOUCH" && break
5413done
5414
5415
5416    if test "x$TOUCH" = x; then
5417        if test "xtouch" = x; then
5418          PROG_NAME=touch
5419        else
5420          PROG_NAME=touch
5421        fi
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5423$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5424        as_fn_error $? "Cannot continue" "$LINENO" 5
5425    fi
5426
5427
5428
5429    for ac_prog in tr
5430do
5431  # Extract the first word of "$ac_prog", so it can be a program name with args.
5432set dummy $ac_prog; ac_word=$2
5433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5434$as_echo_n "checking for $ac_word... " >&6; }
5435if ${ac_cv_path_TR+:} false; then :
5436  $as_echo_n "(cached) " >&6
5437else
5438  case $TR in
5439  [\\/]* | ?:[\\/]*)
5440  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5441  ;;
5442  *)
5443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH
5445do
5446  IFS=$as_save_IFS
5447  test -z "$as_dir" && as_dir=.
5448    for ac_exec_ext in '' $ac_executable_extensions; do
5449  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5450    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5452    break 2
5453  fi
5454done
5455  done
5456IFS=$as_save_IFS
5457
5458  ;;
5459esac
5460fi
5461TR=$ac_cv_path_TR
5462if test -n "$TR"; then
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5464$as_echo "$TR" >&6; }
5465else
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468fi
5469
5470
5471  test -n "$TR" && break
5472done
5473
5474
5475    if test "x$TR" = x; then
5476        if test "xtr" = x; then
5477          PROG_NAME=tr
5478        else
5479          PROG_NAME=tr
5480        fi
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5482$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5483        as_fn_error $? "Cannot continue" "$LINENO" 5
5484    fi
5485
5486
5487
5488    for ac_prog in uname
5489do
5490  # Extract the first word of "$ac_prog", so it can be a program name with args.
5491set dummy $ac_prog; ac_word=$2
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493$as_echo_n "checking for $ac_word... " >&6; }
5494if ${ac_cv_path_UNAME+:} false; then :
5495  $as_echo_n "(cached) " >&6
5496else
5497  case $UNAME in
5498  [\\/]* | ?:[\\/]*)
5499  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5500  ;;
5501  *)
5502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5503for as_dir in $PATH
5504do
5505  IFS=$as_save_IFS
5506  test -z "$as_dir" && as_dir=.
5507    for ac_exec_ext in '' $ac_executable_extensions; do
5508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5509    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5511    break 2
5512  fi
5513done
5514  done
5515IFS=$as_save_IFS
5516
5517  ;;
5518esac
5519fi
5520UNAME=$ac_cv_path_UNAME
5521if test -n "$UNAME"; then
5522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5523$as_echo "$UNAME" >&6; }
5524else
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5526$as_echo "no" >&6; }
5527fi
5528
5529
5530  test -n "$UNAME" && break
5531done
5532
5533
5534    if test "x$UNAME" = x; then
5535        if test "xuname" = x; then
5536          PROG_NAME=uname
5537        else
5538          PROG_NAME=uname
5539        fi
5540        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5541$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5542        as_fn_error $? "Cannot continue" "$LINENO" 5
5543    fi
5544
5545
5546
5547    for ac_prog in uniq
5548do
5549  # Extract the first word of "$ac_prog", so it can be a program name with args.
5550set dummy $ac_prog; ac_word=$2
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552$as_echo_n "checking for $ac_word... " >&6; }
5553if ${ac_cv_path_UNIQ+:} false; then :
5554  $as_echo_n "(cached) " >&6
5555else
5556  case $UNIQ in
5557  [\\/]* | ?:[\\/]*)
5558  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5559  ;;
5560  *)
5561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564  IFS=$as_save_IFS
5565  test -z "$as_dir" && as_dir=.
5566    for ac_exec_ext in '' $ac_executable_extensions; do
5567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5568    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570    break 2
5571  fi
5572done
5573  done
5574IFS=$as_save_IFS
5575
5576  ;;
5577esac
5578fi
5579UNIQ=$ac_cv_path_UNIQ
5580if test -n "$UNIQ"; then
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5582$as_echo "$UNIQ" >&6; }
5583else
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5585$as_echo "no" >&6; }
5586fi
5587
5588
5589  test -n "$UNIQ" && break
5590done
5591
5592
5593    if test "x$UNIQ" = x; then
5594        if test "xuniq" = x; then
5595          PROG_NAME=uniq
5596        else
5597          PROG_NAME=uniq
5598        fi
5599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5600$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5601        as_fn_error $? "Cannot continue" "$LINENO" 5
5602    fi
5603
5604
5605
5606    for ac_prog in wc
5607do
5608  # Extract the first word of "$ac_prog", so it can be a program name with args.
5609set dummy $ac_prog; ac_word=$2
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611$as_echo_n "checking for $ac_word... " >&6; }
5612if ${ac_cv_path_WC+:} false; then :
5613  $as_echo_n "(cached) " >&6
5614else
5615  case $WC in
5616  [\\/]* | ?:[\\/]*)
5617  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5618  ;;
5619  *)
5620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5621for as_dir in $PATH
5622do
5623  IFS=$as_save_IFS
5624  test -z "$as_dir" && as_dir=.
5625    for ac_exec_ext in '' $ac_executable_extensions; do
5626  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5627    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629    break 2
5630  fi
5631done
5632  done
5633IFS=$as_save_IFS
5634
5635  ;;
5636esac
5637fi
5638WC=$ac_cv_path_WC
5639if test -n "$WC"; then
5640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5641$as_echo "$WC" >&6; }
5642else
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5644$as_echo "no" >&6; }
5645fi
5646
5647
5648  test -n "$WC" && break
5649done
5650
5651
5652    if test "x$WC" = x; then
5653        if test "xwc" = x; then
5654          PROG_NAME=wc
5655        else
5656          PROG_NAME=wc
5657        fi
5658        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5659$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5660        as_fn_error $? "Cannot continue" "$LINENO" 5
5661    fi
5662
5663
5664
5665    for ac_prog in which
5666do
5667  # Extract the first word of "$ac_prog", so it can be a program name with args.
5668set dummy $ac_prog; ac_word=$2
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670$as_echo_n "checking for $ac_word... " >&6; }
5671if ${ac_cv_path_WHICH+:} false; then :
5672  $as_echo_n "(cached) " >&6
5673else
5674  case $WHICH in
5675  [\\/]* | ?:[\\/]*)
5676  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5677  ;;
5678  *)
5679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680for as_dir in $PATH
5681do
5682  IFS=$as_save_IFS
5683  test -z "$as_dir" && as_dir=.
5684    for ac_exec_ext in '' $ac_executable_extensions; do
5685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5686    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5688    break 2
5689  fi
5690done
5691  done
5692IFS=$as_save_IFS
5693
5694  ;;
5695esac
5696fi
5697WHICH=$ac_cv_path_WHICH
5698if test -n "$WHICH"; then
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5700$as_echo "$WHICH" >&6; }
5701else
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
5704fi
5705
5706
5707  test -n "$WHICH" && break
5708done
5709
5710
5711    if test "x$WHICH" = x; then
5712        if test "xwhich" = x; then
5713          PROG_NAME=which
5714        else
5715          PROG_NAME=which
5716        fi
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5718$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5719        as_fn_error $? "Cannot continue" "$LINENO" 5
5720    fi
5721
5722
5723
5724    for ac_prog in xargs
5725do
5726  # Extract the first word of "$ac_prog", so it can be a program name with args.
5727set dummy $ac_prog; ac_word=$2
5728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5729$as_echo_n "checking for $ac_word... " >&6; }
5730if ${ac_cv_path_XARGS+:} false; then :
5731  $as_echo_n "(cached) " >&6
5732else
5733  case $XARGS in
5734  [\\/]* | ?:[\\/]*)
5735  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5736  ;;
5737  *)
5738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5739for as_dir in $PATH
5740do
5741  IFS=$as_save_IFS
5742  test -z "$as_dir" && as_dir=.
5743    for ac_exec_ext in '' $ac_executable_extensions; do
5744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5745    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5747    break 2
5748  fi
5749done
5750  done
5751IFS=$as_save_IFS
5752
5753  ;;
5754esac
5755fi
5756XARGS=$ac_cv_path_XARGS
5757if test -n "$XARGS"; then
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5759$as_echo "$XARGS" >&6; }
5760else
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762$as_echo "no" >&6; }
5763fi
5764
5765
5766  test -n "$XARGS" && break
5767done
5768
5769
5770    if test "x$XARGS" = x; then
5771        if test "xxargs" = x; then
5772          PROG_NAME=xargs
5773        else
5774          PROG_NAME=xargs
5775        fi
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5777$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5778        as_fn_error $? "Cannot continue" "$LINENO" 5
5779    fi
5780
5781
5782
5783# Then required tools that require some special treatment.
5784for ac_prog in gawk mawk nawk awk
5785do
5786  # Extract the first word of "$ac_prog", so it can be a program name with args.
5787set dummy $ac_prog; ac_word=$2
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5789$as_echo_n "checking for $ac_word... " >&6; }
5790if ${ac_cv_prog_AWK+:} false; then :
5791  $as_echo_n "(cached) " >&6
5792else
5793  if test -n "$AWK"; then
5794  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5795else
5796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5803    ac_cv_prog_AWK="$ac_prog"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811fi
5812fi
5813AWK=$ac_cv_prog_AWK
5814if test -n "$AWK"; then
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5816$as_echo "$AWK" >&6; }
5817else
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823  test -n "$AWK" && break
5824done
5825
5826
5827    if test "x$AWK" = x; then
5828        if test "x" = x; then
5829          PROG_NAME=awk
5830        else
5831          PROG_NAME=
5832        fi
5833        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5834$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5835        as_fn_error $? "Cannot continue" "$LINENO" 5
5836    fi
5837
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5839$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5840if ${ac_cv_path_GREP+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  if test -z "$GREP"; then
5844  ac_path_GREP_found=false
5845  # Loop through the user's path and test for each of PROGNAME-LIST
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_prog in grep ggrep; do
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5854      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5855# Check for GNU ac_path_GREP and select it if it is found.
5856  # Check for GNU $ac_path_GREP
5857case `"$ac_path_GREP" --version 2>&1` in
5858*GNU*)
5859  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5860*)
5861  ac_count=0
5862  $as_echo_n 0123456789 >"conftest.in"
5863  while :
5864  do
5865    cat "conftest.in" "conftest.in" >"conftest.tmp"
5866    mv "conftest.tmp" "conftest.in"
5867    cp "conftest.in" "conftest.nl"
5868    $as_echo 'GREP' >> "conftest.nl"
5869    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5870    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5871    as_fn_arith $ac_count + 1 && ac_count=$as_val
5872    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5873      # Best one so far, save it but keep looking for a better one
5874      ac_cv_path_GREP="$ac_path_GREP"
5875      ac_path_GREP_max=$ac_count
5876    fi
5877    # 10*(2^10) chars as input seems more than enough
5878    test $ac_count -gt 10 && break
5879  done
5880  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5881esac
5882
5883      $ac_path_GREP_found && break 3
5884    done
5885  done
5886  done
5887IFS=$as_save_IFS
5888  if test -z "$ac_cv_path_GREP"; then
5889    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5890  fi
5891else
5892  ac_cv_path_GREP=$GREP
5893fi
5894
5895fi
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5897$as_echo "$ac_cv_path_GREP" >&6; }
5898 GREP="$ac_cv_path_GREP"
5899
5900
5901
5902    if test "x$GREP" = x; then
5903        if test "x" = x; then
5904          PROG_NAME=grep
5905        else
5906          PROG_NAME=
5907        fi
5908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5910        as_fn_error $? "Cannot continue" "$LINENO" 5
5911    fi
5912
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5914$as_echo_n "checking for egrep... " >&6; }
5915if ${ac_cv_path_EGREP+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5919   then ac_cv_path_EGREP="$GREP -E"
5920   else
5921     if test -z "$EGREP"; then
5922  ac_path_EGREP_found=false
5923  # Loop through the user's path and test for each of PROGNAME-LIST
5924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5925for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5926do
5927  IFS=$as_save_IFS
5928  test -z "$as_dir" && as_dir=.
5929    for ac_prog in egrep; do
5930    for ac_exec_ext in '' $ac_executable_extensions; do
5931      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5932      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5933# Check for GNU ac_path_EGREP and select it if it is found.
5934  # Check for GNU $ac_path_EGREP
5935case `"$ac_path_EGREP" --version 2>&1` in
5936*GNU*)
5937  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5938*)
5939  ac_count=0
5940  $as_echo_n 0123456789 >"conftest.in"
5941  while :
5942  do
5943    cat "conftest.in" "conftest.in" >"conftest.tmp"
5944    mv "conftest.tmp" "conftest.in"
5945    cp "conftest.in" "conftest.nl"
5946    $as_echo 'EGREP' >> "conftest.nl"
5947    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5948    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5949    as_fn_arith $ac_count + 1 && ac_count=$as_val
5950    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5951      # Best one so far, save it but keep looking for a better one
5952      ac_cv_path_EGREP="$ac_path_EGREP"
5953      ac_path_EGREP_max=$ac_count
5954    fi
5955    # 10*(2^10) chars as input seems more than enough
5956    test $ac_count -gt 10 && break
5957  done
5958  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5959esac
5960
5961      $ac_path_EGREP_found && break 3
5962    done
5963  done
5964  done
5965IFS=$as_save_IFS
5966  if test -z "$ac_cv_path_EGREP"; then
5967    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5968  fi
5969else
5970  ac_cv_path_EGREP=$EGREP
5971fi
5972
5973   fi
5974fi
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5976$as_echo "$ac_cv_path_EGREP" >&6; }
5977 EGREP="$ac_cv_path_EGREP"
5978
5979
5980
5981    if test "x$EGREP" = x; then
5982        if test "x" = x; then
5983          PROG_NAME=egrep
5984        else
5985          PROG_NAME=
5986        fi
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5989        as_fn_error $? "Cannot continue" "$LINENO" 5
5990    fi
5991
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5993$as_echo_n "checking for fgrep... " >&6; }
5994if ${ac_cv_path_FGREP+:} false; then :
5995  $as_echo_n "(cached) " >&6
5996else
5997  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5998   then ac_cv_path_FGREP="$GREP -F"
5999   else
6000     if test -z "$FGREP"; then
6001  ac_path_FGREP_found=false
6002  # Loop through the user's path and test for each of PROGNAME-LIST
6003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6005do
6006  IFS=$as_save_IFS
6007  test -z "$as_dir" && as_dir=.
6008    for ac_prog in fgrep; do
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6011      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6012# Check for GNU ac_path_FGREP and select it if it is found.
6013  # Check for GNU $ac_path_FGREP
6014case `"$ac_path_FGREP" --version 2>&1` in
6015*GNU*)
6016  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6017*)
6018  ac_count=0
6019  $as_echo_n 0123456789 >"conftest.in"
6020  while :
6021  do
6022    cat "conftest.in" "conftest.in" >"conftest.tmp"
6023    mv "conftest.tmp" "conftest.in"
6024    cp "conftest.in" "conftest.nl"
6025    $as_echo 'FGREP' >> "conftest.nl"
6026    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6027    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6028    as_fn_arith $ac_count + 1 && ac_count=$as_val
6029    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6030      # Best one so far, save it but keep looking for a better one
6031      ac_cv_path_FGREP="$ac_path_FGREP"
6032      ac_path_FGREP_max=$ac_count
6033    fi
6034    # 10*(2^10) chars as input seems more than enough
6035    test $ac_count -gt 10 && break
6036  done
6037  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6038esac
6039
6040      $ac_path_FGREP_found && break 3
6041    done
6042  done
6043  done
6044IFS=$as_save_IFS
6045  if test -z "$ac_cv_path_FGREP"; then
6046    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6047  fi
6048else
6049  ac_cv_path_FGREP=$FGREP
6050fi
6051
6052   fi
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6055$as_echo "$ac_cv_path_FGREP" >&6; }
6056 FGREP="$ac_cv_path_FGREP"
6057
6058
6059
6060    if test "x$FGREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=fgrep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6072$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6073if ${ac_cv_path_SED+:} false; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6077     for ac_i in 1 2 3 4 5 6 7; do
6078       ac_script="$ac_script$as_nl$ac_script"
6079     done
6080     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6081     { ac_script=; unset ac_script;}
6082     if test -z "$SED"; then
6083  ac_path_SED_found=false
6084  # Loop through the user's path and test for each of PROGNAME-LIST
6085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088  IFS=$as_save_IFS
6089  test -z "$as_dir" && as_dir=.
6090    for ac_prog in sed gsed; do
6091    for ac_exec_ext in '' $ac_executable_extensions; do
6092      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6093      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6094# Check for GNU ac_path_SED and select it if it is found.
6095  # Check for GNU $ac_path_SED
6096case `"$ac_path_SED" --version 2>&1` in
6097*GNU*)
6098  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6099*)
6100  ac_count=0
6101  $as_echo_n 0123456789 >"conftest.in"
6102  while :
6103  do
6104    cat "conftest.in" "conftest.in" >"conftest.tmp"
6105    mv "conftest.tmp" "conftest.in"
6106    cp "conftest.in" "conftest.nl"
6107    $as_echo '' >> "conftest.nl"
6108    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6109    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6110    as_fn_arith $ac_count + 1 && ac_count=$as_val
6111    if test $ac_count -gt ${ac_path_SED_max-0}; then
6112      # Best one so far, save it but keep looking for a better one
6113      ac_cv_path_SED="$ac_path_SED"
6114      ac_path_SED_max=$ac_count
6115    fi
6116    # 10*(2^10) chars as input seems more than enough
6117    test $ac_count -gt 10 && break
6118  done
6119  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6120esac
6121
6122      $ac_path_SED_found && break 3
6123    done
6124  done
6125  done
6126IFS=$as_save_IFS
6127  if test -z "$ac_cv_path_SED"; then
6128    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6129  fi
6130else
6131  ac_cv_path_SED=$SED
6132fi
6133
6134fi
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6136$as_echo "$ac_cv_path_SED" >&6; }
6137 SED="$ac_cv_path_SED"
6138  rm -f conftest.sed
6139
6140
6141    if test "x$SED" = x; then
6142        if test "x" = x; then
6143          PROG_NAME=sed
6144        else
6145          PROG_NAME=
6146        fi
6147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6149        as_fn_error $? "Cannot continue" "$LINENO" 5
6150    fi
6151
6152
6153for ac_prog in nawk gawk awk
6154do
6155  # Extract the first word of "$ac_prog", so it can be a program name with args.
6156set dummy $ac_prog; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_path_NAWK+:} false; then :
6160  $as_echo_n "(cached) " >&6
6161else
6162  case $NAWK in
6163  [\\/]* | ?:[\\/]*)
6164  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6165  ;;
6166  *)
6167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170  IFS=$as_save_IFS
6171  test -z "$as_dir" && as_dir=.
6172    for ac_exec_ext in '' $ac_executable_extensions; do
6173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6174    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6176    break 2
6177  fi
6178done
6179  done
6180IFS=$as_save_IFS
6181
6182  ;;
6183esac
6184fi
6185NAWK=$ac_cv_path_NAWK
6186if test -n "$NAWK"; then
6187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6188$as_echo "$NAWK" >&6; }
6189else
6190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
6192fi
6193
6194
6195  test -n "$NAWK" && break
6196done
6197
6198
6199    if test "x$NAWK" = x; then
6200        if test "x" = x; then
6201          PROG_NAME=nawk
6202        else
6203          PROG_NAME=
6204        fi
6205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6206$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6207        as_fn_error $? "Cannot continue" "$LINENO" 5
6208    fi
6209
6210
6211# Always force rm.
6212RM="$RM -f"
6213
6214# These are not required on all platforms
6215# Extract the first word of "cygpath", so it can be a program name with args.
6216set dummy cygpath; ac_word=$2
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6218$as_echo_n "checking for $ac_word... " >&6; }
6219if ${ac_cv_path_CYGPATH+:} false; then :
6220  $as_echo_n "(cached) " >&6
6221else
6222  case $CYGPATH in
6223  [\\/]* | ?:[\\/]*)
6224  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6225  ;;
6226  *)
6227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH
6229do
6230  IFS=$as_save_IFS
6231  test -z "$as_dir" && as_dir=.
6232    for ac_exec_ext in '' $ac_executable_extensions; do
6233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6234    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6236    break 2
6237  fi
6238done
6239  done
6240IFS=$as_save_IFS
6241
6242  ;;
6243esac
6244fi
6245CYGPATH=$ac_cv_path_CYGPATH
6246if test -n "$CYGPATH"; then
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6248$as_echo "$CYGPATH" >&6; }
6249else
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6251$as_echo "no" >&6; }
6252fi
6253
6254
6255# Extract the first word of "readlink", so it can be a program name with args.
6256set dummy readlink; ac_word=$2
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6258$as_echo_n "checking for $ac_word... " >&6; }
6259if ${ac_cv_path_READLINK+:} false; then :
6260  $as_echo_n "(cached) " >&6
6261else
6262  case $READLINK in
6263  [\\/]* | ?:[\\/]*)
6264  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6265  ;;
6266  *)
6267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268for as_dir in $PATH
6269do
6270  IFS=$as_save_IFS
6271  test -z "$as_dir" && as_dir=.
6272    for ac_exec_ext in '' $ac_executable_extensions; do
6273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6274    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6276    break 2
6277  fi
6278done
6279  done
6280IFS=$as_save_IFS
6281
6282  ;;
6283esac
6284fi
6285READLINK=$ac_cv_path_READLINK
6286if test -n "$READLINK"; then
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6288$as_echo "$READLINK" >&6; }
6289else
6290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6291$as_echo "no" >&6; }
6292fi
6293
6294
6295# Extract the first word of "df", so it can be a program name with args.
6296set dummy df; ac_word=$2
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6298$as_echo_n "checking for $ac_word... " >&6; }
6299if ${ac_cv_path_DF+:} false; then :
6300  $as_echo_n "(cached) " >&6
6301else
6302  case $DF in
6303  [\\/]* | ?:[\\/]*)
6304  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6305  ;;
6306  *)
6307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310  IFS=$as_save_IFS
6311  test -z "$as_dir" && as_dir=.
6312    for ac_exec_ext in '' $ac_executable_extensions; do
6313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6314    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6316    break 2
6317  fi
6318done
6319  done
6320IFS=$as_save_IFS
6321
6322  ;;
6323esac
6324fi
6325DF=$ac_cv_path_DF
6326if test -n "$DF"; then
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6328$as_echo "$DF" >&6; }
6329else
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }
6332fi
6333
6334
6335# Extract the first word of "SetFile", so it can be a program name with args.
6336set dummy SetFile; ac_word=$2
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338$as_echo_n "checking for $ac_word... " >&6; }
6339if ${ac_cv_path_SETFILE+:} false; then :
6340  $as_echo_n "(cached) " >&6
6341else
6342  case $SETFILE in
6343  [\\/]* | ?:[\\/]*)
6344  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6345  ;;
6346  *)
6347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350  IFS=$as_save_IFS
6351  test -z "$as_dir" && as_dir=.
6352    for ac_exec_ext in '' $ac_executable_extensions; do
6353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6354    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356    break 2
6357  fi
6358done
6359  done
6360IFS=$as_save_IFS
6361
6362  ;;
6363esac
6364fi
6365SETFILE=$ac_cv_path_SETFILE
6366if test -n "$SETFILE"; then
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6368$as_echo "$SETFILE" >&6; }
6369else
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375
6376
6377# Now we can determine OpenJDK build and target platforms. This is required to
6378# have early on.
6379# Make sure we can run config.sub.
6380$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6381  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6382
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6384$as_echo_n "checking build system type... " >&6; }
6385if ${ac_cv_build+:} false; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  ac_build_alias=$build_alias
6389test "x$ac_build_alias" = x &&
6390  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6391test "x$ac_build_alias" = x &&
6392  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6393ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6394  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6395
6396fi
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6398$as_echo "$ac_cv_build" >&6; }
6399case $ac_cv_build in
6400*-*-*) ;;
6401*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6402esac
6403build=$ac_cv_build
6404ac_save_IFS=$IFS; IFS='-'
6405set x $ac_cv_build
6406shift
6407build_cpu=$1
6408build_vendor=$2
6409shift; shift
6410# Remember, the first character of IFS is used to create $*,
6411# except with old shells:
6412build_os=$*
6413IFS=$ac_save_IFS
6414case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6415
6416
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6418$as_echo_n "checking host system type... " >&6; }
6419if ${ac_cv_host+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  if test "x$host_alias" = x; then
6423  ac_cv_host=$ac_cv_build
6424else
6425  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6426    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6427fi
6428
6429fi
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6431$as_echo "$ac_cv_host" >&6; }
6432case $ac_cv_host in
6433*-*-*) ;;
6434*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6435esac
6436host=$ac_cv_host
6437ac_save_IFS=$IFS; IFS='-'
6438set x $ac_cv_host
6439shift
6440host_cpu=$1
6441host_vendor=$2
6442shift; shift
6443# Remember, the first character of IFS is used to create $*,
6444# except with old shells:
6445host_os=$*
6446IFS=$ac_save_IFS
6447case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6448
6449
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6451$as_echo_n "checking target system type... " >&6; }
6452if ${ac_cv_target+:} false; then :
6453  $as_echo_n "(cached) " >&6
6454else
6455  if test "x$target_alias" = x; then
6456  ac_cv_target=$ac_cv_host
6457else
6458  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6459    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6460fi
6461
6462fi
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6464$as_echo "$ac_cv_target" >&6; }
6465case $ac_cv_target in
6466*-*-*) ;;
6467*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6468esac
6469target=$ac_cv_target
6470ac_save_IFS=$IFS; IFS='-'
6471set x $ac_cv_target
6472shift
6473target_cpu=$1
6474target_vendor=$2
6475shift; shift
6476# Remember, the first character of IFS is used to create $*,
6477# except with old shells:
6478target_os=$*
6479IFS=$ac_save_IFS
6480case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6481
6482
6483# The aliases save the names the user supplied, while $host etc.
6484# will get canonicalized.
6485test -n "$target_alias" &&
6486  test "$program_prefix$program_suffix$program_transform_name" = \
6487    NONENONEs,x,x, &&
6488  program_prefix=${target_alias}-
6489
6490# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6491# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6492# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6493# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6494# to use the configure naming style.
6495
6496
6497
6498
6499
6500    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6501    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6502    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6503    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6504    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6505    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6506
6507
6508
6509    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6510
6511  case "$build_os" in
6512    *linux*)
6513      VAR_OS=linux
6514      VAR_OS_API=posix
6515      VAR_OS_ENV=linux
6516      ;;
6517    *solaris*)
6518      VAR_OS=solaris
6519      VAR_OS_API=posix
6520      VAR_OS_ENV=solaris
6521      ;;
6522    *darwin*)
6523      VAR_OS=macosx
6524      VAR_OS_API=posix
6525      VAR_OS_ENV=macosx
6526      ;;
6527    *bsd*)
6528      VAR_OS=bsd
6529      VAR_OS_API=posix
6530      VAR_OS_ENV=bsd
6531      ;;
6532    *cygwin*)
6533      VAR_OS=windows
6534      VAR_OS_API=winapi
6535      VAR_OS_ENV=windows.cygwin
6536      ;;
6537    *mingw*)
6538      VAR_OS=windows
6539      VAR_OS_API=winapi
6540      VAR_OS_ENV=windows.msys
6541      ;;
6542    *)
6543      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6544      ;;
6545  esac
6546
6547
6548  # First argument is the cpu name from the trip/quad
6549  case "$build_cpu" in
6550    x86_64)
6551      VAR_CPU=x86_64
6552      VAR_CPU_ARCH=x86
6553      VAR_CPU_BITS=64
6554      VAR_CPU_ENDIAN=little
6555      ;;
6556    i?86)
6557      VAR_CPU=x86
6558      VAR_CPU_ARCH=x86
6559      VAR_CPU_BITS=32
6560      VAR_CPU_ENDIAN=little
6561      ;;
6562    arm*)
6563      VAR_CPU=arm
6564      VAR_CPU_ARCH=arm
6565      VAR_CPU_BITS=32
6566      VAR_CPU_ENDIAN=little
6567      ;;
6568    powerpc)
6569      VAR_CPU=ppc
6570      VAR_CPU_ARCH=ppc
6571      VAR_CPU_BITS=32
6572      VAR_CPU_ENDIAN=big
6573       ;;
6574    powerpc64)
6575      VAR_CPU=ppc64
6576      VAR_CPU_ARCH=ppc
6577      VAR_CPU_BITS=64
6578      VAR_CPU_ENDIAN=big
6579       ;;
6580    sparc)
6581      VAR_CPU=sparc
6582      VAR_CPU_ARCH=sparc
6583      VAR_CPU_BITS=32
6584      VAR_CPU_ENDIAN=big
6585       ;;
6586    sparcv9)
6587      VAR_CPU=sparcv9
6588      VAR_CPU_ARCH=sparc
6589      VAR_CPU_BITS=64
6590      VAR_CPU_ENDIAN=big
6591       ;;
6592    *)
6593      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6594      ;;
6595  esac
6596
6597    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6598    OPENJDK_BUILD_OS="$VAR_OS"
6599    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6600    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6601    OPENJDK_BUILD_CPU="$VAR_CPU"
6602    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6603    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6604    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6605
6606
6607
6608
6609
6610
6611
6612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6613$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6615$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6616
6617    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6618
6619  case "$host_os" in
6620    *linux*)
6621      VAR_OS=linux
6622      VAR_OS_API=posix
6623      VAR_OS_ENV=linux
6624      ;;
6625    *solaris*)
6626      VAR_OS=solaris
6627      VAR_OS_API=posix
6628      VAR_OS_ENV=solaris
6629      ;;
6630    *darwin*)
6631      VAR_OS=macosx
6632      VAR_OS_API=posix
6633      VAR_OS_ENV=macosx
6634      ;;
6635    *bsd*)
6636      VAR_OS=bsd
6637      VAR_OS_API=posix
6638      VAR_OS_ENV=bsd
6639      ;;
6640    *cygwin*)
6641      VAR_OS=windows
6642      VAR_OS_API=winapi
6643      VAR_OS_ENV=windows.cygwin
6644      ;;
6645    *mingw*)
6646      VAR_OS=windows
6647      VAR_OS_API=winapi
6648      VAR_OS_ENV=windows.msys
6649      ;;
6650    *)
6651      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6652      ;;
6653  esac
6654
6655
6656  # First argument is the cpu name from the trip/quad
6657  case "$host_cpu" in
6658    x86_64)
6659      VAR_CPU=x86_64
6660      VAR_CPU_ARCH=x86
6661      VAR_CPU_BITS=64
6662      VAR_CPU_ENDIAN=little
6663      ;;
6664    i?86)
6665      VAR_CPU=x86
6666      VAR_CPU_ARCH=x86
6667      VAR_CPU_BITS=32
6668      VAR_CPU_ENDIAN=little
6669      ;;
6670    arm*)
6671      VAR_CPU=arm
6672      VAR_CPU_ARCH=arm
6673      VAR_CPU_BITS=32
6674      VAR_CPU_ENDIAN=little
6675      ;;
6676    powerpc)
6677      VAR_CPU=ppc
6678      VAR_CPU_ARCH=ppc
6679      VAR_CPU_BITS=32
6680      VAR_CPU_ENDIAN=big
6681       ;;
6682    powerpc64)
6683      VAR_CPU=ppc64
6684      VAR_CPU_ARCH=ppc
6685      VAR_CPU_BITS=64
6686      VAR_CPU_ENDIAN=big
6687       ;;
6688    sparc)
6689      VAR_CPU=sparc
6690      VAR_CPU_ARCH=sparc
6691      VAR_CPU_BITS=32
6692      VAR_CPU_ENDIAN=big
6693       ;;
6694    sparcv9)
6695      VAR_CPU=sparcv9
6696      VAR_CPU_ARCH=sparc
6697      VAR_CPU_BITS=64
6698      VAR_CPU_ENDIAN=big
6699       ;;
6700    *)
6701      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6702      ;;
6703  esac
6704
6705    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6706    OPENJDK_TARGET_OS="$VAR_OS"
6707    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6708    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6709    OPENJDK_TARGET_CPU="$VAR_CPU"
6710    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6711    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6712    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6713
6714
6715
6716
6717
6718
6719
6720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6721$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6723$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6724
6725
6726
6727# Check whether --with-target-bits was given.
6728if test "${with_target_bits+set}" = set; then :
6729  withval=$with_target_bits;
6730fi
6731
6732
6733  # We have three types of compiles:
6734  # native  == normal compilation, target system == build system
6735  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6736  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6737  #
6738  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6739    # We're doing a proper cross-compilation
6740    COMPILE_TYPE="cross"
6741  else
6742    COMPILE_TYPE="native"
6743  fi
6744
6745  if test "x$with_target_bits" != x; then
6746    if test "x$COMPILE_TYPE" = "xcross"; then
6747      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6748    fi
6749
6750    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6751      # A reduced build is requested
6752      COMPILE_TYPE="reduced"
6753      OPENJDK_TARGET_CPU_BITS=32
6754      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6755        OPENJDK_TARGET_CPU=x86
6756      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6757        OPENJDK_TARGET_CPU=sparc
6758      else
6759        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6760      fi
6761    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6762      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
6763    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6764      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6765$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6766    else
6767      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6768    fi
6769  fi
6770
6771
6772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6773$as_echo_n "checking compilation type... " >&6; }
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6775$as_echo "$COMPILE_TYPE" >&6; }
6776
6777
6778    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6779       REQUIRED_OS_NAME=SunOS
6780       REQUIRED_OS_VERSION=5.10
6781    fi
6782    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6783       REQUIRED_OS_NAME=Linux
6784       REQUIRED_OS_VERSION=2.6
6785    fi
6786    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6787        REQUIRED_OS_NAME=Windows
6788        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6789            REQUIRED_OS_VERSION=5.2
6790        else
6791            REQUIRED_OS_VERSION=5.1
6792        fi
6793    fi
6794    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6795        REQUIRED_OS_NAME=Darwin
6796        REQUIRED_OS_VERSION=11.2
6797    fi
6798
6799
6800
6801
6802
6803    # Also store the legacy naming of the cpu.
6804    # Ie i586 and amd64 instead of x86 and x86_64
6805    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6806    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6807      OPENJDK_TARGET_CPU_LEGACY="i586"
6808    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6809      # On all platforms except MacOSX replace x86_64 with amd64.
6810      OPENJDK_TARGET_CPU_LEGACY="amd64"
6811    fi
6812
6813
6814    # And the second legacy naming of the cpu.
6815    # Ie i386 and amd64 instead of x86 and x86_64.
6816    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6817    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6818      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6819    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6820      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6821    fi
6822
6823
6824    # This is the name of the cpu (but using i386 and amd64 instead of
6825    # x86 and x86_64, respectively), preceeded by a /, to be used when
6826    # locating libraries. On macosx, it's empty, though.
6827    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6828    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6829        OPENJDK_TARGET_CPU_LIBDIR=""
6830    fi
6831
6832
6833    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6834    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6835    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6836    OPENJDK_TARGET_CPU_ISADIR=""
6837    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6838      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6839          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6840      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6841          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6842      fi
6843    fi
6844
6845
6846    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6847    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6848    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6849      # On linux only, we replace x86 with i386.
6850      OPENJDK_TARGET_CPU_OSARCH="i386"
6851    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6852      # On all platforms except macosx, we replace x86_64 with amd64.
6853      OPENJDK_TARGET_CPU_OSARCH="amd64"
6854    fi
6855
6856
6857    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6858    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6859      OPENJDK_TARGET_CPU_JLI="i386"
6860    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6861      # On all platforms except macosx, we replace x86_64 with amd64.
6862      OPENJDK_TARGET_CPU_JLI="amd64"
6863    fi
6864    # Now setup the -D flags for building libjli.
6865    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6866    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6867      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6868        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6869      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6870        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6871      fi
6872    fi
6873
6874
6875    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6876    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6877        OPENJDK_TARGET_OS_API_DIR="solaris"
6878    fi
6879    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6880        OPENJDK_TARGET_OS_API_DIR="windows"
6881    fi
6882
6883
6884    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6885        A_LP64="LP64:="
6886        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6887        # unpack200.exe
6888        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6889            ADD_LP64="-D_LP64=1"
6890        fi
6891    fi
6892    LP64=$A_LP64
6893
6894
6895    if test "x$COMPILE_TYPE" = "xcross"; then
6896      # FIXME: ... or should this include reduced builds..?
6897      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6898    else
6899      DEFINE_CROSS_COMPILE_ARCH=""
6900    fi
6901
6902
6903
6904
6905# Continue setting up basic stuff. Most remaining code require fundamental tools.
6906
6907# Locate the directory of this script.
6908SCRIPT="$0"
6909
6910    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6911        # Follow a chain of symbolic links. Use readlink
6912        # where it exists, else fall back to horribly
6913        # complicated shell code.
6914        if test "x$READLINK_TESTED" != yes; then
6915            # On MacOSX there is a readlink tool with a different
6916            # purpose than the GNU readlink tool. Check the found readlink.
6917            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6918            if test "x$ISGNU" = x; then
6919                 # A readlink that we do not know how to use.
6920                 # Are there other non-GNU readlinks out there?
6921                 READLINK_TESTED=yes
6922                 READLINK=
6923            fi
6924        fi
6925
6926        if test "x$READLINK" != x; then
6927            SCRIPT=`$READLINK -f $SCRIPT`
6928        else
6929            # Save the current directory for restoring afterwards
6930            STARTDIR=$PWD
6931            COUNTER=0
6932            sym_link_dir=`$DIRNAME $SCRIPT`
6933            sym_link_file=`$BASENAME $SCRIPT`
6934            # Use the system pwd and not the shell builtin to resolve directory symlinks
6935            cd $sym_link_dir
6936            cd `$THEPWDCMD`
6937            sym_link_dir=`$THEPWDCMD`
6938            # Resolve file symlinks
6939            while test $COUNTER -lt 20; do
6940                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6941                if test "x$ISLINK" == x; then
6942                    # This is not a symbolic link! We are done!
6943                    break
6944                fi
6945                # Again resolve directory symlinks since the target of the just found
6946                # link could be in a different directory
6947                cd `$DIRNAME $ISLINK`
6948                sym_link_dir=`$THEPWDCMD`
6949                sym_link_file=`$BASENAME $ISLINK`
6950                let COUNTER=COUNTER+1
6951            done
6952            cd $STARTDIR
6953            SCRIPT=$sym_link_dir/$sym_link_file
6954        fi
6955    fi
6956
6957AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6958
6959# Where is the source? It is located two levels above the configure script.
6960CURDIR="$PWD"
6961cd "$AUTOCONF_DIR/../.."
6962SRC_ROOT="`$THEPWDCMD`"
6963
6964if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6965  PATH_SEP=";"
6966
6967  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6968  if test $SRC_ROOT_LENGTH -gt 100; then
6969      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6970  fi
6971
6972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6974$as_echo_n "checking cygwin release... " >&6; }
6975    CYGWIN_VERSION=`$UNAME -r`
6976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6977$as_echo "$CYGWIN_VERSION" >&6; }
6978    WINDOWS_ENV_VENDOR='cygwin'
6979    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6980
6981    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6982    if test "x$CYGWIN_VERSION_OK" = x; then
6983      { $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
6984$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;}
6985      as_fn_error $? "Cannot continue" "$LINENO" 5
6986    fi
6987    if test "x$CYGPATH" = x; then
6988        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6989    fi
6990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6991$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6992    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6993    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6994    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6995    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6997$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6998    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6999    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7000    if test "x$test_cygdrive_prefix" = x; then
7001        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7002    fi
7003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7005$as_echo_n "checking msys release... " >&6; }
7006    MSYS_VERSION=`$UNAME -r`
7007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7008$as_echo "$MSYS_VERSION" >&6; }
7009
7010    WINDOWS_ENV_VENDOR='msys'
7011    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7012
7013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7014$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7015    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7016    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7017
7018  windows_path="$MSYS_ROOT_PATH"
7019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7020    unix_path=`$CYGPATH -u "$windows_path"`
7021    MSYS_ROOT_PATH="$unix_path"
7022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7024    MSYS_ROOT_PATH="$unix_path"
7025  fi
7026
7027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7028$as_echo "$MSYS_ROOT_PATH" >&6; }
7029    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7030  else
7031    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7032  fi
7033
7034  # Test if windows or unix (cygwin/msys) find is first in path.
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7036$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7037  FIND_BINARY_OUTPUT=`find --version 2>&1`
7038  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7040$as_echo "unix style" >&6; }
7041  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7043$as_echo "Windows" >&6; }
7044    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7045$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7046    { $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
7047$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7048    as_fn_error $? "Cannot continue" "$LINENO" 5
7049  else
7050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7051$as_echo "unknown" >&6; }
7052    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7053$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7054  fi
7055
7056else
7057  PATH_SEP=":"
7058fi
7059
7060
7061
7062cd "$CURDIR"
7063
7064
7065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7066
7067  # Input might be given as Windows format, start by converting to
7068  # unix format.
7069  path="$SRC_ROOT"
7070  new_path=`$CYGPATH -u "$path"`
7071
7072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7075  # "foo.exe" is OK but "foo" is an error.
7076  #
7077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7078  # It is also a way to make sure we got the proper file name for the real test later on.
7079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7080  if test "x$test_shortpath" = x; then
7081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7082$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7083    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7084  fi
7085
7086  # Call helper function which possibly converts this using DOS-style short mode.
7087  # If so, the updated path is stored in $new_path.
7088
7089  input_path="$new_path"
7090  # Check if we need to convert this using DOS-style short mode. If the path
7091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7092  # take no chances and rewrite it.
7093  # Note: m4 eats our [], so we need to use [ and ] instead.
7094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7095  if test "x$has_forbidden_chars" != x; then
7096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7100      # Going to short mode and back again did indeed matter. Since short mode is
7101      # case insensitive, let's make it lowercase to improve readability.
7102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7103      # Now convert it back to Unix-stile (cygpath)
7104      input_path=`$CYGPATH -u "$shortmode_path"`
7105      new_path="$input_path"
7106    fi
7107  fi
7108
7109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7110  if test "x$test_cygdrive_prefix" = x; then
7111    # As a simple fix, exclude /usr/bin since it's not a real path.
7112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7114      # a path prefixed by /cygdrive for fixpath to work.
7115      new_path="$CYGWIN_ROOT_PATH$input_path"
7116    fi
7117  fi
7118
7119
7120  if test "x$path" != "x$new_path"; then
7121    SRC_ROOT="$new_path"
7122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7123$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7124  fi
7125
7126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7127
7128  path="$SRC_ROOT"
7129  has_colon=`$ECHO $path | $GREP ^.:`
7130  new_path="$path"
7131  if test "x$has_colon" = x; then
7132    # Not in mixed or Windows style, start by that.
7133    new_path=`cmd //c echo $path`
7134  fi
7135
7136
7137  input_path="$new_path"
7138  # Check if we need to convert this using DOS-style short mode. If the path
7139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7140  # take no chances and rewrite it.
7141  # Note: m4 eats our [], so we need to use [ and ] instead.
7142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7143  if test "x$has_forbidden_chars" != x; then
7144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7146  fi
7147
7148
7149  windows_path="$new_path"
7150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7151    unix_path=`$CYGPATH -u "$windows_path"`
7152    new_path="$unix_path"
7153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7155    new_path="$unix_path"
7156  fi
7157
7158  if test "x$path" != "x$new_path"; then
7159    SRC_ROOT="$new_path"
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7161$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7162  fi
7163
7164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7166
7167  else
7168    # We're on a posix platform. Hooray! :)
7169    path="$SRC_ROOT"
7170
7171    if test ! -f "$path" && test ! -d "$path"; then
7172      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7173    fi
7174
7175    has_space=`$ECHO "$path" | $GREP " "`
7176    if test "x$has_space" != x; then
7177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7178$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7180    fi
7181  fi
7182
7183
7184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7185
7186  # Input might be given as Windows format, start by converting to
7187  # unix format.
7188  path="$CURDIR"
7189  new_path=`$CYGPATH -u "$path"`
7190
7191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7194  # "foo.exe" is OK but "foo" is an error.
7195  #
7196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7197  # It is also a way to make sure we got the proper file name for the real test later on.
7198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7199  if test "x$test_shortpath" = x; then
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7201$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7202    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7203  fi
7204
7205  # Call helper function which possibly converts this using DOS-style short mode.
7206  # If so, the updated path is stored in $new_path.
7207
7208  input_path="$new_path"
7209  # Check if we need to convert this using DOS-style short mode. If the path
7210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7211  # take no chances and rewrite it.
7212  # Note: m4 eats our [], so we need to use [ and ] instead.
7213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7214  if test "x$has_forbidden_chars" != x; then
7215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7219      # Going to short mode and back again did indeed matter. Since short mode is
7220      # case insensitive, let's make it lowercase to improve readability.
7221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7222      # Now convert it back to Unix-stile (cygpath)
7223      input_path=`$CYGPATH -u "$shortmode_path"`
7224      new_path="$input_path"
7225    fi
7226  fi
7227
7228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7229  if test "x$test_cygdrive_prefix" = x; then
7230    # As a simple fix, exclude /usr/bin since it's not a real path.
7231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7233      # a path prefixed by /cygdrive for fixpath to work.
7234      new_path="$CYGWIN_ROOT_PATH$input_path"
7235    fi
7236  fi
7237
7238
7239  if test "x$path" != "x$new_path"; then
7240    CURDIR="$new_path"
7241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7242$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7243  fi
7244
7245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7246
7247  path="$CURDIR"
7248  has_colon=`$ECHO $path | $GREP ^.:`
7249  new_path="$path"
7250  if test "x$has_colon" = x; then
7251    # Not in mixed or Windows style, start by that.
7252    new_path=`cmd //c echo $path`
7253  fi
7254
7255
7256  input_path="$new_path"
7257  # Check if we need to convert this using DOS-style short mode. If the path
7258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7259  # take no chances and rewrite it.
7260  # Note: m4 eats our [], so we need to use [ and ] instead.
7261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7262  if test "x$has_forbidden_chars" != x; then
7263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7265  fi
7266
7267
7268  windows_path="$new_path"
7269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7270    unix_path=`$CYGPATH -u "$windows_path"`
7271    new_path="$unix_path"
7272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7274    new_path="$unix_path"
7275  fi
7276
7277  if test "x$path" != "x$new_path"; then
7278    CURDIR="$new_path"
7279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7280$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7281  fi
7282
7283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7285
7286  else
7287    # We're on a posix platform. Hooray! :)
7288    path="$CURDIR"
7289
7290    if test ! -f "$path" && test ! -d "$path"; then
7291      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7292    fi
7293
7294    has_space=`$ECHO "$path" | $GREP " "`
7295    if test "x$has_space" != x; then
7296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7297$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7299    fi
7300  fi
7301
7302
7303if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7304    # Add extra search paths on solaris for utilities like ar and as etc...
7305    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7306fi
7307
7308# You can force the sys-root if the sys-root encoded into the cross compiler tools
7309# is not correct.
7310
7311# Check whether --with-sys-root was given.
7312if test "${with_sys_root+set}" = set; then :
7313  withval=$with_sys_root;
7314fi
7315
7316
7317if test "x$with_sys_root" != x; then
7318  SYS_ROOT=$with_sys_root
7319else
7320  SYS_ROOT=/
7321fi
7322
7323
7324
7325# Check whether --with-tools-dir was given.
7326if test "${with_tools_dir+set}" = set; then :
7327  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7328fi
7329
7330
7331
7332# Check whether --with-devkit was given.
7333if test "${with_devkit+set}" = set; then :
7334  withval=$with_devkit;
7335    if test "x$with_sys_root" != x; then
7336      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7337    fi
7338    if test "x$with_tools_dir" != x; then
7339      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7340    fi
7341    TOOLS_DIR=$with_devkit/bin
7342    SYS_ROOT=$with_devkit/$host_alias/libc
7343
7344fi
7345
7346
7347
7348
7349# Setup default logging of stdout and stderr to build.log in the output root.
7350BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7351BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7352BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7353
7354
7355
7356
7357
7358# These are needed to be able to create a configuration name (and thus the output directory)
7359
7360###############################################################################
7361#
7362# Check which variant of the JDK that we want to build.
7363# Currently we have:
7364#    normal:   standard edition
7365# but the custom make system may add other variants
7366#
7367# Effectively the JDK variant gives a name to a specific set of
7368# modules to compile into the JDK. In the future, these modules
7369# might even be Jigsaw modules.
7370#
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7372$as_echo_n "checking which variant of the JDK to build... " >&6; }
7373
7374# Check whether --with-jdk-variant was given.
7375if test "${with_jdk_variant+set}" = set; then :
7376  withval=$with_jdk_variant;
7377fi
7378
7379
7380if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7381    JDK_VARIANT="normal"
7382else
7383    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7384fi
7385
7386
7387
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7389$as_echo "$JDK_VARIANT" >&6; }
7390
7391
7392
7393###############################################################################
7394#
7395# Check which variants of the JVM that we want to build.
7396# Currently we have:
7397#    server: normal interpreter and a tiered C1/C2 compiler
7398#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7399#    minimal1: reduced form of client with optional VM services and features stripped out
7400#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7401#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7402#    zero: no machine code interpreter, no compiler
7403#    zeroshark: zero interpreter and shark/llvm compiler backend
7404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7405$as_echo_n "checking which variants of the JVM to build... " >&6; }
7406
7407# Check whether --with-jvm-variants was given.
7408if test "${with_jvm_variants+set}" = set; then :
7409  withval=$with_jvm_variants;
7410fi
7411
7412
7413if test "x$with_jvm_variants" = x; then
7414     with_jvm_variants="server"
7415fi
7416
7417JVM_VARIANTS=",$with_jvm_variants,"
7418TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7419
7420if test "x$TEST_VARIANTS" != "x,"; then
7421   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7422fi
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7424$as_echo "$with_jvm_variants" >&6; }
7425
7426JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7427JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7428JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7429JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7430JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7431JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7432
7433if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7434    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7435        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7436    fi
7437fi
7438if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7439    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7440        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7441    fi
7442fi
7443if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7444    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7445        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7446    fi
7447fi
7448
7449# Replace the commas with AND for use in the build directory name.
7450ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7451COUNT_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/'`
7452if test "x$COUNT_VARIANTS" != "x,1"; then
7453    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7454else
7455    BUILDING_MULTIPLE_JVM_VARIANTS=no
7456fi
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7467   MACOSX_UNIVERSAL="true"
7468fi
7469
7470
7471
7472
7473
7474###############################################################################
7475#
7476# Set the debug level
7477#    release: no debug information, all optimizations, no asserts.
7478#    fastdebug: debug information (-g), all optimizations, all asserts
7479#    slowdebug: debug information (-g), no optimizations, all asserts
7480#
7481DEBUG_LEVEL="release"
7482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7483$as_echo_n "checking which debug level to use... " >&6; }
7484# Check whether --enable-debug was given.
7485if test "${enable_debug+set}" = set; then :
7486  enableval=$enable_debug;
7487        ENABLE_DEBUG="${enableval}"
7488        DEBUG_LEVEL="fastdebug"
7489
7490else
7491  ENABLE_DEBUG="no"
7492fi
7493
7494
7495
7496# Check whether --with-debug-level was given.
7497if test "${with_debug_level+set}" = set; then :
7498  withval=$with_debug_level;
7499        DEBUG_LEVEL="${withval}"
7500        if test "x$ENABLE_DEBUG" = xyes; then
7501			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7502        fi
7503
7504fi
7505
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7507$as_echo "$DEBUG_LEVEL" >&6; }
7508
7509if test "x$DEBUG_LEVEL" != xrelease && \
7510   test "x$DEBUG_LEVEL" != xfastdebug && \
7511   test "x$DEBUG_LEVEL" != xslowdebug; then
7512   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7513fi
7514
7515
7516###############################################################################
7517#
7518# Setup legacy vars/targets and new vars to deal with different debug levels.
7519#
7520
7521case $DEBUG_LEVEL in
7522      release )
7523          VARIANT="OPT"
7524          FASTDEBUG="false"
7525          DEBUG_CLASSFILES="false"
7526          BUILD_VARIANT_RELEASE=""
7527          HOTSPOT_DEBUG_LEVEL="product"
7528          HOTSPOT_EXPORT="product"
7529           ;;
7530      fastdebug )
7531          VARIANT="DBG"
7532          FASTDEBUG="true"
7533          DEBUG_CLASSFILES="true"
7534          BUILD_VARIANT_RELEASE="-fastdebug"
7535          HOTSPOT_DEBUG_LEVEL="fastdebug"
7536          HOTSPOT_EXPORT="fastdebug"
7537           ;;
7538      slowdebug )
7539          VARIANT="DBG"
7540          FASTDEBUG="false"
7541          DEBUG_CLASSFILES="true"
7542          BUILD_VARIANT_RELEASE="-debug"
7543          HOTSPOT_DEBUG_LEVEL="jvmg"
7544          HOTSPOT_EXPORT="debug"
7545           ;;
7546esac
7547
7548#####
7549# Generate the legacy makefile targets for hotspot.
7550# The hotspot api for selecting the build artifacts, really, needs to be improved.
7551# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7552# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7553# But until then ...
7554HOTSPOT_TARGET=""
7555
7556if test "x$JVM_VARIANT_SERVER" = xtrue; then
7557    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7558fi
7559
7560if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7561    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7562fi
7563
7564if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7565    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7566fi
7567
7568if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7569    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7570fi
7571
7572if test "x$JVM_VARIANT_ZERO" = xtrue; then
7573    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7574fi
7575
7576if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7577    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7578fi
7579
7580HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7581
7582# On Macosx universal binaries are produced, but they only contain
7583# 64 bit intel. This invalidates control of which jvms are built
7584# from configure, but only server is valid anyway. Fix this
7585# when hotspot makefiles are rewritten.
7586if test "x$MACOSX_UNIVERSAL" = xtrue; then
7587    HOTSPOT_TARGET=universal_product
7588fi
7589
7590#####
7591
7592
7593
7594
7595
7596
7597
7598
7599# With basic setup done, call the custom early hook.
7600
7601
7602# To properly create a configuration name, we need to have the OpenJDK target
7603# and options (variants and debug level) parsed.
7604
7605
7606
7607# Check whether --with-conf-name was given.
7608if test "${with_conf_name+set}" = set; then :
7609  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7610fi
7611
7612
7613# Test from where we are running configure, in or outside of src root.
7614# To enable comparison of directories, CURDIR needs to be symlink free
7615# just like SRC_ROOT already is
7616NOSYM_CURDIR="$CURDIR"
7617
7618    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7619        # Follow a chain of symbolic links. Use readlink
7620        # where it exists, else fall back to horribly
7621        # complicated shell code.
7622        if test "x$READLINK_TESTED" != yes; then
7623            # On MacOSX there is a readlink tool with a different
7624            # purpose than the GNU readlink tool. Check the found readlink.
7625            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7626            if test "x$ISGNU" = x; then
7627                 # A readlink that we do not know how to use.
7628                 # Are there other non-GNU readlinks out there?
7629                 READLINK_TESTED=yes
7630                 READLINK=
7631            fi
7632        fi
7633
7634        if test "x$READLINK" != x; then
7635            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7636        else
7637            # Save the current directory for restoring afterwards
7638            STARTDIR=$PWD
7639            COUNTER=0
7640            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7641            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7642            # Use the system pwd and not the shell builtin to resolve directory symlinks
7643            cd $sym_link_dir
7644            cd `$THEPWDCMD`
7645            sym_link_dir=`$THEPWDCMD`
7646            # Resolve file symlinks
7647            while test $COUNTER -lt 20; do
7648                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7649                if test "x$ISLINK" == x; then
7650                    # This is not a symbolic link! We are done!
7651                    break
7652                fi
7653                # Again resolve directory symlinks since the target of the just found
7654                # link could be in a different directory
7655                cd `$DIRNAME $ISLINK`
7656                sym_link_dir=`$THEPWDCMD`
7657                sym_link_file=`$BASENAME $ISLINK`
7658                let COUNTER=COUNTER+1
7659            done
7660            cd $STARTDIR
7661            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7662        fi
7663    fi
7664
7665if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7666        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7667        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7668    # We are running configure from the src root.
7669    # Create a default ./build/target-variant-debuglevel output root.
7670    if test "x${CONF_NAME}" = x; then
7671        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7672    fi
7673    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7674    $MKDIR -p "$OUTPUT_ROOT"
7675    if test ! -d "$OUTPUT_ROOT"; then
7676        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7677    fi
7678else
7679    # We are running configure from outside of the src dir.
7680    # Then use the current directory as output dir!
7681    # If configuration is situated in normal build directory, just use the build
7682    # directory name as configuration name, otherwise use the complete path.
7683    if test "x${CONF_NAME}" = x; then
7684        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7685    fi
7686    OUTPUT_ROOT="$CURDIR"
7687
7688    # WARNING: This might be a bad thing to do. You need to be sure you want to
7689    # have a configuration in this directory. Do some sanity checks!
7690
7691    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7692      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7693      # other files
7694      files_present=`$LS $OUTPUT_ROOT`
7695      # Configure has already touched config.log and confdefs.h in the current dir when this check
7696      # is performed.
7697      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7698                                             | $TR -d '\n'`
7699      if test "x$filtered_files" != x; then
7700        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7701$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7703$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7705$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7707$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7708        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7709$as_echo "$as_me: seriously mess up just about everything." >&6;}
7710        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7711$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7713$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7714        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7715      fi
7716    fi
7717fi
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7719$as_echo_n "checking what configuration name to use... " >&6; }
7720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7721$as_echo "$CONF_NAME" >&6; }
7722
7723
7724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7725
7726  # Input might be given as Windows format, start by converting to
7727  # unix format.
7728  path="$OUTPUT_ROOT"
7729  new_path=`$CYGPATH -u "$path"`
7730
7731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7734  # "foo.exe" is OK but "foo" is an error.
7735  #
7736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7737  # It is also a way to make sure we got the proper file name for the real test later on.
7738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7739  if test "x$test_shortpath" = x; then
7740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7741$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7742    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7743  fi
7744
7745  # Call helper function which possibly converts this using DOS-style short mode.
7746  # If so, the updated path is stored in $new_path.
7747
7748  input_path="$new_path"
7749  # Check if we need to convert this using DOS-style short mode. If the path
7750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7751  # take no chances and rewrite it.
7752  # Note: m4 eats our [], so we need to use [ and ] instead.
7753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7754  if test "x$has_forbidden_chars" != x; then
7755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7759      # Going to short mode and back again did indeed matter. Since short mode is
7760      # case insensitive, let's make it lowercase to improve readability.
7761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7762      # Now convert it back to Unix-stile (cygpath)
7763      input_path=`$CYGPATH -u "$shortmode_path"`
7764      new_path="$input_path"
7765    fi
7766  fi
7767
7768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7769  if test "x$test_cygdrive_prefix" = x; then
7770    # As a simple fix, exclude /usr/bin since it's not a real path.
7771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7773      # a path prefixed by /cygdrive for fixpath to work.
7774      new_path="$CYGWIN_ROOT_PATH$input_path"
7775    fi
7776  fi
7777
7778
7779  if test "x$path" != "x$new_path"; then
7780    OUTPUT_ROOT="$new_path"
7781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7782$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7783  fi
7784
7785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7786
7787  path="$OUTPUT_ROOT"
7788  has_colon=`$ECHO $path | $GREP ^.:`
7789  new_path="$path"
7790  if test "x$has_colon" = x; then
7791    # Not in mixed or Windows style, start by that.
7792    new_path=`cmd //c echo $path`
7793  fi
7794
7795
7796  input_path="$new_path"
7797  # Check if we need to convert this using DOS-style short mode. If the path
7798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7799  # take no chances and rewrite it.
7800  # Note: m4 eats our [], so we need to use [ and ] instead.
7801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7802  if test "x$has_forbidden_chars" != x; then
7803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7805  fi
7806
7807
7808  windows_path="$new_path"
7809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7810    unix_path=`$CYGPATH -u "$windows_path"`
7811    new_path="$unix_path"
7812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7814    new_path="$unix_path"
7815  fi
7816
7817  if test "x$path" != "x$new_path"; then
7818    OUTPUT_ROOT="$new_path"
7819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7820$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7821  fi
7822
7823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7825
7826  else
7827    # We're on a posix platform. Hooray! :)
7828    path="$OUTPUT_ROOT"
7829
7830    if test ! -f "$path" && test ! -d "$path"; then
7831      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7832    fi
7833
7834    has_space=`$ECHO "$path" | $GREP " "`
7835    if test "x$has_space" != x; then
7836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7837$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7839    fi
7840  fi
7841
7842
7843SPEC=$OUTPUT_ROOT/spec.gmk
7844
7845CONF_NAME=$CONF_NAME
7846
7847OUTPUT_ROOT=$OUTPUT_ROOT
7848
7849
7850# Most of the probed defines are put into config.h
7851ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7852
7853# The spec.gmk file contains all variables for the make system.
7854ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7855
7856# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7857ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7858
7859# The bootcycle-spec.gmk file contains support for boot cycle builds.
7860ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7861
7862# The compare.sh is used to compare the build output to other builds.
7863ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7864
7865# Spec.sh is currently used by compare-objects.sh
7866ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7867
7868# The generated Makefile knows where the spec.gmk is and where the source is.
7869# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7870# which will look for generated configurations
7871ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7872
7873
7874# Save the arguments given to us
7875echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7876
7877
7878# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7879
7880    for ac_prog in apt-get yum port pkgutil pkgadd
7881do
7882  # Extract the first word of "$ac_prog", so it can be a program name with args.
7883set dummy $ac_prog; ac_word=$2
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7885$as_echo_n "checking for $ac_word... " >&6; }
7886if ${ac_cv_prog_PKGHANDLER+:} false; then :
7887  $as_echo_n "(cached) " >&6
7888else
7889  if test -n "$PKGHANDLER"; then
7890  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7891else
7892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7893for as_dir in $PATH
7894do
7895  IFS=$as_save_IFS
7896  test -z "$as_dir" && as_dir=.
7897    for ac_exec_ext in '' $ac_executable_extensions; do
7898  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7899    ac_cv_prog_PKGHANDLER="$ac_prog"
7900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7901    break 2
7902  fi
7903done
7904  done
7905IFS=$as_save_IFS
7906
7907fi
7908fi
7909PKGHANDLER=$ac_cv_prog_PKGHANDLER
7910if test -n "$PKGHANDLER"; then
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7912$as_echo "$PKGHANDLER" >&6; }
7913else
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915$as_echo "no" >&6; }
7916fi
7917
7918
7919  test -n "$PKGHANDLER" && break
7920done
7921
7922
7923
7924# Setup tools that requires more complex handling, or that is not needed by the configure script.
7925
7926
7927  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7928  if test "x$MAKE" != x; then
7929    # User has supplied a make, test it.
7930    if test ! -f "$MAKE"; then
7931      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7932    fi
7933
7934  MAKE_CANDIDATE=""$MAKE""
7935  DESCRIPTION="user supplied MAKE=$MAKE"
7936  if test "x$MAKE_CANDIDATE" != x; then
7937    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7938$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7939    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7940    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7941    if test "x$IS_GNU_MAKE" = x; then
7942      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7943$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7944    else
7945      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7946      if test "x$IS_MODERN_MAKE" = x; then
7947        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
7948$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
7949      else
7950        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7951          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7952            MAKE_EXPECTED_ENV='cygwin'
7953          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7954            MAKE_EXPECTED_ENV='msys'
7955          else
7956            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7957          fi
7958          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7959          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7960        else
7961          # Not relevant for non-Windows
7962          IS_MAKE_CORRECT_ENV=true
7963        fi
7964        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7965          { $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
7966$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;}
7967        else
7968          FOUND_MAKE=$MAKE_CANDIDATE
7969
7970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7971
7972  # First separate the path from the arguments. This will split at the first
7973  # space.
7974  complete="$FOUND_MAKE"
7975  path="${complete%% *}"
7976  tmp="$complete EOL"
7977  arguments="${tmp#* }"
7978
7979  # Input might be given as Windows format, start by converting to
7980  # unix format.
7981  new_path=`$CYGPATH -u "$path"`
7982
7983  # Now try to locate executable using which
7984  new_path=`$WHICH "$new_path" 2> /dev/null`
7985  # bat and cmd files are not always considered executable in cygwin causing which
7986  # to not find them
7987  if test "x$new_path" = x \
7988           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7989           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7990    new_path=`$CYGPATH -u "$path"`
7991  fi
7992  if test "x$new_path" = x; then
7993    # Oops. Which didn't find the executable.
7994    # The splitting of arguments from the executable at a space might have been incorrect,
7995    # since paths with space are more likely in Windows. Give it another try with the whole
7996    # argument.
7997    path="$complete"
7998    arguments="EOL"
7999    new_path=`$CYGPATH -u "$path"`
8000    new_path=`$WHICH "$new_path" 2> /dev/null`
8001    # bat and cmd files are not always considered executable in cygwin causing which
8002    # to not find them
8003    if test "x$new_path" = x \
8004             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8005             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8006      new_path=`$CYGPATH -u "$path"`
8007    fi
8008    if test "x$new_path" = x; then
8009      # It's still not found. Now this is an unrecoverable error.
8010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8012      has_space=`$ECHO "$complete" | $GREP " "`
8013      if test "x$has_space" != x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8016      fi
8017      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8018    fi
8019  fi
8020
8021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8024  # "foo.exe" is OK but "foo" is an error.
8025  #
8026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8027  # It is also a way to make sure we got the proper file name for the real test later on.
8028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8029  if test "x$test_shortpath" = x; then
8030    # Short path failed, file does not exist as specified.
8031    # Try adding .exe or .cmd
8032    if test -f "${new_path}.exe"; then
8033       input_to_shortpath="${new_path}.exe"
8034    elif test -f "${new_path}.cmd"; then
8035       input_to_shortpath="${new_path}.cmd"
8036    else
8037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8039      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8040$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8041      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8042    fi
8043  else
8044    input_to_shortpath="$new_path"
8045  fi
8046
8047  # Call helper function which possibly converts this using DOS-style short mode.
8048  # If so, the updated path is stored in $new_path.
8049  new_path="$input_to_shortpath"
8050
8051  input_path="$input_to_shortpath"
8052  # Check if we need to convert this using DOS-style short mode. If the path
8053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8054  # take no chances and rewrite it.
8055  # Note: m4 eats our [], so we need to use [ and ] instead.
8056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8057  if test "x$has_forbidden_chars" != x; then
8058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8062      # Going to short mode and back again did indeed matter. Since short mode is
8063      # case insensitive, let's make it lowercase to improve readability.
8064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8065      # Now convert it back to Unix-stile (cygpath)
8066      input_path=`$CYGPATH -u "$shortmode_path"`
8067      new_path="$input_path"
8068    fi
8069  fi
8070
8071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8072  if test "x$test_cygdrive_prefix" = x; then
8073    # As a simple fix, exclude /usr/bin since it's not a real path.
8074    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8076      # a path prefixed by /cygdrive for fixpath to work.
8077      new_path="$CYGWIN_ROOT_PATH$input_path"
8078    fi
8079  fi
8080
8081  # remove trailing .exe if any
8082  new_path="${new_path/%.exe/}"
8083
8084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8085
8086  # First separate the path from the arguments. This will split at the first
8087  # space.
8088  complete="$FOUND_MAKE"
8089  path="${complete%% *}"
8090  tmp="$complete EOL"
8091  arguments="${tmp#* }"
8092
8093  # Input might be given as Windows format, start by converting to
8094  # unix format.
8095  new_path="$path"
8096
8097  windows_path="$new_path"
8098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8099    unix_path=`$CYGPATH -u "$windows_path"`
8100    new_path="$unix_path"
8101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8103    new_path="$unix_path"
8104  fi
8105
8106
8107  # Now try to locate executable using which
8108  new_path=`$WHICH "$new_path" 2> /dev/null`
8109
8110  if test "x$new_path" = x; then
8111    # Oops. Which didn't find the executable.
8112    # The splitting of arguments from the executable at a space might have been incorrect,
8113    # since paths with space are more likely in Windows. Give it another try with the whole
8114    # argument.
8115    path="$complete"
8116    arguments="EOL"
8117    new_path="$path"
8118
8119  windows_path="$new_path"
8120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8121    unix_path=`$CYGPATH -u "$windows_path"`
8122    new_path="$unix_path"
8123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8125    new_path="$unix_path"
8126  fi
8127
8128
8129    new_path=`$WHICH "$new_path" 2> /dev/null`
8130
8131    if test "x$new_path" = x; then
8132      # It's still not found. Now this is an unrecoverable error.
8133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8135      has_space=`$ECHO "$complete" | $GREP " "`
8136      if test "x$has_space" != x; then
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8139      fi
8140      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8141    fi
8142  fi
8143
8144  # Now new_path has a complete unix path to the binary
8145  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8146    # Keep paths in /bin as-is, but remove trailing .exe if any
8147    new_path="${new_path/%.exe/}"
8148    # Do not save /bin paths to all_fixpath_prefixes!
8149  else
8150    # Not in mixed or Windows style, start by that.
8151    new_path=`cmd //c echo $new_path`
8152
8153  input_path="$new_path"
8154  # Check if we need to convert this using DOS-style short mode. If the path
8155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8156  # take no chances and rewrite it.
8157  # Note: m4 eats our [], so we need to use [ and ] instead.
8158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8159  if test "x$has_forbidden_chars" != x; then
8160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8162  fi
8163
8164    # Output is in $new_path
8165
8166  windows_path="$new_path"
8167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8168    unix_path=`$CYGPATH -u "$windows_path"`
8169    new_path="$unix_path"
8170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8172    new_path="$unix_path"
8173  fi
8174
8175    # remove trailing .exe if any
8176    new_path="${new_path/%.exe/}"
8177
8178    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8179    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8180  fi
8181
8182  else
8183    # We're on a posix platform. Hooray! :)
8184    # First separate the path from the arguments. This will split at the first
8185    # space.
8186    complete="$FOUND_MAKE"
8187    path="${complete%% *}"
8188    tmp="$complete EOL"
8189    arguments="${tmp#* }"
8190
8191    # Cannot rely on the command "which" here since it doesn't always work.
8192    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8193    if test -z "$is_absolute_path"; then
8194      # Path to executable is not absolute. Find it.
8195      IFS_save="$IFS"
8196      IFS=:
8197      for p in $PATH; do
8198        if test -f "$p/$path" && test -x "$p/$path"; then
8199          new_path="$p/$path"
8200          break
8201        fi
8202      done
8203      IFS="$IFS_save"
8204    else
8205      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8206$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8207      new_path="$path"
8208    fi
8209
8210    if test "x$new_path" = x; then
8211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8213        has_space=`$ECHO "$complete" | $GREP " "`
8214        if test "x$has_space" != x; then
8215          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8217        fi
8218        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8219      fi
8220  fi
8221
8222      # Now join together the path and the arguments once again
8223      if test "x$arguments" != xEOL; then
8224        new_complete="$new_path ${arguments% *}"
8225      else
8226        new_complete="$new_path"
8227      fi
8228
8229  if test "x$complete" != "x$new_complete"; then
8230      FOUND_MAKE="$new_complete"
8231      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8232$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8233    fi
8234
8235        fi
8236      fi
8237    fi
8238  fi
8239
8240    if test "x$FOUND_MAKE" = x; then
8241      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8242    fi
8243  else
8244    # Try our hardest to locate a correct version of GNU make
8245    for ac_prog in gmake
8246do
8247  # Extract the first word of "$ac_prog", so it can be a program name with args.
8248set dummy $ac_prog; ac_word=$2
8249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8250$as_echo_n "checking for $ac_word... " >&6; }
8251if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8252  $as_echo_n "(cached) " >&6
8253else
8254  case $CHECK_GMAKE in
8255  [\\/]* | ?:[\\/]*)
8256  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8257  ;;
8258  *)
8259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8260for as_dir in $PATH
8261do
8262  IFS=$as_save_IFS
8263  test -z "$as_dir" && as_dir=.
8264    for ac_exec_ext in '' $ac_executable_extensions; do
8265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8266    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8268    break 2
8269  fi
8270done
8271  done
8272IFS=$as_save_IFS
8273
8274  ;;
8275esac
8276fi
8277CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8278if test -n "$CHECK_GMAKE"; then
8279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8280$as_echo "$CHECK_GMAKE" >&6; }
8281else
8282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283$as_echo "no" >&6; }
8284fi
8285
8286
8287  test -n "$CHECK_GMAKE" && break
8288done
8289
8290
8291  MAKE_CANDIDATE=""$CHECK_GMAKE""
8292  DESCRIPTION="gmake in PATH"
8293  if test "x$MAKE_CANDIDATE" != x; then
8294    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8295$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8296    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8297    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8298    if test "x$IS_GNU_MAKE" = x; then
8299      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8300$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8301    else
8302      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8303      if test "x$IS_MODERN_MAKE" = x; then
8304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8305$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8306      else
8307        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8308          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8309            MAKE_EXPECTED_ENV='cygwin'
8310          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311            MAKE_EXPECTED_ENV='msys'
8312          else
8313            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8314          fi
8315          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8316          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8317        else
8318          # Not relevant for non-Windows
8319          IS_MAKE_CORRECT_ENV=true
8320        fi
8321        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8322          { $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
8323$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;}
8324        else
8325          FOUND_MAKE=$MAKE_CANDIDATE
8326
8327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8328
8329  # First separate the path from the arguments. This will split at the first
8330  # space.
8331  complete="$FOUND_MAKE"
8332  path="${complete%% *}"
8333  tmp="$complete EOL"
8334  arguments="${tmp#* }"
8335
8336  # Input might be given as Windows format, start by converting to
8337  # unix format.
8338  new_path=`$CYGPATH -u "$path"`
8339
8340  # Now try to locate executable using which
8341  new_path=`$WHICH "$new_path" 2> /dev/null`
8342  # bat and cmd files are not always considered executable in cygwin causing which
8343  # to not find them
8344  if test "x$new_path" = x \
8345           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8346           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8347    new_path=`$CYGPATH -u "$path"`
8348  fi
8349  if test "x$new_path" = x; then
8350    # Oops. Which didn't find the executable.
8351    # The splitting of arguments from the executable at a space might have been incorrect,
8352    # since paths with space are more likely in Windows. Give it another try with the whole
8353    # argument.
8354    path="$complete"
8355    arguments="EOL"
8356    new_path=`$CYGPATH -u "$path"`
8357    new_path=`$WHICH "$new_path" 2> /dev/null`
8358    # bat and cmd files are not always considered executable in cygwin causing which
8359    # to not find them
8360    if test "x$new_path" = x \
8361             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8362             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8363      new_path=`$CYGPATH -u "$path"`
8364    fi
8365    if test "x$new_path" = x; then
8366      # It's still not found. Now this is an unrecoverable error.
8367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8369      has_space=`$ECHO "$complete" | $GREP " "`
8370      if test "x$has_space" != x; then
8371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8373      fi
8374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8375    fi
8376  fi
8377
8378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8381  # "foo.exe" is OK but "foo" is an error.
8382  #
8383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8384  # It is also a way to make sure we got the proper file name for the real test later on.
8385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8386  if test "x$test_shortpath" = x; then
8387    # Short path failed, file does not exist as specified.
8388    # Try adding .exe or .cmd
8389    if test -f "${new_path}.exe"; then
8390       input_to_shortpath="${new_path}.exe"
8391    elif test -f "${new_path}.cmd"; then
8392       input_to_shortpath="${new_path}.cmd"
8393    else
8394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8399    fi
8400  else
8401    input_to_shortpath="$new_path"
8402  fi
8403
8404  # Call helper function which possibly converts this using DOS-style short mode.
8405  # If so, the updated path is stored in $new_path.
8406  new_path="$input_to_shortpath"
8407
8408  input_path="$input_to_shortpath"
8409  # Check if we need to convert this using DOS-style short mode. If the path
8410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8411  # take no chances and rewrite it.
8412  # Note: m4 eats our [], so we need to use [ and ] instead.
8413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8414  if test "x$has_forbidden_chars" != x; then
8415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8419      # Going to short mode and back again did indeed matter. Since short mode is
8420      # case insensitive, let's make it lowercase to improve readability.
8421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8422      # Now convert it back to Unix-stile (cygpath)
8423      input_path=`$CYGPATH -u "$shortmode_path"`
8424      new_path="$input_path"
8425    fi
8426  fi
8427
8428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8429  if test "x$test_cygdrive_prefix" = x; then
8430    # As a simple fix, exclude /usr/bin since it's not a real path.
8431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8433      # a path prefixed by /cygdrive for fixpath to work.
8434      new_path="$CYGWIN_ROOT_PATH$input_path"
8435    fi
8436  fi
8437
8438  # remove trailing .exe if any
8439  new_path="${new_path/%.exe/}"
8440
8441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8442
8443  # First separate the path from the arguments. This will split at the first
8444  # space.
8445  complete="$FOUND_MAKE"
8446  path="${complete%% *}"
8447  tmp="$complete EOL"
8448  arguments="${tmp#* }"
8449
8450  # Input might be given as Windows format, start by converting to
8451  # unix format.
8452  new_path="$path"
8453
8454  windows_path="$new_path"
8455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8456    unix_path=`$CYGPATH -u "$windows_path"`
8457    new_path="$unix_path"
8458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8460    new_path="$unix_path"
8461  fi
8462
8463
8464  # Now try to locate executable using which
8465  new_path=`$WHICH "$new_path" 2> /dev/null`
8466
8467  if test "x$new_path" = x; then
8468    # Oops. Which didn't find the executable.
8469    # The splitting of arguments from the executable at a space might have been incorrect,
8470    # since paths with space are more likely in Windows. Give it another try with the whole
8471    # argument.
8472    path="$complete"
8473    arguments="EOL"
8474    new_path="$path"
8475
8476  windows_path="$new_path"
8477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8478    unix_path=`$CYGPATH -u "$windows_path"`
8479    new_path="$unix_path"
8480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8482    new_path="$unix_path"
8483  fi
8484
8485
8486    new_path=`$WHICH "$new_path" 2> /dev/null`
8487
8488    if test "x$new_path" = x; then
8489      # It's still not found. Now this is an unrecoverable error.
8490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8492      has_space=`$ECHO "$complete" | $GREP " "`
8493      if test "x$has_space" != x; then
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8496      fi
8497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8498    fi
8499  fi
8500
8501  # Now new_path has a complete unix path to the binary
8502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8503    # Keep paths in /bin as-is, but remove trailing .exe if any
8504    new_path="${new_path/%.exe/}"
8505    # Do not save /bin paths to all_fixpath_prefixes!
8506  else
8507    # Not in mixed or Windows style, start by that.
8508    new_path=`cmd //c echo $new_path`
8509
8510  input_path="$new_path"
8511  # Check if we need to convert this using DOS-style short mode. If the path
8512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8513  # take no chances and rewrite it.
8514  # Note: m4 eats our [], so we need to use [ and ] instead.
8515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8516  if test "x$has_forbidden_chars" != x; then
8517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8519  fi
8520
8521    # Output is in $new_path
8522
8523  windows_path="$new_path"
8524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8525    unix_path=`$CYGPATH -u "$windows_path"`
8526    new_path="$unix_path"
8527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8529    new_path="$unix_path"
8530  fi
8531
8532    # remove trailing .exe if any
8533    new_path="${new_path/%.exe/}"
8534
8535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8537  fi
8538
8539  else
8540    # We're on a posix platform. Hooray! :)
8541    # First separate the path from the arguments. This will split at the first
8542    # space.
8543    complete="$FOUND_MAKE"
8544    path="${complete%% *}"
8545    tmp="$complete EOL"
8546    arguments="${tmp#* }"
8547
8548    # Cannot rely on the command "which" here since it doesn't always work.
8549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8550    if test -z "$is_absolute_path"; then
8551      # Path to executable is not absolute. Find it.
8552      IFS_save="$IFS"
8553      IFS=:
8554      for p in $PATH; do
8555        if test -f "$p/$path" && test -x "$p/$path"; then
8556          new_path="$p/$path"
8557          break
8558        fi
8559      done
8560      IFS="$IFS_save"
8561    else
8562      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8563$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8564      new_path="$path"
8565    fi
8566
8567    if test "x$new_path" = x; then
8568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8570        has_space=`$ECHO "$complete" | $GREP " "`
8571        if test "x$has_space" != x; then
8572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8574        fi
8575        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8576      fi
8577  fi
8578
8579      # Now join together the path and the arguments once again
8580      if test "x$arguments" != xEOL; then
8581        new_complete="$new_path ${arguments% *}"
8582      else
8583        new_complete="$new_path"
8584      fi
8585
8586  if test "x$complete" != "x$new_complete"; then
8587      FOUND_MAKE="$new_complete"
8588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8589$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8590    fi
8591
8592        fi
8593      fi
8594    fi
8595  fi
8596
8597
8598    if test "x$FOUND_MAKE" = x; then
8599      for ac_prog in make
8600do
8601  # Extract the first word of "$ac_prog", so it can be a program name with args.
8602set dummy $ac_prog; ac_word=$2
8603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8604$as_echo_n "checking for $ac_word... " >&6; }
8605if ${ac_cv_path_CHECK_MAKE+:} false; then :
8606  $as_echo_n "(cached) " >&6
8607else
8608  case $CHECK_MAKE in
8609  [\\/]* | ?:[\\/]*)
8610  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8611  ;;
8612  *)
8613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8614for as_dir in $PATH
8615do
8616  IFS=$as_save_IFS
8617  test -z "$as_dir" && as_dir=.
8618    for ac_exec_ext in '' $ac_executable_extensions; do
8619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8620    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8622    break 2
8623  fi
8624done
8625  done
8626IFS=$as_save_IFS
8627
8628  ;;
8629esac
8630fi
8631CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8632if test -n "$CHECK_MAKE"; then
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8634$as_echo "$CHECK_MAKE" >&6; }
8635else
8636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8637$as_echo "no" >&6; }
8638fi
8639
8640
8641  test -n "$CHECK_MAKE" && break
8642done
8643
8644
8645  MAKE_CANDIDATE=""$CHECK_MAKE""
8646  DESCRIPTION="make in PATH"
8647  if test "x$MAKE_CANDIDATE" != x; then
8648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8652    if test "x$IS_GNU_MAKE" = x; then
8653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8655    else
8656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8657      if test "x$IS_MODERN_MAKE" = x; then
8658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8659$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8660      else
8661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8663            MAKE_EXPECTED_ENV='cygwin'
8664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8665            MAKE_EXPECTED_ENV='msys'
8666          else
8667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8668          fi
8669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8671        else
8672          # Not relevant for non-Windows
8673          IS_MAKE_CORRECT_ENV=true
8674        fi
8675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8676          { $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
8677$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;}
8678        else
8679          FOUND_MAKE=$MAKE_CANDIDATE
8680
8681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8682
8683  # First separate the path from the arguments. This will split at the first
8684  # space.
8685  complete="$FOUND_MAKE"
8686  path="${complete%% *}"
8687  tmp="$complete EOL"
8688  arguments="${tmp#* }"
8689
8690  # Input might be given as Windows format, start by converting to
8691  # unix format.
8692  new_path=`$CYGPATH -u "$path"`
8693
8694  # Now try to locate executable using which
8695  new_path=`$WHICH "$new_path" 2> /dev/null`
8696  # bat and cmd files are not always considered executable in cygwin causing which
8697  # to not find them
8698  if test "x$new_path" = x \
8699           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8700           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8701    new_path=`$CYGPATH -u "$path"`
8702  fi
8703  if test "x$new_path" = x; then
8704    # Oops. Which didn't find the executable.
8705    # The splitting of arguments from the executable at a space might have been incorrect,
8706    # since paths with space are more likely in Windows. Give it another try with the whole
8707    # argument.
8708    path="$complete"
8709    arguments="EOL"
8710    new_path=`$CYGPATH -u "$path"`
8711    new_path=`$WHICH "$new_path" 2> /dev/null`
8712    # bat and cmd files are not always considered executable in cygwin causing which
8713    # to not find them
8714    if test "x$new_path" = x \
8715             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8716             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8717      new_path=`$CYGPATH -u "$path"`
8718    fi
8719    if test "x$new_path" = x; then
8720      # It's still not found. Now this is an unrecoverable error.
8721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8723      has_space=`$ECHO "$complete" | $GREP " "`
8724      if test "x$has_space" != x; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8727      fi
8728      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8729    fi
8730  fi
8731
8732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8735  # "foo.exe" is OK but "foo" is an error.
8736  #
8737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8738  # It is also a way to make sure we got the proper file name for the real test later on.
8739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8740  if test "x$test_shortpath" = x; then
8741    # Short path failed, file does not exist as specified.
8742    # Try adding .exe or .cmd
8743    if test -f "${new_path}.exe"; then
8744       input_to_shortpath="${new_path}.exe"
8745    elif test -f "${new_path}.cmd"; then
8746       input_to_shortpath="${new_path}.cmd"
8747    else
8748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8753    fi
8754  else
8755    input_to_shortpath="$new_path"
8756  fi
8757
8758  # Call helper function which possibly converts this using DOS-style short mode.
8759  # If so, the updated path is stored in $new_path.
8760  new_path="$input_to_shortpath"
8761
8762  input_path="$input_to_shortpath"
8763  # Check if we need to convert this using DOS-style short mode. If the path
8764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8765  # take no chances and rewrite it.
8766  # Note: m4 eats our [], so we need to use [ and ] instead.
8767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8768  if test "x$has_forbidden_chars" != x; then
8769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8773      # Going to short mode and back again did indeed matter. Since short mode is
8774      # case insensitive, let's make it lowercase to improve readability.
8775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8776      # Now convert it back to Unix-stile (cygpath)
8777      input_path=`$CYGPATH -u "$shortmode_path"`
8778      new_path="$input_path"
8779    fi
8780  fi
8781
8782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8783  if test "x$test_cygdrive_prefix" = x; then
8784    # As a simple fix, exclude /usr/bin since it's not a real path.
8785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8787      # a path prefixed by /cygdrive for fixpath to work.
8788      new_path="$CYGWIN_ROOT_PATH$input_path"
8789    fi
8790  fi
8791
8792  # remove trailing .exe if any
8793  new_path="${new_path/%.exe/}"
8794
8795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8796
8797  # First separate the path from the arguments. This will split at the first
8798  # space.
8799  complete="$FOUND_MAKE"
8800  path="${complete%% *}"
8801  tmp="$complete EOL"
8802  arguments="${tmp#* }"
8803
8804  # Input might be given as Windows format, start by converting to
8805  # unix format.
8806  new_path="$path"
8807
8808  windows_path="$new_path"
8809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8810    unix_path=`$CYGPATH -u "$windows_path"`
8811    new_path="$unix_path"
8812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8814    new_path="$unix_path"
8815  fi
8816
8817
8818  # Now try to locate executable using which
8819  new_path=`$WHICH "$new_path" 2> /dev/null`
8820
8821  if test "x$new_path" = x; then
8822    # Oops. Which didn't find the executable.
8823    # The splitting of arguments from the executable at a space might have been incorrect,
8824    # since paths with space are more likely in Windows. Give it another try with the whole
8825    # argument.
8826    path="$complete"
8827    arguments="EOL"
8828    new_path="$path"
8829
8830  windows_path="$new_path"
8831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8832    unix_path=`$CYGPATH -u "$windows_path"`
8833    new_path="$unix_path"
8834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8836    new_path="$unix_path"
8837  fi
8838
8839
8840    new_path=`$WHICH "$new_path" 2> /dev/null`
8841
8842    if test "x$new_path" = x; then
8843      # It's still not found. Now this is an unrecoverable error.
8844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8846      has_space=`$ECHO "$complete" | $GREP " "`
8847      if test "x$has_space" != x; then
8848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8850      fi
8851      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8852    fi
8853  fi
8854
8855  # Now new_path has a complete unix path to the binary
8856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8857    # Keep paths in /bin as-is, but remove trailing .exe if any
8858    new_path="${new_path/%.exe/}"
8859    # Do not save /bin paths to all_fixpath_prefixes!
8860  else
8861    # Not in mixed or Windows style, start by that.
8862    new_path=`cmd //c echo $new_path`
8863
8864  input_path="$new_path"
8865  # Check if we need to convert this using DOS-style short mode. If the path
8866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8867  # take no chances and rewrite it.
8868  # Note: m4 eats our [], so we need to use [ and ] instead.
8869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8870  if test "x$has_forbidden_chars" != x; then
8871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8873  fi
8874
8875    # Output is in $new_path
8876
8877  windows_path="$new_path"
8878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8879    unix_path=`$CYGPATH -u "$windows_path"`
8880    new_path="$unix_path"
8881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8883    new_path="$unix_path"
8884  fi
8885
8886    # remove trailing .exe if any
8887    new_path="${new_path/%.exe/}"
8888
8889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8891  fi
8892
8893  else
8894    # We're on a posix platform. Hooray! :)
8895    # First separate the path from the arguments. This will split at the first
8896    # space.
8897    complete="$FOUND_MAKE"
8898    path="${complete%% *}"
8899    tmp="$complete EOL"
8900    arguments="${tmp#* }"
8901
8902    # Cannot rely on the command "which" here since it doesn't always work.
8903    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8904    if test -z "$is_absolute_path"; then
8905      # Path to executable is not absolute. Find it.
8906      IFS_save="$IFS"
8907      IFS=:
8908      for p in $PATH; do
8909        if test -f "$p/$path" && test -x "$p/$path"; then
8910          new_path="$p/$path"
8911          break
8912        fi
8913      done
8914      IFS="$IFS_save"
8915    else
8916      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8917$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8918      new_path="$path"
8919    fi
8920
8921    if test "x$new_path" = x; then
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8923$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8924        has_space=`$ECHO "$complete" | $GREP " "`
8925        if test "x$has_space" != x; then
8926          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8928        fi
8929        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8930      fi
8931  fi
8932
8933      # Now join together the path and the arguments once again
8934      if test "x$arguments" != xEOL; then
8935        new_complete="$new_path ${arguments% *}"
8936      else
8937        new_complete="$new_path"
8938      fi
8939
8940  if test "x$complete" != "x$new_complete"; then
8941      FOUND_MAKE="$new_complete"
8942      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8943$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8944    fi
8945
8946        fi
8947      fi
8948    fi
8949  fi
8950
8951    fi
8952
8953    if test "x$FOUND_MAKE" = x; then
8954      if test "x$TOOLS_DIR" != x; then
8955        # We have a tools-dir, check that as well before giving up.
8956        OLD_PATH=$PATH
8957        PATH=$TOOLS_DIR:$PATH
8958        for ac_prog in gmake
8959do
8960  # Extract the first word of "$ac_prog", so it can be a program name with args.
8961set dummy $ac_prog; ac_word=$2
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963$as_echo_n "checking for $ac_word... " >&6; }
8964if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
8965  $as_echo_n "(cached) " >&6
8966else
8967  case $CHECK_TOOLSDIR_GMAKE in
8968  [\\/]* | ?:[\\/]*)
8969  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8970  ;;
8971  *)
8972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8973for as_dir in $PATH
8974do
8975  IFS=$as_save_IFS
8976  test -z "$as_dir" && as_dir=.
8977    for ac_exec_ext in '' $ac_executable_extensions; do
8978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8979    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8981    break 2
8982  fi
8983done
8984  done
8985IFS=$as_save_IFS
8986
8987  ;;
8988esac
8989fi
8990CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8991if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8993$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8994else
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996$as_echo "no" >&6; }
8997fi
8998
8999
9000  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9001done
9002
9003
9004  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9005  DESCRIPTION="gmake in tools-dir"
9006  if test "x$MAKE_CANDIDATE" != x; then
9007    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9008$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9009    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9010    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9011    if test "x$IS_GNU_MAKE" = x; then
9012      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9013$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9014    else
9015      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9016      if test "x$IS_MODERN_MAKE" = x; then
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9018$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9019      else
9020        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9021          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9022            MAKE_EXPECTED_ENV='cygwin'
9023          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9024            MAKE_EXPECTED_ENV='msys'
9025          else
9026            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9027          fi
9028          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9029          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9030        else
9031          # Not relevant for non-Windows
9032          IS_MAKE_CORRECT_ENV=true
9033        fi
9034        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9035          { $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
9036$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;}
9037        else
9038          FOUND_MAKE=$MAKE_CANDIDATE
9039
9040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9041
9042  # First separate the path from the arguments. This will split at the first
9043  # space.
9044  complete="$FOUND_MAKE"
9045  path="${complete%% *}"
9046  tmp="$complete EOL"
9047  arguments="${tmp#* }"
9048
9049  # Input might be given as Windows format, start by converting to
9050  # unix format.
9051  new_path=`$CYGPATH -u "$path"`
9052
9053  # Now try to locate executable using which
9054  new_path=`$WHICH "$new_path" 2> /dev/null`
9055  # bat and cmd files are not always considered executable in cygwin causing which
9056  # to not find them
9057  if test "x$new_path" = x \
9058           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9059           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9060    new_path=`$CYGPATH -u "$path"`
9061  fi
9062  if test "x$new_path" = x; then
9063    # Oops. Which didn't find the executable.
9064    # The splitting of arguments from the executable at a space might have been incorrect,
9065    # since paths with space are more likely in Windows. Give it another try with the whole
9066    # argument.
9067    path="$complete"
9068    arguments="EOL"
9069    new_path=`$CYGPATH -u "$path"`
9070    new_path=`$WHICH "$new_path" 2> /dev/null`
9071    # bat and cmd files are not always considered executable in cygwin causing which
9072    # to not find them
9073    if test "x$new_path" = x \
9074             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9075             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9076      new_path=`$CYGPATH -u "$path"`
9077    fi
9078    if test "x$new_path" = x; then
9079      # It's still not found. Now this is an unrecoverable error.
9080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9082      has_space=`$ECHO "$complete" | $GREP " "`
9083      if test "x$has_space" != x; then
9084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9086      fi
9087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9088    fi
9089  fi
9090
9091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9094  # "foo.exe" is OK but "foo" is an error.
9095  #
9096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9097  # It is also a way to make sure we got the proper file name for the real test later on.
9098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9099  if test "x$test_shortpath" = x; then
9100    # Short path failed, file does not exist as specified.
9101    # Try adding .exe or .cmd
9102    if test -f "${new_path}.exe"; then
9103       input_to_shortpath="${new_path}.exe"
9104    elif test -f "${new_path}.cmd"; then
9105       input_to_shortpath="${new_path}.cmd"
9106    else
9107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9108$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9109      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9110$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9111      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9112    fi
9113  else
9114    input_to_shortpath="$new_path"
9115  fi
9116
9117  # Call helper function which possibly converts this using DOS-style short mode.
9118  # If so, the updated path is stored in $new_path.
9119  new_path="$input_to_shortpath"
9120
9121  input_path="$input_to_shortpath"
9122  # Check if we need to convert this using DOS-style short mode. If the path
9123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9124  # take no chances and rewrite it.
9125  # Note: m4 eats our [], so we need to use [ and ] instead.
9126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9127  if test "x$has_forbidden_chars" != x; then
9128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9132      # Going to short mode and back again did indeed matter. Since short mode is
9133      # case insensitive, let's make it lowercase to improve readability.
9134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9135      # Now convert it back to Unix-stile (cygpath)
9136      input_path=`$CYGPATH -u "$shortmode_path"`
9137      new_path="$input_path"
9138    fi
9139  fi
9140
9141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9142  if test "x$test_cygdrive_prefix" = x; then
9143    # As a simple fix, exclude /usr/bin since it's not a real path.
9144    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9146      # a path prefixed by /cygdrive for fixpath to work.
9147      new_path="$CYGWIN_ROOT_PATH$input_path"
9148    fi
9149  fi
9150
9151  # remove trailing .exe if any
9152  new_path="${new_path/%.exe/}"
9153
9154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9155
9156  # First separate the path from the arguments. This will split at the first
9157  # space.
9158  complete="$FOUND_MAKE"
9159  path="${complete%% *}"
9160  tmp="$complete EOL"
9161  arguments="${tmp#* }"
9162
9163  # Input might be given as Windows format, start by converting to
9164  # unix format.
9165  new_path="$path"
9166
9167  windows_path="$new_path"
9168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9169    unix_path=`$CYGPATH -u "$windows_path"`
9170    new_path="$unix_path"
9171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9173    new_path="$unix_path"
9174  fi
9175
9176
9177  # Now try to locate executable using which
9178  new_path=`$WHICH "$new_path" 2> /dev/null`
9179
9180  if test "x$new_path" = x; then
9181    # Oops. Which didn't find the executable.
9182    # The splitting of arguments from the executable at a space might have been incorrect,
9183    # since paths with space are more likely in Windows. Give it another try with the whole
9184    # argument.
9185    path="$complete"
9186    arguments="EOL"
9187    new_path="$path"
9188
9189  windows_path="$new_path"
9190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9191    unix_path=`$CYGPATH -u "$windows_path"`
9192    new_path="$unix_path"
9193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9195    new_path="$unix_path"
9196  fi
9197
9198
9199    new_path=`$WHICH "$new_path" 2> /dev/null`
9200
9201    if test "x$new_path" = x; then
9202      # It's still not found. Now this is an unrecoverable error.
9203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9205      has_space=`$ECHO "$complete" | $GREP " "`
9206      if test "x$has_space" != x; then
9207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9209      fi
9210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9211    fi
9212  fi
9213
9214  # Now new_path has a complete unix path to the binary
9215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9216    # Keep paths in /bin as-is, but remove trailing .exe if any
9217    new_path="${new_path/%.exe/}"
9218    # Do not save /bin paths to all_fixpath_prefixes!
9219  else
9220    # Not in mixed or Windows style, start by that.
9221    new_path=`cmd //c echo $new_path`
9222
9223  input_path="$new_path"
9224  # Check if we need to convert this using DOS-style short mode. If the path
9225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9226  # take no chances and rewrite it.
9227  # Note: m4 eats our [], so we need to use [ and ] instead.
9228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9229  if test "x$has_forbidden_chars" != x; then
9230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9232  fi
9233
9234    # Output is in $new_path
9235
9236  windows_path="$new_path"
9237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9238    unix_path=`$CYGPATH -u "$windows_path"`
9239    new_path="$unix_path"
9240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9242    new_path="$unix_path"
9243  fi
9244
9245    # remove trailing .exe if any
9246    new_path="${new_path/%.exe/}"
9247
9248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9250  fi
9251
9252  else
9253    # We're on a posix platform. Hooray! :)
9254    # First separate the path from the arguments. This will split at the first
9255    # space.
9256    complete="$FOUND_MAKE"
9257    path="${complete%% *}"
9258    tmp="$complete EOL"
9259    arguments="${tmp#* }"
9260
9261    # Cannot rely on the command "which" here since it doesn't always work.
9262    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9263    if test -z "$is_absolute_path"; then
9264      # Path to executable is not absolute. Find it.
9265      IFS_save="$IFS"
9266      IFS=:
9267      for p in $PATH; do
9268        if test -f "$p/$path" && test -x "$p/$path"; then
9269          new_path="$p/$path"
9270          break
9271        fi
9272      done
9273      IFS="$IFS_save"
9274    else
9275      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9276$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9277      new_path="$path"
9278    fi
9279
9280    if test "x$new_path" = x; then
9281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9282$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9283        has_space=`$ECHO "$complete" | $GREP " "`
9284        if test "x$has_space" != x; then
9285          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9287        fi
9288        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9289      fi
9290  fi
9291
9292      # Now join together the path and the arguments once again
9293      if test "x$arguments" != xEOL; then
9294        new_complete="$new_path ${arguments% *}"
9295      else
9296        new_complete="$new_path"
9297      fi
9298
9299  if test "x$complete" != "x$new_complete"; then
9300      FOUND_MAKE="$new_complete"
9301      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9302$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9303    fi
9304
9305        fi
9306      fi
9307    fi
9308  fi
9309
9310        if test "x$FOUND_MAKE" = x; then
9311          for ac_prog in make
9312do
9313  # Extract the first word of "$ac_prog", so it can be a program name with args.
9314set dummy $ac_prog; ac_word=$2
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9316$as_echo_n "checking for $ac_word... " >&6; }
9317if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9318  $as_echo_n "(cached) " >&6
9319else
9320  case $CHECK_TOOLSDIR_MAKE in
9321  [\\/]* | ?:[\\/]*)
9322  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9323  ;;
9324  *)
9325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9326for as_dir in $PATH
9327do
9328  IFS=$as_save_IFS
9329  test -z "$as_dir" && as_dir=.
9330    for ac_exec_ext in '' $ac_executable_extensions; do
9331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9332    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9334    break 2
9335  fi
9336done
9337  done
9338IFS=$as_save_IFS
9339
9340  ;;
9341esac
9342fi
9343CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9344if test -n "$CHECK_TOOLSDIR_MAKE"; then
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9346$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9347else
9348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9349$as_echo "no" >&6; }
9350fi
9351
9352
9353  test -n "$CHECK_TOOLSDIR_MAKE" && break
9354done
9355
9356
9357  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9358  DESCRIPTION="make in tools-dir"
9359  if test "x$MAKE_CANDIDATE" != x; then
9360    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9361$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9362    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9363    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9364    if test "x$IS_GNU_MAKE" = x; then
9365      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9366$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9367    else
9368      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9369      if test "x$IS_MODERN_MAKE" = x; then
9370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9371$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9372      else
9373        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9374          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9375            MAKE_EXPECTED_ENV='cygwin'
9376          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9377            MAKE_EXPECTED_ENV='msys'
9378          else
9379            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9380          fi
9381          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9382          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9383        else
9384          # Not relevant for non-Windows
9385          IS_MAKE_CORRECT_ENV=true
9386        fi
9387        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9388          { $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
9389$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;}
9390        else
9391          FOUND_MAKE=$MAKE_CANDIDATE
9392
9393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9394
9395  # First separate the path from the arguments. This will split at the first
9396  # space.
9397  complete="$FOUND_MAKE"
9398  path="${complete%% *}"
9399  tmp="$complete EOL"
9400  arguments="${tmp#* }"
9401
9402  # Input might be given as Windows format, start by converting to
9403  # unix format.
9404  new_path=`$CYGPATH -u "$path"`
9405
9406  # Now try to locate executable using which
9407  new_path=`$WHICH "$new_path" 2> /dev/null`
9408  # bat and cmd files are not always considered executable in cygwin causing which
9409  # to not find them
9410  if test "x$new_path" = x \
9411           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9412           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9413    new_path=`$CYGPATH -u "$path"`
9414  fi
9415  if test "x$new_path" = x; then
9416    # Oops. Which didn't find the executable.
9417    # The splitting of arguments from the executable at a space might have been incorrect,
9418    # since paths with space are more likely in Windows. Give it another try with the whole
9419    # argument.
9420    path="$complete"
9421    arguments="EOL"
9422    new_path=`$CYGPATH -u "$path"`
9423    new_path=`$WHICH "$new_path" 2> /dev/null`
9424    # bat and cmd files are not always considered executable in cygwin causing which
9425    # to not find them
9426    if test "x$new_path" = x \
9427             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9428             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9429      new_path=`$CYGPATH -u "$path"`
9430    fi
9431    if test "x$new_path" = x; then
9432      # It's still not found. Now this is an unrecoverable error.
9433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9434$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9435      has_space=`$ECHO "$complete" | $GREP " "`
9436      if test "x$has_space" != x; then
9437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9439      fi
9440      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9441    fi
9442  fi
9443
9444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9447  # "foo.exe" is OK but "foo" is an error.
9448  #
9449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9450  # It is also a way to make sure we got the proper file name for the real test later on.
9451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9452  if test "x$test_shortpath" = x; then
9453    # Short path failed, file does not exist as specified.
9454    # Try adding .exe or .cmd
9455    if test -f "${new_path}.exe"; then
9456       input_to_shortpath="${new_path}.exe"
9457    elif test -f "${new_path}.cmd"; then
9458       input_to_shortpath="${new_path}.cmd"
9459    else
9460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9462      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9463$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9464      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9465    fi
9466  else
9467    input_to_shortpath="$new_path"
9468  fi
9469
9470  # Call helper function which possibly converts this using DOS-style short mode.
9471  # If so, the updated path is stored in $new_path.
9472  new_path="$input_to_shortpath"
9473
9474  input_path="$input_to_shortpath"
9475  # Check if we need to convert this using DOS-style short mode. If the path
9476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9477  # take no chances and rewrite it.
9478  # Note: m4 eats our [], so we need to use [ and ] instead.
9479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9480  if test "x$has_forbidden_chars" != x; then
9481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9485      # Going to short mode and back again did indeed matter. Since short mode is
9486      # case insensitive, let's make it lowercase to improve readability.
9487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9488      # Now convert it back to Unix-stile (cygpath)
9489      input_path=`$CYGPATH -u "$shortmode_path"`
9490      new_path="$input_path"
9491    fi
9492  fi
9493
9494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9495  if test "x$test_cygdrive_prefix" = x; then
9496    # As a simple fix, exclude /usr/bin since it's not a real path.
9497    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9499      # a path prefixed by /cygdrive for fixpath to work.
9500      new_path="$CYGWIN_ROOT_PATH$input_path"
9501    fi
9502  fi
9503
9504  # remove trailing .exe if any
9505  new_path="${new_path/%.exe/}"
9506
9507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9508
9509  # First separate the path from the arguments. This will split at the first
9510  # space.
9511  complete="$FOUND_MAKE"
9512  path="${complete%% *}"
9513  tmp="$complete EOL"
9514  arguments="${tmp#* }"
9515
9516  # Input might be given as Windows format, start by converting to
9517  # unix format.
9518  new_path="$path"
9519
9520  windows_path="$new_path"
9521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9522    unix_path=`$CYGPATH -u "$windows_path"`
9523    new_path="$unix_path"
9524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9526    new_path="$unix_path"
9527  fi
9528
9529
9530  # Now try to locate executable using which
9531  new_path=`$WHICH "$new_path" 2> /dev/null`
9532
9533  if test "x$new_path" = x; then
9534    # Oops. Which didn't find the executable.
9535    # The splitting of arguments from the executable at a space might have been incorrect,
9536    # since paths with space are more likely in Windows. Give it another try with the whole
9537    # argument.
9538    path="$complete"
9539    arguments="EOL"
9540    new_path="$path"
9541
9542  windows_path="$new_path"
9543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9544    unix_path=`$CYGPATH -u "$windows_path"`
9545    new_path="$unix_path"
9546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9548    new_path="$unix_path"
9549  fi
9550
9551
9552    new_path=`$WHICH "$new_path" 2> /dev/null`
9553
9554    if test "x$new_path" = x; then
9555      # It's still not found. Now this is an unrecoverable error.
9556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9557$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9558      has_space=`$ECHO "$complete" | $GREP " "`
9559      if test "x$has_space" != x; then
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9562      fi
9563      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9564    fi
9565  fi
9566
9567  # Now new_path has a complete unix path to the binary
9568  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9569    # Keep paths in /bin as-is, but remove trailing .exe if any
9570    new_path="${new_path/%.exe/}"
9571    # Do not save /bin paths to all_fixpath_prefixes!
9572  else
9573    # Not in mixed or Windows style, start by that.
9574    new_path=`cmd //c echo $new_path`
9575
9576  input_path="$new_path"
9577  # Check if we need to convert this using DOS-style short mode. If the path
9578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9579  # take no chances and rewrite it.
9580  # Note: m4 eats our [], so we need to use [ and ] instead.
9581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9582  if test "x$has_forbidden_chars" != x; then
9583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9585  fi
9586
9587    # Output is in $new_path
9588
9589  windows_path="$new_path"
9590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9591    unix_path=`$CYGPATH -u "$windows_path"`
9592    new_path="$unix_path"
9593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9595    new_path="$unix_path"
9596  fi
9597
9598    # remove trailing .exe if any
9599    new_path="${new_path/%.exe/}"
9600
9601    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9602    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9603  fi
9604
9605  else
9606    # We're on a posix platform. Hooray! :)
9607    # First separate the path from the arguments. This will split at the first
9608    # space.
9609    complete="$FOUND_MAKE"
9610    path="${complete%% *}"
9611    tmp="$complete EOL"
9612    arguments="${tmp#* }"
9613
9614    # Cannot rely on the command "which" here since it doesn't always work.
9615    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9616    if test -z "$is_absolute_path"; then
9617      # Path to executable is not absolute. Find it.
9618      IFS_save="$IFS"
9619      IFS=:
9620      for p in $PATH; do
9621        if test -f "$p/$path" && test -x "$p/$path"; then
9622          new_path="$p/$path"
9623          break
9624        fi
9625      done
9626      IFS="$IFS_save"
9627    else
9628      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9629$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9630      new_path="$path"
9631    fi
9632
9633    if test "x$new_path" = x; then
9634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9635$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9636        has_space=`$ECHO "$complete" | $GREP " "`
9637        if test "x$has_space" != x; then
9638          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9640        fi
9641        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9642      fi
9643  fi
9644
9645      # Now join together the path and the arguments once again
9646      if test "x$arguments" != xEOL; then
9647        new_complete="$new_path ${arguments% *}"
9648      else
9649        new_complete="$new_path"
9650      fi
9651
9652  if test "x$complete" != "x$new_complete"; then
9653      FOUND_MAKE="$new_complete"
9654      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9655$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9656    fi
9657
9658        fi
9659      fi
9660    fi
9661  fi
9662
9663        fi
9664        PATH=$OLD_PATH
9665      fi
9666    fi
9667
9668    if test "x$FOUND_MAKE" = x; then
9669      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9670    fi
9671  fi
9672
9673  MAKE=$FOUND_MAKE
9674
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9676$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9677
9678
9679
9680    # Test if find supports -delete
9681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9682$as_echo_n "checking if find supports -delete... " >&6; }
9683    FIND_DELETE="-delete"
9684
9685    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9686
9687    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9688
9689    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9690    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9691        # No, it does not.
9692        rm $DELETEDIR/TestIfFindSupportsDelete
9693        FIND_DELETE="-exec rm \{\} \+"
9694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696    else
9697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9698$as_echo "yes" >&6; }
9699    fi
9700    rmdir $DELETEDIR
9701
9702
9703
9704# These tools might not be installed by default,
9705# need hint on how to install them.
9706
9707    for ac_prog in unzip
9708do
9709  # Extract the first word of "$ac_prog", so it can be a program name with args.
9710set dummy $ac_prog; ac_word=$2
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9712$as_echo_n "checking for $ac_word... " >&6; }
9713if ${ac_cv_path_UNZIP+:} false; then :
9714  $as_echo_n "(cached) " >&6
9715else
9716  case $UNZIP in
9717  [\\/]* | ?:[\\/]*)
9718  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9719  ;;
9720  *)
9721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9722for as_dir in $PATH
9723do
9724  IFS=$as_save_IFS
9725  test -z "$as_dir" && as_dir=.
9726    for ac_exec_ext in '' $ac_executable_extensions; do
9727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9728    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9730    break 2
9731  fi
9732done
9733  done
9734IFS=$as_save_IFS
9735
9736  ;;
9737esac
9738fi
9739UNZIP=$ac_cv_path_UNZIP
9740if test -n "$UNZIP"; then
9741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9742$as_echo "$UNZIP" >&6; }
9743else
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
9746fi
9747
9748
9749  test -n "$UNZIP" && break
9750done
9751
9752
9753    if test "x$UNZIP" = x; then
9754        if test "xunzip" = x; then
9755          PROG_NAME=unzip
9756        else
9757          PROG_NAME=unzip
9758        fi
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9761        as_fn_error $? "Cannot continue" "$LINENO" 5
9762    fi
9763
9764
9765
9766    for ac_prog in zip
9767do
9768  # Extract the first word of "$ac_prog", so it can be a program name with args.
9769set dummy $ac_prog; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_path_ZIP+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  case $ZIP in
9776  [\\/]* | ?:[\\/]*)
9777  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9778  ;;
9779  *)
9780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783  IFS=$as_save_IFS
9784  test -z "$as_dir" && as_dir=.
9785    for ac_exec_ext in '' $ac_executable_extensions; do
9786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9787    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789    break 2
9790  fi
9791done
9792  done
9793IFS=$as_save_IFS
9794
9795  ;;
9796esac
9797fi
9798ZIP=$ac_cv_path_ZIP
9799if test -n "$ZIP"; then
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9801$as_echo "$ZIP" >&6; }
9802else
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
9808  test -n "$ZIP" && break
9809done
9810
9811
9812    if test "x$ZIP" = x; then
9813        if test "xzip" = x; then
9814          PROG_NAME=zip
9815        else
9816          PROG_NAME=zip
9817        fi
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9820        as_fn_error $? "Cannot continue" "$LINENO" 5
9821    fi
9822
9823
9824
9825# Non-required basic tools
9826
9827# Extract the first word of "ldd", so it can be a program name with args.
9828set dummy ldd; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_LDD+:} false; then :
9832  $as_echo_n "(cached) " >&6
9833else
9834  case $LDD in
9835  [\\/]* | ?:[\\/]*)
9836  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9837  ;;
9838  *)
9839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842  IFS=$as_save_IFS
9843  test -z "$as_dir" && as_dir=.
9844    for ac_exec_ext in '' $ac_executable_extensions; do
9845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9846    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848    break 2
9849  fi
9850done
9851  done
9852IFS=$as_save_IFS
9853
9854  ;;
9855esac
9856fi
9857LDD=$ac_cv_path_LDD
9858if test -n "$LDD"; then
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9860$as_echo "$LDD" >&6; }
9861else
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867if test "x$LDD" = "x"; then
9868    # List shared lib dependencies is used for
9869    # debug output and checking for forbidden dependencies.
9870    # We can build without it.
9871    LDD="true"
9872fi
9873# Extract the first word of "otool", so it can be a program name with args.
9874set dummy otool; ac_word=$2
9875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876$as_echo_n "checking for $ac_word... " >&6; }
9877if ${ac_cv_path_OTOOL+:} false; then :
9878  $as_echo_n "(cached) " >&6
9879else
9880  case $OTOOL in
9881  [\\/]* | ?:[\\/]*)
9882  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9883  ;;
9884  *)
9885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886for as_dir in $PATH
9887do
9888  IFS=$as_save_IFS
9889  test -z "$as_dir" && as_dir=.
9890    for ac_exec_ext in '' $ac_executable_extensions; do
9891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9892    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894    break 2
9895  fi
9896done
9897  done
9898IFS=$as_save_IFS
9899
9900  ;;
9901esac
9902fi
9903OTOOL=$ac_cv_path_OTOOL
9904if test -n "$OTOOL"; then
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9906$as_echo "$OTOOL" >&6; }
9907else
9908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
9910fi
9911
9912
9913if test "x$OTOOL" = "x"; then
9914   OTOOL="true"
9915fi
9916for ac_prog in readelf greadelf
9917do
9918  # Extract the first word of "$ac_prog", so it can be a program name with args.
9919set dummy $ac_prog; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_READELF+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  case $READELF in
9926  [\\/]* | ?:[\\/]*)
9927  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9928  ;;
9929  *)
9930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9937    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945  ;;
9946esac
9947fi
9948READELF=$ac_cv_path_READELF
9949if test -n "$READELF"; then
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9951$as_echo "$READELF" >&6; }
9952else
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955fi
9956
9957
9958  test -n "$READELF" && break
9959done
9960
9961# Extract the first word of "hg", so it can be a program name with args.
9962set dummy hg; ac_word=$2
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9964$as_echo_n "checking for $ac_word... " >&6; }
9965if ${ac_cv_path_HG+:} false; then :
9966  $as_echo_n "(cached) " >&6
9967else
9968  case $HG in
9969  [\\/]* | ?:[\\/]*)
9970  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9971  ;;
9972  *)
9973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9974for as_dir in $PATH
9975do
9976  IFS=$as_save_IFS
9977  test -z "$as_dir" && as_dir=.
9978    for ac_exec_ext in '' $ac_executable_extensions; do
9979  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9980    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9982    break 2
9983  fi
9984done
9985  done
9986IFS=$as_save_IFS
9987
9988  ;;
9989esac
9990fi
9991HG=$ac_cv_path_HG
9992if test -n "$HG"; then
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9994$as_echo "$HG" >&6; }
9995else
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
9998fi
9999
10000
10001# Extract the first word of "stat", so it can be a program name with args.
10002set dummy stat; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_STAT+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $STAT in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10020    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031STAT=$ac_cv_path_STAT
10032if test -n "$STAT"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10034$as_echo "$STAT" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041# Extract the first word of "time", so it can be a program name with args.
10042set dummy time; ac_word=$2
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10044$as_echo_n "checking for $ac_word... " >&6; }
10045if ${ac_cv_path_TIME+:} false; then :
10046  $as_echo_n "(cached) " >&6
10047else
10048  case $TIME in
10049  [\\/]* | ?:[\\/]*)
10050  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10051  ;;
10052  *)
10053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10054for as_dir in $PATH
10055do
10056  IFS=$as_save_IFS
10057  test -z "$as_dir" && as_dir=.
10058    for ac_exec_ext in '' $ac_executable_extensions; do
10059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10060    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10062    break 2
10063  fi
10064done
10065  done
10066IFS=$as_save_IFS
10067
10068  ;;
10069esac
10070fi
10071TIME=$ac_cv_path_TIME
10072if test -n "$TIME"; then
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10074$as_echo "$TIME" >&6; }
10075else
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077$as_echo "no" >&6; }
10078fi
10079
10080
10081
10082if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10083
10084    for ac_prog in comm
10085do
10086  # Extract the first word of "$ac_prog", so it can be a program name with args.
10087set dummy $ac_prog; ac_word=$2
10088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10089$as_echo_n "checking for $ac_word... " >&6; }
10090if ${ac_cv_path_COMM+:} false; then :
10091  $as_echo_n "(cached) " >&6
10092else
10093  case $COMM in
10094  [\\/]* | ?:[\\/]*)
10095  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10096  ;;
10097  *)
10098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10099for as_dir in $PATH
10100do
10101  IFS=$as_save_IFS
10102  test -z "$as_dir" && as_dir=.
10103    for ac_exec_ext in '' $ac_executable_extensions; do
10104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10105    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10107    break 2
10108  fi
10109done
10110  done
10111IFS=$as_save_IFS
10112
10113  ;;
10114esac
10115fi
10116COMM=$ac_cv_path_COMM
10117if test -n "$COMM"; then
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10119$as_echo "$COMM" >&6; }
10120else
10121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123fi
10124
10125
10126  test -n "$COMM" && break
10127done
10128
10129
10130    if test "x$COMM" = x; then
10131        if test "xcomm" = x; then
10132          PROG_NAME=comm
10133        else
10134          PROG_NAME=comm
10135        fi
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10137$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10138        as_fn_error $? "Cannot continue" "$LINENO" 5
10139    fi
10140
10141
10142fi
10143
10144
10145# Check if pkg-config is available.
10146
10147
10148if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10149	if test -n "$ac_tool_prefix"; then
10150  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10151set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if ${ac_cv_path_PKG_CONFIG+:} false; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $PKG_CONFIG in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10169    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10181if test -n "$PKG_CONFIG"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10183$as_echo "$PKG_CONFIG" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190fi
10191if test -z "$ac_cv_path_PKG_CONFIG"; then
10192  ac_pt_PKG_CONFIG=$PKG_CONFIG
10193  # Extract the first word of "pkg-config", so it can be a program name with args.
10194set dummy pkg-config; ac_word=$2
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10196$as_echo_n "checking for $ac_word... " >&6; }
10197if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10198  $as_echo_n "(cached) " >&6
10199else
10200  case $ac_pt_PKG_CONFIG in
10201  [\\/]* | ?:[\\/]*)
10202  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10203  ;;
10204  *)
10205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10206for as_dir in $PATH
10207do
10208  IFS=$as_save_IFS
10209  test -z "$as_dir" && as_dir=.
10210    for ac_exec_ext in '' $ac_executable_extensions; do
10211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10212    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10214    break 2
10215  fi
10216done
10217  done
10218IFS=$as_save_IFS
10219
10220  ;;
10221esac
10222fi
10223ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10224if test -n "$ac_pt_PKG_CONFIG"; then
10225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10226$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10227else
10228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
10230fi
10231
10232  if test "x$ac_pt_PKG_CONFIG" = x; then
10233    PKG_CONFIG=""
10234  else
10235    case $cross_compiling:$ac_tool_warned in
10236yes:)
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10239ac_tool_warned=yes ;;
10240esac
10241    PKG_CONFIG=$ac_pt_PKG_CONFIG
10242  fi
10243else
10244  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10245fi
10246
10247fi
10248if test -n "$PKG_CONFIG"; then
10249	_pkg_min_version=0.9.0
10250	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10251$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10252	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10253		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10254$as_echo "yes" >&6; }
10255	else
10256		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
10258		PKG_CONFIG=""
10259	fi
10260
10261fi
10262
10263# After basic tools have been setup, we can check build os specific details.
10264
10265###############################################################################
10266
10267# Note that this is the build platform OS version!
10268
10269OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10270OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10271OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10272OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10273
10274
10275
10276
10277
10278# Setup builddeps, for automatic downloading of tools we need.
10279# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10280# boot-jdk setup, but we need to have basic tools setup first.
10281
10282
10283# Check whether --with-builddeps-conf was given.
10284if test "${with_builddeps_conf+set}" = set; then :
10285  withval=$with_builddeps_conf;
10286fi
10287
10288
10289
10290# Check whether --with-builddeps-server was given.
10291if test "${with_builddeps_server+set}" = set; then :
10292  withval=$with_builddeps_server;
10293fi
10294
10295
10296
10297# Check whether --with-builddeps-dir was given.
10298if test "${with_builddeps_dir+set}" = set; then :
10299  withval=$with_builddeps_dir;
10300else
10301  with_builddeps_dir=/localhome/builddeps
10302fi
10303
10304
10305
10306# Check whether --with-builddeps-group was given.
10307if test "${with_builddeps_group+set}" = set; then :
10308  withval=$with_builddeps_group;
10309fi
10310
10311
10312
10313
10314    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10315        if test "x$with_builddeps_conf" != x; then
10316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10317$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10318            builddepsfile=$with_builddeps_conf
10319            if test -s $builddepsfile; then
10320                . $builddepsfile
10321                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10322$as_echo "loaded!" >&6; }
10323            else
10324               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10325           fi
10326        else
10327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10328$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10329            builddepsfile=`mktemp`
10330            touch $builddepsfile
10331            # Put all found confs into a single file.
10332            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10333            # Source the file to acquire the variables
10334            if test -s $builddepsfile; then
10335                . $builddepsfile
10336                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10337$as_echo "found at least one!" >&6; }
10338            else
10339               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10340           fi
10341        fi
10342        # Create build and target names that use _ instead of "-" and ".".
10343        # This is necessary to use them in variable names.
10344        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10345        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10346        # Extract rewrite information for build and target
10347        eval rewritten_build=\${REWRITE_${build_var}}
10348        if test "x$rewritten_build" = x; then
10349            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10350            echo Build stays the same $rewritten_build
10351        else
10352            echo Rewriting build for builddeps into $rewritten_build
10353        fi
10354        eval rewritten_target=\${REWRITE_${target_var}}
10355        if test "x$rewritten_target" = x; then
10356            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10357            echo Target stays the same $rewritten_target
10358        else
10359            echo Rewriting target for builddeps into $rewritten_target
10360        fi
10361        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10362        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10363    fi
10364    for ac_prog in 7z unzip
10365do
10366  # Extract the first word of "$ac_prog", so it can be a program name with args.
10367set dummy $ac_prog; ac_word=$2
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10369$as_echo_n "checking for $ac_word... " >&6; }
10370if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10371  $as_echo_n "(cached) " >&6
10372else
10373  if test -n "$BDEPS_UNZIP"; then
10374  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10375else
10376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377for as_dir in $PATH
10378do
10379  IFS=$as_save_IFS
10380  test -z "$as_dir" && as_dir=.
10381    for ac_exec_ext in '' $ac_executable_extensions; do
10382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10383    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385    break 2
10386  fi
10387done
10388  done
10389IFS=$as_save_IFS
10390
10391fi
10392fi
10393BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10394if test -n "$BDEPS_UNZIP"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10396$as_echo "$BDEPS_UNZIP" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403  test -n "$BDEPS_UNZIP" && break
10404done
10405
10406    if test "x$BDEPS_UNZIP" = x7z; then
10407        BDEPS_UNZIP="7z x"
10408    fi
10409
10410    for ac_prog in wget lftp ftp
10411do
10412  # Extract the first word of "$ac_prog", so it can be a program name with args.
10413set dummy $ac_prog; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  if test -n "$BDEPS_FTP"; then
10420  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10421else
10422as_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10429    ac_cv_prog_BDEPS_FTP="$ac_prog"
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
10437fi
10438fi
10439BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10440if test -n "$BDEPS_FTP"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10442$as_echo "$BDEPS_FTP" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$BDEPS_FTP" && break
10450done
10451
10452
10453
10454###############################################################################
10455#
10456# Determine OpenJDK variants, options and version numbers.
10457#
10458###############################################################################
10459
10460# We need build & target for this.
10461
10462
10463###############################################################################
10464#
10465# Should we build only OpenJDK even if closed sources are present?
10466#
10467# Check whether --enable-openjdk-only was given.
10468if test "${enable_openjdk_only+set}" = set; then :
10469  enableval=$enable_openjdk_only;
10470else
10471  enable_openjdk_only="no"
10472fi
10473
10474
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10476$as_echo_n "checking for presence of closed sources... " >&6; }
10477if test -d "$SRC_ROOT/jdk/src/closed"; then
10478    CLOSED_SOURCE_PRESENT=yes
10479else
10480    CLOSED_SOURCE_PRESENT=no
10481fi
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10483$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10484
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10486$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10487SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10489$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10490
10491if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10492  OPENJDK=true
10493  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10494    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10495$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10496  fi
10497else
10498  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10499    OPENJDK=true
10500  else
10501    OPENJDK=false
10502  fi
10503fi
10504
10505if test "x$OPENJDK" = "xtrue"; then
10506    SET_OPENJDK="OPENJDK=true"
10507fi
10508
10509
10510
10511###############################################################################
10512#
10513# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10514# We always build headless support.
10515#
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10517$as_echo_n "checking headful support... " >&6; }
10518# Check whether --enable-headful was given.
10519if test "${enable_headful+set}" = set; then :
10520  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10521else
10522  SUPPORT_HEADFUL=yes
10523fi
10524
10525
10526SUPPORT_HEADLESS=yes
10527BUILD_HEADLESS="BUILD_HEADLESS:=true"
10528
10529if test "x$SUPPORT_HEADFUL" = xyes; then
10530    # We are building both headful and headless.
10531    headful_msg="inlude support for both headful and headless"
10532fi
10533
10534if test "x$SUPPORT_HEADFUL" = xno; then
10535    # Thus we are building headless only.
10536    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10537    headful_msg="headless only"
10538fi
10539
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10541$as_echo "$headful_msg" >&6; }
10542
10543
10544
10545
10546
10547# Control wether Hotspot runs Queens test after build.
10548# Check whether --enable-hotspot-test-in-build was given.
10549if test "${enable_hotspot_test_in_build+set}" = set; then :
10550  enableval=$enable_hotspot_test_in_build;
10551else
10552  enable_hotspot_test_in_build=no
10553fi
10554
10555if test "x$enable_hotspot_test_in_build" = "xyes"; then
10556    TEST_IN_BUILD=true
10557else
10558    TEST_IN_BUILD=false
10559fi
10560
10561
10562###############################################################################
10563#
10564# Choose cacerts source file
10565#
10566
10567# Check whether --with-cacerts-file was given.
10568if test "${with_cacerts_file+set}" = set; then :
10569  withval=$with_cacerts_file;
10570fi
10571
10572if test "x$with_cacerts_file" != x; then
10573    CACERTS_FILE=$with_cacerts_file
10574else
10575    if test "x$OPENJDK" = "xtrue"; then
10576        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10577    else
10578        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10579    fi
10580fi
10581
10582
10583###############################################################################
10584#
10585# Enable or disable unlimited crypto
10586#
10587# Check whether --enable-unlimited-crypto was given.
10588if test "${enable_unlimited_crypto+set}" = set; then :
10589  enableval=$enable_unlimited_crypto;
10590else
10591  enable_unlimited_crypto=no
10592fi
10593
10594if test "x$enable_unlimited_crypto" = "xyes"; then
10595    UNLIMITED_CRYPTO=true
10596else
10597    UNLIMITED_CRYPTO=false
10598fi
10599
10600
10601###############################################################################
10602#
10603# Compress jars
10604#
10605COMPRESS_JARS=false
10606
10607
10608
10609
10610# Source the version numbers
10611. $AUTOCONF_DIR/version.numbers
10612if test "x$OPENJDK" = "xfalse"; then
10613    . $AUTOCONF_DIR/closed.version.numbers
10614fi
10615# Now set the JDK version, milestone, build number etc.
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630COPYRIGHT_YEAR=`date +'%Y'`
10631
10632
10633RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10634
10635
10636if test "x$JDK_UPDATE_VERSION" != x; then
10637    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10638else
10639    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10640fi
10641
10642
10643if test "x$MILESTONE" != x; then
10644    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10645else
10646    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10647fi
10648
10649
10650if test "x$JDK_BUILD_NUMBER" != x; then
10651    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10652else
10653    JDK_BUILD_NUMBER=b00
10654    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10655    # Avoid [:alnum:] since it depends on the locale.
10656    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10657    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10658    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10659fi
10660
10661COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10662
10663
10664
10665###############################################################################
10666#
10667# Setup BootJDK, used to bootstrap the build.
10668#
10669###############################################################################
10670
10671
10672BOOT_JDK_FOUND=no
10673
10674# Check whether --with-boot-jdk was given.
10675if test "${with_boot_jdk+set}" = set; then :
10676  withval=$with_boot_jdk;
10677fi
10678
10679
10680# We look for the Boot JDK through various means, going from more certain to
10681# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10682# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10683# must check if this is indeed valid; otherwise we'll continue looking.
10684
10685# Test: Is bootjdk explicitely set by command line arguments?
10686
10687  if test "x$BOOT_JDK_FOUND" = xno; then
10688    # Now execute the test
10689
10690if test "x$with_boot_jdk" != x; then
10691    BOOT_JDK=$with_boot_jdk
10692    BOOT_JDK_FOUND=maybe
10693    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10694$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10695fi
10696
10697
10698    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10699    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10700      # Do we have a bin/java?
10701      if test ! -x "$BOOT_JDK/bin/java"; then
10702        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10704        BOOT_JDK_FOUND=no
10705      else
10706        # Do we have a bin/javac?
10707        if test ! -x "$BOOT_JDK/bin/javac"; then
10708          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10710          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10711$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10712          BOOT_JDK_FOUND=no
10713        else
10714          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10715          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10718            BOOT_JDK_FOUND=no
10719          else
10720            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10722
10723            # Extra M4 quote needed to protect [] in grep expression.
10724            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10725            if test "x$FOUND_VERSION_78" = x; then
10726              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10728              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10729$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10730              BOOT_JDK_FOUND=no
10731            else
10732              # We're done! :-)
10733              BOOT_JDK_FOUND=yes
10734
10735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10736
10737  # Input might be given as Windows format, start by converting to
10738  # unix format.
10739  path="$BOOT_JDK"
10740  new_path=`$CYGPATH -u "$path"`
10741
10742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10745  # "foo.exe" is OK but "foo" is an error.
10746  #
10747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10748  # It is also a way to make sure we got the proper file name for the real test later on.
10749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10750  if test "x$test_shortpath" = x; then
10751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10752$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10753    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10754  fi
10755
10756  # Call helper function which possibly converts this using DOS-style short mode.
10757  # If so, the updated path is stored in $new_path.
10758
10759  input_path="$new_path"
10760  # Check if we need to convert this using DOS-style short mode. If the path
10761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10762  # take no chances and rewrite it.
10763  # Note: m4 eats our [], so we need to use [ and ] instead.
10764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10765  if test "x$has_forbidden_chars" != x; then
10766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10770      # Going to short mode and back again did indeed matter. Since short mode is
10771      # case insensitive, let's make it lowercase to improve readability.
10772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10773      # Now convert it back to Unix-stile (cygpath)
10774      input_path=`$CYGPATH -u "$shortmode_path"`
10775      new_path="$input_path"
10776    fi
10777  fi
10778
10779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10780  if test "x$test_cygdrive_prefix" = x; then
10781    # As a simple fix, exclude /usr/bin since it's not a real path.
10782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10784      # a path prefixed by /cygdrive for fixpath to work.
10785      new_path="$CYGWIN_ROOT_PATH$input_path"
10786    fi
10787  fi
10788
10789
10790  if test "x$path" != "x$new_path"; then
10791    BOOT_JDK="$new_path"
10792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10794  fi
10795
10796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10797
10798  path="$BOOT_JDK"
10799  has_colon=`$ECHO $path | $GREP ^.:`
10800  new_path="$path"
10801  if test "x$has_colon" = x; then
10802    # Not in mixed or Windows style, start by that.
10803    new_path=`cmd //c echo $path`
10804  fi
10805
10806
10807  input_path="$new_path"
10808  # Check if we need to convert this using DOS-style short mode. If the path
10809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10810  # take no chances and rewrite it.
10811  # Note: m4 eats our [], so we need to use [ and ] instead.
10812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10813  if test "x$has_forbidden_chars" != x; then
10814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10816  fi
10817
10818
10819  windows_path="$new_path"
10820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10821    unix_path=`$CYGPATH -u "$windows_path"`
10822    new_path="$unix_path"
10823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10825    new_path="$unix_path"
10826  fi
10827
10828  if test "x$path" != "x$new_path"; then
10829    BOOT_JDK="$new_path"
10830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10832  fi
10833
10834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10836
10837  else
10838    # We're on a posix platform. Hooray! :)
10839    path="$BOOT_JDK"
10840
10841    if test ! -f "$path" && test ! -d "$path"; then
10842      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10843    fi
10844
10845    has_space=`$ECHO "$path" | $GREP " "`
10846    if test "x$has_space" != x; then
10847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10850    fi
10851  fi
10852
10853              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10854$as_echo_n "checking for Boot JDK... " >&6; }
10855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10856$as_echo "$BOOT_JDK" >&6; }
10857              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10858$as_echo_n "checking Boot JDK version... " >&6; }
10859              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10860              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10861$as_echo "$BOOT_JDK_VERSION" >&6; }
10862            fi # end check jdk version
10863          fi # end check rt.jar
10864        fi # end check javac
10865      fi # end check java
10866    fi # end check boot jdk found
10867  fi
10868
10869if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10870  # Having specified an argument which is incorrect will produce an instant failure;
10871  # we should not go on looking
10872  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10873fi
10874
10875# Test: Is bootjdk available from builddeps?
10876
10877  if test "x$BOOT_JDK_FOUND" = xno; then
10878    # Now execute the test
10879
10880
10881
10882    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10883        # Source the builddeps file again, to make sure it uses the latest variables!
10884        . $builddepsfile
10885        # Look for a target and build machine specific resource!
10886        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10887        if test "x$resource" = x; then
10888            # Ok, lets instead look for a target specific resource
10889            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10890        fi
10891        if test "x$resource" = x; then
10892            # Ok, lets instead look for a build specific resource
10893            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10894        fi
10895        if test "x$resource" = x; then
10896            # Ok, lets instead look for a generic resource
10897            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10898            resource=${builddep_bootjdk}
10899        fi
10900        if test "x$resource" != x; then
10901            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10902$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10903	    # If the resource in the builddeps.conf file is an existing directory,
10904	    # for example /java/linux/cups
10905	    if test -d ${resource}; then
10906	       depdir=${resource}
10907	    else
10908
10909# bootjdk is for example mymodule
10910# $resource is for example libs/general/libmymod_1_2_3.zip
10911# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10912# $with_builddeps_dir is for example /localhome/builddeps
10913# depdir is the name of the variable into which we store the depdir, eg MYMOD
10914# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10915# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10916    filename=`basename $resource`
10917    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10918    filebase=${filename%%.*}
10919    extension=${filename#*.}
10920    installdir=$with_builddeps_dir/$filebase
10921    if test ! -f $installdir/$filename.unpacked; then
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10923$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10924        if test ! -d $installdir; then
10925            mkdir -p $installdir
10926        fi
10927        if test ! -d $installdir; then
10928            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10929        fi
10930        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10931        touch $tmpfile
10932        if test ! -f $tmpfile; then
10933            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10934        fi
10935
10936    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10937    # $tmpfile is the local file name for the downloaded file.
10938    VALID_TOOL=no
10939    if test "x$BDEPS_FTP" = xwget; then
10940       VALID_TOOL=yes
10941       wget -O $tmpfile $with_builddeps_server/$resource
10942    fi
10943    if test "x$BDEPS_FTP" = xlftp; then
10944       VALID_TOOL=yes
10945       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10946    fi
10947    if test "x$BDEPS_FTP" = xftp; then
10948        VALID_TOOL=yes
10949        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10950        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10951        FTPUSERPWD=${FTPSERVER%%@*}
10952        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10953            FTPUSER=${userpwd%%:*}
10954            FTPPWD=${userpwd#*@}
10955            FTPSERVER=${FTPSERVER#*@}
10956        else
10957            FTPUSER=ftp
10958            FTPPWD=ftp
10959        fi
10960        # the "pass" command does not work on some
10961        # ftp clients (read ftp.exe) but if it works,
10962        # passive mode is better!
10963        (\
10964            echo "user $FTPUSER $FTPPWD"        ;\
10965            echo "pass"                         ;\
10966            echo "bin"                          ;\
10967            echo "get $FTPPATH $tmpfile"              ;\
10968        ) | ftp -in $FTPSERVER
10969    fi
10970    if test "x$VALID_TOOL" != xyes; then
10971       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10972    fi
10973
10974        mv $tmpfile $installdir/$filename
10975        if test ! -s $installdir/$filename; then
10976            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10977        fi
10978        case "$extension" in
10979            zip)  echo "Unzipping $installdir/$filename..."
10980               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10981            ;;
10982            tar.gz) echo "Untaring $installdir/$filename..."
10983               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10984            ;;
10985            tgz) echo "Untaring $installdir/$filename..."
10986               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10987            ;;
10988            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10989            ;;
10990        esac
10991    fi
10992    if test -f $installdir/$filename.unpacked; then
10993        depdir=$installdir
10994    fi
10995
10996	    fi
10997            # Source the builddeps file again, because in the previous command, the depdir
10998            # was updated to point at the current build dependency install directory.
10999            . $builddepsfile
11000            # Now extract variables from the builddeps.conf files.
11001            theroot=${builddep_bootjdk_ROOT}
11002            thecflags=${builddep_bootjdk_CFLAGS}
11003            thelibs=${builddep_bootjdk_LIBS}
11004            if test "x$depdir" = x; then
11005                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11006            fi
11007            BOOT_JDK=$depdir
11008            if test "x$theroot" != x; then
11009               BOOT_JDK="$theroot"
11010            fi
11011            if test "x$thecflags" != x; then
11012               BOOT_JDK_CFLAGS="$thecflags"
11013            fi
11014            if test "x$thelibs" != x; then
11015               BOOT_JDK_LIBS="$thelibs"
11016            fi
11017            BOOT_JDK_FOUND=maybe
11018            else BOOT_JDK_FOUND=no
11019
11020        fi
11021        else BOOT_JDK_FOUND=no
11022
11023    fi
11024
11025
11026
11027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11029      # Do we have a bin/java?
11030      if test ! -x "$BOOT_JDK/bin/java"; then
11031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11033        BOOT_JDK_FOUND=no
11034      else
11035        # Do we have a bin/javac?
11036        if test ! -x "$BOOT_JDK/bin/javac"; then
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11041          BOOT_JDK_FOUND=no
11042        else
11043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11047            BOOT_JDK_FOUND=no
11048          else
11049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11051
11052            # Extra M4 quote needed to protect [] in grep expression.
11053            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11054            if test "x$FOUND_VERSION_78" = x; then
11055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11058$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11059              BOOT_JDK_FOUND=no
11060            else
11061              # We're done! :-)
11062              BOOT_JDK_FOUND=yes
11063
11064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11065
11066  # Input might be given as Windows format, start by converting to
11067  # unix format.
11068  path="$BOOT_JDK"
11069  new_path=`$CYGPATH -u "$path"`
11070
11071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11074  # "foo.exe" is OK but "foo" is an error.
11075  #
11076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11077  # It is also a way to make sure we got the proper file name for the real test later on.
11078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11079  if test "x$test_shortpath" = x; then
11080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11083  fi
11084
11085  # Call helper function which possibly converts this using DOS-style short mode.
11086  # If so, the updated path is stored in $new_path.
11087
11088  input_path="$new_path"
11089  # Check if we need to convert this using DOS-style short mode. If the path
11090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11091  # take no chances and rewrite it.
11092  # Note: m4 eats our [], so we need to use [ and ] instead.
11093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11094  if test "x$has_forbidden_chars" != x; then
11095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11099      # Going to short mode and back again did indeed matter. Since short mode is
11100      # case insensitive, let's make it lowercase to improve readability.
11101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11102      # Now convert it back to Unix-stile (cygpath)
11103      input_path=`$CYGPATH -u "$shortmode_path"`
11104      new_path="$input_path"
11105    fi
11106  fi
11107
11108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11109  if test "x$test_cygdrive_prefix" = x; then
11110    # As a simple fix, exclude /usr/bin since it's not a real path.
11111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11113      # a path prefixed by /cygdrive for fixpath to work.
11114      new_path="$CYGWIN_ROOT_PATH$input_path"
11115    fi
11116  fi
11117
11118
11119  if test "x$path" != "x$new_path"; then
11120    BOOT_JDK="$new_path"
11121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11123  fi
11124
11125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11126
11127  path="$BOOT_JDK"
11128  has_colon=`$ECHO $path | $GREP ^.:`
11129  new_path="$path"
11130  if test "x$has_colon" = x; then
11131    # Not in mixed or Windows style, start by that.
11132    new_path=`cmd //c echo $path`
11133  fi
11134
11135
11136  input_path="$new_path"
11137  # Check if we need to convert this using DOS-style short mode. If the path
11138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11139  # take no chances and rewrite it.
11140  # Note: m4 eats our [], so we need to use [ and ] instead.
11141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11142  if test "x$has_forbidden_chars" != x; then
11143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11145  fi
11146
11147
11148  windows_path="$new_path"
11149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11150    unix_path=`$CYGPATH -u "$windows_path"`
11151    new_path="$unix_path"
11152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11154    new_path="$unix_path"
11155  fi
11156
11157  if test "x$path" != "x$new_path"; then
11158    BOOT_JDK="$new_path"
11159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11161  fi
11162
11163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11165
11166  else
11167    # We're on a posix platform. Hooray! :)
11168    path="$BOOT_JDK"
11169
11170    if test ! -f "$path" && test ! -d "$path"; then
11171      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11172    fi
11173
11174    has_space=`$ECHO "$path" | $GREP " "`
11175    if test "x$has_space" != x; then
11176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11179    fi
11180  fi
11181
11182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11183$as_echo_n "checking for Boot JDK... " >&6; }
11184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11185$as_echo "$BOOT_JDK" >&6; }
11186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11187$as_echo_n "checking Boot JDK version... " >&6; }
11188              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11190$as_echo "$BOOT_JDK_VERSION" >&6; }
11191            fi # end check jdk version
11192          fi # end check rt.jar
11193        fi # end check javac
11194      fi # end check java
11195    fi # end check boot jdk found
11196  fi
11197
11198
11199# Test: Is $JAVA_HOME set?
11200
11201  if test "x$BOOT_JDK_FOUND" = xno; then
11202    # Now execute the test
11203
11204    if test "x$JAVA_HOME" != x; then
11205        JAVA_HOME_PROCESSED="$JAVA_HOME"
11206
11207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11208
11209  # Input might be given as Windows format, start by converting to
11210  # unix format.
11211  path="$JAVA_HOME_PROCESSED"
11212  new_path=`$CYGPATH -u "$path"`
11213
11214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11217  # "foo.exe" is OK but "foo" is an error.
11218  #
11219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11220  # It is also a way to make sure we got the proper file name for the real test later on.
11221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11222  if test "x$test_shortpath" = x; then
11223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11224$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11225    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11226  fi
11227
11228  # Call helper function which possibly converts this using DOS-style short mode.
11229  # If so, the updated path is stored in $new_path.
11230
11231  input_path="$new_path"
11232  # Check if we need to convert this using DOS-style short mode. If the path
11233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11234  # take no chances and rewrite it.
11235  # Note: m4 eats our [], so we need to use [ and ] instead.
11236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11237  if test "x$has_forbidden_chars" != x; then
11238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11242      # Going to short mode and back again did indeed matter. Since short mode is
11243      # case insensitive, let's make it lowercase to improve readability.
11244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11245      # Now convert it back to Unix-stile (cygpath)
11246      input_path=`$CYGPATH -u "$shortmode_path"`
11247      new_path="$input_path"
11248    fi
11249  fi
11250
11251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11252  if test "x$test_cygdrive_prefix" = x; then
11253    # As a simple fix, exclude /usr/bin since it's not a real path.
11254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11256      # a path prefixed by /cygdrive for fixpath to work.
11257      new_path="$CYGWIN_ROOT_PATH$input_path"
11258    fi
11259  fi
11260
11261
11262  if test "x$path" != "x$new_path"; then
11263    JAVA_HOME_PROCESSED="$new_path"
11264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11265$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11266  fi
11267
11268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11269
11270  path="$JAVA_HOME_PROCESSED"
11271  has_colon=`$ECHO $path | $GREP ^.:`
11272  new_path="$path"
11273  if test "x$has_colon" = x; then
11274    # Not in mixed or Windows style, start by that.
11275    new_path=`cmd //c echo $path`
11276  fi
11277
11278
11279  input_path="$new_path"
11280  # Check if we need to convert this using DOS-style short mode. If the path
11281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11282  # take no chances and rewrite it.
11283  # Note: m4 eats our [], so we need to use [ and ] instead.
11284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11285  if test "x$has_forbidden_chars" != x; then
11286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11288  fi
11289
11290
11291  windows_path="$new_path"
11292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11293    unix_path=`$CYGPATH -u "$windows_path"`
11294    new_path="$unix_path"
11295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11297    new_path="$unix_path"
11298  fi
11299
11300  if test "x$path" != "x$new_path"; then
11301    JAVA_HOME_PROCESSED="$new_path"
11302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11303$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11304  fi
11305
11306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11308
11309  else
11310    # We're on a posix platform. Hooray! :)
11311    path="$JAVA_HOME_PROCESSED"
11312
11313    if test ! -f "$path" && test ! -d "$path"; then
11314      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11315    fi
11316
11317    has_space=`$ECHO "$path" | $GREP " "`
11318    if test "x$has_space" != x; then
11319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11320$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11321      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11322    fi
11323  fi
11324
11325        if test ! -d "$JAVA_HOME_PROCESSED"; then
11326            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11327$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11328        else
11329          # Aha, the user has set a JAVA_HOME
11330          # let us use that as the Boot JDK.
11331          BOOT_JDK="$JAVA_HOME_PROCESSED"
11332          BOOT_JDK_FOUND=maybe
11333          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11334$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11335        fi
11336    fi
11337
11338
11339    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11340    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11341      # Do we have a bin/java?
11342      if test ! -x "$BOOT_JDK/bin/java"; then
11343        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11345        BOOT_JDK_FOUND=no
11346      else
11347        # Do we have a bin/javac?
11348        if test ! -x "$BOOT_JDK/bin/javac"; then
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11351          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11352$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11353          BOOT_JDK_FOUND=no
11354        else
11355          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11356          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11357            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11359            BOOT_JDK_FOUND=no
11360          else
11361            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11363
11364            # Extra M4 quote needed to protect [] in grep expression.
11365            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11366            if test "x$FOUND_VERSION_78" = x; then
11367              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11370$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11371              BOOT_JDK_FOUND=no
11372            else
11373              # We're done! :-)
11374              BOOT_JDK_FOUND=yes
11375
11376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11377
11378  # Input might be given as Windows format, start by converting to
11379  # unix format.
11380  path="$BOOT_JDK"
11381  new_path=`$CYGPATH -u "$path"`
11382
11383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11386  # "foo.exe" is OK but "foo" is an error.
11387  #
11388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11389  # It is also a way to make sure we got the proper file name for the real test later on.
11390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11391  if test "x$test_shortpath" = x; then
11392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11394    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11395  fi
11396
11397  # Call helper function which possibly converts this using DOS-style short mode.
11398  # If so, the updated path is stored in $new_path.
11399
11400  input_path="$new_path"
11401  # Check if we need to convert this using DOS-style short mode. If the path
11402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11403  # take no chances and rewrite it.
11404  # Note: m4 eats our [], so we need to use [ and ] instead.
11405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11406  if test "x$has_forbidden_chars" != x; then
11407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11411      # Going to short mode and back again did indeed matter. Since short mode is
11412      # case insensitive, let's make it lowercase to improve readability.
11413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11414      # Now convert it back to Unix-stile (cygpath)
11415      input_path=`$CYGPATH -u "$shortmode_path"`
11416      new_path="$input_path"
11417    fi
11418  fi
11419
11420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11421  if test "x$test_cygdrive_prefix" = x; then
11422    # As a simple fix, exclude /usr/bin since it's not a real path.
11423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11425      # a path prefixed by /cygdrive for fixpath to work.
11426      new_path="$CYGWIN_ROOT_PATH$input_path"
11427    fi
11428  fi
11429
11430
11431  if test "x$path" != "x$new_path"; then
11432    BOOT_JDK="$new_path"
11433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11435  fi
11436
11437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11438
11439  path="$BOOT_JDK"
11440  has_colon=`$ECHO $path | $GREP ^.:`
11441  new_path="$path"
11442  if test "x$has_colon" = x; then
11443    # Not in mixed or Windows style, start by that.
11444    new_path=`cmd //c echo $path`
11445  fi
11446
11447
11448  input_path="$new_path"
11449  # Check if we need to convert this using DOS-style short mode. If the path
11450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11451  # take no chances and rewrite it.
11452  # Note: m4 eats our [], so we need to use [ and ] instead.
11453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11454  if test "x$has_forbidden_chars" != x; then
11455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11457  fi
11458
11459
11460  windows_path="$new_path"
11461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11462    unix_path=`$CYGPATH -u "$windows_path"`
11463    new_path="$unix_path"
11464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11466    new_path="$unix_path"
11467  fi
11468
11469  if test "x$path" != "x$new_path"; then
11470    BOOT_JDK="$new_path"
11471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11473  fi
11474
11475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11477
11478  else
11479    # We're on a posix platform. Hooray! :)
11480    path="$BOOT_JDK"
11481
11482    if test ! -f "$path" && test ! -d "$path"; then
11483      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11484    fi
11485
11486    has_space=`$ECHO "$path" | $GREP " "`
11487    if test "x$has_space" != x; then
11488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11490      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11491    fi
11492  fi
11493
11494              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11495$as_echo_n "checking for Boot JDK... " >&6; }
11496              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11497$as_echo "$BOOT_JDK" >&6; }
11498              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11499$as_echo_n "checking Boot JDK version... " >&6; }
11500              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11501              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11502$as_echo "$BOOT_JDK_VERSION" >&6; }
11503            fi # end check jdk version
11504          fi # end check rt.jar
11505        fi # end check javac
11506      fi # end check java
11507    fi # end check boot jdk found
11508  fi
11509
11510
11511# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11512
11513  if test "x$BOOT_JDK_FOUND" = xno; then
11514    # Now execute the test
11515
11516    if test -x /usr/libexec/java_home; then
11517        BOOT_JDK=`/usr/libexec/java_home`
11518        BOOT_JDK_FOUND=maybe
11519        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11520$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11521    fi
11522
11523
11524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11526      # Do we have a bin/java?
11527      if test ! -x "$BOOT_JDK/bin/java"; then
11528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11530        BOOT_JDK_FOUND=no
11531      else
11532        # Do we have a bin/javac?
11533        if test ! -x "$BOOT_JDK/bin/javac"; then
11534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11538          BOOT_JDK_FOUND=no
11539        else
11540          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11541          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11544            BOOT_JDK_FOUND=no
11545          else
11546            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11547            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11548
11549            # Extra M4 quote needed to protect [] in grep expression.
11550            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11551            if test "x$FOUND_VERSION_78" = x; then
11552              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11554              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11555$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11556              BOOT_JDK_FOUND=no
11557            else
11558              # We're done! :-)
11559              BOOT_JDK_FOUND=yes
11560
11561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11562
11563  # Input might be given as Windows format, start by converting to
11564  # unix format.
11565  path="$BOOT_JDK"
11566  new_path=`$CYGPATH -u "$path"`
11567
11568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11571  # "foo.exe" is OK but "foo" is an error.
11572  #
11573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11574  # It is also a way to make sure we got the proper file name for the real test later on.
11575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11576  if test "x$test_shortpath" = x; then
11577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11580  fi
11581
11582  # Call helper function which possibly converts this using DOS-style short mode.
11583  # If so, the updated path is stored in $new_path.
11584
11585  input_path="$new_path"
11586  # Check if we need to convert this using DOS-style short mode. If the path
11587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11588  # take no chances and rewrite it.
11589  # Note: m4 eats our [], so we need to use [ and ] instead.
11590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11591  if test "x$has_forbidden_chars" != x; then
11592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11596      # Going to short mode and back again did indeed matter. Since short mode is
11597      # case insensitive, let's make it lowercase to improve readability.
11598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11599      # Now convert it back to Unix-stile (cygpath)
11600      input_path=`$CYGPATH -u "$shortmode_path"`
11601      new_path="$input_path"
11602    fi
11603  fi
11604
11605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11606  if test "x$test_cygdrive_prefix" = x; then
11607    # As a simple fix, exclude /usr/bin since it's not a real path.
11608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11610      # a path prefixed by /cygdrive for fixpath to work.
11611      new_path="$CYGWIN_ROOT_PATH$input_path"
11612    fi
11613  fi
11614
11615
11616  if test "x$path" != "x$new_path"; then
11617    BOOT_JDK="$new_path"
11618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11620  fi
11621
11622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11623
11624  path="$BOOT_JDK"
11625  has_colon=`$ECHO $path | $GREP ^.:`
11626  new_path="$path"
11627  if test "x$has_colon" = x; then
11628    # Not in mixed or Windows style, start by that.
11629    new_path=`cmd //c echo $path`
11630  fi
11631
11632
11633  input_path="$new_path"
11634  # Check if we need to convert this using DOS-style short mode. If the path
11635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11636  # take no chances and rewrite it.
11637  # Note: m4 eats our [], so we need to use [ and ] instead.
11638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11639  if test "x$has_forbidden_chars" != x; then
11640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11642  fi
11643
11644
11645  windows_path="$new_path"
11646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11647    unix_path=`$CYGPATH -u "$windows_path"`
11648    new_path="$unix_path"
11649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11651    new_path="$unix_path"
11652  fi
11653
11654  if test "x$path" != "x$new_path"; then
11655    BOOT_JDK="$new_path"
11656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11658  fi
11659
11660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11662
11663  else
11664    # We're on a posix platform. Hooray! :)
11665    path="$BOOT_JDK"
11666
11667    if test ! -f "$path" && test ! -d "$path"; then
11668      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11669    fi
11670
11671    has_space=`$ECHO "$path" | $GREP " "`
11672    if test "x$has_space" != x; then
11673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11675      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11676    fi
11677  fi
11678
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11680$as_echo_n "checking for Boot JDK... " >&6; }
11681              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11682$as_echo "$BOOT_JDK" >&6; }
11683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11684$as_echo_n "checking Boot JDK version... " >&6; }
11685              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11687$as_echo "$BOOT_JDK_VERSION" >&6; }
11688            fi # end check jdk version
11689          fi # end check rt.jar
11690        fi # end check javac
11691      fi # end check java
11692    fi # end check boot jdk found
11693  fi
11694
11695
11696# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11697
11698  if test "x$BOOT_JDK_FOUND" = xno; then
11699    # Now execute the test
11700
11701    # Extract the first word of "javac", so it can be a program name with args.
11702set dummy javac; ac_word=$2
11703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11704$as_echo_n "checking for $ac_word... " >&6; }
11705if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11706  $as_echo_n "(cached) " >&6
11707else
11708  case $JAVAC_CHECK in
11709  [\\/]* | ?:[\\/]*)
11710  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11711  ;;
11712  *)
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_exec_ext in '' $ac_executable_extensions; do
11719  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11720    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11722    break 2
11723  fi
11724done
11725  done
11726IFS=$as_save_IFS
11727
11728  ;;
11729esac
11730fi
11731JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11732if test -n "$JAVAC_CHECK"; then
11733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11734$as_echo "$JAVAC_CHECK" >&6; }
11735else
11736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
11738fi
11739
11740
11741    # Extract the first word of "java", so it can be a program name with args.
11742set dummy java; ac_word=$2
11743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11744$as_echo_n "checking for $ac_word... " >&6; }
11745if ${ac_cv_path_JAVA_CHECK+:} false; then :
11746  $as_echo_n "(cached) " >&6
11747else
11748  case $JAVA_CHECK in
11749  [\\/]* | ?:[\\/]*)
11750  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11751  ;;
11752  *)
11753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754for as_dir in $PATH
11755do
11756  IFS=$as_save_IFS
11757  test -z "$as_dir" && as_dir=.
11758    for ac_exec_ext in '' $ac_executable_extensions; do
11759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11760    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11762    break 2
11763  fi
11764done
11765  done
11766IFS=$as_save_IFS
11767
11768  ;;
11769esac
11770fi
11771JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11772if test -n "$JAVA_CHECK"; then
11773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11774$as_echo "$JAVA_CHECK" >&6; }
11775else
11776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777$as_echo "no" >&6; }
11778fi
11779
11780
11781    BINARY="$JAVAC_CHECK"
11782    if test "x$JAVAC_CHECK" = x; then
11783        BINARY="$JAVA_CHECK"
11784    fi
11785    if test "x$BINARY" != x; then
11786        # So there is a java(c) binary, it might be part of a JDK.
11787        # Lets find the JDK/JRE directory by following symbolic links.
11788        # Linux/GNU systems often have links from /usr/bin/java to
11789        # /etc/alternatives/java to the real JDK binary.
11790
11791    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11792        # Follow a chain of symbolic links. Use readlink
11793        # where it exists, else fall back to horribly
11794        # complicated shell code.
11795        if test "x$READLINK_TESTED" != yes; then
11796            # On MacOSX there is a readlink tool with a different
11797            # purpose than the GNU readlink tool. Check the found readlink.
11798            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11799            if test "x$ISGNU" = x; then
11800                 # A readlink that we do not know how to use.
11801                 # Are there other non-GNU readlinks out there?
11802                 READLINK_TESTED=yes
11803                 READLINK=
11804            fi
11805        fi
11806
11807        if test "x$READLINK" != x; then
11808            BINARY=`$READLINK -f $BINARY`
11809        else
11810            # Save the current directory for restoring afterwards
11811            STARTDIR=$PWD
11812            COUNTER=0
11813            sym_link_dir=`$DIRNAME $BINARY`
11814            sym_link_file=`$BASENAME $BINARY`
11815            # Use the system pwd and not the shell builtin to resolve directory symlinks
11816            cd $sym_link_dir
11817            cd `$THEPWDCMD`
11818            sym_link_dir=`$THEPWDCMD`
11819            # Resolve file symlinks
11820            while test $COUNTER -lt 20; do
11821                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11822                if test "x$ISLINK" == x; then
11823                    # This is not a symbolic link! We are done!
11824                    break
11825                fi
11826                # Again resolve directory symlinks since the target of the just found
11827                # link could be in a different directory
11828                cd `$DIRNAME $ISLINK`
11829                sym_link_dir=`$THEPWDCMD`
11830                sym_link_file=`$BASENAME $ISLINK`
11831                let COUNTER=COUNTER+1
11832            done
11833            cd $STARTDIR
11834            BINARY=$sym_link_dir/$sym_link_file
11835        fi
11836    fi
11837
11838        BOOT_JDK=`dirname "$BINARY"`
11839        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11840        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11841            # Looks like we found ourselves an JDK
11842            BOOT_JDK_FOUND=maybe
11843            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11844$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11845        fi
11846    fi
11847
11848
11849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11851      # Do we have a bin/java?
11852      if test ! -x "$BOOT_JDK/bin/java"; then
11853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11855        BOOT_JDK_FOUND=no
11856      else
11857        # Do we have a bin/javac?
11858        if test ! -x "$BOOT_JDK/bin/javac"; then
11859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11863          BOOT_JDK_FOUND=no
11864        else
11865          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11866          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11867            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11869            BOOT_JDK_FOUND=no
11870          else
11871            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11873
11874            # Extra M4 quote needed to protect [] in grep expression.
11875            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11876            if test "x$FOUND_VERSION_78" = x; then
11877              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11879              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11880$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11881              BOOT_JDK_FOUND=no
11882            else
11883              # We're done! :-)
11884              BOOT_JDK_FOUND=yes
11885
11886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11887
11888  # Input might be given as Windows format, start by converting to
11889  # unix format.
11890  path="$BOOT_JDK"
11891  new_path=`$CYGPATH -u "$path"`
11892
11893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11896  # "foo.exe" is OK but "foo" is an error.
11897  #
11898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11899  # It is also a way to make sure we got the proper file name for the real test later on.
11900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11901  if test "x$test_shortpath" = x; then
11902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11904    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11905  fi
11906
11907  # Call helper function which possibly converts this using DOS-style short mode.
11908  # If so, the updated path is stored in $new_path.
11909
11910  input_path="$new_path"
11911  # Check if we need to convert this using DOS-style short mode. If the path
11912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11913  # take no chances and rewrite it.
11914  # Note: m4 eats our [], so we need to use [ and ] instead.
11915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11916  if test "x$has_forbidden_chars" != x; then
11917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11921      # Going to short mode and back again did indeed matter. Since short mode is
11922      # case insensitive, let's make it lowercase to improve readability.
11923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11924      # Now convert it back to Unix-stile (cygpath)
11925      input_path=`$CYGPATH -u "$shortmode_path"`
11926      new_path="$input_path"
11927    fi
11928  fi
11929
11930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11931  if test "x$test_cygdrive_prefix" = x; then
11932    # As a simple fix, exclude /usr/bin since it's not a real path.
11933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11935      # a path prefixed by /cygdrive for fixpath to work.
11936      new_path="$CYGWIN_ROOT_PATH$input_path"
11937    fi
11938  fi
11939
11940
11941  if test "x$path" != "x$new_path"; then
11942    BOOT_JDK="$new_path"
11943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11945  fi
11946
11947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11948
11949  path="$BOOT_JDK"
11950  has_colon=`$ECHO $path | $GREP ^.:`
11951  new_path="$path"
11952  if test "x$has_colon" = x; then
11953    # Not in mixed or Windows style, start by that.
11954    new_path=`cmd //c echo $path`
11955  fi
11956
11957
11958  input_path="$new_path"
11959  # Check if we need to convert this using DOS-style short mode. If the path
11960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11961  # take no chances and rewrite it.
11962  # Note: m4 eats our [], so we need to use [ and ] instead.
11963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11964  if test "x$has_forbidden_chars" != x; then
11965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11967  fi
11968
11969
11970  windows_path="$new_path"
11971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11972    unix_path=`$CYGPATH -u "$windows_path"`
11973    new_path="$unix_path"
11974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11976    new_path="$unix_path"
11977  fi
11978
11979  if test "x$path" != "x$new_path"; then
11980    BOOT_JDK="$new_path"
11981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11983  fi
11984
11985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11987
11988  else
11989    # We're on a posix platform. Hooray! :)
11990    path="$BOOT_JDK"
11991
11992    if test ! -f "$path" && test ! -d "$path"; then
11993      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11994    fi
11995
11996    has_space=`$ECHO "$path" | $GREP " "`
11997    if test "x$has_space" != x; then
11998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12000      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12001    fi
12002  fi
12003
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12005$as_echo_n "checking for Boot JDK... " >&6; }
12006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12007$as_echo "$BOOT_JDK" >&6; }
12008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12009$as_echo_n "checking Boot JDK version... " >&6; }
12010              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12012$as_echo "$BOOT_JDK_VERSION" >&6; }
12013            fi # end check jdk version
12014          fi # end check rt.jar
12015        fi # end check javac
12016      fi # end check java
12017    fi # end check boot jdk found
12018  fi
12019
12020
12021# Test: Is there a JDK installed in default, well-known locations?
12022
12023  if test "x$BOOT_JDK_FOUND" = xno; then
12024    # Now execute the test
12025
12026  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12027
12028  if test "x$BOOT_JDK_FOUND" = xno; then
12029    # Now execute the test
12030
12031  if test "x$ProgramW6432" != x; then
12032    VIRTUAL_DIR="$ProgramW6432/Java"
12033
12034  windows_path="$VIRTUAL_DIR"
12035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12036    unix_path=`$CYGPATH -u "$windows_path"`
12037    VIRTUAL_DIR="$unix_path"
12038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12040    VIRTUAL_DIR="$unix_path"
12041  fi
12042
12043
12044  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12045  BOOT_JDK_SUFFIX=""
12046  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12047  if test "x$ALL_JDKS_FOUND" != x; then
12048    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12049
12050  if test "x$BOOT_JDK_FOUND" = xno; then
12051    # Now execute the test
12052
12053        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12054        if test -d "$BOOT_JDK"; then
12055          BOOT_JDK_FOUND=maybe
12056          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12057$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12058        fi
12059
12060
12061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12063      # Do we have a bin/java?
12064      if test ! -x "$BOOT_JDK/bin/java"; then
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12067        BOOT_JDK_FOUND=no
12068      else
12069        # Do we have a bin/javac?
12070        if test ! -x "$BOOT_JDK/bin/javac"; then
12071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12075          BOOT_JDK_FOUND=no
12076        else
12077          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12078          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12081            BOOT_JDK_FOUND=no
12082          else
12083            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12085
12086            # Extra M4 quote needed to protect [] in grep expression.
12087            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12088            if test "x$FOUND_VERSION_78" = x; then
12089              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12091              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12092$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12093              BOOT_JDK_FOUND=no
12094            else
12095              # We're done! :-)
12096              BOOT_JDK_FOUND=yes
12097
12098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12099
12100  # Input might be given as Windows format, start by converting to
12101  # unix format.
12102  path="$BOOT_JDK"
12103  new_path=`$CYGPATH -u "$path"`
12104
12105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12108  # "foo.exe" is OK but "foo" is an error.
12109  #
12110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12111  # It is also a way to make sure we got the proper file name for the real test later on.
12112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12113  if test "x$test_shortpath" = x; then
12114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12116    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12117  fi
12118
12119  # Call helper function which possibly converts this using DOS-style short mode.
12120  # If so, the updated path is stored in $new_path.
12121
12122  input_path="$new_path"
12123  # Check if we need to convert this using DOS-style short mode. If the path
12124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12125  # take no chances and rewrite it.
12126  # Note: m4 eats our [], so we need to use [ and ] instead.
12127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12128  if test "x$has_forbidden_chars" != x; then
12129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12133      # Going to short mode and back again did indeed matter. Since short mode is
12134      # case insensitive, let's make it lowercase to improve readability.
12135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12136      # Now convert it back to Unix-stile (cygpath)
12137      input_path=`$CYGPATH -u "$shortmode_path"`
12138      new_path="$input_path"
12139    fi
12140  fi
12141
12142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12143  if test "x$test_cygdrive_prefix" = x; then
12144    # As a simple fix, exclude /usr/bin since it's not a real path.
12145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12147      # a path prefixed by /cygdrive for fixpath to work.
12148      new_path="$CYGWIN_ROOT_PATH$input_path"
12149    fi
12150  fi
12151
12152
12153  if test "x$path" != "x$new_path"; then
12154    BOOT_JDK="$new_path"
12155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12157  fi
12158
12159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12160
12161  path="$BOOT_JDK"
12162  has_colon=`$ECHO $path | $GREP ^.:`
12163  new_path="$path"
12164  if test "x$has_colon" = x; then
12165    # Not in mixed or Windows style, start by that.
12166    new_path=`cmd //c echo $path`
12167  fi
12168
12169
12170  input_path="$new_path"
12171  # Check if we need to convert this using DOS-style short mode. If the path
12172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12173  # take no chances and rewrite it.
12174  # Note: m4 eats our [], so we need to use [ and ] instead.
12175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12176  if test "x$has_forbidden_chars" != x; then
12177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12179  fi
12180
12181
12182  windows_path="$new_path"
12183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12184    unix_path=`$CYGPATH -u "$windows_path"`
12185    new_path="$unix_path"
12186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12188    new_path="$unix_path"
12189  fi
12190
12191  if test "x$path" != "x$new_path"; then
12192    BOOT_JDK="$new_path"
12193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12195  fi
12196
12197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12199
12200  else
12201    # We're on a posix platform. Hooray! :)
12202    path="$BOOT_JDK"
12203
12204    if test ! -f "$path" && test ! -d "$path"; then
12205      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12206    fi
12207
12208    has_space=`$ECHO "$path" | $GREP " "`
12209    if test "x$has_space" != x; then
12210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12213    fi
12214  fi
12215
12216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12217$as_echo_n "checking for Boot JDK... " >&6; }
12218              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12219$as_echo "$BOOT_JDK" >&6; }
12220              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12221$as_echo_n "checking Boot JDK version... " >&6; }
12222              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12224$as_echo "$BOOT_JDK_VERSION" >&6; }
12225            fi # end check jdk version
12226          fi # end check rt.jar
12227        fi # end check javac
12228      fi # end check java
12229    fi # end check boot jdk found
12230  fi
12231
12232    done
12233  fi
12234
12235  fi
12236
12237
12238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12240      # Do we have a bin/java?
12241      if test ! -x "$BOOT_JDK/bin/java"; then
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12244        BOOT_JDK_FOUND=no
12245      else
12246        # Do we have a bin/javac?
12247        if test ! -x "$BOOT_JDK/bin/javac"; then
12248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12252          BOOT_JDK_FOUND=no
12253        else
12254          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12255          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12258            BOOT_JDK_FOUND=no
12259          else
12260            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12262
12263            # Extra M4 quote needed to protect [] in grep expression.
12264            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12265            if test "x$FOUND_VERSION_78" = x; then
12266              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12268              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12269$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12270              BOOT_JDK_FOUND=no
12271            else
12272              # We're done! :-)
12273              BOOT_JDK_FOUND=yes
12274
12275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12276
12277  # Input might be given as Windows format, start by converting to
12278  # unix format.
12279  path="$BOOT_JDK"
12280  new_path=`$CYGPATH -u "$path"`
12281
12282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12285  # "foo.exe" is OK but "foo" is an error.
12286  #
12287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12288  # It is also a way to make sure we got the proper file name for the real test later on.
12289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12290  if test "x$test_shortpath" = x; then
12291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12294  fi
12295
12296  # Call helper function which possibly converts this using DOS-style short mode.
12297  # If so, the updated path is stored in $new_path.
12298
12299  input_path="$new_path"
12300  # Check if we need to convert this using DOS-style short mode. If the path
12301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12302  # take no chances and rewrite it.
12303  # Note: m4 eats our [], so we need to use [ and ] instead.
12304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12305  if test "x$has_forbidden_chars" != x; then
12306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12310      # Going to short mode and back again did indeed matter. Since short mode is
12311      # case insensitive, let's make it lowercase to improve readability.
12312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12313      # Now convert it back to Unix-stile (cygpath)
12314      input_path=`$CYGPATH -u "$shortmode_path"`
12315      new_path="$input_path"
12316    fi
12317  fi
12318
12319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12320  if test "x$test_cygdrive_prefix" = x; then
12321    # As a simple fix, exclude /usr/bin since it's not a real path.
12322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12324      # a path prefixed by /cygdrive for fixpath to work.
12325      new_path="$CYGWIN_ROOT_PATH$input_path"
12326    fi
12327  fi
12328
12329
12330  if test "x$path" != "x$new_path"; then
12331    BOOT_JDK="$new_path"
12332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12334  fi
12335
12336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12337
12338  path="$BOOT_JDK"
12339  has_colon=`$ECHO $path | $GREP ^.:`
12340  new_path="$path"
12341  if test "x$has_colon" = x; then
12342    # Not in mixed or Windows style, start by that.
12343    new_path=`cmd //c echo $path`
12344  fi
12345
12346
12347  input_path="$new_path"
12348  # Check if we need to convert this using DOS-style short mode. If the path
12349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12350  # take no chances and rewrite it.
12351  # Note: m4 eats our [], so we need to use [ and ] instead.
12352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12353  if test "x$has_forbidden_chars" != x; then
12354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12356  fi
12357
12358
12359  windows_path="$new_path"
12360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12361    unix_path=`$CYGPATH -u "$windows_path"`
12362    new_path="$unix_path"
12363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12365    new_path="$unix_path"
12366  fi
12367
12368  if test "x$path" != "x$new_path"; then
12369    BOOT_JDK="$new_path"
12370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12372  fi
12373
12374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12376
12377  else
12378    # We're on a posix platform. Hooray! :)
12379    path="$BOOT_JDK"
12380
12381    if test ! -f "$path" && test ! -d "$path"; then
12382      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12383    fi
12384
12385    has_space=`$ECHO "$path" | $GREP " "`
12386    if test "x$has_space" != x; then
12387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12390    fi
12391  fi
12392
12393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12394$as_echo_n "checking for Boot JDK... " >&6; }
12395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12396$as_echo "$BOOT_JDK" >&6; }
12397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12398$as_echo_n "checking Boot JDK version... " >&6; }
12399              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12401$as_echo "$BOOT_JDK_VERSION" >&6; }
12402            fi # end check jdk version
12403          fi # end check rt.jar
12404        fi # end check javac
12405      fi # end check java
12406    fi # end check boot jdk found
12407  fi
12408
12409
12410  if test "x$BOOT_JDK_FOUND" = xno; then
12411    # Now execute the test
12412
12413  if test "x$PROGRAMW6432" != x; then
12414    VIRTUAL_DIR="$PROGRAMW6432/Java"
12415
12416  windows_path="$VIRTUAL_DIR"
12417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12418    unix_path=`$CYGPATH -u "$windows_path"`
12419    VIRTUAL_DIR="$unix_path"
12420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12422    VIRTUAL_DIR="$unix_path"
12423  fi
12424
12425
12426  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12427  BOOT_JDK_SUFFIX=""
12428  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12429  if test "x$ALL_JDKS_FOUND" != x; then
12430    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12431
12432  if test "x$BOOT_JDK_FOUND" = xno; then
12433    # Now execute the test
12434
12435        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12436        if test -d "$BOOT_JDK"; then
12437          BOOT_JDK_FOUND=maybe
12438          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12439$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12440        fi
12441
12442
12443    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12444    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12445      # Do we have a bin/java?
12446      if test ! -x "$BOOT_JDK/bin/java"; then
12447        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12449        BOOT_JDK_FOUND=no
12450      else
12451        # Do we have a bin/javac?
12452        if test ! -x "$BOOT_JDK/bin/javac"; then
12453          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12455          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12456$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12457          BOOT_JDK_FOUND=no
12458        else
12459          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12460          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12463            BOOT_JDK_FOUND=no
12464          else
12465            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12467
12468            # Extra M4 quote needed to protect [] in grep expression.
12469            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12470            if test "x$FOUND_VERSION_78" = x; then
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12474$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12475              BOOT_JDK_FOUND=no
12476            else
12477              # We're done! :-)
12478              BOOT_JDK_FOUND=yes
12479
12480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12481
12482  # Input might be given as Windows format, start by converting to
12483  # unix format.
12484  path="$BOOT_JDK"
12485  new_path=`$CYGPATH -u "$path"`
12486
12487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12490  # "foo.exe" is OK but "foo" is an error.
12491  #
12492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12493  # It is also a way to make sure we got the proper file name for the real test later on.
12494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12495  if test "x$test_shortpath" = x; then
12496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12499  fi
12500
12501  # Call helper function which possibly converts this using DOS-style short mode.
12502  # If so, the updated path is stored in $new_path.
12503
12504  input_path="$new_path"
12505  # Check if we need to convert this using DOS-style short mode. If the path
12506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12507  # take no chances and rewrite it.
12508  # Note: m4 eats our [], so we need to use [ and ] instead.
12509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12510  if test "x$has_forbidden_chars" != x; then
12511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12515      # Going to short mode and back again did indeed matter. Since short mode is
12516      # case insensitive, let's make it lowercase to improve readability.
12517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12518      # Now convert it back to Unix-stile (cygpath)
12519      input_path=`$CYGPATH -u "$shortmode_path"`
12520      new_path="$input_path"
12521    fi
12522  fi
12523
12524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12525  if test "x$test_cygdrive_prefix" = x; then
12526    # As a simple fix, exclude /usr/bin since it's not a real path.
12527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12529      # a path prefixed by /cygdrive for fixpath to work.
12530      new_path="$CYGWIN_ROOT_PATH$input_path"
12531    fi
12532  fi
12533
12534
12535  if test "x$path" != "x$new_path"; then
12536    BOOT_JDK="$new_path"
12537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12539  fi
12540
12541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12542
12543  path="$BOOT_JDK"
12544  has_colon=`$ECHO $path | $GREP ^.:`
12545  new_path="$path"
12546  if test "x$has_colon" = x; then
12547    # Not in mixed or Windows style, start by that.
12548    new_path=`cmd //c echo $path`
12549  fi
12550
12551
12552  input_path="$new_path"
12553  # Check if we need to convert this using DOS-style short mode. If the path
12554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12555  # take no chances and rewrite it.
12556  # Note: m4 eats our [], so we need to use [ and ] instead.
12557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12558  if test "x$has_forbidden_chars" != x; then
12559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12561  fi
12562
12563
12564  windows_path="$new_path"
12565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12566    unix_path=`$CYGPATH -u "$windows_path"`
12567    new_path="$unix_path"
12568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12570    new_path="$unix_path"
12571  fi
12572
12573  if test "x$path" != "x$new_path"; then
12574    BOOT_JDK="$new_path"
12575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12577  fi
12578
12579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12581
12582  else
12583    # We're on a posix platform. Hooray! :)
12584    path="$BOOT_JDK"
12585
12586    if test ! -f "$path" && test ! -d "$path"; then
12587      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12588    fi
12589
12590    has_space=`$ECHO "$path" | $GREP " "`
12591    if test "x$has_space" != x; then
12592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12594      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12595    fi
12596  fi
12597
12598              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12599$as_echo_n "checking for Boot JDK... " >&6; }
12600              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12601$as_echo "$BOOT_JDK" >&6; }
12602              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12603$as_echo_n "checking Boot JDK version... " >&6; }
12604              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12605              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12606$as_echo "$BOOT_JDK_VERSION" >&6; }
12607            fi # end check jdk version
12608          fi # end check rt.jar
12609        fi # end check javac
12610      fi # end check java
12611    fi # end check boot jdk found
12612  fi
12613
12614    done
12615  fi
12616
12617  fi
12618
12619
12620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12622      # Do we have a bin/java?
12623      if test ! -x "$BOOT_JDK/bin/java"; then
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12626        BOOT_JDK_FOUND=no
12627      else
12628        # Do we have a bin/javac?
12629        if test ! -x "$BOOT_JDK/bin/javac"; then
12630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12634          BOOT_JDK_FOUND=no
12635        else
12636          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12637          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12640            BOOT_JDK_FOUND=no
12641          else
12642            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12644
12645            # Extra M4 quote needed to protect [] in grep expression.
12646            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12647            if test "x$FOUND_VERSION_78" = x; then
12648              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12650              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12651$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12652              BOOT_JDK_FOUND=no
12653            else
12654              # We're done! :-)
12655              BOOT_JDK_FOUND=yes
12656
12657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12658
12659  # Input might be given as Windows format, start by converting to
12660  # unix format.
12661  path="$BOOT_JDK"
12662  new_path=`$CYGPATH -u "$path"`
12663
12664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12667  # "foo.exe" is OK but "foo" is an error.
12668  #
12669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12670  # It is also a way to make sure we got the proper file name for the real test later on.
12671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12672  if test "x$test_shortpath" = x; then
12673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12675    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12676  fi
12677
12678  # Call helper function which possibly converts this using DOS-style short mode.
12679  # If so, the updated path is stored in $new_path.
12680
12681  input_path="$new_path"
12682  # Check if we need to convert this using DOS-style short mode. If the path
12683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12684  # take no chances and rewrite it.
12685  # Note: m4 eats our [], so we need to use [ and ] instead.
12686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12687  if test "x$has_forbidden_chars" != x; then
12688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12692      # Going to short mode and back again did indeed matter. Since short mode is
12693      # case insensitive, let's make it lowercase to improve readability.
12694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12695      # Now convert it back to Unix-stile (cygpath)
12696      input_path=`$CYGPATH -u "$shortmode_path"`
12697      new_path="$input_path"
12698    fi
12699  fi
12700
12701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12702  if test "x$test_cygdrive_prefix" = x; then
12703    # As a simple fix, exclude /usr/bin since it's not a real path.
12704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12706      # a path prefixed by /cygdrive for fixpath to work.
12707      new_path="$CYGWIN_ROOT_PATH$input_path"
12708    fi
12709  fi
12710
12711
12712  if test "x$path" != "x$new_path"; then
12713    BOOT_JDK="$new_path"
12714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12716  fi
12717
12718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12719
12720  path="$BOOT_JDK"
12721  has_colon=`$ECHO $path | $GREP ^.:`
12722  new_path="$path"
12723  if test "x$has_colon" = x; then
12724    # Not in mixed or Windows style, start by that.
12725    new_path=`cmd //c echo $path`
12726  fi
12727
12728
12729  input_path="$new_path"
12730  # Check if we need to convert this using DOS-style short mode. If the path
12731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12732  # take no chances and rewrite it.
12733  # Note: m4 eats our [], so we need to use [ and ] instead.
12734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12735  if test "x$has_forbidden_chars" != x; then
12736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12738  fi
12739
12740
12741  windows_path="$new_path"
12742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12743    unix_path=`$CYGPATH -u "$windows_path"`
12744    new_path="$unix_path"
12745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12747    new_path="$unix_path"
12748  fi
12749
12750  if test "x$path" != "x$new_path"; then
12751    BOOT_JDK="$new_path"
12752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12754  fi
12755
12756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12758
12759  else
12760    # We're on a posix platform. Hooray! :)
12761    path="$BOOT_JDK"
12762
12763    if test ! -f "$path" && test ! -d "$path"; then
12764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12765    fi
12766
12767    has_space=`$ECHO "$path" | $GREP " "`
12768    if test "x$has_space" != x; then
12769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12772    fi
12773  fi
12774
12775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12776$as_echo_n "checking for Boot JDK... " >&6; }
12777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12778$as_echo "$BOOT_JDK" >&6; }
12779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12780$as_echo_n "checking Boot JDK version... " >&6; }
12781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12783$as_echo "$BOOT_JDK_VERSION" >&6; }
12784            fi # end check jdk version
12785          fi # end check rt.jar
12786        fi # end check javac
12787      fi # end check java
12788    fi # end check boot jdk found
12789  fi
12790
12791
12792  if test "x$BOOT_JDK_FOUND" = xno; then
12793    # Now execute the test
12794
12795  if test "x$PROGRAMFILES" != x; then
12796    VIRTUAL_DIR="$PROGRAMFILES/Java"
12797
12798  windows_path="$VIRTUAL_DIR"
12799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12800    unix_path=`$CYGPATH -u "$windows_path"`
12801    VIRTUAL_DIR="$unix_path"
12802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12804    VIRTUAL_DIR="$unix_path"
12805  fi
12806
12807
12808  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12809  BOOT_JDK_SUFFIX=""
12810  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12811  if test "x$ALL_JDKS_FOUND" != x; then
12812    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12813
12814  if test "x$BOOT_JDK_FOUND" = xno; then
12815    # Now execute the test
12816
12817        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12818        if test -d "$BOOT_JDK"; then
12819          BOOT_JDK_FOUND=maybe
12820          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12821$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12822        fi
12823
12824
12825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12827      # Do we have a bin/java?
12828      if test ! -x "$BOOT_JDK/bin/java"; then
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12831        BOOT_JDK_FOUND=no
12832      else
12833        # Do we have a bin/javac?
12834        if test ! -x "$BOOT_JDK/bin/javac"; then
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12839          BOOT_JDK_FOUND=no
12840        else
12841          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12842          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12845            BOOT_JDK_FOUND=no
12846          else
12847            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12849
12850            # Extra M4 quote needed to protect [] in grep expression.
12851            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12852            if test "x$FOUND_VERSION_78" = x; then
12853              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12855              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12856$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12857              BOOT_JDK_FOUND=no
12858            else
12859              # We're done! :-)
12860              BOOT_JDK_FOUND=yes
12861
12862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12863
12864  # Input might be given as Windows format, start by converting to
12865  # unix format.
12866  path="$BOOT_JDK"
12867  new_path=`$CYGPATH -u "$path"`
12868
12869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12872  # "foo.exe" is OK but "foo" is an error.
12873  #
12874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12875  # It is also a way to make sure we got the proper file name for the real test later on.
12876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12877  if test "x$test_shortpath" = x; then
12878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12881  fi
12882
12883  # Call helper function which possibly converts this using DOS-style short mode.
12884  # If so, the updated path is stored in $new_path.
12885
12886  input_path="$new_path"
12887  # Check if we need to convert this using DOS-style short mode. If the path
12888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12889  # take no chances and rewrite it.
12890  # Note: m4 eats our [], so we need to use [ and ] instead.
12891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12892  if test "x$has_forbidden_chars" != x; then
12893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12897      # Going to short mode and back again did indeed matter. Since short mode is
12898      # case insensitive, let's make it lowercase to improve readability.
12899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12900      # Now convert it back to Unix-stile (cygpath)
12901      input_path=`$CYGPATH -u "$shortmode_path"`
12902      new_path="$input_path"
12903    fi
12904  fi
12905
12906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12907  if test "x$test_cygdrive_prefix" = x; then
12908    # As a simple fix, exclude /usr/bin since it's not a real path.
12909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12911      # a path prefixed by /cygdrive for fixpath to work.
12912      new_path="$CYGWIN_ROOT_PATH$input_path"
12913    fi
12914  fi
12915
12916
12917  if test "x$path" != "x$new_path"; then
12918    BOOT_JDK="$new_path"
12919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12921  fi
12922
12923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12924
12925  path="$BOOT_JDK"
12926  has_colon=`$ECHO $path | $GREP ^.:`
12927  new_path="$path"
12928  if test "x$has_colon" = x; then
12929    # Not in mixed or Windows style, start by that.
12930    new_path=`cmd //c echo $path`
12931  fi
12932
12933
12934  input_path="$new_path"
12935  # Check if we need to convert this using DOS-style short mode. If the path
12936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12937  # take no chances and rewrite it.
12938  # Note: m4 eats our [], so we need to use [ and ] instead.
12939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12940  if test "x$has_forbidden_chars" != x; then
12941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12943  fi
12944
12945
12946  windows_path="$new_path"
12947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12948    unix_path=`$CYGPATH -u "$windows_path"`
12949    new_path="$unix_path"
12950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12952    new_path="$unix_path"
12953  fi
12954
12955  if test "x$path" != "x$new_path"; then
12956    BOOT_JDK="$new_path"
12957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12959  fi
12960
12961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12963
12964  else
12965    # We're on a posix platform. Hooray! :)
12966    path="$BOOT_JDK"
12967
12968    if test ! -f "$path" && test ! -d "$path"; then
12969      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12970    fi
12971
12972    has_space=`$ECHO "$path" | $GREP " "`
12973    if test "x$has_space" != x; then
12974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12976      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12977    fi
12978  fi
12979
12980              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12981$as_echo_n "checking for Boot JDK... " >&6; }
12982              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12983$as_echo "$BOOT_JDK" >&6; }
12984              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12985$as_echo_n "checking Boot JDK version... " >&6; }
12986              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12988$as_echo "$BOOT_JDK_VERSION" >&6; }
12989            fi # end check jdk version
12990          fi # end check rt.jar
12991        fi # end check javac
12992      fi # end check java
12993    fi # end check boot jdk found
12994  fi
12995
12996    done
12997  fi
12998
12999  fi
13000
13001
13002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13004      # Do we have a bin/java?
13005      if test ! -x "$BOOT_JDK/bin/java"; then
13006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13008        BOOT_JDK_FOUND=no
13009      else
13010        # Do we have a bin/javac?
13011        if test ! -x "$BOOT_JDK/bin/javac"; then
13012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13016          BOOT_JDK_FOUND=no
13017        else
13018          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13019          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13022            BOOT_JDK_FOUND=no
13023          else
13024            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13026
13027            # Extra M4 quote needed to protect [] in grep expression.
13028            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13029            if test "x$FOUND_VERSION_78" = x; then
13030              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13032              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13033$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13034              BOOT_JDK_FOUND=no
13035            else
13036              # We're done! :-)
13037              BOOT_JDK_FOUND=yes
13038
13039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13040
13041  # Input might be given as Windows format, start by converting to
13042  # unix format.
13043  path="$BOOT_JDK"
13044  new_path=`$CYGPATH -u "$path"`
13045
13046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13049  # "foo.exe" is OK but "foo" is an error.
13050  #
13051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13052  # It is also a way to make sure we got the proper file name for the real test later on.
13053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13054  if test "x$test_shortpath" = x; then
13055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13058  fi
13059
13060  # Call helper function which possibly converts this using DOS-style short mode.
13061  # If so, the updated path is stored in $new_path.
13062
13063  input_path="$new_path"
13064  # Check if we need to convert this using DOS-style short mode. If the path
13065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13066  # take no chances and rewrite it.
13067  # Note: m4 eats our [], so we need to use [ and ] instead.
13068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13069  if test "x$has_forbidden_chars" != x; then
13070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13074      # Going to short mode and back again did indeed matter. Since short mode is
13075      # case insensitive, let's make it lowercase to improve readability.
13076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13077      # Now convert it back to Unix-stile (cygpath)
13078      input_path=`$CYGPATH -u "$shortmode_path"`
13079      new_path="$input_path"
13080    fi
13081  fi
13082
13083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13084  if test "x$test_cygdrive_prefix" = x; then
13085    # As a simple fix, exclude /usr/bin since it's not a real path.
13086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13088      # a path prefixed by /cygdrive for fixpath to work.
13089      new_path="$CYGWIN_ROOT_PATH$input_path"
13090    fi
13091  fi
13092
13093
13094  if test "x$path" != "x$new_path"; then
13095    BOOT_JDK="$new_path"
13096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13098  fi
13099
13100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13101
13102  path="$BOOT_JDK"
13103  has_colon=`$ECHO $path | $GREP ^.:`
13104  new_path="$path"
13105  if test "x$has_colon" = x; then
13106    # Not in mixed or Windows style, start by that.
13107    new_path=`cmd //c echo $path`
13108  fi
13109
13110
13111  input_path="$new_path"
13112  # Check if we need to convert this using DOS-style short mode. If the path
13113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13114  # take no chances and rewrite it.
13115  # Note: m4 eats our [], so we need to use [ and ] instead.
13116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13117  if test "x$has_forbidden_chars" != x; then
13118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13120  fi
13121
13122
13123  windows_path="$new_path"
13124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13125    unix_path=`$CYGPATH -u "$windows_path"`
13126    new_path="$unix_path"
13127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13129    new_path="$unix_path"
13130  fi
13131
13132  if test "x$path" != "x$new_path"; then
13133    BOOT_JDK="$new_path"
13134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13136  fi
13137
13138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13140
13141  else
13142    # We're on a posix platform. Hooray! :)
13143    path="$BOOT_JDK"
13144
13145    if test ! -f "$path" && test ! -d "$path"; then
13146      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13147    fi
13148
13149    has_space=`$ECHO "$path" | $GREP " "`
13150    if test "x$has_space" != x; then
13151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13154    fi
13155  fi
13156
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13158$as_echo_n "checking for Boot JDK... " >&6; }
13159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13160$as_echo "$BOOT_JDK" >&6; }
13161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13162$as_echo_n "checking Boot JDK version... " >&6; }
13163              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13165$as_echo "$BOOT_JDK_VERSION" >&6; }
13166            fi # end check jdk version
13167          fi # end check rt.jar
13168        fi # end check javac
13169      fi # end check java
13170    fi # end check boot jdk found
13171  fi
13172
13173
13174  if test "x$BOOT_JDK_FOUND" = xno; then
13175    # Now execute the test
13176
13177  if test "x$ProgramFiles" != x; then
13178    VIRTUAL_DIR="$ProgramFiles/Java"
13179
13180  windows_path="$VIRTUAL_DIR"
13181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13182    unix_path=`$CYGPATH -u "$windows_path"`
13183    VIRTUAL_DIR="$unix_path"
13184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13186    VIRTUAL_DIR="$unix_path"
13187  fi
13188
13189
13190  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13191  BOOT_JDK_SUFFIX=""
13192  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13193  if test "x$ALL_JDKS_FOUND" != x; then
13194    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13195
13196  if test "x$BOOT_JDK_FOUND" = xno; then
13197    # Now execute the test
13198
13199        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13200        if test -d "$BOOT_JDK"; then
13201          BOOT_JDK_FOUND=maybe
13202          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13203$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13204        fi
13205
13206
13207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13209      # Do we have a bin/java?
13210      if test ! -x "$BOOT_JDK/bin/java"; then
13211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13213        BOOT_JDK_FOUND=no
13214      else
13215        # Do we have a bin/javac?
13216        if test ! -x "$BOOT_JDK/bin/javac"; then
13217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13221          BOOT_JDK_FOUND=no
13222        else
13223          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13224          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13227            BOOT_JDK_FOUND=no
13228          else
13229            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13231
13232            # Extra M4 quote needed to protect [] in grep expression.
13233            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13234            if test "x$FOUND_VERSION_78" = x; then
13235              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13237              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13238$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13239              BOOT_JDK_FOUND=no
13240            else
13241              # We're done! :-)
13242              BOOT_JDK_FOUND=yes
13243
13244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13245
13246  # Input might be given as Windows format, start by converting to
13247  # unix format.
13248  path="$BOOT_JDK"
13249  new_path=`$CYGPATH -u "$path"`
13250
13251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13254  # "foo.exe" is OK but "foo" is an error.
13255  #
13256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13257  # It is also a way to make sure we got the proper file name for the real test later on.
13258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13259  if test "x$test_shortpath" = x; then
13260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13262    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13263  fi
13264
13265  # Call helper function which possibly converts this using DOS-style short mode.
13266  # If so, the updated path is stored in $new_path.
13267
13268  input_path="$new_path"
13269  # Check if we need to convert this using DOS-style short mode. If the path
13270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13271  # take no chances and rewrite it.
13272  # Note: m4 eats our [], so we need to use [ and ] instead.
13273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13274  if test "x$has_forbidden_chars" != x; then
13275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13279      # Going to short mode and back again did indeed matter. Since short mode is
13280      # case insensitive, let's make it lowercase to improve readability.
13281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13282      # Now convert it back to Unix-stile (cygpath)
13283      input_path=`$CYGPATH -u "$shortmode_path"`
13284      new_path="$input_path"
13285    fi
13286  fi
13287
13288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13289  if test "x$test_cygdrive_prefix" = x; then
13290    # As a simple fix, exclude /usr/bin since it's not a real path.
13291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13293      # a path prefixed by /cygdrive for fixpath to work.
13294      new_path="$CYGWIN_ROOT_PATH$input_path"
13295    fi
13296  fi
13297
13298
13299  if test "x$path" != "x$new_path"; then
13300    BOOT_JDK="$new_path"
13301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13303  fi
13304
13305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13306
13307  path="$BOOT_JDK"
13308  has_colon=`$ECHO $path | $GREP ^.:`
13309  new_path="$path"
13310  if test "x$has_colon" = x; then
13311    # Not in mixed or Windows style, start by that.
13312    new_path=`cmd //c echo $path`
13313  fi
13314
13315
13316  input_path="$new_path"
13317  # Check if we need to convert this using DOS-style short mode. If the path
13318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13319  # take no chances and rewrite it.
13320  # Note: m4 eats our [], so we need to use [ and ] instead.
13321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13322  if test "x$has_forbidden_chars" != x; then
13323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13325  fi
13326
13327
13328  windows_path="$new_path"
13329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13330    unix_path=`$CYGPATH -u "$windows_path"`
13331    new_path="$unix_path"
13332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13334    new_path="$unix_path"
13335  fi
13336
13337  if test "x$path" != "x$new_path"; then
13338    BOOT_JDK="$new_path"
13339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13341  fi
13342
13343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13345
13346  else
13347    # We're on a posix platform. Hooray! :)
13348    path="$BOOT_JDK"
13349
13350    if test ! -f "$path" && test ! -d "$path"; then
13351      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13352    fi
13353
13354    has_space=`$ECHO "$path" | $GREP " "`
13355    if test "x$has_space" != x; then
13356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13358      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13359    fi
13360  fi
13361
13362              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13363$as_echo_n "checking for Boot JDK... " >&6; }
13364              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13365$as_echo "$BOOT_JDK" >&6; }
13366              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13367$as_echo_n "checking Boot JDK version... " >&6; }
13368              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13370$as_echo "$BOOT_JDK_VERSION" >&6; }
13371            fi # end check jdk version
13372          fi # end check rt.jar
13373        fi # end check javac
13374      fi # end check java
13375    fi # end check boot jdk found
13376  fi
13377
13378    done
13379  fi
13380
13381  fi
13382
13383
13384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13386      # Do we have a bin/java?
13387      if test ! -x "$BOOT_JDK/bin/java"; then
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13390        BOOT_JDK_FOUND=no
13391      else
13392        # Do we have a bin/javac?
13393        if test ! -x "$BOOT_JDK/bin/javac"; then
13394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13398          BOOT_JDK_FOUND=no
13399        else
13400          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13401          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13404            BOOT_JDK_FOUND=no
13405          else
13406            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13407            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13408
13409            # Extra M4 quote needed to protect [] in grep expression.
13410            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13411            if test "x$FOUND_VERSION_78" = x; then
13412              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13414              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13415$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13416              BOOT_JDK_FOUND=no
13417            else
13418              # We're done! :-)
13419              BOOT_JDK_FOUND=yes
13420
13421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13422
13423  # Input might be given as Windows format, start by converting to
13424  # unix format.
13425  path="$BOOT_JDK"
13426  new_path=`$CYGPATH -u "$path"`
13427
13428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13431  # "foo.exe" is OK but "foo" is an error.
13432  #
13433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13434  # It is also a way to make sure we got the proper file name for the real test later on.
13435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13436  if test "x$test_shortpath" = x; then
13437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13440  fi
13441
13442  # Call helper function which possibly converts this using DOS-style short mode.
13443  # If so, the updated path is stored in $new_path.
13444
13445  input_path="$new_path"
13446  # Check if we need to convert this using DOS-style short mode. If the path
13447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13448  # take no chances and rewrite it.
13449  # Note: m4 eats our [], so we need to use [ and ] instead.
13450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13451  if test "x$has_forbidden_chars" != x; then
13452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13456      # Going to short mode and back again did indeed matter. Since short mode is
13457      # case insensitive, let's make it lowercase to improve readability.
13458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13459      # Now convert it back to Unix-stile (cygpath)
13460      input_path=`$CYGPATH -u "$shortmode_path"`
13461      new_path="$input_path"
13462    fi
13463  fi
13464
13465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13466  if test "x$test_cygdrive_prefix" = x; then
13467    # As a simple fix, exclude /usr/bin since it's not a real path.
13468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13470      # a path prefixed by /cygdrive for fixpath to work.
13471      new_path="$CYGWIN_ROOT_PATH$input_path"
13472    fi
13473  fi
13474
13475
13476  if test "x$path" != "x$new_path"; then
13477    BOOT_JDK="$new_path"
13478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13480  fi
13481
13482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13483
13484  path="$BOOT_JDK"
13485  has_colon=`$ECHO $path | $GREP ^.:`
13486  new_path="$path"
13487  if test "x$has_colon" = x; then
13488    # Not in mixed or Windows style, start by that.
13489    new_path=`cmd //c echo $path`
13490  fi
13491
13492
13493  input_path="$new_path"
13494  # Check if we need to convert this using DOS-style short mode. If the path
13495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13496  # take no chances and rewrite it.
13497  # Note: m4 eats our [], so we need to use [ and ] instead.
13498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13499  if test "x$has_forbidden_chars" != x; then
13500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13502  fi
13503
13504
13505  windows_path="$new_path"
13506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13507    unix_path=`$CYGPATH -u "$windows_path"`
13508    new_path="$unix_path"
13509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13511    new_path="$unix_path"
13512  fi
13513
13514  if test "x$path" != "x$new_path"; then
13515    BOOT_JDK="$new_path"
13516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13518  fi
13519
13520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13522
13523  else
13524    # We're on a posix platform. Hooray! :)
13525    path="$BOOT_JDK"
13526
13527    if test ! -f "$path" && test ! -d "$path"; then
13528      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13529    fi
13530
13531    has_space=`$ECHO "$path" | $GREP " "`
13532    if test "x$has_space" != x; then
13533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13536    fi
13537  fi
13538
13539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13540$as_echo_n "checking for Boot JDK... " >&6; }
13541              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13542$as_echo "$BOOT_JDK" >&6; }
13543              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13544$as_echo_n "checking Boot JDK version... " >&6; }
13545              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13547$as_echo "$BOOT_JDK_VERSION" >&6; }
13548            fi # end check jdk version
13549          fi # end check rt.jar
13550        fi # end check javac
13551      fi # end check java
13552    fi # end check boot jdk found
13553  fi
13554
13555
13556  if test "x$BOOT_JDK_FOUND" = xno; then
13557    # Now execute the test
13558
13559  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13560  BOOT_JDK_SUFFIX=""
13561  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13562  if test "x$ALL_JDKS_FOUND" != x; then
13563    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13564
13565  if test "x$BOOT_JDK_FOUND" = xno; then
13566    # Now execute the test
13567
13568        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13569        if test -d "$BOOT_JDK"; then
13570          BOOT_JDK_FOUND=maybe
13571          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13572$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13573        fi
13574
13575
13576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13578      # Do we have a bin/java?
13579      if test ! -x "$BOOT_JDK/bin/java"; then
13580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13582        BOOT_JDK_FOUND=no
13583      else
13584        # Do we have a bin/javac?
13585        if test ! -x "$BOOT_JDK/bin/javac"; then
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13590          BOOT_JDK_FOUND=no
13591        else
13592          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13593          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13596            BOOT_JDK_FOUND=no
13597          else
13598            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13600
13601            # Extra M4 quote needed to protect [] in grep expression.
13602            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13603            if test "x$FOUND_VERSION_78" = x; then
13604              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13606              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13607$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13608              BOOT_JDK_FOUND=no
13609            else
13610              # We're done! :-)
13611              BOOT_JDK_FOUND=yes
13612
13613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13614
13615  # Input might be given as Windows format, start by converting to
13616  # unix format.
13617  path="$BOOT_JDK"
13618  new_path=`$CYGPATH -u "$path"`
13619
13620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13623  # "foo.exe" is OK but "foo" is an error.
13624  #
13625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13626  # It is also a way to make sure we got the proper file name for the real test later on.
13627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13628  if test "x$test_shortpath" = x; then
13629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13632  fi
13633
13634  # Call helper function which possibly converts this using DOS-style short mode.
13635  # If so, the updated path is stored in $new_path.
13636
13637  input_path="$new_path"
13638  # Check if we need to convert this using DOS-style short mode. If the path
13639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13640  # take no chances and rewrite it.
13641  # Note: m4 eats our [], so we need to use [ and ] instead.
13642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13643  if test "x$has_forbidden_chars" != x; then
13644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13648      # Going to short mode and back again did indeed matter. Since short mode is
13649      # case insensitive, let's make it lowercase to improve readability.
13650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13651      # Now convert it back to Unix-stile (cygpath)
13652      input_path=`$CYGPATH -u "$shortmode_path"`
13653      new_path="$input_path"
13654    fi
13655  fi
13656
13657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13658  if test "x$test_cygdrive_prefix" = x; then
13659    # As a simple fix, exclude /usr/bin since it's not a real path.
13660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13662      # a path prefixed by /cygdrive for fixpath to work.
13663      new_path="$CYGWIN_ROOT_PATH$input_path"
13664    fi
13665  fi
13666
13667
13668  if test "x$path" != "x$new_path"; then
13669    BOOT_JDK="$new_path"
13670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13672  fi
13673
13674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13675
13676  path="$BOOT_JDK"
13677  has_colon=`$ECHO $path | $GREP ^.:`
13678  new_path="$path"
13679  if test "x$has_colon" = x; then
13680    # Not in mixed or Windows style, start by that.
13681    new_path=`cmd //c echo $path`
13682  fi
13683
13684
13685  input_path="$new_path"
13686  # Check if we need to convert this using DOS-style short mode. If the path
13687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13688  # take no chances and rewrite it.
13689  # Note: m4 eats our [], so we need to use [ and ] instead.
13690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13691  if test "x$has_forbidden_chars" != x; then
13692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13694  fi
13695
13696
13697  windows_path="$new_path"
13698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13699    unix_path=`$CYGPATH -u "$windows_path"`
13700    new_path="$unix_path"
13701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13703    new_path="$unix_path"
13704  fi
13705
13706  if test "x$path" != "x$new_path"; then
13707    BOOT_JDK="$new_path"
13708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13710  fi
13711
13712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13714
13715  else
13716    # We're on a posix platform. Hooray! :)
13717    path="$BOOT_JDK"
13718
13719    if test ! -f "$path" && test ! -d "$path"; then
13720      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13721    fi
13722
13723    has_space=`$ECHO "$path" | $GREP " "`
13724    if test "x$has_space" != x; then
13725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13727      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13728    fi
13729  fi
13730
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13732$as_echo_n "checking for Boot JDK... " >&6; }
13733              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13734$as_echo "$BOOT_JDK" >&6; }
13735              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13736$as_echo_n "checking Boot JDK version... " >&6; }
13737              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13738              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13739$as_echo "$BOOT_JDK_VERSION" >&6; }
13740            fi # end check jdk version
13741          fi # end check rt.jar
13742        fi # end check javac
13743      fi # end check java
13744    fi # end check boot jdk found
13745  fi
13746
13747    done
13748  fi
13749
13750
13751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13753      # Do we have a bin/java?
13754      if test ! -x "$BOOT_JDK/bin/java"; then
13755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13757        BOOT_JDK_FOUND=no
13758      else
13759        # Do we have a bin/javac?
13760        if test ! -x "$BOOT_JDK/bin/javac"; then
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13765          BOOT_JDK_FOUND=no
13766        else
13767          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13768          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13771            BOOT_JDK_FOUND=no
13772          else
13773            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13775
13776            # Extra M4 quote needed to protect [] in grep expression.
13777            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13778            if test "x$FOUND_VERSION_78" = x; then
13779              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13781              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13782$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13783              BOOT_JDK_FOUND=no
13784            else
13785              # We're done! :-)
13786              BOOT_JDK_FOUND=yes
13787
13788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13789
13790  # Input might be given as Windows format, start by converting to
13791  # unix format.
13792  path="$BOOT_JDK"
13793  new_path=`$CYGPATH -u "$path"`
13794
13795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13798  # "foo.exe" is OK but "foo" is an error.
13799  #
13800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13801  # It is also a way to make sure we got the proper file name for the real test later on.
13802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13803  if test "x$test_shortpath" = x; then
13804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13807  fi
13808
13809  # Call helper function which possibly converts this using DOS-style short mode.
13810  # If so, the updated path is stored in $new_path.
13811
13812  input_path="$new_path"
13813  # Check if we need to convert this using DOS-style short mode. If the path
13814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13815  # take no chances and rewrite it.
13816  # Note: m4 eats our [], so we need to use [ and ] instead.
13817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13818  if test "x$has_forbidden_chars" != x; then
13819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13823      # Going to short mode and back again did indeed matter. Since short mode is
13824      # case insensitive, let's make it lowercase to improve readability.
13825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13826      # Now convert it back to Unix-stile (cygpath)
13827      input_path=`$CYGPATH -u "$shortmode_path"`
13828      new_path="$input_path"
13829    fi
13830  fi
13831
13832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13833  if test "x$test_cygdrive_prefix" = x; then
13834    # As a simple fix, exclude /usr/bin since it's not a real path.
13835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13837      # a path prefixed by /cygdrive for fixpath to work.
13838      new_path="$CYGWIN_ROOT_PATH$input_path"
13839    fi
13840  fi
13841
13842
13843  if test "x$path" != "x$new_path"; then
13844    BOOT_JDK="$new_path"
13845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13847  fi
13848
13849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13850
13851  path="$BOOT_JDK"
13852  has_colon=`$ECHO $path | $GREP ^.:`
13853  new_path="$path"
13854  if test "x$has_colon" = x; then
13855    # Not in mixed or Windows style, start by that.
13856    new_path=`cmd //c echo $path`
13857  fi
13858
13859
13860  input_path="$new_path"
13861  # Check if we need to convert this using DOS-style short mode. If the path
13862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13863  # take no chances and rewrite it.
13864  # Note: m4 eats our [], so we need to use [ and ] instead.
13865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13866  if test "x$has_forbidden_chars" != x; then
13867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13869  fi
13870
13871
13872  windows_path="$new_path"
13873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13874    unix_path=`$CYGPATH -u "$windows_path"`
13875    new_path="$unix_path"
13876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13878    new_path="$unix_path"
13879  fi
13880
13881  if test "x$path" != "x$new_path"; then
13882    BOOT_JDK="$new_path"
13883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13885  fi
13886
13887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13889
13890  else
13891    # We're on a posix platform. Hooray! :)
13892    path="$BOOT_JDK"
13893
13894    if test ! -f "$path" && test ! -d "$path"; then
13895      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13896    fi
13897
13898    has_space=`$ECHO "$path" | $GREP " "`
13899    if test "x$has_space" != x; then
13900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13902      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13903    fi
13904  fi
13905
13906              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13907$as_echo_n "checking for Boot JDK... " >&6; }
13908              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13909$as_echo "$BOOT_JDK" >&6; }
13910              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13911$as_echo_n "checking Boot JDK version... " >&6; }
13912              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13913              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13914$as_echo "$BOOT_JDK_VERSION" >&6; }
13915            fi # end check jdk version
13916          fi # end check rt.jar
13917        fi # end check javac
13918      fi # end check java
13919    fi # end check boot jdk found
13920  fi
13921
13922  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13923
13924  if test "x$BOOT_JDK_FOUND" = xno; then
13925    # Now execute the test
13926
13927  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13928  BOOT_JDK_SUFFIX="/Contents/Home"
13929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13930  if test "x$ALL_JDKS_FOUND" != x; then
13931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13932
13933  if test "x$BOOT_JDK_FOUND" = xno; then
13934    # Now execute the test
13935
13936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13937        if test -d "$BOOT_JDK"; then
13938          BOOT_JDK_FOUND=maybe
13939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13941        fi
13942
13943
13944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13946      # Do we have a bin/java?
13947      if test ! -x "$BOOT_JDK/bin/java"; then
13948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13950        BOOT_JDK_FOUND=no
13951      else
13952        # Do we have a bin/javac?
13953        if test ! -x "$BOOT_JDK/bin/javac"; then
13954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13958          BOOT_JDK_FOUND=no
13959        else
13960          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13961          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13964            BOOT_JDK_FOUND=no
13965          else
13966            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13968
13969            # Extra M4 quote needed to protect [] in grep expression.
13970            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13971            if test "x$FOUND_VERSION_78" = x; then
13972              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13974              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13975$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13976              BOOT_JDK_FOUND=no
13977            else
13978              # We're done! :-)
13979              BOOT_JDK_FOUND=yes
13980
13981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13982
13983  # Input might be given as Windows format, start by converting to
13984  # unix format.
13985  path="$BOOT_JDK"
13986  new_path=`$CYGPATH -u "$path"`
13987
13988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13991  # "foo.exe" is OK but "foo" is an error.
13992  #
13993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13994  # It is also a way to make sure we got the proper file name for the real test later on.
13995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13996  if test "x$test_shortpath" = x; then
13997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13999    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14000  fi
14001
14002  # Call helper function which possibly converts this using DOS-style short mode.
14003  # If so, the updated path is stored in $new_path.
14004
14005  input_path="$new_path"
14006  # Check if we need to convert this using DOS-style short mode. If the path
14007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14008  # take no chances and rewrite it.
14009  # Note: m4 eats our [], so we need to use [ and ] instead.
14010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14011  if test "x$has_forbidden_chars" != x; then
14012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14016      # Going to short mode and back again did indeed matter. Since short mode is
14017      # case insensitive, let's make it lowercase to improve readability.
14018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14019      # Now convert it back to Unix-stile (cygpath)
14020      input_path=`$CYGPATH -u "$shortmode_path"`
14021      new_path="$input_path"
14022    fi
14023  fi
14024
14025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14026  if test "x$test_cygdrive_prefix" = x; then
14027    # As a simple fix, exclude /usr/bin since it's not a real path.
14028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14030      # a path prefixed by /cygdrive for fixpath to work.
14031      new_path="$CYGWIN_ROOT_PATH$input_path"
14032    fi
14033  fi
14034
14035
14036  if test "x$path" != "x$new_path"; then
14037    BOOT_JDK="$new_path"
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14039$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14040  fi
14041
14042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14043
14044  path="$BOOT_JDK"
14045  has_colon=`$ECHO $path | $GREP ^.:`
14046  new_path="$path"
14047  if test "x$has_colon" = x; then
14048    # Not in mixed or Windows style, start by that.
14049    new_path=`cmd //c echo $path`
14050  fi
14051
14052
14053  input_path="$new_path"
14054  # Check if we need to convert this using DOS-style short mode. If the path
14055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14056  # take no chances and rewrite it.
14057  # Note: m4 eats our [], so we need to use [ and ] instead.
14058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14059  if test "x$has_forbidden_chars" != x; then
14060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14062  fi
14063
14064
14065  windows_path="$new_path"
14066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14067    unix_path=`$CYGPATH -u "$windows_path"`
14068    new_path="$unix_path"
14069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14071    new_path="$unix_path"
14072  fi
14073
14074  if test "x$path" != "x$new_path"; then
14075    BOOT_JDK="$new_path"
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14078  fi
14079
14080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14082
14083  else
14084    # We're on a posix platform. Hooray! :)
14085    path="$BOOT_JDK"
14086
14087    if test ! -f "$path" && test ! -d "$path"; then
14088      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14089    fi
14090
14091    has_space=`$ECHO "$path" | $GREP " "`
14092    if test "x$has_space" != x; then
14093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14096    fi
14097  fi
14098
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14100$as_echo_n "checking for Boot JDK... " >&6; }
14101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14102$as_echo "$BOOT_JDK" >&6; }
14103              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14104$as_echo_n "checking Boot JDK version... " >&6; }
14105              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14107$as_echo "$BOOT_JDK_VERSION" >&6; }
14108            fi # end check jdk version
14109          fi # end check rt.jar
14110        fi # end check javac
14111      fi # end check java
14112    fi # end check boot jdk found
14113  fi
14114
14115    done
14116  fi
14117
14118
14119    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14120    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14121      # Do we have a bin/java?
14122      if test ! -x "$BOOT_JDK/bin/java"; then
14123        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14125        BOOT_JDK_FOUND=no
14126      else
14127        # Do we have a bin/javac?
14128        if test ! -x "$BOOT_JDK/bin/javac"; then
14129          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14131          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14132$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14133          BOOT_JDK_FOUND=no
14134        else
14135          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14136          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14139            BOOT_JDK_FOUND=no
14140          else
14141            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14143
14144            # Extra M4 quote needed to protect [] in grep expression.
14145            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14146            if test "x$FOUND_VERSION_78" = x; then
14147              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14149              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14150$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14151              BOOT_JDK_FOUND=no
14152            else
14153              # We're done! :-)
14154              BOOT_JDK_FOUND=yes
14155
14156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14157
14158  # Input might be given as Windows format, start by converting to
14159  # unix format.
14160  path="$BOOT_JDK"
14161  new_path=`$CYGPATH -u "$path"`
14162
14163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14166  # "foo.exe" is OK but "foo" is an error.
14167  #
14168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14169  # It is also a way to make sure we got the proper file name for the real test later on.
14170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14171  if test "x$test_shortpath" = x; then
14172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14174    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14175  fi
14176
14177  # Call helper function which possibly converts this using DOS-style short mode.
14178  # If so, the updated path is stored in $new_path.
14179
14180  input_path="$new_path"
14181  # Check if we need to convert this using DOS-style short mode. If the path
14182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14183  # take no chances and rewrite it.
14184  # Note: m4 eats our [], so we need to use [ and ] instead.
14185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14186  if test "x$has_forbidden_chars" != x; then
14187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14191      # Going to short mode and back again did indeed matter. Since short mode is
14192      # case insensitive, let's make it lowercase to improve readability.
14193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14194      # Now convert it back to Unix-stile (cygpath)
14195      input_path=`$CYGPATH -u "$shortmode_path"`
14196      new_path="$input_path"
14197    fi
14198  fi
14199
14200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14201  if test "x$test_cygdrive_prefix" = x; then
14202    # As a simple fix, exclude /usr/bin since it's not a real path.
14203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14205      # a path prefixed by /cygdrive for fixpath to work.
14206      new_path="$CYGWIN_ROOT_PATH$input_path"
14207    fi
14208  fi
14209
14210
14211  if test "x$path" != "x$new_path"; then
14212    BOOT_JDK="$new_path"
14213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14215  fi
14216
14217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14218
14219  path="$BOOT_JDK"
14220  has_colon=`$ECHO $path | $GREP ^.:`
14221  new_path="$path"
14222  if test "x$has_colon" = x; then
14223    # Not in mixed or Windows style, start by that.
14224    new_path=`cmd //c echo $path`
14225  fi
14226
14227
14228  input_path="$new_path"
14229  # Check if we need to convert this using DOS-style short mode. If the path
14230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14231  # take no chances and rewrite it.
14232  # Note: m4 eats our [], so we need to use [ and ] instead.
14233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14234  if test "x$has_forbidden_chars" != x; then
14235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14237  fi
14238
14239
14240  windows_path="$new_path"
14241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14242    unix_path=`$CYGPATH -u "$windows_path"`
14243    new_path="$unix_path"
14244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14246    new_path="$unix_path"
14247  fi
14248
14249  if test "x$path" != "x$new_path"; then
14250    BOOT_JDK="$new_path"
14251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14253  fi
14254
14255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14257
14258  else
14259    # We're on a posix platform. Hooray! :)
14260    path="$BOOT_JDK"
14261
14262    if test ! -f "$path" && test ! -d "$path"; then
14263      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14264    fi
14265
14266    has_space=`$ECHO "$path" | $GREP " "`
14267    if test "x$has_space" != x; then
14268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14270      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14271    fi
14272  fi
14273
14274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14275$as_echo_n "checking for Boot JDK... " >&6; }
14276              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14277$as_echo "$BOOT_JDK" >&6; }
14278              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14279$as_echo_n "checking Boot JDK version... " >&6; }
14280              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14281              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14282$as_echo "$BOOT_JDK_VERSION" >&6; }
14283            fi # end check jdk version
14284          fi # end check rt.jar
14285        fi # end check javac
14286      fi # end check java
14287    fi # end check boot jdk found
14288  fi
14289
14290
14291  if test "x$BOOT_JDK_FOUND" = xno; then
14292    # Now execute the test
14293
14294  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14295  BOOT_JDK_SUFFIX="/Contents/Home"
14296  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14297  if test "x$ALL_JDKS_FOUND" != x; then
14298    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14299
14300  if test "x$BOOT_JDK_FOUND" = xno; then
14301    # Now execute the test
14302
14303        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14304        if test -d "$BOOT_JDK"; then
14305          BOOT_JDK_FOUND=maybe
14306          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14307$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14308        fi
14309
14310
14311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14313      # Do we have a bin/java?
14314      if test ! -x "$BOOT_JDK/bin/java"; then
14315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14317        BOOT_JDK_FOUND=no
14318      else
14319        # Do we have a bin/javac?
14320        if test ! -x "$BOOT_JDK/bin/javac"; then
14321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14325          BOOT_JDK_FOUND=no
14326        else
14327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14331            BOOT_JDK_FOUND=no
14332          else
14333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14335
14336            # Extra M4 quote needed to protect [] in grep expression.
14337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14338            if test "x$FOUND_VERSION_78" = x; then
14339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14343              BOOT_JDK_FOUND=no
14344            else
14345              # We're done! :-)
14346              BOOT_JDK_FOUND=yes
14347
14348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14349
14350  # Input might be given as Windows format, start by converting to
14351  # unix format.
14352  path="$BOOT_JDK"
14353  new_path=`$CYGPATH -u "$path"`
14354
14355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14358  # "foo.exe" is OK but "foo" is an error.
14359  #
14360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14361  # It is also a way to make sure we got the proper file name for the real test later on.
14362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14363  if test "x$test_shortpath" = x; then
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14367  fi
14368
14369  # Call helper function which possibly converts this using DOS-style short mode.
14370  # If so, the updated path is stored in $new_path.
14371
14372  input_path="$new_path"
14373  # Check if we need to convert this using DOS-style short mode. If the path
14374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14375  # take no chances and rewrite it.
14376  # Note: m4 eats our [], so we need to use [ and ] instead.
14377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14378  if test "x$has_forbidden_chars" != x; then
14379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14383      # Going to short mode and back again did indeed matter. Since short mode is
14384      # case insensitive, let's make it lowercase to improve readability.
14385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386      # Now convert it back to Unix-stile (cygpath)
14387      input_path=`$CYGPATH -u "$shortmode_path"`
14388      new_path="$input_path"
14389    fi
14390  fi
14391
14392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14393  if test "x$test_cygdrive_prefix" = x; then
14394    # As a simple fix, exclude /usr/bin since it's not a real path.
14395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14397      # a path prefixed by /cygdrive for fixpath to work.
14398      new_path="$CYGWIN_ROOT_PATH$input_path"
14399    fi
14400  fi
14401
14402
14403  if test "x$path" != "x$new_path"; then
14404    BOOT_JDK="$new_path"
14405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14407  fi
14408
14409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14410
14411  path="$BOOT_JDK"
14412  has_colon=`$ECHO $path | $GREP ^.:`
14413  new_path="$path"
14414  if test "x$has_colon" = x; then
14415    # Not in mixed or Windows style, start by that.
14416    new_path=`cmd //c echo $path`
14417  fi
14418
14419
14420  input_path="$new_path"
14421  # Check if we need to convert this using DOS-style short mode. If the path
14422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14423  # take no chances and rewrite it.
14424  # Note: m4 eats our [], so we need to use [ and ] instead.
14425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14426  if test "x$has_forbidden_chars" != x; then
14427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14429  fi
14430
14431
14432  windows_path="$new_path"
14433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14434    unix_path=`$CYGPATH -u "$windows_path"`
14435    new_path="$unix_path"
14436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14438    new_path="$unix_path"
14439  fi
14440
14441  if test "x$path" != "x$new_path"; then
14442    BOOT_JDK="$new_path"
14443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14445  fi
14446
14447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14449
14450  else
14451    # We're on a posix platform. Hooray! :)
14452    path="$BOOT_JDK"
14453
14454    if test ! -f "$path" && test ! -d "$path"; then
14455      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14456    fi
14457
14458    has_space=`$ECHO "$path" | $GREP " "`
14459    if test "x$has_space" != x; then
14460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14463    fi
14464  fi
14465
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14467$as_echo_n "checking for Boot JDK... " >&6; }
14468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14469$as_echo "$BOOT_JDK" >&6; }
14470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14471$as_echo_n "checking Boot JDK version... " >&6; }
14472              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14474$as_echo "$BOOT_JDK_VERSION" >&6; }
14475            fi # end check jdk version
14476          fi # end check rt.jar
14477        fi # end check javac
14478      fi # end check java
14479    fi # end check boot jdk found
14480  fi
14481
14482    done
14483  fi
14484
14485
14486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14488      # Do we have a bin/java?
14489      if test ! -x "$BOOT_JDK/bin/java"; then
14490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14492        BOOT_JDK_FOUND=no
14493      else
14494        # Do we have a bin/javac?
14495        if test ! -x "$BOOT_JDK/bin/javac"; then
14496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14500          BOOT_JDK_FOUND=no
14501        else
14502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14506            BOOT_JDK_FOUND=no
14507          else
14508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14510
14511            # Extra M4 quote needed to protect [] in grep expression.
14512            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14513            if test "x$FOUND_VERSION_78" = x; then
14514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14517$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14518              BOOT_JDK_FOUND=no
14519            else
14520              # We're done! :-)
14521              BOOT_JDK_FOUND=yes
14522
14523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14524
14525  # Input might be given as Windows format, start by converting to
14526  # unix format.
14527  path="$BOOT_JDK"
14528  new_path=`$CYGPATH -u "$path"`
14529
14530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14533  # "foo.exe" is OK but "foo" is an error.
14534  #
14535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14536  # It is also a way to make sure we got the proper file name for the real test later on.
14537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14538  if test "x$test_shortpath" = x; then
14539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14542  fi
14543
14544  # Call helper function which possibly converts this using DOS-style short mode.
14545  # If so, the updated path is stored in $new_path.
14546
14547  input_path="$new_path"
14548  # Check if we need to convert this using DOS-style short mode. If the path
14549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14550  # take no chances and rewrite it.
14551  # Note: m4 eats our [], so we need to use [ and ] instead.
14552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14553  if test "x$has_forbidden_chars" != x; then
14554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14558      # Going to short mode and back again did indeed matter. Since short mode is
14559      # case insensitive, let's make it lowercase to improve readability.
14560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14561      # Now convert it back to Unix-stile (cygpath)
14562      input_path=`$CYGPATH -u "$shortmode_path"`
14563      new_path="$input_path"
14564    fi
14565  fi
14566
14567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14568  if test "x$test_cygdrive_prefix" = x; then
14569    # As a simple fix, exclude /usr/bin since it's not a real path.
14570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14572      # a path prefixed by /cygdrive for fixpath to work.
14573      new_path="$CYGWIN_ROOT_PATH$input_path"
14574    fi
14575  fi
14576
14577
14578  if test "x$path" != "x$new_path"; then
14579    BOOT_JDK="$new_path"
14580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14582  fi
14583
14584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14585
14586  path="$BOOT_JDK"
14587  has_colon=`$ECHO $path | $GREP ^.:`
14588  new_path="$path"
14589  if test "x$has_colon" = x; then
14590    # Not in mixed or Windows style, start by that.
14591    new_path=`cmd //c echo $path`
14592  fi
14593
14594
14595  input_path="$new_path"
14596  # Check if we need to convert this using DOS-style short mode. If the path
14597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14598  # take no chances and rewrite it.
14599  # Note: m4 eats our [], so we need to use [ and ] instead.
14600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14601  if test "x$has_forbidden_chars" != x; then
14602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14604  fi
14605
14606
14607  windows_path="$new_path"
14608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14609    unix_path=`$CYGPATH -u "$windows_path"`
14610    new_path="$unix_path"
14611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14613    new_path="$unix_path"
14614  fi
14615
14616  if test "x$path" != "x$new_path"; then
14617    BOOT_JDK="$new_path"
14618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14620  fi
14621
14622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14624
14625  else
14626    # We're on a posix platform. Hooray! :)
14627    path="$BOOT_JDK"
14628
14629    if test ! -f "$path" && test ! -d "$path"; then
14630      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14631    fi
14632
14633    has_space=`$ECHO "$path" | $GREP " "`
14634    if test "x$has_space" != x; then
14635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14637      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14638    fi
14639  fi
14640
14641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14642$as_echo_n "checking for Boot JDK... " >&6; }
14643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14644$as_echo "$BOOT_JDK" >&6; }
14645              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14646$as_echo_n "checking Boot JDK version... " >&6; }
14647              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14648              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14649$as_echo "$BOOT_JDK_VERSION" >&6; }
14650            fi # end check jdk version
14651          fi # end check rt.jar
14652        fi # end check javac
14653      fi # end check java
14654    fi # end check boot jdk found
14655  fi
14656
14657  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14658
14659  if test "x$BOOT_JDK_FOUND" = xno; then
14660    # Now execute the test
14661
14662  BOOT_JDK_PREFIX="/usr/lib/jvm"
14663  BOOT_JDK_SUFFIX=""
14664  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14665  if test "x$ALL_JDKS_FOUND" != x; then
14666    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14667
14668  if test "x$BOOT_JDK_FOUND" = xno; then
14669    # Now execute the test
14670
14671        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14672        if test -d "$BOOT_JDK"; then
14673          BOOT_JDK_FOUND=maybe
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14675$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14676        fi
14677
14678
14679    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14680    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14681      # Do we have a bin/java?
14682      if test ! -x "$BOOT_JDK/bin/java"; then
14683        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14685        BOOT_JDK_FOUND=no
14686      else
14687        # Do we have a bin/javac?
14688        if test ! -x "$BOOT_JDK/bin/javac"; then
14689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14691          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14692$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14693          BOOT_JDK_FOUND=no
14694        else
14695          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14696          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14699            BOOT_JDK_FOUND=no
14700          else
14701            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14702            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14703
14704            # Extra M4 quote needed to protect [] in grep expression.
14705            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14706            if test "x$FOUND_VERSION_78" = x; then
14707              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14709              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14710$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14711              BOOT_JDK_FOUND=no
14712            else
14713              # We're done! :-)
14714              BOOT_JDK_FOUND=yes
14715
14716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14717
14718  # Input might be given as Windows format, start by converting to
14719  # unix format.
14720  path="$BOOT_JDK"
14721  new_path=`$CYGPATH -u "$path"`
14722
14723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14726  # "foo.exe" is OK but "foo" is an error.
14727  #
14728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14729  # It is also a way to make sure we got the proper file name for the real test later on.
14730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14731  if test "x$test_shortpath" = x; then
14732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14735  fi
14736
14737  # Call helper function which possibly converts this using DOS-style short mode.
14738  # If so, the updated path is stored in $new_path.
14739
14740  input_path="$new_path"
14741  # Check if we need to convert this using DOS-style short mode. If the path
14742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14743  # take no chances and rewrite it.
14744  # Note: m4 eats our [], so we need to use [ and ] instead.
14745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14746  if test "x$has_forbidden_chars" != x; then
14747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14751      # Going to short mode and back again did indeed matter. Since short mode is
14752      # case insensitive, let's make it lowercase to improve readability.
14753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14754      # Now convert it back to Unix-stile (cygpath)
14755      input_path=`$CYGPATH -u "$shortmode_path"`
14756      new_path="$input_path"
14757    fi
14758  fi
14759
14760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14761  if test "x$test_cygdrive_prefix" = x; then
14762    # As a simple fix, exclude /usr/bin since it's not a real path.
14763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14765      # a path prefixed by /cygdrive for fixpath to work.
14766      new_path="$CYGWIN_ROOT_PATH$input_path"
14767    fi
14768  fi
14769
14770
14771  if test "x$path" != "x$new_path"; then
14772    BOOT_JDK="$new_path"
14773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14775  fi
14776
14777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14778
14779  path="$BOOT_JDK"
14780  has_colon=`$ECHO $path | $GREP ^.:`
14781  new_path="$path"
14782  if test "x$has_colon" = x; then
14783    # Not in mixed or Windows style, start by that.
14784    new_path=`cmd //c echo $path`
14785  fi
14786
14787
14788  input_path="$new_path"
14789  # Check if we need to convert this using DOS-style short mode. If the path
14790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14791  # take no chances and rewrite it.
14792  # Note: m4 eats our [], so we need to use [ and ] instead.
14793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14794  if test "x$has_forbidden_chars" != x; then
14795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14797  fi
14798
14799
14800  windows_path="$new_path"
14801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14802    unix_path=`$CYGPATH -u "$windows_path"`
14803    new_path="$unix_path"
14804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14806    new_path="$unix_path"
14807  fi
14808
14809  if test "x$path" != "x$new_path"; then
14810    BOOT_JDK="$new_path"
14811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14813  fi
14814
14815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14817
14818  else
14819    # We're on a posix platform. Hooray! :)
14820    path="$BOOT_JDK"
14821
14822    if test ! -f "$path" && test ! -d "$path"; then
14823      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14824    fi
14825
14826    has_space=`$ECHO "$path" | $GREP " "`
14827    if test "x$has_space" != x; then
14828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14830      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14831    fi
14832  fi
14833
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14835$as_echo_n "checking for Boot JDK... " >&6; }
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14837$as_echo "$BOOT_JDK" >&6; }
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14839$as_echo_n "checking Boot JDK version... " >&6; }
14840              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14841              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14842$as_echo "$BOOT_JDK_VERSION" >&6; }
14843            fi # end check jdk version
14844          fi # end check rt.jar
14845        fi # end check javac
14846      fi # end check java
14847    fi # end check boot jdk found
14848  fi
14849
14850    done
14851  fi
14852
14853
14854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14856      # Do we have a bin/java?
14857      if test ! -x "$BOOT_JDK/bin/java"; then
14858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14860        BOOT_JDK_FOUND=no
14861      else
14862        # Do we have a bin/javac?
14863        if test ! -x "$BOOT_JDK/bin/javac"; then
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14868          BOOT_JDK_FOUND=no
14869        else
14870          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14871          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14872            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14874            BOOT_JDK_FOUND=no
14875          else
14876            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14878
14879            # Extra M4 quote needed to protect [] in grep expression.
14880            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14881            if test "x$FOUND_VERSION_78" = x; then
14882              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14884              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14885$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14886              BOOT_JDK_FOUND=no
14887            else
14888              # We're done! :-)
14889              BOOT_JDK_FOUND=yes
14890
14891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14892
14893  # Input might be given as Windows format, start by converting to
14894  # unix format.
14895  path="$BOOT_JDK"
14896  new_path=`$CYGPATH -u "$path"`
14897
14898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14901  # "foo.exe" is OK but "foo" is an error.
14902  #
14903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14904  # It is also a way to make sure we got the proper file name for the real test later on.
14905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14906  if test "x$test_shortpath" = x; then
14907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14909    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14910  fi
14911
14912  # Call helper function which possibly converts this using DOS-style short mode.
14913  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14926      # Going to short mode and back again did indeed matter. Since short mode is
14927      # case insensitive, let's make it lowercase to improve readability.
14928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14929      # Now convert it back to Unix-stile (cygpath)
14930      input_path=`$CYGPATH -u "$shortmode_path"`
14931      new_path="$input_path"
14932    fi
14933  fi
14934
14935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14936  if test "x$test_cygdrive_prefix" = x; then
14937    # As a simple fix, exclude /usr/bin since it's not a real path.
14938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14940      # a path prefixed by /cygdrive for fixpath to work.
14941      new_path="$CYGWIN_ROOT_PATH$input_path"
14942    fi
14943  fi
14944
14945
14946  if test "x$path" != "x$new_path"; then
14947    BOOT_JDK="$new_path"
14948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14950  fi
14951
14952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14953
14954  path="$BOOT_JDK"
14955  has_colon=`$ECHO $path | $GREP ^.:`
14956  new_path="$path"
14957  if test "x$has_colon" = x; then
14958    # Not in mixed or Windows style, start by that.
14959    new_path=`cmd //c echo $path`
14960  fi
14961
14962
14963  input_path="$new_path"
14964  # Check if we need to convert this using DOS-style short mode. If the path
14965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14966  # take no chances and rewrite it.
14967  # Note: m4 eats our [], so we need to use [ and ] instead.
14968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14969  if test "x$has_forbidden_chars" != x; then
14970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14972  fi
14973
14974
14975  windows_path="$new_path"
14976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14977    unix_path=`$CYGPATH -u "$windows_path"`
14978    new_path="$unix_path"
14979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14981    new_path="$unix_path"
14982  fi
14983
14984  if test "x$path" != "x$new_path"; then
14985    BOOT_JDK="$new_path"
14986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14988  fi
14989
14990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14992
14993  else
14994    # We're on a posix platform. Hooray! :)
14995    path="$BOOT_JDK"
14996
14997    if test ! -f "$path" && test ! -d "$path"; then
14998      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14999    fi
15000
15001    has_space=`$ECHO "$path" | $GREP " "`
15002    if test "x$has_space" != x; then
15003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15005      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15006    fi
15007  fi
15008
15009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15010$as_echo_n "checking for Boot JDK... " >&6; }
15011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15012$as_echo "$BOOT_JDK" >&6; }
15013              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15014$as_echo_n "checking Boot JDK version... " >&6; }
15015              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15017$as_echo "$BOOT_JDK_VERSION" >&6; }
15018            fi # end check jdk version
15019          fi # end check rt.jar
15020        fi # end check javac
15021      fi # end check java
15022    fi # end check boot jdk found
15023  fi
15024
15025  fi
15026
15027
15028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15030      # Do we have a bin/java?
15031      if test ! -x "$BOOT_JDK/bin/java"; then
15032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15034        BOOT_JDK_FOUND=no
15035      else
15036        # Do we have a bin/javac?
15037        if test ! -x "$BOOT_JDK/bin/javac"; then
15038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15042          BOOT_JDK_FOUND=no
15043        else
15044          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15045          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15046            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15048            BOOT_JDK_FOUND=no
15049          else
15050            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15051            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15052
15053            # Extra M4 quote needed to protect [] in grep expression.
15054            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15055            if test "x$FOUND_VERSION_78" = x; then
15056              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15058              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15059$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15060              BOOT_JDK_FOUND=no
15061            else
15062              # We're done! :-)
15063              BOOT_JDK_FOUND=yes
15064
15065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15066
15067  # Input might be given as Windows format, start by converting to
15068  # unix format.
15069  path="$BOOT_JDK"
15070  new_path=`$CYGPATH -u "$path"`
15071
15072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15075  # "foo.exe" is OK but "foo" is an error.
15076  #
15077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15078  # It is also a way to make sure we got the proper file name for the real test later on.
15079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15080  if test "x$test_shortpath" = x; then
15081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15084  fi
15085
15086  # Call helper function which possibly converts this using DOS-style short mode.
15087  # If so, the updated path is stored in $new_path.
15088
15089  input_path="$new_path"
15090  # Check if we need to convert this using DOS-style short mode. If the path
15091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15092  # take no chances and rewrite it.
15093  # Note: m4 eats our [], so we need to use [ and ] instead.
15094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15095  if test "x$has_forbidden_chars" != x; then
15096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15100      # Going to short mode and back again did indeed matter. Since short mode is
15101      # case insensitive, let's make it lowercase to improve readability.
15102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15103      # Now convert it back to Unix-stile (cygpath)
15104      input_path=`$CYGPATH -u "$shortmode_path"`
15105      new_path="$input_path"
15106    fi
15107  fi
15108
15109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15110  if test "x$test_cygdrive_prefix" = x; then
15111    # As a simple fix, exclude /usr/bin since it's not a real path.
15112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15114      # a path prefixed by /cygdrive for fixpath to work.
15115      new_path="$CYGWIN_ROOT_PATH$input_path"
15116    fi
15117  fi
15118
15119
15120  if test "x$path" != "x$new_path"; then
15121    BOOT_JDK="$new_path"
15122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15124  fi
15125
15126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127
15128  path="$BOOT_JDK"
15129  has_colon=`$ECHO $path | $GREP ^.:`
15130  new_path="$path"
15131  if test "x$has_colon" = x; then
15132    # Not in mixed or Windows style, start by that.
15133    new_path=`cmd //c echo $path`
15134  fi
15135
15136
15137  input_path="$new_path"
15138  # Check if we need to convert this using DOS-style short mode. If the path
15139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15140  # take no chances and rewrite it.
15141  # Note: m4 eats our [], so we need to use [ and ] instead.
15142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15143  if test "x$has_forbidden_chars" != x; then
15144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15146  fi
15147
15148
15149  windows_path="$new_path"
15150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15151    unix_path=`$CYGPATH -u "$windows_path"`
15152    new_path="$unix_path"
15153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15155    new_path="$unix_path"
15156  fi
15157
15158  if test "x$path" != "x$new_path"; then
15159    BOOT_JDK="$new_path"
15160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15162  fi
15163
15164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15166
15167  else
15168    # We're on a posix platform. Hooray! :)
15169    path="$BOOT_JDK"
15170
15171    if test ! -f "$path" && test ! -d "$path"; then
15172      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15173    fi
15174
15175    has_space=`$ECHO "$path" | $GREP " "`
15176    if test "x$has_space" != x; then
15177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15180    fi
15181  fi
15182
15183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15184$as_echo_n "checking for Boot JDK... " >&6; }
15185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15186$as_echo "$BOOT_JDK" >&6; }
15187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15188$as_echo_n "checking Boot JDK version... " >&6; }
15189              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15191$as_echo "$BOOT_JDK_VERSION" >&6; }
15192            fi # end check jdk version
15193          fi # end check rt.jar
15194        fi # end check javac
15195      fi # end check java
15196    fi # end check boot jdk found
15197  fi
15198
15199
15200# If we haven't found anything yet, we've truly lost. Give up.
15201if test "x$BOOT_JDK_FOUND" = xno; then
15202
15203    # Print a helpful message on how to acquire the necessary build dependency.
15204    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15205    MISSING_DEPENDENCY=openjdk
15206    PKGHANDLER_COMMAND=
15207
15208    case $PKGHANDLER in
15209	apt-get)
15210                apt_help     $MISSING_DEPENDENCY ;;
15211    yum)
15212                yum_help     $MISSING_DEPENDENCY ;;
15213	port)
15214                port_help    $MISSING_DEPENDENCY ;;
15215	pkgutil)
15216                pkgutil_help $MISSING_DEPENDENCY ;;
15217	pkgadd)
15218                pkgadd_help  $MISSING_DEPENDENCY ;;
15219    * )
15220      break ;;
15221    esac
15222
15223    if test "x$PKGHANDLER_COMMAND" != x; then
15224        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15225    fi
15226
15227  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15228$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15229  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15230$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15231  as_fn_error $? "Cannot continue" "$LINENO" 5
15232fi
15233
15234# Setup proper paths for what we found
15235BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15236if test ! -f "$BOOT_RTJAR"; then
15237    # On MacOSX it is called classes.jar
15238    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15239    if test -f "$BOOT_RTJAR"; then
15240      # Remove the ..
15241      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15242    fi
15243fi
15244BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15245BOOT_JDK="$BOOT_JDK"
15246
15247
15248
15249
15250# Setup tools from the Boot JDK.
15251
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15253$as_echo_n "checking for java in Boot JDK... " >&6; }
15254  JAVA=$BOOT_JDK/bin/java
15255  if test ! -x $JAVA; then
15256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15257$as_echo "not found" >&6; }
15258      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15259$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15260      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15261  fi
15262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15263$as_echo "ok" >&6; }
15264
15265
15266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15267$as_echo_n "checking for javac in Boot JDK... " >&6; }
15268  JAVAC=$BOOT_JDK/bin/javac
15269  if test ! -x $JAVAC; then
15270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15273$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15274      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15275  fi
15276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15277$as_echo "ok" >&6; }
15278
15279
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15281$as_echo_n "checking for javah in Boot JDK... " >&6; }
15282  JAVAH=$BOOT_JDK/bin/javah
15283  if test ! -x $JAVAH; then
15284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15285$as_echo "not found" >&6; }
15286      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15287$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15288      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15289  fi
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15291$as_echo "ok" >&6; }
15292
15293
15294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15295$as_echo_n "checking for javap in Boot JDK... " >&6; }
15296  JAVAP=$BOOT_JDK/bin/javap
15297  if test ! -x $JAVAP; then
15298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15299$as_echo "not found" >&6; }
15300      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15301$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15302      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15303  fi
15304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15305$as_echo "ok" >&6; }
15306
15307
15308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15309$as_echo_n "checking for jar in Boot JDK... " >&6; }
15310  JAR=$BOOT_JDK/bin/jar
15311  if test ! -x $JAR; then
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15313$as_echo "not found" >&6; }
15314      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15315$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15316      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15317  fi
15318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15319$as_echo "ok" >&6; }
15320
15321
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15323$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15324  RMIC=$BOOT_JDK/bin/rmic
15325  if test ! -x $RMIC; then
15326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15327$as_echo "not found" >&6; }
15328      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15329$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15330      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15331  fi
15332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15333$as_echo "ok" >&6; }
15334
15335
15336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15337$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15338  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15339  if test ! -x $NATIVE2ASCII; then
15340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15341$as_echo "not found" >&6; }
15342      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15343$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15344      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15345  fi
15346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15347$as_echo "ok" >&6; }
15348
15349
15350# Finally, set some other options...
15351
15352# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15353BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15354
15355
15356
15357
15358##############################################################################
15359#
15360# Specify options for anything that is run with the Boot JDK.
15361#
15362
15363# Check whether --with-boot-jdk-jvmargs was given.
15364if test "${with_boot_jdk_jvmargs+set}" = set; then :
15365  withval=$with_boot_jdk_jvmargs;
15366fi
15367
15368
15369if test "x$with_boot_jdk_jvmargs" = x; then
15370    # Not all JVM:s accept the same arguments on the command line.
15371    # OpenJDK specific increase in thread stack for JDK build,
15372    # well more specifically, when running javac.
15373    if test "x$BUILD_NUM_BITS" = x32; then
15374       STACK_SIZE=768
15375    else
15376       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15377       # since 64-bit pointers are pushed on the stach. Apparently, we need
15378       # to increase the stack space when javacing the JDK....
15379       STACK_SIZE=1536
15380    fi
15381
15382    # Minimum amount of heap memory.
15383
15384    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15385    # If so, then append -Xms64M to boot_jdk_jvmargs
15386    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15387    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15388    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15389        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15390    fi
15391
15392    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15393        # Why does macosx need more heap? Its the huge JDK batch.
15394
15395    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15396    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15397    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15398    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15399    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15400        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15401    fi
15402
15403    else
15404
15405    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15406    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15407    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15408    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15409    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15410        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15411    fi
15412
15413    fi
15414    # When is adding -client something that speeds up the JVM?
15415    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15416
15417    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15418    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15419    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15420    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15421    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15422        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15423    fi
15424
15425
15426    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15427    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15428    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15429    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15430    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15431        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15432    fi
15433
15434
15435    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15436    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15437    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15438    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15439    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15440        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15441    fi
15442
15443    # Disable special log output when a debug build is used as Boot JDK...
15444
15445    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15446    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15447    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15448    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15449    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15450        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15451    fi
15452
15453fi
15454
15455BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15456
15457
15458
15459###############################################################################
15460#
15461# Configure the sources to use. We can add or override individual directories.
15462#
15463###############################################################################
15464
15465
15466
15467# Where are the sources. Any of these can be overridden
15468# using --with-override-corba and the likes.
15469LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15470CORBA_TOPDIR="$SRC_ROOT/corba"
15471JAXP_TOPDIR="$SRC_ROOT/jaxp"
15472JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15473HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15474JDK_TOPDIR="$SRC_ROOT/jdk"
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484###############################################################################
15485#
15486# Pickup additional source for a component from outside of the source root
15487# or override source for a component.
15488#
15489
15490# Check whether --with-add-source-root was given.
15491if test "${with_add_source_root+set}" = set; then :
15492  withval=$with_add_source_root;
15493fi
15494
15495
15496
15497# Check whether --with-override-source-root was given.
15498if test "${with_override_source_root+set}" = set; then :
15499  withval=$with_override_source_root;
15500fi
15501
15502
15503
15504# Check whether --with-adds-and-overrides was given.
15505if test "${with_adds_and_overrides+set}" = set; then :
15506  withval=$with_adds_and_overrides;
15507fi
15508
15509
15510if test "x$with_adds_and_overrides" != x; then
15511    with_add_source_root="$with_adds_and_overrides/adds"
15512    with_override_source_root="$with_adds_and_overrides/overrides"
15513fi
15514
15515if test "x$with_add_source_root" != x; then
15516    if ! test -d $with_add_source_root; then
15517       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15518    fi
15519    CURDIR="$PWD"
15520    cd "$with_add_source_root"
15521    ADD_SRC_ROOT="`pwd`"
15522    cd "$CURDIR"
15523    # Verify that the addon source root does not have any root makefiles.
15524    # If it does, then it is usually an error, prevent this.
15525    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15526       test -f $with_add_source_root/langtools/make/Makefile; then
15527        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
15528    fi
15529    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15530       test -f $with_add_source_root/corba/make/Makefile; then
15531        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
15532    fi
15533    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15534       test -f $with_add_source_root/jaxp/make/Makefile; then
15535        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
15536    fi
15537    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15538       test -f $with_add_source_root/jaxws/make/Makefile; then
15539        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
15540    fi
15541    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15542       test -f $with_add_source_root/hotspot/make/Makefile; then
15543        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
15544    fi
15545    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15546       test -f $with_add_source_root/jdk/make/Makefile; then
15547        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
15548    fi
15549fi
15550
15551
15552if test "x$with_override_source_root" != x; then
15553    if ! test -d $with_override_source_root; then
15554       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15555    fi
15556    CURDIR="$PWD"
15557    cd "$with_override_source_root"
15558    OVERRIDE_SRC_ROOT="`pwd`"
15559    cd "$CURDIR"
15560    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15561       test -f $with_override_source_root/langtools/make/Makefile; then
15562        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
15563    fi
15564    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15565       test -f $with_override_source_root/corba/make/Makefile; then
15566        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
15567    fi
15568    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15569       test -f $with_override_source_root/jaxp/make/Makefile; then
15570        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
15571    fi
15572    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15573       test -f $with_override_source_root/jaxws/make/Makefile; then
15574        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
15575    fi
15576    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15577       test -f $with_override_source_root/hotspot/make/Makefile; then
15578        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
15579    fi
15580    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15581       test -f $with_override_source_root/jdk/make/Makefile; then
15582        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
15583    fi
15584fi
15585
15586
15587###############################################################################
15588#
15589# Override a repo completely, this is used for example when you have 3 small
15590# development sandboxes of the langtools sources and want to avoid having 3 full
15591# OpenJDK sources checked out on disk.
15592#
15593# Assuming that the 3 langtools sandboxes are located here:
15594# /home/fredrik/sandbox1/langtools
15595# /home/fredrik/sandbox2/langtools
15596# /home/fredrik/sandbox3/langtools
15597#
15598# From the source root you create build subdirs manually:
15599#     mkdir -p build1 build2 build3
15600# in each build directory run:
15601#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15602#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15603#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15604#
15605
15606
15607# Check whether --with-override-langtools was given.
15608if test "${with_override_langtools+set}" = set; then :
15609  withval=$with_override_langtools;
15610fi
15611
15612
15613
15614# Check whether --with-override-corba was given.
15615if test "${with_override_corba+set}" = set; then :
15616  withval=$with_override_corba;
15617fi
15618
15619
15620
15621# Check whether --with-override-jaxp was given.
15622if test "${with_override_jaxp+set}" = set; then :
15623  withval=$with_override_jaxp;
15624fi
15625
15626
15627
15628# Check whether --with-override-jaxws was given.
15629if test "${with_override_jaxws+set}" = set; then :
15630  withval=$with_override_jaxws;
15631fi
15632
15633
15634
15635# Check whether --with-override-hotspot was given.
15636if test "${with_override_hotspot+set}" = set; then :
15637  withval=$with_override_hotspot;
15638fi
15639
15640
15641
15642# Check whether --with-override-jdk was given.
15643if test "${with_override_jdk+set}" = set; then :
15644  withval=$with_override_jdk;
15645fi
15646
15647
15648if test "x$with_override_langtools" != x; then
15649    CURDIR="$PWD"
15650    cd "$with_override_langtools"
15651    LANGTOOLS_TOPDIR="`pwd`"
15652    cd "$CURDIR"
15653    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15654        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15655    fi
15656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15657$as_echo_n "checking if langtools should be overridden... " >&6; }
15658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15659$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15660fi
15661if test "x$with_override_corba" != x; then
15662    CURDIR="$PWD"
15663    cd "$with_override_corba"
15664    CORBA_TOPDIR="`pwd`"
15665    cd "$CURDIR"
15666    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15667        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15668    fi
15669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15670$as_echo_n "checking if corba should be overridden... " >&6; }
15671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15672$as_echo "yes with $CORBA_TOPDIR" >&6; }
15673fi
15674if test "x$with_override_jaxp" != x; then
15675    CURDIR="$PWD"
15676    cd "$with_override_jaxp"
15677    JAXP_TOPDIR="`pwd`"
15678    cd "$CURDIR"
15679    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15680        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15681    fi
15682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15683$as_echo_n "checking if jaxp should be overridden... " >&6; }
15684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15685$as_echo "yes with $JAXP_TOPDIR" >&6; }
15686fi
15687if test "x$with_override_jaxws" != x; then
15688    CURDIR="$PWD"
15689    cd "$with_override_jaxws"
15690    JAXWS_TOPDIR="`pwd`"
15691    cd "$CURDIR"
15692    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15693        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15694    fi
15695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15696$as_echo_n "checking if jaxws should be overridden... " >&6; }
15697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15698$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15699fi
15700if test "x$with_override_hotspot" != x; then
15701    CURDIR="$PWD"
15702    cd "$with_override_hotspot"
15703    HOTSPOT_TOPDIR="`pwd`"
15704    cd "$CURDIR"
15705    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15706       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15707        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15708    fi
15709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15710$as_echo_n "checking if hotspot should be overridden... " >&6; }
15711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15712$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15713fi
15714if test "x$with_override_jdk" != x; then
15715    CURDIR="$PWD"
15716    cd "$with_override_jdk"
15717    JDK_TOPDIR="`pwd`"
15718    cd "$CURDIR"
15719    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15720        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15721    fi
15722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15723$as_echo_n "checking if JDK should be overridden... " >&6; }
15724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15725$as_echo "yes with $JDK_TOPDIR" >&6; }
15726fi
15727
15728
15729
15730BUILD_OUTPUT="$OUTPUT_ROOT"
15731
15732
15733HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15734BUILD_HOTSPOT=true
15735
15736
15737
15738# Check whether --with-import-hotspot was given.
15739if test "${with_import_hotspot+set}" = set; then :
15740  withval=$with_import_hotspot;
15741fi
15742
15743if test "x$with_import_hotspot" != x; then
15744    CURDIR="$PWD"
15745    cd "$with_import_hotspot"
15746    HOTSPOT_DIST="`pwd`"
15747    cd "$CURDIR"
15748    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15749        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15750    fi
15751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15752$as_echo_n "checking if hotspot should be imported... " >&6; }
15753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15754$as_echo "yes from $HOTSPOT_DIST" >&6; }
15755    BUILD_HOTSPOT=false
15756fi
15757
15758JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15759
15760
15761###############################################################################
15762#
15763# Setup the toolchain (compilers etc), i.e. the tools that need to be
15764# cross-compilation aware.
15765#
15766###############################################################################
15767
15768
15769###############################################################################
15770#
15771# Configure the development tool paths and potential sysroot.
15772#
15773ac_ext=cpp
15774ac_cpp='$CXXCPP $CPPFLAGS'
15775ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15776ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15777ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15778
15779
15780# The option used to specify the target .o,.a or .so file.
15781# When compiling, how to specify the to be created object file.
15782CC_OUT_OPTION='-o$(SPACE)'
15783# When linking, how to specify the to be created executable.
15784EXE_OUT_OPTION='-o$(SPACE)'
15785# When linking, how to specify the to be created dynamically linkable library.
15786LD_OUT_OPTION='-o$(SPACE)'
15787# When archiving, how to specify the to be create static archive for object files.
15788AR_OUT_OPTION='rcs$(SPACE)'
15789
15790
15791
15792
15793
15794# Locate the actual tools
15795
15796if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15797
15798  # Store path to cygwin link.exe to help excluding it when searching for
15799  # VS linker. This must be done before changing the PATH when looking for VS.
15800  # Extract the first word of "link", so it can be a program name with args.
15801set dummy link; ac_word=$2
15802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15803$as_echo_n "checking for $ac_word... " >&6; }
15804if ${ac_cv_path_CYGWIN_LINK+:} false; then :
15805  $as_echo_n "(cached) " >&6
15806else
15807  case $CYGWIN_LINK in
15808  [\\/]* | ?:[\\/]*)
15809  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15810  ;;
15811  *)
15812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15813for as_dir in $PATH
15814do
15815  IFS=$as_save_IFS
15816  test -z "$as_dir" && as_dir=.
15817    for ac_exec_ext in '' $ac_executable_extensions; do
15818  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15819    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15821    break 2
15822  fi
15823done
15824  done
15825IFS=$as_save_IFS
15826
15827  ;;
15828esac
15829fi
15830CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15831if test -n "$CYGWIN_LINK"; then
15832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15833$as_echo "$CYGWIN_LINK" >&6; }
15834else
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15836$as_echo "no" >&6; }
15837fi
15838
15839
15840  if test "x$CYGWIN_LINK" != x; then
15841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15842$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15843    "$CYGWIN_LINK" --version > /dev/null
15844    if test $? -eq 0 ; then
15845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15846$as_echo "yes" >&6; }
15847    else
15848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15849$as_echo "no" >&6; }
15850      # This might be the VS linker. Don't exclude it later on.
15851      CYGWIN_LINK=""
15852    fi
15853  fi
15854
15855  # First-hand choice is to locate and run the vsvars bat file.
15856
15857  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15858    VCVARSFILE="vc/bin/vcvars32.bat"
15859  else
15860    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15861  fi
15862
15863  VS_ENV_CMD=""
15864  VS_ENV_ARGS=""
15865  if test "x$with_toolsdir" != x; then
15866
15867  if test "x$VS_ENV_CMD" = x; then
15868    VS100BASE="$with_toolsdir/../.."
15869    METHOD="--with-tools-dir"
15870
15871  windows_path="$VS100BASE"
15872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15873    unix_path=`$CYGPATH -u "$windows_path"`
15874    VS100BASE="$unix_path"
15875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15877    VS100BASE="$unix_path"
15878  fi
15879
15880    if test -d "$VS100BASE"; then
15881      if test -f "$VS100BASE/$VCVARSFILE"; then
15882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15884        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15885      else
15886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15887$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15889$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15890      fi
15891    fi
15892  fi
15893
15894  fi
15895
15896  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15897    # Having specified an argument which is incorrect will produce an instant failure;
15898    # we should not go on looking
15899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15900$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15902$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15903    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15904  fi
15905
15906  if test "x$ProgramW6432" != x; then
15907
15908  if test "x$VS_ENV_CMD" = x; then
15909    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15910    METHOD="well-known name"
15911
15912  windows_path="$WIN_SDK_BASE"
15913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15914    unix_path=`$CYGPATH -u "$windows_path"`
15915    WIN_SDK_BASE="$unix_path"
15916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15918    WIN_SDK_BASE="$unix_path"
15919  fi
15920
15921    if test -d "$WIN_SDK_BASE"; then
15922      # There have been cases of partial or broken SDK installations. A missing
15923      # lib dir is not going to work.
15924      if test ! -d "$WIN_SDK_BASE/../lib"; then
15925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15926$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15928$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15929      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15931$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15932        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15933        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15934          VS_ENV_ARGS="/x86"
15935        else
15936          VS_ENV_ARGS="/x64"
15937        fi
15938      else
15939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15942$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15943      fi
15944    fi
15945  fi
15946
15947  fi
15948  if test "x$PROGRAMW6432" != x; then
15949
15950  if test "x$VS_ENV_CMD" = x; then
15951    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15952    METHOD="well-known name"
15953
15954  windows_path="$WIN_SDK_BASE"
15955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15956    unix_path=`$CYGPATH -u "$windows_path"`
15957    WIN_SDK_BASE="$unix_path"
15958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15960    WIN_SDK_BASE="$unix_path"
15961  fi
15962
15963    if test -d "$WIN_SDK_BASE"; then
15964      # There have been cases of partial or broken SDK installations. A missing
15965      # lib dir is not going to work.
15966      if test ! -d "$WIN_SDK_BASE/../lib"; then
15967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15970$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15971      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15974        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15975        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15976          VS_ENV_ARGS="/x86"
15977        else
15978          VS_ENV_ARGS="/x64"
15979        fi
15980      else
15981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15983        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15984$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15985      fi
15986    fi
15987  fi
15988
15989  fi
15990  if test "x$PROGRAMFILES" != x; then
15991
15992  if test "x$VS_ENV_CMD" = x; then
15993    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15994    METHOD="well-known name"
15995
15996  windows_path="$WIN_SDK_BASE"
15997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998    unix_path=`$CYGPATH -u "$windows_path"`
15999    WIN_SDK_BASE="$unix_path"
16000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16002    WIN_SDK_BASE="$unix_path"
16003  fi
16004
16005    if test -d "$WIN_SDK_BASE"; then
16006      # There have been cases of partial or broken SDK installations. A missing
16007      # lib dir is not going to work.
16008      if test ! -d "$WIN_SDK_BASE/../lib"; then
16009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16012$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16013      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16014        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16015$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16016        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16017        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16018          VS_ENV_ARGS="/x86"
16019        else
16020          VS_ENV_ARGS="/x64"
16021        fi
16022      else
16023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16024$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16026$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16027      fi
16028    fi
16029  fi
16030
16031  fi
16032
16033  if test "x$VS_ENV_CMD" = x; then
16034    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16035    METHOD="well-known name"
16036
16037  windows_path="$WIN_SDK_BASE"
16038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16039    unix_path=`$CYGPATH -u "$windows_path"`
16040    WIN_SDK_BASE="$unix_path"
16041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16043    WIN_SDK_BASE="$unix_path"
16044  fi
16045
16046    if test -d "$WIN_SDK_BASE"; then
16047      # There have been cases of partial or broken SDK installations. A missing
16048      # lib dir is not going to work.
16049      if test ! -d "$WIN_SDK_BASE/../lib"; then
16050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16053$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16054      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16057        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16058        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16059          VS_ENV_ARGS="/x86"
16060        else
16061          VS_ENV_ARGS="/x64"
16062        fi
16063      else
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16067$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16068      fi
16069    fi
16070  fi
16071
16072
16073  if test "x$VS_ENV_CMD" = x; then
16074    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16075    METHOD="well-known name"
16076
16077  windows_path="$WIN_SDK_BASE"
16078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16079    unix_path=`$CYGPATH -u "$windows_path"`
16080    WIN_SDK_BASE="$unix_path"
16081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16083    WIN_SDK_BASE="$unix_path"
16084  fi
16085
16086    if test -d "$WIN_SDK_BASE"; then
16087      # There have been cases of partial or broken SDK installations. A missing
16088      # lib dir is not going to work.
16089      if test ! -d "$WIN_SDK_BASE/../lib"; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16091$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16092        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16093$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16094      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16097        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16098        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16099          VS_ENV_ARGS="/x86"
16100        else
16101          VS_ENV_ARGS="/x64"
16102        fi
16103      else
16104        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16105$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16106        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16107$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16108      fi
16109    fi
16110  fi
16111
16112
16113  if test "x$VS100COMNTOOLS" != x; then
16114
16115  if test "x$VS_ENV_CMD" = x; then
16116    VS100BASE="$VS100COMNTOOLS/../.."
16117    METHOD="VS100COMNTOOLS variable"
16118
16119  windows_path="$VS100BASE"
16120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16121    unix_path=`$CYGPATH -u "$windows_path"`
16122    VS100BASE="$unix_path"
16123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16125    VS100BASE="$unix_path"
16126  fi
16127
16128    if test -d "$VS100BASE"; then
16129      if test -f "$VS100BASE/$VCVARSFILE"; then
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16131$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16132        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16133      else
16134        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16135$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16136        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16137$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16138      fi
16139    fi
16140  fi
16141
16142  fi
16143  if test "x$PROGRAMFILES" != x; then
16144
16145  if test "x$VS_ENV_CMD" = x; then
16146    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16147    METHOD="well-known name"
16148
16149  windows_path="$VS100BASE"
16150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16151    unix_path=`$CYGPATH -u "$windows_path"`
16152    VS100BASE="$unix_path"
16153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16155    VS100BASE="$unix_path"
16156  fi
16157
16158    if test -d "$VS100BASE"; then
16159      if test -f "$VS100BASE/$VCVARSFILE"; then
16160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16161$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16162        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16163      else
16164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16165$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16167$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16168      fi
16169    fi
16170  fi
16171
16172  fi
16173
16174  if test "x$VS_ENV_CMD" = x; then
16175    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16176    METHOD="well-known name"
16177
16178  windows_path="$VS100BASE"
16179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16180    unix_path=`$CYGPATH -u "$windows_path"`
16181    VS100BASE="$unix_path"
16182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16184    VS100BASE="$unix_path"
16185  fi
16186
16187    if test -d "$VS100BASE"; then
16188      if test -f "$VS100BASE/$VCVARSFILE"; then
16189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16190$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16191        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16192      else
16193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16194$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16195        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16196$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16197      fi
16198    fi
16199  fi
16200
16201
16202  if test "x$VS_ENV_CMD" = x; then
16203    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16204    METHOD="well-known name"
16205
16206  windows_path="$VS100BASE"
16207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16208    unix_path=`$CYGPATH -u "$windows_path"`
16209    VS100BASE="$unix_path"
16210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16212    VS100BASE="$unix_path"
16213  fi
16214
16215    if test -d "$VS100BASE"; then
16216      if test -f "$VS100BASE/$VCVARSFILE"; then
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16218$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16219        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16220      else
16221        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16222$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16223        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16224$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16225      fi
16226    fi
16227  fi
16228
16229
16230  if test "x$VS_ENV_CMD" != x; then
16231    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16232
16233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16234
16235  # First separate the path from the arguments. This will split at the first
16236  # space.
16237  complete="$VS_ENV_CMD"
16238  path="${complete%% *}"
16239  tmp="$complete EOL"
16240  arguments="${tmp#* }"
16241
16242  # Input might be given as Windows format, start by converting to
16243  # unix format.
16244  new_path=`$CYGPATH -u "$path"`
16245
16246  # Now try to locate executable using which
16247  new_path=`$WHICH "$new_path" 2> /dev/null`
16248  # bat and cmd files are not always considered executable in cygwin causing which
16249  # to not find them
16250  if test "x$new_path" = x \
16251           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16252           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16253    new_path=`$CYGPATH -u "$path"`
16254  fi
16255  if test "x$new_path" = x; then
16256    # Oops. Which didn't find the executable.
16257    # The splitting of arguments from the executable at a space might have been incorrect,
16258    # since paths with space are more likely in Windows. Give it another try with the whole
16259    # argument.
16260    path="$complete"
16261    arguments="EOL"
16262    new_path=`$CYGPATH -u "$path"`
16263    new_path=`$WHICH "$new_path" 2> /dev/null`
16264    # bat and cmd files are not always considered executable in cygwin causing which
16265    # to not find them
16266    if test "x$new_path" = x \
16267             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16268             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16269      new_path=`$CYGPATH -u "$path"`
16270    fi
16271    if test "x$new_path" = x; then
16272      # It's still not found. Now this is an unrecoverable error.
16273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16274$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16275      has_space=`$ECHO "$complete" | $GREP " "`
16276      if test "x$has_space" != x; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16279      fi
16280      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16281    fi
16282  fi
16283
16284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16287  # "foo.exe" is OK but "foo" is an error.
16288  #
16289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16290  # It is also a way to make sure we got the proper file name for the real test later on.
16291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16292  if test "x$test_shortpath" = x; then
16293    # Short path failed, file does not exist as specified.
16294    # Try adding .exe or .cmd
16295    if test -f "${new_path}.exe"; then
16296       input_to_shortpath="${new_path}.exe"
16297    elif test -f "${new_path}.cmd"; then
16298       input_to_shortpath="${new_path}.cmd"
16299    else
16300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16301$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16304      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16305    fi
16306  else
16307    input_to_shortpath="$new_path"
16308  fi
16309
16310  # Call helper function which possibly converts this using DOS-style short mode.
16311  # If so, the updated path is stored in $new_path.
16312  new_path="$input_to_shortpath"
16313
16314  input_path="$input_to_shortpath"
16315  # Check if we need to convert this using DOS-style short mode. If the path
16316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16317  # take no chances and rewrite it.
16318  # Note: m4 eats our [], so we need to use [ and ] instead.
16319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16320  if test "x$has_forbidden_chars" != x; then
16321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16325      # Going to short mode and back again did indeed matter. Since short mode is
16326      # case insensitive, let's make it lowercase to improve readability.
16327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16328      # Now convert it back to Unix-stile (cygpath)
16329      input_path=`$CYGPATH -u "$shortmode_path"`
16330      new_path="$input_path"
16331    fi
16332  fi
16333
16334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16335  if test "x$test_cygdrive_prefix" = x; then
16336    # As a simple fix, exclude /usr/bin since it's not a real path.
16337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16339      # a path prefixed by /cygdrive for fixpath to work.
16340      new_path="$CYGWIN_ROOT_PATH$input_path"
16341    fi
16342  fi
16343
16344  # remove trailing .exe if any
16345  new_path="${new_path/%.exe/}"
16346
16347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348
16349  # First separate the path from the arguments. This will split at the first
16350  # space.
16351  complete="$VS_ENV_CMD"
16352  path="${complete%% *}"
16353  tmp="$complete EOL"
16354  arguments="${tmp#* }"
16355
16356  # Input might be given as Windows format, start by converting to
16357  # unix format.
16358  new_path="$path"
16359
16360  windows_path="$new_path"
16361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362    unix_path=`$CYGPATH -u "$windows_path"`
16363    new_path="$unix_path"
16364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366    new_path="$unix_path"
16367  fi
16368
16369
16370  # Now try to locate executable using which
16371  new_path=`$WHICH "$new_path" 2> /dev/null`
16372
16373  if test "x$new_path" = x; then
16374    # Oops. Which didn't find the executable.
16375    # The splitting of arguments from the executable at a space might have been incorrect,
16376    # since paths with space are more likely in Windows. Give it another try with the whole
16377    # argument.
16378    path="$complete"
16379    arguments="EOL"
16380    new_path="$path"
16381
16382  windows_path="$new_path"
16383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16384    unix_path=`$CYGPATH -u "$windows_path"`
16385    new_path="$unix_path"
16386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16388    new_path="$unix_path"
16389  fi
16390
16391
16392    new_path=`$WHICH "$new_path" 2> /dev/null`
16393
16394    if test "x$new_path" = x; then
16395      # It's still not found. Now this is an unrecoverable error.
16396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16397$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16398      has_space=`$ECHO "$complete" | $GREP " "`
16399      if test "x$has_space" != x; then
16400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16402      fi
16403      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16404    fi
16405  fi
16406
16407  # Now new_path has a complete unix path to the binary
16408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16409    # Keep paths in /bin as-is, but remove trailing .exe if any
16410    new_path="${new_path/%.exe/}"
16411    # Do not save /bin paths to all_fixpath_prefixes!
16412  else
16413    # Not in mixed or Windows style, start by that.
16414    new_path=`cmd //c echo $new_path`
16415
16416  input_path="$new_path"
16417  # Check if we need to convert this using DOS-style short mode. If the path
16418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419  # take no chances and rewrite it.
16420  # Note: m4 eats our [], so we need to use [ and ] instead.
16421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16422  if test "x$has_forbidden_chars" != x; then
16423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16425  fi
16426
16427    # Output is in $new_path
16428
16429  windows_path="$new_path"
16430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16431    unix_path=`$CYGPATH -u "$windows_path"`
16432    new_path="$unix_path"
16433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16435    new_path="$unix_path"
16436  fi
16437
16438    # remove trailing .exe if any
16439    new_path="${new_path/%.exe/}"
16440
16441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16443  fi
16444
16445  else
16446    # We're on a posix platform. Hooray! :)
16447    # First separate the path from the arguments. This will split at the first
16448    # space.
16449    complete="$VS_ENV_CMD"
16450    path="${complete%% *}"
16451    tmp="$complete EOL"
16452    arguments="${tmp#* }"
16453
16454    # Cannot rely on the command "which" here since it doesn't always work.
16455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16456    if test -z "$is_absolute_path"; then
16457      # Path to executable is not absolute. Find it.
16458      IFS_save="$IFS"
16459      IFS=:
16460      for p in $PATH; do
16461        if test -f "$p/$path" && test -x "$p/$path"; then
16462          new_path="$p/$path"
16463          break
16464        fi
16465      done
16466      IFS="$IFS_save"
16467    else
16468      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16469$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16470      new_path="$path"
16471    fi
16472
16473    if test "x$new_path" = x; then
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16475$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16476        has_space=`$ECHO "$complete" | $GREP " "`
16477        if test "x$has_space" != x; then
16478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16480        fi
16481        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16482      fi
16483  fi
16484
16485      # Now join together the path and the arguments once again
16486      if test "x$arguments" != xEOL; then
16487        new_complete="$new_path ${arguments% *}"
16488      else
16489        new_complete="$new_path"
16490      fi
16491
16492  if test "x$complete" != "x$new_complete"; then
16493      VS_ENV_CMD="$new_complete"
16494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16495$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16496    fi
16497
16498
16499    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16500    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16501$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16502    cd $OUTPUT_ROOT
16503    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16504    # to autoconf standards.
16505
16506    #----
16507
16508    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16509    # but calculate the difference in Cygwin environment before/after running it and then
16510    # apply the diff.
16511
16512    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16513      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16514      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16515      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16516    else
16517      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16518      _dosbash=`cmd //c echo \`which bash\``
16519    fi
16520
16521    # generate the set of exported vars before/after the vs10 setup
16522    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16523    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16524    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16525    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16526
16527    # Now execute the newly created bat file.
16528    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16529    cmd /c localdevenvtmp.bat | cat
16530
16531    # apply the diff (less some non-vs10 vars named by "!")
16532    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16533    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16534    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16535
16536    # cleanup
16537    $RM localdevenvtmp*
16538    #----
16539    cd $CURDIR
16540    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16542$as_echo "no" >&6; }
16543      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16544$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16545      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16546$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16547      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16548$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16549      as_fn_error $? "Cannot continue" "$LINENO" 5
16550    fi
16551
16552    # Now set all paths and other env variables. This will allow the rest of
16553    # the configure script to find and run the compiler in the proper way.
16554    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16555$as_echo "$as_me: Setting extracted environment variables" >&6;}
16556    . $OUTPUT_ROOT/localdevenv.sh
16557  else
16558    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16559    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16560$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16561  fi
16562
16563  # At this point, we should have corrent variables in the environment, or we can't continue.
16564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16565$as_echo_n "checking for Visual Studio variables... " >&6; }
16566
16567  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16568    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16570$as_echo "present but broken" >&6; }
16571      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16572    else
16573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16574$as_echo "ok" >&6; }
16575      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16576      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16577      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16578      VS_PATH="$PATH"
16579
16580
16581
16582    fi
16583  else
16584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16585$as_echo "not found" >&6; }
16586
16587    if test "x$VS_ENV_CMD" = x; then
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16589$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16590      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16591$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16592    else
16593      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16594$as_echo "$as_me: Running the extraction script failed." >&6;}
16595    fi
16596    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16597$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16598    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16599$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16600    as_fn_error $? "Cannot continue" "$LINENO" 5
16601  fi
16602
16603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16604$as_echo_n "checking for msvcr100.dll... " >&6; }
16605
16606# Check whether --with-msvcr-dll was given.
16607if test "${with_msvcr_dll+set}" = set; then :
16608  withval=$with_msvcr_dll;
16609fi
16610
16611  if test "x$with_msvcr_dll" != x; then
16612    MSVCR_DLL="$with_msvcr_dll"
16613  else
16614    if test "x$VCINSTALLDIR" != x; then
16615      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16616        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16617      else
16618        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16619        if test "x$MSVCR_DLL" = x; then
16620          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16621        fi
16622      fi
16623      if test "x$MSVCR_DLL" != x; then
16624        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16625$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16626      else
16627        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16628$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16629      fi
16630    fi
16631    if test "x$MSVCR_DLL" = x; then
16632      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16633        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16634$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16635        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16636      fi
16637    fi
16638  fi
16639  if test "x$MSVCR_DLL" = x; then
16640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16641$as_echo "no" >&6; }
16642    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16643  fi
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16645$as_echo "$MSVCR_DLL" >&6; }
16646
16647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16648
16649  # Input might be given as Windows format, start by converting to
16650  # unix format.
16651  path="$MSVCR_DLL"
16652  new_path=`$CYGPATH -u "$path"`
16653
16654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16657  # "foo.exe" is OK but "foo" is an error.
16658  #
16659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16660  # It is also a way to make sure we got the proper file name for the real test later on.
16661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16662  if test "x$test_shortpath" = x; then
16663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16664$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16665    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16666  fi
16667
16668  # Call helper function which possibly converts this using DOS-style short mode.
16669  # If so, the updated path is stored in $new_path.
16670
16671  input_path="$new_path"
16672  # Check if we need to convert this using DOS-style short mode. If the path
16673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16674  # take no chances and rewrite it.
16675  # Note: m4 eats our [], so we need to use [ and ] instead.
16676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16677  if test "x$has_forbidden_chars" != x; then
16678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16682      # Going to short mode and back again did indeed matter. Since short mode is
16683      # case insensitive, let's make it lowercase to improve readability.
16684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16685      # Now convert it back to Unix-stile (cygpath)
16686      input_path=`$CYGPATH -u "$shortmode_path"`
16687      new_path="$input_path"
16688    fi
16689  fi
16690
16691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16692  if test "x$test_cygdrive_prefix" = x; then
16693    # As a simple fix, exclude /usr/bin since it's not a real path.
16694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16696      # a path prefixed by /cygdrive for fixpath to work.
16697      new_path="$CYGWIN_ROOT_PATH$input_path"
16698    fi
16699  fi
16700
16701
16702  if test "x$path" != "x$new_path"; then
16703    MSVCR_DLL="$new_path"
16704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16705$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16706  fi
16707
16708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16709
16710  path="$MSVCR_DLL"
16711  has_colon=`$ECHO $path | $GREP ^.:`
16712  new_path="$path"
16713  if test "x$has_colon" = x; then
16714    # Not in mixed or Windows style, start by that.
16715    new_path=`cmd //c echo $path`
16716  fi
16717
16718
16719  input_path="$new_path"
16720  # Check if we need to convert this using DOS-style short mode. If the path
16721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16722  # take no chances and rewrite it.
16723  # Note: m4 eats our [], so we need to use [ and ] instead.
16724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16725  if test "x$has_forbidden_chars" != x; then
16726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16728  fi
16729
16730
16731  windows_path="$new_path"
16732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16733    unix_path=`$CYGPATH -u "$windows_path"`
16734    new_path="$unix_path"
16735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16737    new_path="$unix_path"
16738  fi
16739
16740  if test "x$path" != "x$new_path"; then
16741    MSVCR_DLL="$new_path"
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16743$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16744  fi
16745
16746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16748
16749  else
16750    # We're on a posix platform. Hooray! :)
16751    path="$MSVCR_DLL"
16752
16753    if test ! -f "$path" && test ! -d "$path"; then
16754      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16755    fi
16756
16757    has_space=`$ECHO "$path" | $GREP " "`
16758    if test "x$has_space" != x; then
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16760$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16761      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16762    fi
16763  fi
16764
16765
16766fi
16767
16768
16769
16770# If --build AND --host is set, then the configure script will find any
16771# cross compilation tools in the PATH. Cross compilation tools
16772# follows the cross compilation standard where they are prefixed with ${host}.
16773# For example the binary i686-sun-solaris2.10-gcc
16774# will cross compile for i686-sun-solaris2.10
16775# If neither of build and host is not set, then build=host and the
16776# default compiler found in the path will be used.
16777# Setting only --host, does not seem to be really supported.
16778# Please set both --build and --host if you want to cross compile.
16779
16780if test "x$COMPILE_TYPE" = "xcross"; then
16781    # Now we to find a C/C++ compiler that can build executables for the build
16782    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16783    # once. Also, we need to do this before adding a tools dir to the path,
16784    # otherwise we might pick up cross-compilers which don't use standard naming.
16785    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16786    # to wait until they are properly discovered.
16787    for ac_prog in cl cc gcc
16788do
16789  # Extract the first word of "$ac_prog", so it can be a program name with args.
16790set dummy $ac_prog; ac_word=$2
16791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16792$as_echo_n "checking for $ac_word... " >&6; }
16793if ${ac_cv_path_BUILD_CC+:} false; then :
16794  $as_echo_n "(cached) " >&6
16795else
16796  case $BUILD_CC in
16797  [\\/]* | ?:[\\/]*)
16798  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16799  ;;
16800  *)
16801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16802for as_dir in $PATH
16803do
16804  IFS=$as_save_IFS
16805  test -z "$as_dir" && as_dir=.
16806    for ac_exec_ext in '' $ac_executable_extensions; do
16807  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16808    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16810    break 2
16811  fi
16812done
16813  done
16814IFS=$as_save_IFS
16815
16816  ;;
16817esac
16818fi
16819BUILD_CC=$ac_cv_path_BUILD_CC
16820if test -n "$BUILD_CC"; then
16821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16822$as_echo "$BUILD_CC" >&6; }
16823else
16824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16825$as_echo "no" >&6; }
16826fi
16827
16828
16829  test -n "$BUILD_CC" && break
16830done
16831
16832
16833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16834
16835  # First separate the path from the arguments. This will split at the first
16836  # space.
16837  complete="$BUILD_CC"
16838  path="${complete%% *}"
16839  tmp="$complete EOL"
16840  arguments="${tmp#* }"
16841
16842  # Input might be given as Windows format, start by converting to
16843  # unix format.
16844  new_path=`$CYGPATH -u "$path"`
16845
16846  # Now try to locate executable using which
16847  new_path=`$WHICH "$new_path" 2> /dev/null`
16848  # bat and cmd files are not always considered executable in cygwin causing which
16849  # to not find them
16850  if test "x$new_path" = x \
16851           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16852           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16853    new_path=`$CYGPATH -u "$path"`
16854  fi
16855  if test "x$new_path" = x; then
16856    # Oops. Which didn't find the executable.
16857    # The splitting of arguments from the executable at a space might have been incorrect,
16858    # since paths with space are more likely in Windows. Give it another try with the whole
16859    # argument.
16860    path="$complete"
16861    arguments="EOL"
16862    new_path=`$CYGPATH -u "$path"`
16863    new_path=`$WHICH "$new_path" 2> /dev/null`
16864    # bat and cmd files are not always considered executable in cygwin causing which
16865    # to not find them
16866    if test "x$new_path" = x \
16867             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16868             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16869      new_path=`$CYGPATH -u "$path"`
16870    fi
16871    if test "x$new_path" = x; then
16872      # It's still not found. Now this is an unrecoverable error.
16873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16874$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16875      has_space=`$ECHO "$complete" | $GREP " "`
16876      if test "x$has_space" != x; then
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16879      fi
16880      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16881    fi
16882  fi
16883
16884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16887  # "foo.exe" is OK but "foo" is an error.
16888  #
16889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16890  # It is also a way to make sure we got the proper file name for the real test later on.
16891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16892  if test "x$test_shortpath" = x; then
16893    # Short path failed, file does not exist as specified.
16894    # Try adding .exe or .cmd
16895    if test -f "${new_path}.exe"; then
16896       input_to_shortpath="${new_path}.exe"
16897    elif test -f "${new_path}.cmd"; then
16898       input_to_shortpath="${new_path}.cmd"
16899    else
16900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16901$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16904      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16905    fi
16906  else
16907    input_to_shortpath="$new_path"
16908  fi
16909
16910  # Call helper function which possibly converts this using DOS-style short mode.
16911  # If so, the updated path is stored in $new_path.
16912  new_path="$input_to_shortpath"
16913
16914  input_path="$input_to_shortpath"
16915  # Check if we need to convert this using DOS-style short mode. If the path
16916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16917  # take no chances and rewrite it.
16918  # Note: m4 eats our [], so we need to use [ and ] instead.
16919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16920  if test "x$has_forbidden_chars" != x; then
16921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16925      # Going to short mode and back again did indeed matter. Since short mode is
16926      # case insensitive, let's make it lowercase to improve readability.
16927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16928      # Now convert it back to Unix-stile (cygpath)
16929      input_path=`$CYGPATH -u "$shortmode_path"`
16930      new_path="$input_path"
16931    fi
16932  fi
16933
16934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16935  if test "x$test_cygdrive_prefix" = x; then
16936    # As a simple fix, exclude /usr/bin since it's not a real path.
16937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16939      # a path prefixed by /cygdrive for fixpath to work.
16940      new_path="$CYGWIN_ROOT_PATH$input_path"
16941    fi
16942  fi
16943
16944  # remove trailing .exe if any
16945  new_path="${new_path/%.exe/}"
16946
16947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16948
16949  # First separate the path from the arguments. This will split at the first
16950  # space.
16951  complete="$BUILD_CC"
16952  path="${complete%% *}"
16953  tmp="$complete EOL"
16954  arguments="${tmp#* }"
16955
16956  # Input might be given as Windows format, start by converting to
16957  # unix format.
16958  new_path="$path"
16959
16960  windows_path="$new_path"
16961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16962    unix_path=`$CYGPATH -u "$windows_path"`
16963    new_path="$unix_path"
16964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16966    new_path="$unix_path"
16967  fi
16968
16969
16970  # Now try to locate executable using which
16971  new_path=`$WHICH "$new_path" 2> /dev/null`
16972
16973  if test "x$new_path" = x; then
16974    # Oops. Which didn't find the executable.
16975    # The splitting of arguments from the executable at a space might have been incorrect,
16976    # since paths with space are more likely in Windows. Give it another try with the whole
16977    # argument.
16978    path="$complete"
16979    arguments="EOL"
16980    new_path="$path"
16981
16982  windows_path="$new_path"
16983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16984    unix_path=`$CYGPATH -u "$windows_path"`
16985    new_path="$unix_path"
16986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16988    new_path="$unix_path"
16989  fi
16990
16991
16992    new_path=`$WHICH "$new_path" 2> /dev/null`
16993
16994    if test "x$new_path" = x; then
16995      # It's still not found. Now this is an unrecoverable error.
16996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16997$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16998      has_space=`$ECHO "$complete" | $GREP " "`
16999      if test "x$has_space" != x; then
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17002      fi
17003      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17004    fi
17005  fi
17006
17007  # Now new_path has a complete unix path to the binary
17008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17009    # Keep paths in /bin as-is, but remove trailing .exe if any
17010    new_path="${new_path/%.exe/}"
17011    # Do not save /bin paths to all_fixpath_prefixes!
17012  else
17013    # Not in mixed or Windows style, start by that.
17014    new_path=`cmd //c echo $new_path`
17015
17016  input_path="$new_path"
17017  # Check if we need to convert this using DOS-style short mode. If the path
17018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17019  # take no chances and rewrite it.
17020  # Note: m4 eats our [], so we need to use [ and ] instead.
17021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17022  if test "x$has_forbidden_chars" != x; then
17023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17025  fi
17026
17027    # Output is in $new_path
17028
17029  windows_path="$new_path"
17030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17031    unix_path=`$CYGPATH -u "$windows_path"`
17032    new_path="$unix_path"
17033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17035    new_path="$unix_path"
17036  fi
17037
17038    # remove trailing .exe if any
17039    new_path="${new_path/%.exe/}"
17040
17041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17043  fi
17044
17045  else
17046    # We're on a posix platform. Hooray! :)
17047    # First separate the path from the arguments. This will split at the first
17048    # space.
17049    complete="$BUILD_CC"
17050    path="${complete%% *}"
17051    tmp="$complete EOL"
17052    arguments="${tmp#* }"
17053
17054    # Cannot rely on the command "which" here since it doesn't always work.
17055    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17056    if test -z "$is_absolute_path"; then
17057      # Path to executable is not absolute. Find it.
17058      IFS_save="$IFS"
17059      IFS=:
17060      for p in $PATH; do
17061        if test -f "$p/$path" && test -x "$p/$path"; then
17062          new_path="$p/$path"
17063          break
17064        fi
17065      done
17066      IFS="$IFS_save"
17067    else
17068      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17069$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17070      new_path="$path"
17071    fi
17072
17073    if test "x$new_path" = x; then
17074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17075$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17076        has_space=`$ECHO "$complete" | $GREP " "`
17077        if test "x$has_space" != x; then
17078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17080        fi
17081        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17082      fi
17083  fi
17084
17085      # Now join together the path and the arguments once again
17086      if test "x$arguments" != xEOL; then
17087        new_complete="$new_path ${arguments% *}"
17088      else
17089        new_complete="$new_path"
17090      fi
17091
17092  if test "x$complete" != "x$new_complete"; then
17093      BUILD_CC="$new_complete"
17094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17095$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17096    fi
17097
17098    for ac_prog in cl CC g++
17099do
17100  # Extract the first word of "$ac_prog", so it can be a program name with args.
17101set dummy $ac_prog; ac_word=$2
17102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17103$as_echo_n "checking for $ac_word... " >&6; }
17104if ${ac_cv_path_BUILD_CXX+:} false; then :
17105  $as_echo_n "(cached) " >&6
17106else
17107  case $BUILD_CXX in
17108  [\\/]* | ?:[\\/]*)
17109  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17110  ;;
17111  *)
17112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17113for as_dir in $PATH
17114do
17115  IFS=$as_save_IFS
17116  test -z "$as_dir" && as_dir=.
17117    for ac_exec_ext in '' $ac_executable_extensions; do
17118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17119    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17121    break 2
17122  fi
17123done
17124  done
17125IFS=$as_save_IFS
17126
17127  ;;
17128esac
17129fi
17130BUILD_CXX=$ac_cv_path_BUILD_CXX
17131if test -n "$BUILD_CXX"; then
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17133$as_echo "$BUILD_CXX" >&6; }
17134else
17135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17136$as_echo "no" >&6; }
17137fi
17138
17139
17140  test -n "$BUILD_CXX" && break
17141done
17142
17143
17144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145
17146  # First separate the path from the arguments. This will split at the first
17147  # space.
17148  complete="$BUILD_CXX"
17149  path="${complete%% *}"
17150  tmp="$complete EOL"
17151  arguments="${tmp#* }"
17152
17153  # Input might be given as Windows format, start by converting to
17154  # unix format.
17155  new_path=`$CYGPATH -u "$path"`
17156
17157  # Now try to locate executable using which
17158  new_path=`$WHICH "$new_path" 2> /dev/null`
17159  # bat and cmd files are not always considered executable in cygwin causing which
17160  # to not find them
17161  if test "x$new_path" = x \
17162           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17163           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17164    new_path=`$CYGPATH -u "$path"`
17165  fi
17166  if test "x$new_path" = x; then
17167    # Oops. Which didn't find the executable.
17168    # The splitting of arguments from the executable at a space might have been incorrect,
17169    # since paths with space are more likely in Windows. Give it another try with the whole
17170    # argument.
17171    path="$complete"
17172    arguments="EOL"
17173    new_path=`$CYGPATH -u "$path"`
17174    new_path=`$WHICH "$new_path" 2> /dev/null`
17175    # bat and cmd files are not always considered executable in cygwin causing which
17176    # to not find them
17177    if test "x$new_path" = x \
17178             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17179             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17180      new_path=`$CYGPATH -u "$path"`
17181    fi
17182    if test "x$new_path" = x; then
17183      # It's still not found. Now this is an unrecoverable error.
17184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17185$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17186      has_space=`$ECHO "$complete" | $GREP " "`
17187      if test "x$has_space" != x; then
17188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17190      fi
17191      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17192    fi
17193  fi
17194
17195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17198  # "foo.exe" is OK but "foo" is an error.
17199  #
17200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17201  # It is also a way to make sure we got the proper file name for the real test later on.
17202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17203  if test "x$test_shortpath" = x; then
17204    # Short path failed, file does not exist as specified.
17205    # Try adding .exe or .cmd
17206    if test -f "${new_path}.exe"; then
17207       input_to_shortpath="${new_path}.exe"
17208    elif test -f "${new_path}.cmd"; then
17209       input_to_shortpath="${new_path}.cmd"
17210    else
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17212$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17215      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17216    fi
17217  else
17218    input_to_shortpath="$new_path"
17219  fi
17220
17221  # Call helper function which possibly converts this using DOS-style short mode.
17222  # If so, the updated path is stored in $new_path.
17223  new_path="$input_to_shortpath"
17224
17225  input_path="$input_to_shortpath"
17226  # Check if we need to convert this using DOS-style short mode. If the path
17227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17228  # take no chances and rewrite it.
17229  # Note: m4 eats our [], so we need to use [ and ] instead.
17230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17231  if test "x$has_forbidden_chars" != x; then
17232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17236      # Going to short mode and back again did indeed matter. Since short mode is
17237      # case insensitive, let's make it lowercase to improve readability.
17238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17239      # Now convert it back to Unix-stile (cygpath)
17240      input_path=`$CYGPATH -u "$shortmode_path"`
17241      new_path="$input_path"
17242    fi
17243  fi
17244
17245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17246  if test "x$test_cygdrive_prefix" = x; then
17247    # As a simple fix, exclude /usr/bin since it's not a real path.
17248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17250      # a path prefixed by /cygdrive for fixpath to work.
17251      new_path="$CYGWIN_ROOT_PATH$input_path"
17252    fi
17253  fi
17254
17255  # remove trailing .exe if any
17256  new_path="${new_path/%.exe/}"
17257
17258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259
17260  # First separate the path from the arguments. This will split at the first
17261  # space.
17262  complete="$BUILD_CXX"
17263  path="${complete%% *}"
17264  tmp="$complete EOL"
17265  arguments="${tmp#* }"
17266
17267  # Input might be given as Windows format, start by converting to
17268  # unix format.
17269  new_path="$path"
17270
17271  windows_path="$new_path"
17272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17273    unix_path=`$CYGPATH -u "$windows_path"`
17274    new_path="$unix_path"
17275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17277    new_path="$unix_path"
17278  fi
17279
17280
17281  # Now try to locate executable using which
17282  new_path=`$WHICH "$new_path" 2> /dev/null`
17283
17284  if test "x$new_path" = x; then
17285    # Oops. Which didn't find the executable.
17286    # The splitting of arguments from the executable at a space might have been incorrect,
17287    # since paths with space are more likely in Windows. Give it another try with the whole
17288    # argument.
17289    path="$complete"
17290    arguments="EOL"
17291    new_path="$path"
17292
17293  windows_path="$new_path"
17294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17295    unix_path=`$CYGPATH -u "$windows_path"`
17296    new_path="$unix_path"
17297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17299    new_path="$unix_path"
17300  fi
17301
17302
17303    new_path=`$WHICH "$new_path" 2> /dev/null`
17304
17305    if test "x$new_path" = x; then
17306      # It's still not found. Now this is an unrecoverable error.
17307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17308$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17309      has_space=`$ECHO "$complete" | $GREP " "`
17310      if test "x$has_space" != x; then
17311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17313      fi
17314      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17315    fi
17316  fi
17317
17318  # Now new_path has a complete unix path to the binary
17319  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17320    # Keep paths in /bin as-is, but remove trailing .exe if any
17321    new_path="${new_path/%.exe/}"
17322    # Do not save /bin paths to all_fixpath_prefixes!
17323  else
17324    # Not in mixed or Windows style, start by that.
17325    new_path=`cmd //c echo $new_path`
17326
17327  input_path="$new_path"
17328  # Check if we need to convert this using DOS-style short mode. If the path
17329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17330  # take no chances and rewrite it.
17331  # Note: m4 eats our [], so we need to use [ and ] instead.
17332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17333  if test "x$has_forbidden_chars" != x; then
17334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17336  fi
17337
17338    # Output is in $new_path
17339
17340  windows_path="$new_path"
17341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17342    unix_path=`$CYGPATH -u "$windows_path"`
17343    new_path="$unix_path"
17344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17346    new_path="$unix_path"
17347  fi
17348
17349    # remove trailing .exe if any
17350    new_path="${new_path/%.exe/}"
17351
17352    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17353    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17354  fi
17355
17356  else
17357    # We're on a posix platform. Hooray! :)
17358    # First separate the path from the arguments. This will split at the first
17359    # space.
17360    complete="$BUILD_CXX"
17361    path="${complete%% *}"
17362    tmp="$complete EOL"
17363    arguments="${tmp#* }"
17364
17365    # Cannot rely on the command "which" here since it doesn't always work.
17366    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17367    if test -z "$is_absolute_path"; then
17368      # Path to executable is not absolute. Find it.
17369      IFS_save="$IFS"
17370      IFS=:
17371      for p in $PATH; do
17372        if test -f "$p/$path" && test -x "$p/$path"; then
17373          new_path="$p/$path"
17374          break
17375        fi
17376      done
17377      IFS="$IFS_save"
17378    else
17379      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17380$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17381      new_path="$path"
17382    fi
17383
17384    if test "x$new_path" = x; then
17385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17386$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17387        has_space=`$ECHO "$complete" | $GREP " "`
17388        if test "x$has_space" != x; then
17389          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17391        fi
17392        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17393      fi
17394  fi
17395
17396      # Now join together the path and the arguments once again
17397      if test "x$arguments" != xEOL; then
17398        new_complete="$new_path ${arguments% *}"
17399      else
17400        new_complete="$new_path"
17401      fi
17402
17403  if test "x$complete" != "x$new_complete"; then
17404      BUILD_CXX="$new_complete"
17405      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17406$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17407    fi
17408
17409    # Extract the first word of "ld", so it can be a program name with args.
17410set dummy ld; ac_word=$2
17411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17412$as_echo_n "checking for $ac_word... " >&6; }
17413if ${ac_cv_path_BUILD_LD+:} false; then :
17414  $as_echo_n "(cached) " >&6
17415else
17416  case $BUILD_LD in
17417  [\\/]* | ?:[\\/]*)
17418  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17419  ;;
17420  *)
17421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17422for as_dir in $PATH
17423do
17424  IFS=$as_save_IFS
17425  test -z "$as_dir" && as_dir=.
17426    for ac_exec_ext in '' $ac_executable_extensions; do
17427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17428    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17430    break 2
17431  fi
17432done
17433  done
17434IFS=$as_save_IFS
17435
17436  ;;
17437esac
17438fi
17439BUILD_LD=$ac_cv_path_BUILD_LD
17440if test -n "$BUILD_LD"; then
17441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17442$as_echo "$BUILD_LD" >&6; }
17443else
17444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17445$as_echo "no" >&6; }
17446fi
17447
17448
17449
17450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17451
17452  # First separate the path from the arguments. This will split at the first
17453  # space.
17454  complete="$BUILD_LD"
17455  path="${complete%% *}"
17456  tmp="$complete EOL"
17457  arguments="${tmp#* }"
17458
17459  # Input might be given as Windows format, start by converting to
17460  # unix format.
17461  new_path=`$CYGPATH -u "$path"`
17462
17463  # Now try to locate executable using which
17464  new_path=`$WHICH "$new_path" 2> /dev/null`
17465  # bat and cmd files are not always considered executable in cygwin causing which
17466  # to not find them
17467  if test "x$new_path" = x \
17468           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17469           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17470    new_path=`$CYGPATH -u "$path"`
17471  fi
17472  if test "x$new_path" = x; then
17473    # Oops. Which didn't find the executable.
17474    # The splitting of arguments from the executable at a space might have been incorrect,
17475    # since paths with space are more likely in Windows. Give it another try with the whole
17476    # argument.
17477    path="$complete"
17478    arguments="EOL"
17479    new_path=`$CYGPATH -u "$path"`
17480    new_path=`$WHICH "$new_path" 2> /dev/null`
17481    # bat and cmd files are not always considered executable in cygwin causing which
17482    # to not find them
17483    if test "x$new_path" = x \
17484             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17485             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17486      new_path=`$CYGPATH -u "$path"`
17487    fi
17488    if test "x$new_path" = x; then
17489      # It's still not found. Now this is an unrecoverable error.
17490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17491$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17492      has_space=`$ECHO "$complete" | $GREP " "`
17493      if test "x$has_space" != x; then
17494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17496      fi
17497      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17498    fi
17499  fi
17500
17501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17504  # "foo.exe" is OK but "foo" is an error.
17505  #
17506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17507  # It is also a way to make sure we got the proper file name for the real test later on.
17508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17509  if test "x$test_shortpath" = x; then
17510    # Short path failed, file does not exist as specified.
17511    # Try adding .exe or .cmd
17512    if test -f "${new_path}.exe"; then
17513       input_to_shortpath="${new_path}.exe"
17514    elif test -f "${new_path}.cmd"; then
17515       input_to_shortpath="${new_path}.cmd"
17516    else
17517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17518$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17521      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17522    fi
17523  else
17524    input_to_shortpath="$new_path"
17525  fi
17526
17527  # Call helper function which possibly converts this using DOS-style short mode.
17528  # If so, the updated path is stored in $new_path.
17529  new_path="$input_to_shortpath"
17530
17531  input_path="$input_to_shortpath"
17532  # Check if we need to convert this using DOS-style short mode. If the path
17533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17534  # take no chances and rewrite it.
17535  # Note: m4 eats our [], so we need to use [ and ] instead.
17536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17537  if test "x$has_forbidden_chars" != x; then
17538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17542      # Going to short mode and back again did indeed matter. Since short mode is
17543      # case insensitive, let's make it lowercase to improve readability.
17544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17545      # Now convert it back to Unix-stile (cygpath)
17546      input_path=`$CYGPATH -u "$shortmode_path"`
17547      new_path="$input_path"
17548    fi
17549  fi
17550
17551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17552  if test "x$test_cygdrive_prefix" = x; then
17553    # As a simple fix, exclude /usr/bin since it's not a real path.
17554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17556      # a path prefixed by /cygdrive for fixpath to work.
17557      new_path="$CYGWIN_ROOT_PATH$input_path"
17558    fi
17559  fi
17560
17561  # remove trailing .exe if any
17562  new_path="${new_path/%.exe/}"
17563
17564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17565
17566  # First separate the path from the arguments. This will split at the first
17567  # space.
17568  complete="$BUILD_LD"
17569  path="${complete%% *}"
17570  tmp="$complete EOL"
17571  arguments="${tmp#* }"
17572
17573  # Input might be given as Windows format, start by converting to
17574  # unix format.
17575  new_path="$path"
17576
17577  windows_path="$new_path"
17578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17579    unix_path=`$CYGPATH -u "$windows_path"`
17580    new_path="$unix_path"
17581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17583    new_path="$unix_path"
17584  fi
17585
17586
17587  # Now try to locate executable using which
17588  new_path=`$WHICH "$new_path" 2> /dev/null`
17589
17590  if test "x$new_path" = x; then
17591    # Oops. Which didn't find the executable.
17592    # The splitting of arguments from the executable at a space might have been incorrect,
17593    # since paths with space are more likely in Windows. Give it another try with the whole
17594    # argument.
17595    path="$complete"
17596    arguments="EOL"
17597    new_path="$path"
17598
17599  windows_path="$new_path"
17600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17601    unix_path=`$CYGPATH -u "$windows_path"`
17602    new_path="$unix_path"
17603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17605    new_path="$unix_path"
17606  fi
17607
17608
17609    new_path=`$WHICH "$new_path" 2> /dev/null`
17610
17611    if test "x$new_path" = x; then
17612      # It's still not found. Now this is an unrecoverable error.
17613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17614$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17615      has_space=`$ECHO "$complete" | $GREP " "`
17616      if test "x$has_space" != x; then
17617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17619      fi
17620      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17621    fi
17622  fi
17623
17624  # Now new_path has a complete unix path to the binary
17625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17626    # Keep paths in /bin as-is, but remove trailing .exe if any
17627    new_path="${new_path/%.exe/}"
17628    # Do not save /bin paths to all_fixpath_prefixes!
17629  else
17630    # Not in mixed or Windows style, start by that.
17631    new_path=`cmd //c echo $new_path`
17632
17633  input_path="$new_path"
17634  # Check if we need to convert this using DOS-style short mode. If the path
17635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17636  # take no chances and rewrite it.
17637  # Note: m4 eats our [], so we need to use [ and ] instead.
17638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17639  if test "x$has_forbidden_chars" != x; then
17640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17642  fi
17643
17644    # Output is in $new_path
17645
17646  windows_path="$new_path"
17647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17648    unix_path=`$CYGPATH -u "$windows_path"`
17649    new_path="$unix_path"
17650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17652    new_path="$unix_path"
17653  fi
17654
17655    # remove trailing .exe if any
17656    new_path="${new_path/%.exe/}"
17657
17658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17660  fi
17661
17662  else
17663    # We're on a posix platform. Hooray! :)
17664    # First separate the path from the arguments. This will split at the first
17665    # space.
17666    complete="$BUILD_LD"
17667    path="${complete%% *}"
17668    tmp="$complete EOL"
17669    arguments="${tmp#* }"
17670
17671    # Cannot rely on the command "which" here since it doesn't always work.
17672    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17673    if test -z "$is_absolute_path"; then
17674      # Path to executable is not absolute. Find it.
17675      IFS_save="$IFS"
17676      IFS=:
17677      for p in $PATH; do
17678        if test -f "$p/$path" && test -x "$p/$path"; then
17679          new_path="$p/$path"
17680          break
17681        fi
17682      done
17683      IFS="$IFS_save"
17684    else
17685      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17686$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17687      new_path="$path"
17688    fi
17689
17690    if test "x$new_path" = x; then
17691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17692$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17693        has_space=`$ECHO "$complete" | $GREP " "`
17694        if test "x$has_space" != x; then
17695          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17696$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17697        fi
17698        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17699      fi
17700  fi
17701
17702      # Now join together the path and the arguments once again
17703      if test "x$arguments" != xEOL; then
17704        new_complete="$new_path ${arguments% *}"
17705      else
17706        new_complete="$new_path"
17707      fi
17708
17709  if test "x$complete" != "x$new_complete"; then
17710      BUILD_LD="$new_complete"
17711      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17712$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17713    fi
17714
17715fi
17716
17717
17718
17719
17720# If a devkit is found on the builddeps server, then prepend its path to the
17721# PATH variable. If there are cross compilers available in the devkit, these
17722# will be found by AC_PROG_CC et al.
17723DEVKIT=
17724
17725
17726    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17727        # Source the builddeps file again, to make sure it uses the latest variables!
17728        . $builddepsfile
17729        # Look for a target and build machine specific resource!
17730        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17731        if test "x$resource" = x; then
17732            # Ok, lets instead look for a target specific resource
17733            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17734        fi
17735        if test "x$resource" = x; then
17736            # Ok, lets instead look for a build specific resource
17737            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17738        fi
17739        if test "x$resource" = x; then
17740            # Ok, lets instead look for a generic resource
17741            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17742            resource=${builddep_devkit}
17743        fi
17744        if test "x$resource" != x; then
17745            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17746$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17747	    # If the resource in the builddeps.conf file is an existing directory,
17748	    # for example /java/linux/cups
17749	    if test -d ${resource}; then
17750	       depdir=${resource}
17751	    else
17752
17753# devkit is for example mymodule
17754# $resource is for example libs/general/libmymod_1_2_3.zip
17755# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17756# $with_builddeps_dir is for example /localhome/builddeps
17757# depdir is the name of the variable into which we store the depdir, eg MYMOD
17758# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17759# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17760    filename=`basename $resource`
17761    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17762    filebase=${filename%%.*}
17763    extension=${filename#*.}
17764    installdir=$with_builddeps_dir/$filebase
17765    if test ! -f $installdir/$filename.unpacked; then
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17767$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17768        if test ! -d $installdir; then
17769            mkdir -p $installdir
17770        fi
17771        if test ! -d $installdir; then
17772            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17773        fi
17774        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17775        touch $tmpfile
17776        if test ! -f $tmpfile; then
17777            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17778        fi
17779
17780    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17781    # $tmpfile is the local file name for the downloaded file.
17782    VALID_TOOL=no
17783    if test "x$BDEPS_FTP" = xwget; then
17784       VALID_TOOL=yes
17785       wget -O $tmpfile $with_builddeps_server/$resource
17786    fi
17787    if test "x$BDEPS_FTP" = xlftp; then
17788       VALID_TOOL=yes
17789       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17790    fi
17791    if test "x$BDEPS_FTP" = xftp; then
17792        VALID_TOOL=yes
17793        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17794        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17795        FTPUSERPWD=${FTPSERVER%%@*}
17796        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17797            FTPUSER=${userpwd%%:*}
17798            FTPPWD=${userpwd#*@}
17799            FTPSERVER=${FTPSERVER#*@}
17800        else
17801            FTPUSER=ftp
17802            FTPPWD=ftp
17803        fi
17804        # the "pass" command does not work on some
17805        # ftp clients (read ftp.exe) but if it works,
17806        # passive mode is better!
17807        (\
17808            echo "user $FTPUSER $FTPPWD"        ;\
17809            echo "pass"                         ;\
17810            echo "bin"                          ;\
17811            echo "get $FTPPATH $tmpfile"              ;\
17812        ) | ftp -in $FTPSERVER
17813    fi
17814    if test "x$VALID_TOOL" != xyes; then
17815       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17816    fi
17817
17818        mv $tmpfile $installdir/$filename
17819        if test ! -s $installdir/$filename; then
17820            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17821        fi
17822        case "$extension" in
17823            zip)  echo "Unzipping $installdir/$filename..."
17824               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17825            ;;
17826            tar.gz) echo "Untaring $installdir/$filename..."
17827               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17828            ;;
17829            tgz) echo "Untaring $installdir/$filename..."
17830               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17831            ;;
17832            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17833            ;;
17834        esac
17835    fi
17836    if test -f $installdir/$filename.unpacked; then
17837        depdir=$installdir
17838    fi
17839
17840	    fi
17841            # Source the builddeps file again, because in the previous command, the depdir
17842            # was updated to point at the current build dependency install directory.
17843            . $builddepsfile
17844            # Now extract variables from the builddeps.conf files.
17845            theroot=${builddep_devkit_ROOT}
17846            thecflags=${builddep_devkit_CFLAGS}
17847            thelibs=${builddep_devkit_LIBS}
17848            if test "x$depdir" = x; then
17849                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17850            fi
17851            DEVKIT=$depdir
17852            if test "x$theroot" != x; then
17853               DEVKIT="$theroot"
17854            fi
17855            if test "x$thecflags" != x; then
17856               DEVKIT_CFLAGS="$thecflags"
17857            fi
17858            if test "x$thelibs" != x; then
17859               DEVKIT_LIBS="$thelibs"
17860            fi
17861            # Found devkit
17862                     PATH="$DEVKIT/bin:$PATH"
17863                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17864                     if test "x$x_includes" = "xNONE"; then
17865                         x_includes="$SYS_ROOT/usr/include/X11"
17866                     fi
17867                     if test "x$x_libraries" = "xNONE"; then
17868                         x_libraries="$SYS_ROOT/usr/lib"
17869                     fi
17870
17871
17872        fi
17873
17874    fi
17875
17876
17877if test "x$SYS_ROOT" != "x/" ; then
17878    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17879    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17880    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17881    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17882    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17883    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17884fi
17885
17886# Store the CFLAGS etal passed to the configure script.
17887ORG_CFLAGS="$CFLAGS"
17888ORG_CXXFLAGS="$CXXFLAGS"
17889ORG_OBJCFLAGS="$OBJCFLAGS"
17890
17891# autoconf magic only relies on PATH, so update it if tools dir is specified
17892OLD_PATH="$PATH"
17893if test "x$TOOLS_DIR" != x; then
17894  PATH=$TOOLS_DIR:$PATH
17895fi
17896
17897
17898### Locate C compiler (CC)
17899
17900# gcc is almost always present, but on Windows we
17901# prefer cl.exe and on Solaris we prefer CC.
17902# Thus test for them in this order.
17903if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17904  # Do not probe for cc on MacOSX.
17905  COMPILER_CHECK_LIST="cl gcc"
17906else
17907  COMPILER_CHECK_LIST="cl cc gcc"
17908fi
17909
17910
17911  COMPILER_NAME=C
17912
17913  CC=
17914  # If TOOLS_DIR is set, check for all compiler names in there first
17915  # before checking the rest of the PATH.
17916  if test -n "$TOOLS_DIR"; then
17917    PATH_save="$PATH"
17918    PATH="$TOOLS_DIR"
17919    for ac_prog in $COMPILER_CHECK_LIST
17920do
17921  # Extract the first word of "$ac_prog", so it can be a program name with args.
17922set dummy $ac_prog; ac_word=$2
17923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17924$as_echo_n "checking for $ac_word... " >&6; }
17925if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
17926  $as_echo_n "(cached) " >&6
17927else
17928  case $TOOLS_DIR_CC in
17929  [\\/]* | ?:[\\/]*)
17930  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
17931  ;;
17932  *)
17933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17934for as_dir in $PATH
17935do
17936  IFS=$as_save_IFS
17937  test -z "$as_dir" && as_dir=.
17938    for ac_exec_ext in '' $ac_executable_extensions; do
17939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17940    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
17941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17942    break 2
17943  fi
17944done
17945  done
17946IFS=$as_save_IFS
17947
17948  ;;
17949esac
17950fi
17951TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
17952if test -n "$TOOLS_DIR_CC"; then
17953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
17954$as_echo "$TOOLS_DIR_CC" >&6; }
17955else
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17957$as_echo "no" >&6; }
17958fi
17959
17960
17961  test -n "$TOOLS_DIR_CC" && break
17962done
17963
17964    CC=$TOOLS_DIR_CC
17965    PATH="$PATH_save"
17966  fi
17967
17968  # AC_PATH_PROGS can't be run multiple times with the same variable,
17969  # so create a new name for this run.
17970  if test "x$CC" = x; then
17971    for ac_prog in $COMPILER_CHECK_LIST
17972do
17973  # Extract the first word of "$ac_prog", so it can be a program name with args.
17974set dummy $ac_prog; ac_word=$2
17975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17976$as_echo_n "checking for $ac_word... " >&6; }
17977if ${ac_cv_path_POTENTIAL_CC+:} false; then :
17978  $as_echo_n "(cached) " >&6
17979else
17980  case $POTENTIAL_CC in
17981  [\\/]* | ?:[\\/]*)
17982  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17983  ;;
17984  *)
17985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17986for as_dir in $PATH
17987do
17988  IFS=$as_save_IFS
17989  test -z "$as_dir" && as_dir=.
17990    for ac_exec_ext in '' $ac_executable_extensions; do
17991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17992    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17994    break 2
17995  fi
17996done
17997  done
17998IFS=$as_save_IFS
17999
18000  ;;
18001esac
18002fi
18003POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18004if test -n "$POTENTIAL_CC"; then
18005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18006$as_echo "$POTENTIAL_CC" >&6; }
18007else
18008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18009$as_echo "no" >&6; }
18010fi
18011
18012
18013  test -n "$POTENTIAL_CC" && break
18014done
18015
18016    CC=$POTENTIAL_CC
18017  fi
18018
18019  if test "x$CC" = x; then
18020
18021    # Print a helpful message on how to acquire the necessary build dependency.
18022    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18023    MISSING_DEPENDENCY=devkit
18024    PKGHANDLER_COMMAND=
18025
18026    case $PKGHANDLER in
18027	apt-get)
18028                apt_help     $MISSING_DEPENDENCY ;;
18029    yum)
18030                yum_help     $MISSING_DEPENDENCY ;;
18031	port)
18032                port_help    $MISSING_DEPENDENCY ;;
18033	pkgutil)
18034                pkgutil_help $MISSING_DEPENDENCY ;;
18035	pkgadd)
18036                pkgadd_help  $MISSING_DEPENDENCY ;;
18037    * )
18038      break ;;
18039    esac
18040
18041    if test "x$PKGHANDLER_COMMAND" != x; then
18042        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18043    fi
18044
18045      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18046  fi
18047
18048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18049
18050  # First separate the path from the arguments. This will split at the first
18051  # space.
18052  complete="$CC"
18053  path="${complete%% *}"
18054  tmp="$complete EOL"
18055  arguments="${tmp#* }"
18056
18057  # Input might be given as Windows format, start by converting to
18058  # unix format.
18059  new_path=`$CYGPATH -u "$path"`
18060
18061  # Now try to locate executable using which
18062  new_path=`$WHICH "$new_path" 2> /dev/null`
18063  # bat and cmd files are not always considered executable in cygwin causing which
18064  # to not find them
18065  if test "x$new_path" = x \
18066           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18067           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18068    new_path=`$CYGPATH -u "$path"`
18069  fi
18070  if test "x$new_path" = x; then
18071    # Oops. Which didn't find the executable.
18072    # The splitting of arguments from the executable at a space might have been incorrect,
18073    # since paths with space are more likely in Windows. Give it another try with the whole
18074    # argument.
18075    path="$complete"
18076    arguments="EOL"
18077    new_path=`$CYGPATH -u "$path"`
18078    new_path=`$WHICH "$new_path" 2> /dev/null`
18079    # bat and cmd files are not always considered executable in cygwin causing which
18080    # to not find them
18081    if test "x$new_path" = x \
18082             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18083             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18084      new_path=`$CYGPATH -u "$path"`
18085    fi
18086    if test "x$new_path" = x; then
18087      # It's still not found. Now this is an unrecoverable error.
18088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18089$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18090      has_space=`$ECHO "$complete" | $GREP " "`
18091      if test "x$has_space" != x; then
18092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18094      fi
18095      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18096    fi
18097  fi
18098
18099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18102  # "foo.exe" is OK but "foo" is an error.
18103  #
18104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18105  # It is also a way to make sure we got the proper file name for the real test later on.
18106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18107  if test "x$test_shortpath" = x; then
18108    # Short path failed, file does not exist as specified.
18109    # Try adding .exe or .cmd
18110    if test -f "${new_path}.exe"; then
18111       input_to_shortpath="${new_path}.exe"
18112    elif test -f "${new_path}.cmd"; then
18113       input_to_shortpath="${new_path}.cmd"
18114    else
18115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18116$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18119      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18120    fi
18121  else
18122    input_to_shortpath="$new_path"
18123  fi
18124
18125  # Call helper function which possibly converts this using DOS-style short mode.
18126  # If so, the updated path is stored in $new_path.
18127  new_path="$input_to_shortpath"
18128
18129  input_path="$input_to_shortpath"
18130  # Check if we need to convert this using DOS-style short mode. If the path
18131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18132  # take no chances and rewrite it.
18133  # Note: m4 eats our [], so we need to use [ and ] instead.
18134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18135  if test "x$has_forbidden_chars" != x; then
18136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18140      # Going to short mode and back again did indeed matter. Since short mode is
18141      # case insensitive, let's make it lowercase to improve readability.
18142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18143      # Now convert it back to Unix-stile (cygpath)
18144      input_path=`$CYGPATH -u "$shortmode_path"`
18145      new_path="$input_path"
18146    fi
18147  fi
18148
18149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18150  if test "x$test_cygdrive_prefix" = x; then
18151    # As a simple fix, exclude /usr/bin since it's not a real path.
18152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18154      # a path prefixed by /cygdrive for fixpath to work.
18155      new_path="$CYGWIN_ROOT_PATH$input_path"
18156    fi
18157  fi
18158
18159  # remove trailing .exe if any
18160  new_path="${new_path/%.exe/}"
18161
18162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18163
18164  # First separate the path from the arguments. This will split at the first
18165  # space.
18166  complete="$CC"
18167  path="${complete%% *}"
18168  tmp="$complete EOL"
18169  arguments="${tmp#* }"
18170
18171  # Input might be given as Windows format, start by converting to
18172  # unix format.
18173  new_path="$path"
18174
18175  windows_path="$new_path"
18176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18177    unix_path=`$CYGPATH -u "$windows_path"`
18178    new_path="$unix_path"
18179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18181    new_path="$unix_path"
18182  fi
18183
18184
18185  # Now try to locate executable using which
18186  new_path=`$WHICH "$new_path" 2> /dev/null`
18187
18188  if test "x$new_path" = x; then
18189    # Oops. Which didn't find the executable.
18190    # The splitting of arguments from the executable at a space might have been incorrect,
18191    # since paths with space are more likely in Windows. Give it another try with the whole
18192    # argument.
18193    path="$complete"
18194    arguments="EOL"
18195    new_path="$path"
18196
18197  windows_path="$new_path"
18198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18199    unix_path=`$CYGPATH -u "$windows_path"`
18200    new_path="$unix_path"
18201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18203    new_path="$unix_path"
18204  fi
18205
18206
18207    new_path=`$WHICH "$new_path" 2> /dev/null`
18208
18209    if test "x$new_path" = x; then
18210      # It's still not found. Now this is an unrecoverable error.
18211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18212$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18213      has_space=`$ECHO "$complete" | $GREP " "`
18214      if test "x$has_space" != x; then
18215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18217      fi
18218      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18219    fi
18220  fi
18221
18222  # Now new_path has a complete unix path to the binary
18223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18224    # Keep paths in /bin as-is, but remove trailing .exe if any
18225    new_path="${new_path/%.exe/}"
18226    # Do not save /bin paths to all_fixpath_prefixes!
18227  else
18228    # Not in mixed or Windows style, start by that.
18229    new_path=`cmd //c echo $new_path`
18230
18231  input_path="$new_path"
18232  # Check if we need to convert this using DOS-style short mode. If the path
18233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18234  # take no chances and rewrite it.
18235  # Note: m4 eats our [], so we need to use [ and ] instead.
18236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18237  if test "x$has_forbidden_chars" != x; then
18238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18240  fi
18241
18242    # Output is in $new_path
18243
18244  windows_path="$new_path"
18245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18246    unix_path=`$CYGPATH -u "$windows_path"`
18247    new_path="$unix_path"
18248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18250    new_path="$unix_path"
18251  fi
18252
18253    # remove trailing .exe if any
18254    new_path="${new_path/%.exe/}"
18255
18256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18258  fi
18259
18260  else
18261    # We're on a posix platform. Hooray! :)
18262    # First separate the path from the arguments. This will split at the first
18263    # space.
18264    complete="$CC"
18265    path="${complete%% *}"
18266    tmp="$complete EOL"
18267    arguments="${tmp#* }"
18268
18269    # Cannot rely on the command "which" here since it doesn't always work.
18270    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18271    if test -z "$is_absolute_path"; then
18272      # Path to executable is not absolute. Find it.
18273      IFS_save="$IFS"
18274      IFS=:
18275      for p in $PATH; do
18276        if test -f "$p/$path" && test -x "$p/$path"; then
18277          new_path="$p/$path"
18278          break
18279        fi
18280      done
18281      IFS="$IFS_save"
18282    else
18283      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18284$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18285      new_path="$path"
18286    fi
18287
18288    if test "x$new_path" = x; then
18289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18290$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18291        has_space=`$ECHO "$complete" | $GREP " "`
18292        if test "x$has_space" != x; then
18293          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18295        fi
18296        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18297      fi
18298  fi
18299
18300      # Now join together the path and the arguments once again
18301      if test "x$arguments" != xEOL; then
18302        new_complete="$new_path ${arguments% *}"
18303      else
18304        new_complete="$new_path"
18305      fi
18306
18307  if test "x$complete" != "x$new_complete"; then
18308      CC="$new_complete"
18309      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18310$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18311    fi
18312
18313  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18314$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18315  TEST_COMPILER="$CC"
18316
18317    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18318        # Follow a chain of symbolic links. Use readlink
18319        # where it exists, else fall back to horribly
18320        # complicated shell code.
18321        if test "x$READLINK_TESTED" != yes; then
18322            # On MacOSX there is a readlink tool with a different
18323            # purpose than the GNU readlink tool. Check the found readlink.
18324            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18325            if test "x$ISGNU" = x; then
18326                 # A readlink that we do not know how to use.
18327                 # Are there other non-GNU readlinks out there?
18328                 READLINK_TESTED=yes
18329                 READLINK=
18330            fi
18331        fi
18332
18333        if test "x$READLINK" != x; then
18334            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18335        else
18336            # Save the current directory for restoring afterwards
18337            STARTDIR=$PWD
18338            COUNTER=0
18339            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18340            sym_link_file=`$BASENAME $TEST_COMPILER`
18341            # Use the system pwd and not the shell builtin to resolve directory symlinks
18342            cd $sym_link_dir
18343            cd `$THEPWDCMD`
18344            sym_link_dir=`$THEPWDCMD`
18345            # Resolve file symlinks
18346            while test $COUNTER -lt 20; do
18347                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18348                if test "x$ISLINK" == x; then
18349                    # This is not a symbolic link! We are done!
18350                    break
18351                fi
18352                # Again resolve directory symlinks since the target of the just found
18353                # link could be in a different directory
18354                cd `$DIRNAME $ISLINK`
18355                sym_link_dir=`$THEPWDCMD`
18356                sym_link_file=`$BASENAME $ISLINK`
18357                let COUNTER=COUNTER+1
18358            done
18359            cd $STARTDIR
18360            TEST_COMPILER=$sym_link_dir/$sym_link_file
18361        fi
18362    fi
18363
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18365$as_echo "$TEST_COMPILER" >&6; }
18366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18367$as_echo_n "checking if CC is disguised ccache... " >&6; }
18368
18369  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18370  if test "x$COMPILER_BASENAME" = "xccache"; then
18371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18372$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18373    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18374    # We want to control ccache invocation ourselves, so ignore this cc and try
18375    # searching again.
18376
18377    # Remove the path to the fake ccache cc from the PATH
18378    RETRY_COMPILER_SAVED_PATH="$PATH"
18379    COMPILER_DIRNAME=`$DIRNAME $CC`
18380    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18381
18382    # Try again looking for our compiler
18383    if test -n "$ac_tool_prefix"; then
18384  for ac_prog in $COMPILER_CHECK_LIST
18385  do
18386    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18389$as_echo_n "checking for $ac_word... " >&6; }
18390if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18391  $as_echo_n "(cached) " >&6
18392else
18393  if test -n "$PROPER_COMPILER_CC"; then
18394  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18395else
18396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18397for as_dir in $PATH
18398do
18399  IFS=$as_save_IFS
18400  test -z "$as_dir" && as_dir=.
18401    for ac_exec_ext in '' $ac_executable_extensions; do
18402  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18403    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18405    break 2
18406  fi
18407done
18408  done
18409IFS=$as_save_IFS
18410
18411fi
18412fi
18413PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18414if test -n "$PROPER_COMPILER_CC"; then
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18416$as_echo "$PROPER_COMPILER_CC" >&6; }
18417else
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419$as_echo "no" >&6; }
18420fi
18421
18422
18423    test -n "$PROPER_COMPILER_CC" && break
18424  done
18425fi
18426if test -z "$PROPER_COMPILER_CC"; then
18427  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18428  for ac_prog in $COMPILER_CHECK_LIST
18429do
18430  # Extract the first word of "$ac_prog", so it can be a program name with args.
18431set dummy $ac_prog; ac_word=$2
18432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18433$as_echo_n "checking for $ac_word... " >&6; }
18434if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18435  $as_echo_n "(cached) " >&6
18436else
18437  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18438  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18439else
18440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18441for as_dir in $PATH
18442do
18443  IFS=$as_save_IFS
18444  test -z "$as_dir" && as_dir=.
18445    for ac_exec_ext in '' $ac_executable_extensions; do
18446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18447    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18449    break 2
18450  fi
18451done
18452  done
18453IFS=$as_save_IFS
18454
18455fi
18456fi
18457ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18458if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18460$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18461else
18462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18463$as_echo "no" >&6; }
18464fi
18465
18466
18467  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18468done
18469
18470  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18471    PROPER_COMPILER_CC=""
18472  else
18473    case $cross_compiling:$ac_tool_warned in
18474yes:)
18475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18477ac_tool_warned=yes ;;
18478esac
18479    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18480  fi
18481fi
18482
18483
18484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18485
18486  # First separate the path from the arguments. This will split at the first
18487  # space.
18488  complete="$PROPER_COMPILER_CC"
18489  path="${complete%% *}"
18490  tmp="$complete EOL"
18491  arguments="${tmp#* }"
18492
18493  # Input might be given as Windows format, start by converting to
18494  # unix format.
18495  new_path=`$CYGPATH -u "$path"`
18496
18497  # Now try to locate executable using which
18498  new_path=`$WHICH "$new_path" 2> /dev/null`
18499  # bat and cmd files are not always considered executable in cygwin causing which
18500  # to not find them
18501  if test "x$new_path" = x \
18502           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18503           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18504    new_path=`$CYGPATH -u "$path"`
18505  fi
18506  if test "x$new_path" = x; then
18507    # Oops. Which didn't find the executable.
18508    # The splitting of arguments from the executable at a space might have been incorrect,
18509    # since paths with space are more likely in Windows. Give it another try with the whole
18510    # argument.
18511    path="$complete"
18512    arguments="EOL"
18513    new_path=`$CYGPATH -u "$path"`
18514    new_path=`$WHICH "$new_path" 2> /dev/null`
18515    # bat and cmd files are not always considered executable in cygwin causing which
18516    # to not find them
18517    if test "x$new_path" = x \
18518             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18519             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18520      new_path=`$CYGPATH -u "$path"`
18521    fi
18522    if test "x$new_path" = x; then
18523      # It's still not found. Now this is an unrecoverable error.
18524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18525$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18526      has_space=`$ECHO "$complete" | $GREP " "`
18527      if test "x$has_space" != x; then
18528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18530      fi
18531      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18532    fi
18533  fi
18534
18535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18538  # "foo.exe" is OK but "foo" is an error.
18539  #
18540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18541  # It is also a way to make sure we got the proper file name for the real test later on.
18542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18543  if test "x$test_shortpath" = x; then
18544    # Short path failed, file does not exist as specified.
18545    # Try adding .exe or .cmd
18546    if test -f "${new_path}.exe"; then
18547       input_to_shortpath="${new_path}.exe"
18548    elif test -f "${new_path}.cmd"; then
18549       input_to_shortpath="${new_path}.cmd"
18550    else
18551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18552$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18553      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18554$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18555      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18556    fi
18557  else
18558    input_to_shortpath="$new_path"
18559  fi
18560
18561  # Call helper function which possibly converts this using DOS-style short mode.
18562  # If so, the updated path is stored in $new_path.
18563  new_path="$input_to_shortpath"
18564
18565  input_path="$input_to_shortpath"
18566  # Check if we need to convert this using DOS-style short mode. If the path
18567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18568  # take no chances and rewrite it.
18569  # Note: m4 eats our [], so we need to use [ and ] instead.
18570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18571  if test "x$has_forbidden_chars" != x; then
18572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18576      # Going to short mode and back again did indeed matter. Since short mode is
18577      # case insensitive, let's make it lowercase to improve readability.
18578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18579      # Now convert it back to Unix-stile (cygpath)
18580      input_path=`$CYGPATH -u "$shortmode_path"`
18581      new_path="$input_path"
18582    fi
18583  fi
18584
18585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18586  if test "x$test_cygdrive_prefix" = x; then
18587    # As a simple fix, exclude /usr/bin since it's not a real path.
18588    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18590      # a path prefixed by /cygdrive for fixpath to work.
18591      new_path="$CYGWIN_ROOT_PATH$input_path"
18592    fi
18593  fi
18594
18595  # remove trailing .exe if any
18596  new_path="${new_path/%.exe/}"
18597
18598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18599
18600  # First separate the path from the arguments. This will split at the first
18601  # space.
18602  complete="$PROPER_COMPILER_CC"
18603  path="${complete%% *}"
18604  tmp="$complete EOL"
18605  arguments="${tmp#* }"
18606
18607  # Input might be given as Windows format, start by converting to
18608  # unix format.
18609  new_path="$path"
18610
18611  windows_path="$new_path"
18612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613    unix_path=`$CYGPATH -u "$windows_path"`
18614    new_path="$unix_path"
18615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18617    new_path="$unix_path"
18618  fi
18619
18620
18621  # Now try to locate executable using which
18622  new_path=`$WHICH "$new_path" 2> /dev/null`
18623
18624  if test "x$new_path" = x; then
18625    # Oops. Which didn't find the executable.
18626    # The splitting of arguments from the executable at a space might have been incorrect,
18627    # since paths with space are more likely in Windows. Give it another try with the whole
18628    # argument.
18629    path="$complete"
18630    arguments="EOL"
18631    new_path="$path"
18632
18633  windows_path="$new_path"
18634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18635    unix_path=`$CYGPATH -u "$windows_path"`
18636    new_path="$unix_path"
18637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18639    new_path="$unix_path"
18640  fi
18641
18642
18643    new_path=`$WHICH "$new_path" 2> /dev/null`
18644
18645    if test "x$new_path" = x; then
18646      # It's still not found. Now this is an unrecoverable error.
18647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18648$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18649      has_space=`$ECHO "$complete" | $GREP " "`
18650      if test "x$has_space" != x; then
18651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18653      fi
18654      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18655    fi
18656  fi
18657
18658  # Now new_path has a complete unix path to the binary
18659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18660    # Keep paths in /bin as-is, but remove trailing .exe if any
18661    new_path="${new_path/%.exe/}"
18662    # Do not save /bin paths to all_fixpath_prefixes!
18663  else
18664    # Not in mixed or Windows style, start by that.
18665    new_path=`cmd //c echo $new_path`
18666
18667  input_path="$new_path"
18668  # Check if we need to convert this using DOS-style short mode. If the path
18669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18670  # take no chances and rewrite it.
18671  # Note: m4 eats our [], so we need to use [ and ] instead.
18672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18673  if test "x$has_forbidden_chars" != x; then
18674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18676  fi
18677
18678    # Output is in $new_path
18679
18680  windows_path="$new_path"
18681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18682    unix_path=`$CYGPATH -u "$windows_path"`
18683    new_path="$unix_path"
18684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18686    new_path="$unix_path"
18687  fi
18688
18689    # remove trailing .exe if any
18690    new_path="${new_path/%.exe/}"
18691
18692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18694  fi
18695
18696  else
18697    # We're on a posix platform. Hooray! :)
18698    # First separate the path from the arguments. This will split at the first
18699    # space.
18700    complete="$PROPER_COMPILER_CC"
18701    path="${complete%% *}"
18702    tmp="$complete EOL"
18703    arguments="${tmp#* }"
18704
18705    # Cannot rely on the command "which" here since it doesn't always work.
18706    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18707    if test -z "$is_absolute_path"; then
18708      # Path to executable is not absolute. Find it.
18709      IFS_save="$IFS"
18710      IFS=:
18711      for p in $PATH; do
18712        if test -f "$p/$path" && test -x "$p/$path"; then
18713          new_path="$p/$path"
18714          break
18715        fi
18716      done
18717      IFS="$IFS_save"
18718    else
18719      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18720$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18721      new_path="$path"
18722    fi
18723
18724    if test "x$new_path" = x; then
18725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18726$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18727        has_space=`$ECHO "$complete" | $GREP " "`
18728        if test "x$has_space" != x; then
18729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18731        fi
18732        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18733      fi
18734  fi
18735
18736      # Now join together the path and the arguments once again
18737      if test "x$arguments" != xEOL; then
18738        new_complete="$new_path ${arguments% *}"
18739      else
18740        new_complete="$new_path"
18741      fi
18742
18743  if test "x$complete" != "x$new_complete"; then
18744      PROPER_COMPILER_CC="$new_complete"
18745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18746$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18747    fi
18748
18749    PATH="$RETRY_COMPILER_SAVED_PATH"
18750
18751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18752$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18753
18754    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18755        # Follow a chain of symbolic links. Use readlink
18756        # where it exists, else fall back to horribly
18757        # complicated shell code.
18758        if test "x$READLINK_TESTED" != yes; then
18759            # On MacOSX there is a readlink tool with a different
18760            # purpose than the GNU readlink tool. Check the found readlink.
18761            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18762            if test "x$ISGNU" = x; then
18763                 # A readlink that we do not know how to use.
18764                 # Are there other non-GNU readlinks out there?
18765                 READLINK_TESTED=yes
18766                 READLINK=
18767            fi
18768        fi
18769
18770        if test "x$READLINK" != x; then
18771            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18772        else
18773            # Save the current directory for restoring afterwards
18774            STARTDIR=$PWD
18775            COUNTER=0
18776            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18777            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18778            # Use the system pwd and not the shell builtin to resolve directory symlinks
18779            cd $sym_link_dir
18780            cd `$THEPWDCMD`
18781            sym_link_dir=`$THEPWDCMD`
18782            # Resolve file symlinks
18783            while test $COUNTER -lt 20; do
18784                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18785                if test "x$ISLINK" == x; then
18786                    # This is not a symbolic link! We are done!
18787                    break
18788                fi
18789                # Again resolve directory symlinks since the target of the just found
18790                # link could be in a different directory
18791                cd `$DIRNAME $ISLINK`
18792                sym_link_dir=`$THEPWDCMD`
18793                sym_link_file=`$BASENAME $ISLINK`
18794                let COUNTER=COUNTER+1
18795            done
18796            cd $STARTDIR
18797            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18798        fi
18799    fi
18800
18801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18802$as_echo "$PROPER_COMPILER_CC" >&6; }
18803    CC="$PROPER_COMPILER_CC"
18804  else
18805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18806$as_echo "no, keeping CC" >&6; }
18807    CC="$TEST_COMPILER"
18808  fi
18809
18810  COMPILER=$CC
18811  COMPILER_NAME=$COMPILER_NAME
18812
18813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18814    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18815    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18816    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18817    if test $? -ne 0; then
18818      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18819
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
18821$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18823$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18824      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18825    else
18826      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18827      COMPILER_VENDOR="Sun Studio"
18828    fi
18829  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18830    # First line typically looks something like:
18831    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18832    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18833    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18834    COMPILER_VENDOR="Microsoft CL.EXE"
18835    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18836    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18837      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18838        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18839      fi
18840    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18841      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18842        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18843      fi
18844    fi
18845  else
18846    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18847    # Check that this is likely to be GCC.
18848    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18849    if test $? -ne 0; then
18850      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18851$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18852      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18853$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18854      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18855    fi
18856
18857    # First line typically looks something like:
18858    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18859    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18860    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18861  fi
18862  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18863  CC_VERSION="$COMPILER_VERSION"
18864  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18865  CC_VENDOR="$COMPILER_VENDOR"
18866
18867  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18868$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18869
18870
18871# Now that we have resolved CC ourself, let autoconf have it's go at it
18872ac_ext=c
18873ac_cpp='$CPP $CPPFLAGS'
18874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18876ac_compiler_gnu=$ac_cv_c_compiler_gnu
18877if test -n "$ac_tool_prefix"; then
18878  for ac_prog in $CC
18879  do
18880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18881set dummy $ac_tool_prefix$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_prog_CC+:} false; then :
18885  $as_echo_n "(cached) " >&6
18886else
18887  if test -n "$CC"; then
18888  ac_cv_prog_CC="$CC" # Let the user override the test.
18889else
18890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18891for as_dir in $PATH
18892do
18893  IFS=$as_save_IFS
18894  test -z "$as_dir" && as_dir=.
18895    for ac_exec_ext in '' $ac_executable_extensions; do
18896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18897    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18899    break 2
18900  fi
18901done
18902  done
18903IFS=$as_save_IFS
18904
18905fi
18906fi
18907CC=$ac_cv_prog_CC
18908if test -n "$CC"; then
18909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18910$as_echo "$CC" >&6; }
18911else
18912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18913$as_echo "no" >&6; }
18914fi
18915
18916
18917    test -n "$CC" && break
18918  done
18919fi
18920if test -z "$CC"; then
18921  ac_ct_CC=$CC
18922  for ac_prog in $CC
18923do
18924  # Extract the first word of "$ac_prog", so it can be a program name with args.
18925set dummy $ac_prog; ac_word=$2
18926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18927$as_echo_n "checking for $ac_word... " >&6; }
18928if ${ac_cv_prog_ac_ct_CC+:} false; then :
18929  $as_echo_n "(cached) " >&6
18930else
18931  if test -n "$ac_ct_CC"; then
18932  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18933else
18934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18935for as_dir in $PATH
18936do
18937  IFS=$as_save_IFS
18938  test -z "$as_dir" && as_dir=.
18939    for ac_exec_ext in '' $ac_executable_extensions; do
18940  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18941    ac_cv_prog_ac_ct_CC="$ac_prog"
18942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18943    break 2
18944  fi
18945done
18946  done
18947IFS=$as_save_IFS
18948
18949fi
18950fi
18951ac_ct_CC=$ac_cv_prog_ac_ct_CC
18952if test -n "$ac_ct_CC"; then
18953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18954$as_echo "$ac_ct_CC" >&6; }
18955else
18956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18957$as_echo "no" >&6; }
18958fi
18959
18960
18961  test -n "$ac_ct_CC" && break
18962done
18963
18964  if test "x$ac_ct_CC" = x; then
18965    CC=""
18966  else
18967    case $cross_compiling:$ac_tool_warned in
18968yes:)
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18971ac_tool_warned=yes ;;
18972esac
18973    CC=$ac_ct_CC
18974  fi
18975fi
18976
18977
18978test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18980as_fn_error $? "no acceptable C compiler found in \$PATH
18981See \`config.log' for more details" "$LINENO" 5; }
18982
18983# Provide some information about the compiler.
18984$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18985set X $ac_compile
18986ac_compiler=$2
18987for ac_option in --version -v -V -qversion; do
18988  { { ac_try="$ac_compiler $ac_option >&5"
18989case "(($ac_try" in
18990  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18991  *) ac_try_echo=$ac_try;;
18992esac
18993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18994$as_echo "$ac_try_echo"; } >&5
18995  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18996  ac_status=$?
18997  if test -s conftest.err; then
18998    sed '10a\
18999... rest of stderr output deleted ...
19000         10q' conftest.err >conftest.er1
19001    cat conftest.er1 >&5
19002  fi
19003  rm -f conftest.er1 conftest.err
19004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19005  test $ac_status = 0; }
19006done
19007
19008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19009/* end confdefs.h.  */
19010
19011int
19012main ()
19013{
19014
19015  ;
19016  return 0;
19017}
19018_ACEOF
19019ac_clean_files_save=$ac_clean_files
19020ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19021# Try to create an executable without -o first, disregard a.out.
19022# It will help us diagnose broken compilers, and finding out an intuition
19023# of exeext.
19024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19025$as_echo_n "checking whether the C compiler works... " >&6; }
19026ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19027
19028# The possible output files:
19029ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19030
19031ac_rmfiles=
19032for ac_file in $ac_files
19033do
19034  case $ac_file in
19035    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19036    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19037  esac
19038done
19039rm -f $ac_rmfiles
19040
19041if { { ac_try="$ac_link_default"
19042case "(($ac_try" in
19043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19044  *) ac_try_echo=$ac_try;;
19045esac
19046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19047$as_echo "$ac_try_echo"; } >&5
19048  (eval "$ac_link_default") 2>&5
19049  ac_status=$?
19050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19051  test $ac_status = 0; }; then :
19052  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19053# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19054# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19055# so that the user can short-circuit this test for compilers unknown to
19056# Autoconf.
19057for ac_file in $ac_files ''
19058do
19059  test -f "$ac_file" || continue
19060  case $ac_file in
19061    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19062	;;
19063    [ab].out )
19064	# We found the default executable, but exeext='' is most
19065	# certainly right.
19066	break;;
19067    *.* )
19068	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19069	then :; else
19070	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19071	fi
19072	# We set ac_cv_exeext here because the later test for it is not
19073	# safe: cross compilers may not add the suffix if given an `-o'
19074	# argument, so we may need to know it at that point already.
19075	# Even if this section looks crufty: it has the advantage of
19076	# actually working.
19077	break;;
19078    * )
19079	break;;
19080  esac
19081done
19082test "$ac_cv_exeext" = no && ac_cv_exeext=
19083
19084else
19085  ac_file=''
19086fi
19087if test -z "$ac_file"; then :
19088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19089$as_echo "no" >&6; }
19090$as_echo "$as_me: failed program was:" >&5
19091sed 's/^/| /' conftest.$ac_ext >&5
19092
19093{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19095as_fn_error 77 "C compiler cannot create executables
19096See \`config.log' for more details" "$LINENO" 5; }
19097else
19098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19099$as_echo "yes" >&6; }
19100fi
19101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19102$as_echo_n "checking for C compiler default output file name... " >&6; }
19103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19104$as_echo "$ac_file" >&6; }
19105ac_exeext=$ac_cv_exeext
19106
19107rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19108ac_clean_files=$ac_clean_files_save
19109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19110$as_echo_n "checking for suffix of executables... " >&6; }
19111if { { ac_try="$ac_link"
19112case "(($ac_try" in
19113  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19114  *) ac_try_echo=$ac_try;;
19115esac
19116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19117$as_echo "$ac_try_echo"; } >&5
19118  (eval "$ac_link") 2>&5
19119  ac_status=$?
19120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19121  test $ac_status = 0; }; then :
19122  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19123# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19124# work properly (i.e., refer to `conftest.exe'), while it won't with
19125# `rm'.
19126for ac_file in conftest.exe conftest conftest.*; do
19127  test -f "$ac_file" || continue
19128  case $ac_file in
19129    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19130    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19131	  break;;
19132    * ) break;;
19133  esac
19134done
19135else
19136  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19138as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19139See \`config.log' for more details" "$LINENO" 5; }
19140fi
19141rm -f conftest conftest$ac_cv_exeext
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19143$as_echo "$ac_cv_exeext" >&6; }
19144
19145rm -f conftest.$ac_ext
19146EXEEXT=$ac_cv_exeext
19147ac_exeext=$EXEEXT
19148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19149/* end confdefs.h.  */
19150#include <stdio.h>
19151int
19152main ()
19153{
19154FILE *f = fopen ("conftest.out", "w");
19155 return ferror (f) || fclose (f) != 0;
19156
19157  ;
19158  return 0;
19159}
19160_ACEOF
19161ac_clean_files="$ac_clean_files conftest.out"
19162# Check that the compiler produces executables we can run.  If not, either
19163# the compiler is broken, or we cross compile.
19164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19165$as_echo_n "checking whether we are cross compiling... " >&6; }
19166if test "$cross_compiling" != yes; then
19167  { { ac_try="$ac_link"
19168case "(($ac_try" in
19169  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19170  *) ac_try_echo=$ac_try;;
19171esac
19172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19173$as_echo "$ac_try_echo"; } >&5
19174  (eval "$ac_link") 2>&5
19175  ac_status=$?
19176  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19177  test $ac_status = 0; }
19178  if { ac_try='./conftest$ac_cv_exeext'
19179  { { case "(($ac_try" in
19180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19181  *) ac_try_echo=$ac_try;;
19182esac
19183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19184$as_echo "$ac_try_echo"; } >&5
19185  (eval "$ac_try") 2>&5
19186  ac_status=$?
19187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19188  test $ac_status = 0; }; }; then
19189    cross_compiling=no
19190  else
19191    if test "$cross_compiling" = maybe; then
19192	cross_compiling=yes
19193    else
19194	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19196as_fn_error $? "cannot run C compiled programs.
19197If you meant to cross compile, use \`--host'.
19198See \`config.log' for more details" "$LINENO" 5; }
19199    fi
19200  fi
19201fi
19202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19203$as_echo "$cross_compiling" >&6; }
19204
19205rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19206ac_clean_files=$ac_clean_files_save
19207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19208$as_echo_n "checking for suffix of object files... " >&6; }
19209if ${ac_cv_objext+:} false; then :
19210  $as_echo_n "(cached) " >&6
19211else
19212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19213/* end confdefs.h.  */
19214
19215int
19216main ()
19217{
19218
19219  ;
19220  return 0;
19221}
19222_ACEOF
19223rm -f conftest.o conftest.obj
19224if { { ac_try="$ac_compile"
19225case "(($ac_try" in
19226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19227  *) ac_try_echo=$ac_try;;
19228esac
19229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19230$as_echo "$ac_try_echo"; } >&5
19231  (eval "$ac_compile") 2>&5
19232  ac_status=$?
19233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19234  test $ac_status = 0; }; then :
19235  for ac_file in conftest.o conftest.obj conftest.*; do
19236  test -f "$ac_file" || continue;
19237  case $ac_file in
19238    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19239    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19240       break;;
19241  esac
19242done
19243else
19244  $as_echo "$as_me: failed program was:" >&5
19245sed 's/^/| /' conftest.$ac_ext >&5
19246
19247{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19249as_fn_error $? "cannot compute suffix of object files: cannot compile
19250See \`config.log' for more details" "$LINENO" 5; }
19251fi
19252rm -f conftest.$ac_cv_objext conftest.$ac_ext
19253fi
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19255$as_echo "$ac_cv_objext" >&6; }
19256OBJEXT=$ac_cv_objext
19257ac_objext=$OBJEXT
19258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19259$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19260if ${ac_cv_c_compiler_gnu+:} false; then :
19261  $as_echo_n "(cached) " >&6
19262else
19263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19264/* end confdefs.h.  */
19265
19266int
19267main ()
19268{
19269#ifndef __GNUC__
19270       choke me
19271#endif
19272
19273  ;
19274  return 0;
19275}
19276_ACEOF
19277if ac_fn_c_try_compile "$LINENO"; then :
19278  ac_compiler_gnu=yes
19279else
19280  ac_compiler_gnu=no
19281fi
19282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19283ac_cv_c_compiler_gnu=$ac_compiler_gnu
19284
19285fi
19286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19287$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19288if test $ac_compiler_gnu = yes; then
19289  GCC=yes
19290else
19291  GCC=
19292fi
19293ac_test_CFLAGS=${CFLAGS+set}
19294ac_save_CFLAGS=$CFLAGS
19295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19296$as_echo_n "checking whether $CC accepts -g... " >&6; }
19297if ${ac_cv_prog_cc_g+:} false; then :
19298  $as_echo_n "(cached) " >&6
19299else
19300  ac_save_c_werror_flag=$ac_c_werror_flag
19301   ac_c_werror_flag=yes
19302   ac_cv_prog_cc_g=no
19303   CFLAGS="-g"
19304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19305/* end confdefs.h.  */
19306
19307int
19308main ()
19309{
19310
19311  ;
19312  return 0;
19313}
19314_ACEOF
19315if ac_fn_c_try_compile "$LINENO"; then :
19316  ac_cv_prog_cc_g=yes
19317else
19318  CFLAGS=""
19319      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19320/* end confdefs.h.  */
19321
19322int
19323main ()
19324{
19325
19326  ;
19327  return 0;
19328}
19329_ACEOF
19330if ac_fn_c_try_compile "$LINENO"; then :
19331
19332else
19333  ac_c_werror_flag=$ac_save_c_werror_flag
19334	 CFLAGS="-g"
19335	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19336/* end confdefs.h.  */
19337
19338int
19339main ()
19340{
19341
19342  ;
19343  return 0;
19344}
19345_ACEOF
19346if ac_fn_c_try_compile "$LINENO"; then :
19347  ac_cv_prog_cc_g=yes
19348fi
19349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19350fi
19351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19352fi
19353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19354   ac_c_werror_flag=$ac_save_c_werror_flag
19355fi
19356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19357$as_echo "$ac_cv_prog_cc_g" >&6; }
19358if test "$ac_test_CFLAGS" = set; then
19359  CFLAGS=$ac_save_CFLAGS
19360elif test $ac_cv_prog_cc_g = yes; then
19361  if test "$GCC" = yes; then
19362    CFLAGS="-g -O2"
19363  else
19364    CFLAGS="-g"
19365  fi
19366else
19367  if test "$GCC" = yes; then
19368    CFLAGS="-O2"
19369  else
19370    CFLAGS=
19371  fi
19372fi
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19374$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19375if ${ac_cv_prog_cc_c89+:} false; then :
19376  $as_echo_n "(cached) " >&6
19377else
19378  ac_cv_prog_cc_c89=no
19379ac_save_CC=$CC
19380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19381/* end confdefs.h.  */
19382#include <stdarg.h>
19383#include <stdio.h>
19384#include <sys/types.h>
19385#include <sys/stat.h>
19386/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19387struct buf { int x; };
19388FILE * (*rcsopen) (struct buf *, struct stat *, int);
19389static char *e (p, i)
19390     char **p;
19391     int i;
19392{
19393  return p[i];
19394}
19395static char *f (char * (*g) (char **, int), char **p, ...)
19396{
19397  char *s;
19398  va_list v;
19399  va_start (v,p);
19400  s = g (p, va_arg (v,int));
19401  va_end (v);
19402  return s;
19403}
19404
19405/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19406   function prototypes and stuff, but not '\xHH' hex character constants.
19407   These don't provoke an error unfortunately, instead are silently treated
19408   as 'x'.  The following induces an error, until -std is added to get
19409   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19410   array size at least.  It's necessary to write '\x00'==0 to get something
19411   that's true only with -std.  */
19412int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19413
19414/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19415   inside strings and character constants.  */
19416#define FOO(x) 'x'
19417int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19418
19419int test (int i, double x);
19420struct s1 {int (*f) (int a);};
19421struct s2 {int (*f) (double a);};
19422int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19423int argc;
19424char **argv;
19425int
19426main ()
19427{
19428return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19429  ;
19430  return 0;
19431}
19432_ACEOF
19433for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19434	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19435do
19436  CC="$ac_save_CC $ac_arg"
19437  if ac_fn_c_try_compile "$LINENO"; then :
19438  ac_cv_prog_cc_c89=$ac_arg
19439fi
19440rm -f core conftest.err conftest.$ac_objext
19441  test "x$ac_cv_prog_cc_c89" != "xno" && break
19442done
19443rm -f conftest.$ac_ext
19444CC=$ac_save_CC
19445
19446fi
19447# AC_CACHE_VAL
19448case "x$ac_cv_prog_cc_c89" in
19449  x)
19450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19451$as_echo "none needed" >&6; } ;;
19452  xno)
19453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19454$as_echo "unsupported" >&6; } ;;
19455  *)
19456    CC="$CC $ac_cv_prog_cc_c89"
19457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19458$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19459esac
19460if test "x$ac_cv_prog_cc_c89" != xno; then :
19461
19462fi
19463
19464ac_ext=cpp
19465ac_cpp='$CXXCPP $CPPFLAGS'
19466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19469
19470
19471### Locate C++ compiler (CXX)
19472
19473if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19474  # Do not probe for CC on MacOSX.
19475  COMPILER_CHECK_LIST="cl g++"
19476else
19477  COMPILER_CHECK_LIST="cl CC g++"
19478fi
19479
19480  COMPILER_NAME=C++
19481
19482  CXX=
19483  # If TOOLS_DIR is set, check for all compiler names in there first
19484  # before checking the rest of the PATH.
19485  if test -n "$TOOLS_DIR"; then
19486    PATH_save="$PATH"
19487    PATH="$TOOLS_DIR"
19488    for ac_prog in $COMPILER_CHECK_LIST
19489do
19490  # Extract the first word of "$ac_prog", so it can be a program name with args.
19491set dummy $ac_prog; ac_word=$2
19492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19493$as_echo_n "checking for $ac_word... " >&6; }
19494if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19495  $as_echo_n "(cached) " >&6
19496else
19497  case $TOOLS_DIR_CXX in
19498  [\\/]* | ?:[\\/]*)
19499  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19500  ;;
19501  *)
19502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19503for as_dir in $PATH
19504do
19505  IFS=$as_save_IFS
19506  test -z "$as_dir" && as_dir=.
19507    for ac_exec_ext in '' $ac_executable_extensions; do
19508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19509    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19511    break 2
19512  fi
19513done
19514  done
19515IFS=$as_save_IFS
19516
19517  ;;
19518esac
19519fi
19520TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19521if test -n "$TOOLS_DIR_CXX"; then
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19523$as_echo "$TOOLS_DIR_CXX" >&6; }
19524else
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526$as_echo "no" >&6; }
19527fi
19528
19529
19530  test -n "$TOOLS_DIR_CXX" && break
19531done
19532
19533    CXX=$TOOLS_DIR_CXX
19534    PATH="$PATH_save"
19535  fi
19536
19537  # AC_PATH_PROGS can't be run multiple times with the same variable,
19538  # so create a new name for this run.
19539  if test "x$CXX" = x; then
19540    for ac_prog in $COMPILER_CHECK_LIST
19541do
19542  # Extract the first word of "$ac_prog", so it can be a program name with args.
19543set dummy $ac_prog; ac_word=$2
19544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19545$as_echo_n "checking for $ac_word... " >&6; }
19546if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19547  $as_echo_n "(cached) " >&6
19548else
19549  case $POTENTIAL_CXX in
19550  [\\/]* | ?:[\\/]*)
19551  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19552  ;;
19553  *)
19554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19555for as_dir in $PATH
19556do
19557  IFS=$as_save_IFS
19558  test -z "$as_dir" && as_dir=.
19559    for ac_exec_ext in '' $ac_executable_extensions; do
19560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19561    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19563    break 2
19564  fi
19565done
19566  done
19567IFS=$as_save_IFS
19568
19569  ;;
19570esac
19571fi
19572POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19573if test -n "$POTENTIAL_CXX"; then
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19575$as_echo "$POTENTIAL_CXX" >&6; }
19576else
19577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19578$as_echo "no" >&6; }
19579fi
19580
19581
19582  test -n "$POTENTIAL_CXX" && break
19583done
19584
19585    CXX=$POTENTIAL_CXX
19586  fi
19587
19588  if test "x$CXX" = x; then
19589
19590    # Print a helpful message on how to acquire the necessary build dependency.
19591    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19592    MISSING_DEPENDENCY=devkit
19593    PKGHANDLER_COMMAND=
19594
19595    case $PKGHANDLER in
19596	apt-get)
19597                apt_help     $MISSING_DEPENDENCY ;;
19598    yum)
19599                yum_help     $MISSING_DEPENDENCY ;;
19600	port)
19601                port_help    $MISSING_DEPENDENCY ;;
19602	pkgutil)
19603                pkgutil_help $MISSING_DEPENDENCY ;;
19604	pkgadd)
19605                pkgadd_help  $MISSING_DEPENDENCY ;;
19606    * )
19607      break ;;
19608    esac
19609
19610    if test "x$PKGHANDLER_COMMAND" != x; then
19611        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19612    fi
19613
19614      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19615  fi
19616
19617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19618
19619  # First separate the path from the arguments. This will split at the first
19620  # space.
19621  complete="$CXX"
19622  path="${complete%% *}"
19623  tmp="$complete EOL"
19624  arguments="${tmp#* }"
19625
19626  # Input might be given as Windows format, start by converting to
19627  # unix format.
19628  new_path=`$CYGPATH -u "$path"`
19629
19630  # Now try to locate executable using which
19631  new_path=`$WHICH "$new_path" 2> /dev/null`
19632  # bat and cmd files are not always considered executable in cygwin causing which
19633  # to not find them
19634  if test "x$new_path" = x \
19635           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19636           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19637    new_path=`$CYGPATH -u "$path"`
19638  fi
19639  if test "x$new_path" = x; then
19640    # Oops. Which didn't find the executable.
19641    # The splitting of arguments from the executable at a space might have been incorrect,
19642    # since paths with space are more likely in Windows. Give it another try with the whole
19643    # argument.
19644    path="$complete"
19645    arguments="EOL"
19646    new_path=`$CYGPATH -u "$path"`
19647    new_path=`$WHICH "$new_path" 2> /dev/null`
19648    # bat and cmd files are not always considered executable in cygwin causing which
19649    # to not find them
19650    if test "x$new_path" = x \
19651             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19652             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19653      new_path=`$CYGPATH -u "$path"`
19654    fi
19655    if test "x$new_path" = x; then
19656      # It's still not found. Now this is an unrecoverable error.
19657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19658$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19659      has_space=`$ECHO "$complete" | $GREP " "`
19660      if test "x$has_space" != x; then
19661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19663      fi
19664      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19665    fi
19666  fi
19667
19668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19671  # "foo.exe" is OK but "foo" is an error.
19672  #
19673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19674  # It is also a way to make sure we got the proper file name for the real test later on.
19675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19676  if test "x$test_shortpath" = x; then
19677    # Short path failed, file does not exist as specified.
19678    # Try adding .exe or .cmd
19679    if test -f "${new_path}.exe"; then
19680       input_to_shortpath="${new_path}.exe"
19681    elif test -f "${new_path}.cmd"; then
19682       input_to_shortpath="${new_path}.cmd"
19683    else
19684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19685$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19686      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19687$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19688      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19689    fi
19690  else
19691    input_to_shortpath="$new_path"
19692  fi
19693
19694  # Call helper function which possibly converts this using DOS-style short mode.
19695  # If so, the updated path is stored in $new_path.
19696  new_path="$input_to_shortpath"
19697
19698  input_path="$input_to_shortpath"
19699  # Check if we need to convert this using DOS-style short mode. If the path
19700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19701  # take no chances and rewrite it.
19702  # Note: m4 eats our [], so we need to use [ and ] instead.
19703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19704  if test "x$has_forbidden_chars" != x; then
19705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19709      # Going to short mode and back again did indeed matter. Since short mode is
19710      # case insensitive, let's make it lowercase to improve readability.
19711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19712      # Now convert it back to Unix-stile (cygpath)
19713      input_path=`$CYGPATH -u "$shortmode_path"`
19714      new_path="$input_path"
19715    fi
19716  fi
19717
19718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19719  if test "x$test_cygdrive_prefix" = x; then
19720    # As a simple fix, exclude /usr/bin since it's not a real path.
19721    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19723      # a path prefixed by /cygdrive for fixpath to work.
19724      new_path="$CYGWIN_ROOT_PATH$input_path"
19725    fi
19726  fi
19727
19728  # remove trailing .exe if any
19729  new_path="${new_path/%.exe/}"
19730
19731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19732
19733  # First separate the path from the arguments. This will split at the first
19734  # space.
19735  complete="$CXX"
19736  path="${complete%% *}"
19737  tmp="$complete EOL"
19738  arguments="${tmp#* }"
19739
19740  # Input might be given as Windows format, start by converting to
19741  # unix format.
19742  new_path="$path"
19743
19744  windows_path="$new_path"
19745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19746    unix_path=`$CYGPATH -u "$windows_path"`
19747    new_path="$unix_path"
19748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19750    new_path="$unix_path"
19751  fi
19752
19753
19754  # Now try to locate executable using which
19755  new_path=`$WHICH "$new_path" 2> /dev/null`
19756
19757  if test "x$new_path" = x; then
19758    # Oops. Which didn't find the executable.
19759    # The splitting of arguments from the executable at a space might have been incorrect,
19760    # since paths with space are more likely in Windows. Give it another try with the whole
19761    # argument.
19762    path="$complete"
19763    arguments="EOL"
19764    new_path="$path"
19765
19766  windows_path="$new_path"
19767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19768    unix_path=`$CYGPATH -u "$windows_path"`
19769    new_path="$unix_path"
19770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19772    new_path="$unix_path"
19773  fi
19774
19775
19776    new_path=`$WHICH "$new_path" 2> /dev/null`
19777
19778    if test "x$new_path" = x; then
19779      # It's still not found. Now this is an unrecoverable error.
19780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19781$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19782      has_space=`$ECHO "$complete" | $GREP " "`
19783      if test "x$has_space" != x; then
19784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19786      fi
19787      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19788    fi
19789  fi
19790
19791  # Now new_path has a complete unix path to the binary
19792  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19793    # Keep paths in /bin as-is, but remove trailing .exe if any
19794    new_path="${new_path/%.exe/}"
19795    # Do not save /bin paths to all_fixpath_prefixes!
19796  else
19797    # Not in mixed or Windows style, start by that.
19798    new_path=`cmd //c echo $new_path`
19799
19800  input_path="$new_path"
19801  # Check if we need to convert this using DOS-style short mode. If the path
19802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19803  # take no chances and rewrite it.
19804  # Note: m4 eats our [], so we need to use [ and ] instead.
19805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19806  if test "x$has_forbidden_chars" != x; then
19807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19809  fi
19810
19811    # Output is in $new_path
19812
19813  windows_path="$new_path"
19814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19815    unix_path=`$CYGPATH -u "$windows_path"`
19816    new_path="$unix_path"
19817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19819    new_path="$unix_path"
19820  fi
19821
19822    # remove trailing .exe if any
19823    new_path="${new_path/%.exe/}"
19824
19825    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19826    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19827  fi
19828
19829  else
19830    # We're on a posix platform. Hooray! :)
19831    # First separate the path from the arguments. This will split at the first
19832    # space.
19833    complete="$CXX"
19834    path="${complete%% *}"
19835    tmp="$complete EOL"
19836    arguments="${tmp#* }"
19837
19838    # Cannot rely on the command "which" here since it doesn't always work.
19839    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19840    if test -z "$is_absolute_path"; then
19841      # Path to executable is not absolute. Find it.
19842      IFS_save="$IFS"
19843      IFS=:
19844      for p in $PATH; do
19845        if test -f "$p/$path" && test -x "$p/$path"; then
19846          new_path="$p/$path"
19847          break
19848        fi
19849      done
19850      IFS="$IFS_save"
19851    else
19852      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
19853$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
19854      new_path="$path"
19855    fi
19856
19857    if test "x$new_path" = x; then
19858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19859$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19860        has_space=`$ECHO "$complete" | $GREP " "`
19861        if test "x$has_space" != x; then
19862          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19864        fi
19865        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19866      fi
19867  fi
19868
19869      # Now join together the path and the arguments once again
19870      if test "x$arguments" != xEOL; then
19871        new_complete="$new_path ${arguments% *}"
19872      else
19873        new_complete="$new_path"
19874      fi
19875
19876  if test "x$complete" != "x$new_complete"; then
19877      CXX="$new_complete"
19878      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19879$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19880    fi
19881
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19883$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19884  TEST_COMPILER="$CXX"
19885
19886    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19887        # Follow a chain of symbolic links. Use readlink
19888        # where it exists, else fall back to horribly
19889        # complicated shell code.
19890        if test "x$READLINK_TESTED" != yes; then
19891            # On MacOSX there is a readlink tool with a different
19892            # purpose than the GNU readlink tool. Check the found readlink.
19893            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19894            if test "x$ISGNU" = x; then
19895                 # A readlink that we do not know how to use.
19896                 # Are there other non-GNU readlinks out there?
19897                 READLINK_TESTED=yes
19898                 READLINK=
19899            fi
19900        fi
19901
19902        if test "x$READLINK" != x; then
19903            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19904        else
19905            # Save the current directory for restoring afterwards
19906            STARTDIR=$PWD
19907            COUNTER=0
19908            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19909            sym_link_file=`$BASENAME $TEST_COMPILER`
19910            # Use the system pwd and not the shell builtin to resolve directory symlinks
19911            cd $sym_link_dir
19912            cd `$THEPWDCMD`
19913            sym_link_dir=`$THEPWDCMD`
19914            # Resolve file symlinks
19915            while test $COUNTER -lt 20; do
19916                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19917                if test "x$ISLINK" == x; then
19918                    # This is not a symbolic link! We are done!
19919                    break
19920                fi
19921                # Again resolve directory symlinks since the target of the just found
19922                # link could be in a different directory
19923                cd `$DIRNAME $ISLINK`
19924                sym_link_dir=`$THEPWDCMD`
19925                sym_link_file=`$BASENAME $ISLINK`
19926                let COUNTER=COUNTER+1
19927            done
19928            cd $STARTDIR
19929            TEST_COMPILER=$sym_link_dir/$sym_link_file
19930        fi
19931    fi
19932
19933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19934$as_echo "$TEST_COMPILER" >&6; }
19935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19936$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19937
19938  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19939  if test "x$COMPILER_BASENAME" = "xccache"; then
19940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19941$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19942    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19943    # We want to control ccache invocation ourselves, so ignore this cc and try
19944    # searching again.
19945
19946    # Remove the path to the fake ccache cc from the PATH
19947    RETRY_COMPILER_SAVED_PATH="$PATH"
19948    COMPILER_DIRNAME=`$DIRNAME $CXX`
19949    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19950
19951    # Try again looking for our compiler
19952    if test -n "$ac_tool_prefix"; then
19953  for ac_prog in $COMPILER_CHECK_LIST
19954  do
19955    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19956set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19958$as_echo_n "checking for $ac_word... " >&6; }
19959if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
19960  $as_echo_n "(cached) " >&6
19961else
19962  if test -n "$PROPER_COMPILER_CXX"; then
19963  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19964else
19965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19966for as_dir in $PATH
19967do
19968  IFS=$as_save_IFS
19969  test -z "$as_dir" && as_dir=.
19970    for ac_exec_ext in '' $ac_executable_extensions; do
19971  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19972    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19974    break 2
19975  fi
19976done
19977  done
19978IFS=$as_save_IFS
19979
19980fi
19981fi
19982PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19983if test -n "$PROPER_COMPILER_CXX"; then
19984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19985$as_echo "$PROPER_COMPILER_CXX" >&6; }
19986else
19987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19988$as_echo "no" >&6; }
19989fi
19990
19991
19992    test -n "$PROPER_COMPILER_CXX" && break
19993  done
19994fi
19995if test -z "$PROPER_COMPILER_CXX"; then
19996  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19997  for ac_prog in $COMPILER_CHECK_LIST
19998do
19999  # Extract the first word of "$ac_prog", so it can be a program name with args.
20000set dummy $ac_prog; ac_word=$2
20001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20002$as_echo_n "checking for $ac_word... " >&6; }
20003if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20004  $as_echo_n "(cached) " >&6
20005else
20006  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20007  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20008else
20009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20010for as_dir in $PATH
20011do
20012  IFS=$as_save_IFS
20013  test -z "$as_dir" && as_dir=.
20014    for ac_exec_ext in '' $ac_executable_extensions; do
20015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20016    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20018    break 2
20019  fi
20020done
20021  done
20022IFS=$as_save_IFS
20023
20024fi
20025fi
20026ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20027if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20029$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20030else
20031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20032$as_echo "no" >&6; }
20033fi
20034
20035
20036  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20037done
20038
20039  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20040    PROPER_COMPILER_CXX=""
20041  else
20042    case $cross_compiling:$ac_tool_warned in
20043yes:)
20044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20046ac_tool_warned=yes ;;
20047esac
20048    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20049  fi
20050fi
20051
20052
20053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20054
20055  # First separate the path from the arguments. This will split at the first
20056  # space.
20057  complete="$PROPER_COMPILER_CXX"
20058  path="${complete%% *}"
20059  tmp="$complete EOL"
20060  arguments="${tmp#* }"
20061
20062  # Input might be given as Windows format, start by converting to
20063  # unix format.
20064  new_path=`$CYGPATH -u "$path"`
20065
20066  # Now try to locate executable using which
20067  new_path=`$WHICH "$new_path" 2> /dev/null`
20068  # bat and cmd files are not always considered executable in cygwin causing which
20069  # to not find them
20070  if test "x$new_path" = x \
20071           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20072           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20073    new_path=`$CYGPATH -u "$path"`
20074  fi
20075  if test "x$new_path" = x; then
20076    # Oops. Which didn't find the executable.
20077    # The splitting of arguments from the executable at a space might have been incorrect,
20078    # since paths with space are more likely in Windows. Give it another try with the whole
20079    # argument.
20080    path="$complete"
20081    arguments="EOL"
20082    new_path=`$CYGPATH -u "$path"`
20083    new_path=`$WHICH "$new_path" 2> /dev/null`
20084    # bat and cmd files are not always considered executable in cygwin causing which
20085    # to not find them
20086    if test "x$new_path" = x \
20087             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20088             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20089      new_path=`$CYGPATH -u "$path"`
20090    fi
20091    if test "x$new_path" = x; then
20092      # It's still not found. Now this is an unrecoverable error.
20093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20094$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20095      has_space=`$ECHO "$complete" | $GREP " "`
20096      if test "x$has_space" != x; then
20097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20099      fi
20100      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20101    fi
20102  fi
20103
20104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20107  # "foo.exe" is OK but "foo" is an error.
20108  #
20109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20110  # It is also a way to make sure we got the proper file name for the real test later on.
20111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20112  if test "x$test_shortpath" = x; then
20113    # Short path failed, file does not exist as specified.
20114    # Try adding .exe or .cmd
20115    if test -f "${new_path}.exe"; then
20116       input_to_shortpath="${new_path}.exe"
20117    elif test -f "${new_path}.cmd"; then
20118       input_to_shortpath="${new_path}.cmd"
20119    else
20120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20121$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20122      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20123$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20124      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20125    fi
20126  else
20127    input_to_shortpath="$new_path"
20128  fi
20129
20130  # Call helper function which possibly converts this using DOS-style short mode.
20131  # If so, the updated path is stored in $new_path.
20132  new_path="$input_to_shortpath"
20133
20134  input_path="$input_to_shortpath"
20135  # Check if we need to convert this using DOS-style short mode. If the path
20136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20137  # take no chances and rewrite it.
20138  # Note: m4 eats our [], so we need to use [ and ] instead.
20139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20140  if test "x$has_forbidden_chars" != x; then
20141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20145      # Going to short mode and back again did indeed matter. Since short mode is
20146      # case insensitive, let's make it lowercase to improve readability.
20147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20148      # Now convert it back to Unix-stile (cygpath)
20149      input_path=`$CYGPATH -u "$shortmode_path"`
20150      new_path="$input_path"
20151    fi
20152  fi
20153
20154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20155  if test "x$test_cygdrive_prefix" = x; then
20156    # As a simple fix, exclude /usr/bin since it's not a real path.
20157    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20159      # a path prefixed by /cygdrive for fixpath to work.
20160      new_path="$CYGWIN_ROOT_PATH$input_path"
20161    fi
20162  fi
20163
20164  # remove trailing .exe if any
20165  new_path="${new_path/%.exe/}"
20166
20167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168
20169  # First separate the path from the arguments. This will split at the first
20170  # space.
20171  complete="$PROPER_COMPILER_CXX"
20172  path="${complete%% *}"
20173  tmp="$complete EOL"
20174  arguments="${tmp#* }"
20175
20176  # Input might be given as Windows format, start by converting to
20177  # unix format.
20178  new_path="$path"
20179
20180  windows_path="$new_path"
20181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20182    unix_path=`$CYGPATH -u "$windows_path"`
20183    new_path="$unix_path"
20184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20186    new_path="$unix_path"
20187  fi
20188
20189
20190  # Now try to locate executable using which
20191  new_path=`$WHICH "$new_path" 2> /dev/null`
20192
20193  if test "x$new_path" = x; then
20194    # Oops. Which didn't find the executable.
20195    # The splitting of arguments from the executable at a space might have been incorrect,
20196    # since paths with space are more likely in Windows. Give it another try with the whole
20197    # argument.
20198    path="$complete"
20199    arguments="EOL"
20200    new_path="$path"
20201
20202  windows_path="$new_path"
20203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20204    unix_path=`$CYGPATH -u "$windows_path"`
20205    new_path="$unix_path"
20206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20208    new_path="$unix_path"
20209  fi
20210
20211
20212    new_path=`$WHICH "$new_path" 2> /dev/null`
20213
20214    if test "x$new_path" = x; then
20215      # It's still not found. Now this is an unrecoverable error.
20216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20217$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20218      has_space=`$ECHO "$complete" | $GREP " "`
20219      if test "x$has_space" != x; then
20220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20222      fi
20223      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20224    fi
20225  fi
20226
20227  # Now new_path has a complete unix path to the binary
20228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20229    # Keep paths in /bin as-is, but remove trailing .exe if any
20230    new_path="${new_path/%.exe/}"
20231    # Do not save /bin paths to all_fixpath_prefixes!
20232  else
20233    # Not in mixed or Windows style, start by that.
20234    new_path=`cmd //c echo $new_path`
20235
20236  input_path="$new_path"
20237  # Check if we need to convert this using DOS-style short mode. If the path
20238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20239  # take no chances and rewrite it.
20240  # Note: m4 eats our [], so we need to use [ and ] instead.
20241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20242  if test "x$has_forbidden_chars" != x; then
20243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20245  fi
20246
20247    # Output is in $new_path
20248
20249  windows_path="$new_path"
20250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20251    unix_path=`$CYGPATH -u "$windows_path"`
20252    new_path="$unix_path"
20253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20255    new_path="$unix_path"
20256  fi
20257
20258    # remove trailing .exe if any
20259    new_path="${new_path/%.exe/}"
20260
20261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20263  fi
20264
20265  else
20266    # We're on a posix platform. Hooray! :)
20267    # First separate the path from the arguments. This will split at the first
20268    # space.
20269    complete="$PROPER_COMPILER_CXX"
20270    path="${complete%% *}"
20271    tmp="$complete EOL"
20272    arguments="${tmp#* }"
20273
20274    # Cannot rely on the command "which" here since it doesn't always work.
20275    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20276    if test -z "$is_absolute_path"; then
20277      # Path to executable is not absolute. Find it.
20278      IFS_save="$IFS"
20279      IFS=:
20280      for p in $PATH; do
20281        if test -f "$p/$path" && test -x "$p/$path"; then
20282          new_path="$p/$path"
20283          break
20284        fi
20285      done
20286      IFS="$IFS_save"
20287    else
20288      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20289$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20290      new_path="$path"
20291    fi
20292
20293    if test "x$new_path" = x; then
20294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20295$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20296        has_space=`$ECHO "$complete" | $GREP " "`
20297        if test "x$has_space" != x; then
20298          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20299$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20300        fi
20301        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20302      fi
20303  fi
20304
20305      # Now join together the path and the arguments once again
20306      if test "x$arguments" != xEOL; then
20307        new_complete="$new_path ${arguments% *}"
20308      else
20309        new_complete="$new_path"
20310      fi
20311
20312  if test "x$complete" != "x$new_complete"; then
20313      PROPER_COMPILER_CXX="$new_complete"
20314      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20315$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20316    fi
20317
20318    PATH="$RETRY_COMPILER_SAVED_PATH"
20319
20320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20321$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20322
20323    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20324        # Follow a chain of symbolic links. Use readlink
20325        # where it exists, else fall back to horribly
20326        # complicated shell code.
20327        if test "x$READLINK_TESTED" != yes; then
20328            # On MacOSX there is a readlink tool with a different
20329            # purpose than the GNU readlink tool. Check the found readlink.
20330            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20331            if test "x$ISGNU" = x; then
20332                 # A readlink that we do not know how to use.
20333                 # Are there other non-GNU readlinks out there?
20334                 READLINK_TESTED=yes
20335                 READLINK=
20336            fi
20337        fi
20338
20339        if test "x$READLINK" != x; then
20340            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20341        else
20342            # Save the current directory for restoring afterwards
20343            STARTDIR=$PWD
20344            COUNTER=0
20345            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20346            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20347            # Use the system pwd and not the shell builtin to resolve directory symlinks
20348            cd $sym_link_dir
20349            cd `$THEPWDCMD`
20350            sym_link_dir=`$THEPWDCMD`
20351            # Resolve file symlinks
20352            while test $COUNTER -lt 20; do
20353                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20354                if test "x$ISLINK" == x; then
20355                    # This is not a symbolic link! We are done!
20356                    break
20357                fi
20358                # Again resolve directory symlinks since the target of the just found
20359                # link could be in a different directory
20360                cd `$DIRNAME $ISLINK`
20361                sym_link_dir=`$THEPWDCMD`
20362                sym_link_file=`$BASENAME $ISLINK`
20363                let COUNTER=COUNTER+1
20364            done
20365            cd $STARTDIR
20366            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20367        fi
20368    fi
20369
20370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20371$as_echo "$PROPER_COMPILER_CXX" >&6; }
20372    CXX="$PROPER_COMPILER_CXX"
20373  else
20374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20375$as_echo "no, keeping CXX" >&6; }
20376    CXX="$TEST_COMPILER"
20377  fi
20378
20379  COMPILER=$CXX
20380  COMPILER_NAME=$COMPILER_NAME
20381
20382  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20383    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20384    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20385    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20386    if test $? -ne 0; then
20387      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20388
20389      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
20390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20392$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20393      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20394    else
20395      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20396      COMPILER_VENDOR="Sun Studio"
20397    fi
20398  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20399    # First line typically looks something like:
20400    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20401    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20402    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20403    COMPILER_VENDOR="Microsoft CL.EXE"
20404    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20405    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20406      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20407        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20408      fi
20409    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20410      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20411        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20412      fi
20413    fi
20414  else
20415    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20416    # Check that this is likely to be GCC.
20417    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20418    if test $? -ne 0; then
20419      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20420$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20421      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20422$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20423      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20424    fi
20425
20426    # First line typically looks something like:
20427    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20428    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20429    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20430  fi
20431  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20432  CXX_VERSION="$COMPILER_VERSION"
20433  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20434  CXX_VENDOR="$COMPILER_VENDOR"
20435
20436  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20437$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20438
20439
20440# Now that we have resolved CXX ourself, let autoconf have it's go at it
20441ac_ext=cpp
20442ac_cpp='$CXXCPP $CPPFLAGS'
20443ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20444ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20445ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20446if test -z "$CXX"; then
20447  if test -n "$CCC"; then
20448    CXX=$CCC
20449  else
20450    if test -n "$ac_tool_prefix"; then
20451  for ac_prog in $CXX
20452  do
20453    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20454set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20456$as_echo_n "checking for $ac_word... " >&6; }
20457if ${ac_cv_prog_CXX+:} false; then :
20458  $as_echo_n "(cached) " >&6
20459else
20460  if test -n "$CXX"; then
20461  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20462else
20463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20464for as_dir in $PATH
20465do
20466  IFS=$as_save_IFS
20467  test -z "$as_dir" && as_dir=.
20468    for ac_exec_ext in '' $ac_executable_extensions; do
20469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20470    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20472    break 2
20473  fi
20474done
20475  done
20476IFS=$as_save_IFS
20477
20478fi
20479fi
20480CXX=$ac_cv_prog_CXX
20481if test -n "$CXX"; then
20482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20483$as_echo "$CXX" >&6; }
20484else
20485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20486$as_echo "no" >&6; }
20487fi
20488
20489
20490    test -n "$CXX" && break
20491  done
20492fi
20493if test -z "$CXX"; then
20494  ac_ct_CXX=$CXX
20495  for ac_prog in $CXX
20496do
20497  # Extract the first word of "$ac_prog", so it can be a program name with args.
20498set dummy $ac_prog; ac_word=$2
20499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20500$as_echo_n "checking for $ac_word... " >&6; }
20501if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20502  $as_echo_n "(cached) " >&6
20503else
20504  if test -n "$ac_ct_CXX"; then
20505  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20506else
20507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20508for as_dir in $PATH
20509do
20510  IFS=$as_save_IFS
20511  test -z "$as_dir" && as_dir=.
20512    for ac_exec_ext in '' $ac_executable_extensions; do
20513  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20514    ac_cv_prog_ac_ct_CXX="$ac_prog"
20515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20516    break 2
20517  fi
20518done
20519  done
20520IFS=$as_save_IFS
20521
20522fi
20523fi
20524ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20525if test -n "$ac_ct_CXX"; then
20526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20527$as_echo "$ac_ct_CXX" >&6; }
20528else
20529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20530$as_echo "no" >&6; }
20531fi
20532
20533
20534  test -n "$ac_ct_CXX" && break
20535done
20536
20537  if test "x$ac_ct_CXX" = x; then
20538    CXX="g++"
20539  else
20540    case $cross_compiling:$ac_tool_warned in
20541yes:)
20542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20544ac_tool_warned=yes ;;
20545esac
20546    CXX=$ac_ct_CXX
20547  fi
20548fi
20549
20550  fi
20551fi
20552# Provide some information about the compiler.
20553$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20554set X $ac_compile
20555ac_compiler=$2
20556for ac_option in --version -v -V -qversion; do
20557  { { ac_try="$ac_compiler $ac_option >&5"
20558case "(($ac_try" in
20559  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20560  *) ac_try_echo=$ac_try;;
20561esac
20562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20563$as_echo "$ac_try_echo"; } >&5
20564  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20565  ac_status=$?
20566  if test -s conftest.err; then
20567    sed '10a\
20568... rest of stderr output deleted ...
20569         10q' conftest.err >conftest.er1
20570    cat conftest.er1 >&5
20571  fi
20572  rm -f conftest.er1 conftest.err
20573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20574  test $ac_status = 0; }
20575done
20576
20577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20578$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20579if ${ac_cv_cxx_compiler_gnu+:} false; then :
20580  $as_echo_n "(cached) " >&6
20581else
20582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20583/* end confdefs.h.  */
20584
20585int
20586main ()
20587{
20588#ifndef __GNUC__
20589       choke me
20590#endif
20591
20592  ;
20593  return 0;
20594}
20595_ACEOF
20596if ac_fn_cxx_try_compile "$LINENO"; then :
20597  ac_compiler_gnu=yes
20598else
20599  ac_compiler_gnu=no
20600fi
20601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20602ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20603
20604fi
20605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20606$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20607if test $ac_compiler_gnu = yes; then
20608  GXX=yes
20609else
20610  GXX=
20611fi
20612ac_test_CXXFLAGS=${CXXFLAGS+set}
20613ac_save_CXXFLAGS=$CXXFLAGS
20614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20615$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20616if ${ac_cv_prog_cxx_g+:} false; then :
20617  $as_echo_n "(cached) " >&6
20618else
20619  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20620   ac_cxx_werror_flag=yes
20621   ac_cv_prog_cxx_g=no
20622   CXXFLAGS="-g"
20623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624/* end confdefs.h.  */
20625
20626int
20627main ()
20628{
20629
20630  ;
20631  return 0;
20632}
20633_ACEOF
20634if ac_fn_cxx_try_compile "$LINENO"; then :
20635  ac_cv_prog_cxx_g=yes
20636else
20637  CXXFLAGS=""
20638      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20639/* end confdefs.h.  */
20640
20641int
20642main ()
20643{
20644
20645  ;
20646  return 0;
20647}
20648_ACEOF
20649if ac_fn_cxx_try_compile "$LINENO"; then :
20650
20651else
20652  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20653	 CXXFLAGS="-g"
20654	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20655/* end confdefs.h.  */
20656
20657int
20658main ()
20659{
20660
20661  ;
20662  return 0;
20663}
20664_ACEOF
20665if ac_fn_cxx_try_compile "$LINENO"; then :
20666  ac_cv_prog_cxx_g=yes
20667fi
20668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20669fi
20670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20671fi
20672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20673   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20674fi
20675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20676$as_echo "$ac_cv_prog_cxx_g" >&6; }
20677if test "$ac_test_CXXFLAGS" = set; then
20678  CXXFLAGS=$ac_save_CXXFLAGS
20679elif test $ac_cv_prog_cxx_g = yes; then
20680  if test "$GXX" = yes; then
20681    CXXFLAGS="-g -O2"
20682  else
20683    CXXFLAGS="-g"
20684  fi
20685else
20686  if test "$GXX" = yes; then
20687    CXXFLAGS="-O2"
20688  else
20689    CXXFLAGS=
20690  fi
20691fi
20692ac_ext=cpp
20693ac_cpp='$CXXCPP $CPPFLAGS'
20694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20697
20698
20699### Locate other tools
20700
20701if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20702    ac_ext=m
20703ac_cpp='$OBJCPP $CPPFLAGS'
20704ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20705ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20706ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20707if test -n "$ac_tool_prefix"; then
20708  for ac_prog in gcc objcc objc cc CC
20709  do
20710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20713$as_echo_n "checking for $ac_word... " >&6; }
20714if ${ac_cv_prog_OBJC+:} false; then :
20715  $as_echo_n "(cached) " >&6
20716else
20717  if test -n "$OBJC"; then
20718  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20719else
20720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20721for as_dir in $PATH
20722do
20723  IFS=$as_save_IFS
20724  test -z "$as_dir" && as_dir=.
20725    for ac_exec_ext in '' $ac_executable_extensions; do
20726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20727    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20729    break 2
20730  fi
20731done
20732  done
20733IFS=$as_save_IFS
20734
20735fi
20736fi
20737OBJC=$ac_cv_prog_OBJC
20738if test -n "$OBJC"; then
20739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20740$as_echo "$OBJC" >&6; }
20741else
20742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20743$as_echo "no" >&6; }
20744fi
20745
20746
20747    test -n "$OBJC" && break
20748  done
20749fi
20750if test -z "$OBJC"; then
20751  ac_ct_OBJC=$OBJC
20752  for ac_prog in gcc objcc objc cc CC
20753do
20754  # Extract the first word of "$ac_prog", so it can be a program name with args.
20755set dummy $ac_prog; ac_word=$2
20756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20757$as_echo_n "checking for $ac_word... " >&6; }
20758if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20759  $as_echo_n "(cached) " >&6
20760else
20761  if test -n "$ac_ct_OBJC"; then
20762  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20763else
20764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20765for as_dir in $PATH
20766do
20767  IFS=$as_save_IFS
20768  test -z "$as_dir" && as_dir=.
20769    for ac_exec_ext in '' $ac_executable_extensions; do
20770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20771    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20773    break 2
20774  fi
20775done
20776  done
20777IFS=$as_save_IFS
20778
20779fi
20780fi
20781ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20782if test -n "$ac_ct_OBJC"; then
20783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20784$as_echo "$ac_ct_OBJC" >&6; }
20785else
20786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20787$as_echo "no" >&6; }
20788fi
20789
20790
20791  test -n "$ac_ct_OBJC" && break
20792done
20793
20794  if test "x$ac_ct_OBJC" = x; then
20795    OBJC="gcc"
20796  else
20797    case $cross_compiling:$ac_tool_warned in
20798yes:)
20799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20801ac_tool_warned=yes ;;
20802esac
20803    OBJC=$ac_ct_OBJC
20804  fi
20805fi
20806
20807# Provide some information about the compiler.
20808$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20809set X $ac_compile
20810ac_compiler=$2
20811for ac_option in --version -v -V -qversion; do
20812  { { ac_try="$ac_compiler $ac_option >&5"
20813case "(($ac_try" in
20814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20815  *) ac_try_echo=$ac_try;;
20816esac
20817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20818$as_echo "$ac_try_echo"; } >&5
20819  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20820  ac_status=$?
20821  if test -s conftest.err; then
20822    sed '10a\
20823... rest of stderr output deleted ...
20824         10q' conftest.err >conftest.er1
20825    cat conftest.er1 >&5
20826  fi
20827  rm -f conftest.er1 conftest.err
20828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20829  test $ac_status = 0; }
20830done
20831
20832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20833$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20834if ${ac_cv_objc_compiler_gnu+:} false; then :
20835  $as_echo_n "(cached) " >&6
20836else
20837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20838/* end confdefs.h.  */
20839
20840int
20841main ()
20842{
20843#ifndef __GNUC__
20844       choke me
20845#endif
20846
20847  ;
20848  return 0;
20849}
20850_ACEOF
20851if ac_fn_objc_try_compile "$LINENO"; then :
20852  ac_compiler_gnu=yes
20853else
20854  ac_compiler_gnu=no
20855fi
20856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20857ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20858
20859fi
20860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20861$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20862if test $ac_compiler_gnu = yes; then
20863  GOBJC=yes
20864else
20865  GOBJC=
20866fi
20867ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20868ac_save_OBJCFLAGS=$OBJCFLAGS
20869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20870$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20871if ${ac_cv_prog_objc_g+:} false; then :
20872  $as_echo_n "(cached) " >&6
20873else
20874  ac_save_objc_werror_flag=$ac_objc_werror_flag
20875   ac_objc_werror_flag=yes
20876   ac_cv_prog_objc_g=no
20877   OBJCFLAGS="-g"
20878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20879/* end confdefs.h.  */
20880
20881int
20882main ()
20883{
20884
20885  ;
20886  return 0;
20887}
20888_ACEOF
20889if ac_fn_objc_try_compile "$LINENO"; then :
20890  ac_cv_prog_objc_g=yes
20891else
20892  OBJCFLAGS=""
20893      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20894/* end confdefs.h.  */
20895
20896int
20897main ()
20898{
20899
20900  ;
20901  return 0;
20902}
20903_ACEOF
20904if ac_fn_objc_try_compile "$LINENO"; then :
20905
20906else
20907  ac_objc_werror_flag=$ac_save_objc_werror_flag
20908	 OBJCFLAGS="-g"
20909	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20910/* end confdefs.h.  */
20911
20912int
20913main ()
20914{
20915
20916  ;
20917  return 0;
20918}
20919_ACEOF
20920if ac_fn_objc_try_compile "$LINENO"; then :
20921  ac_cv_prog_objc_g=yes
20922fi
20923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20924fi
20925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20926fi
20927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20928   ac_objc_werror_flag=$ac_save_objc_werror_flag
20929fi
20930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20931$as_echo "$ac_cv_prog_objc_g" >&6; }
20932if test "$ac_test_OBJCFLAGS" = set; then
20933  OBJCFLAGS=$ac_save_OBJCFLAGS
20934elif test $ac_cv_prog_objc_g = yes; then
20935  if test "$GOBJC" = yes; then
20936    OBJCFLAGS="-g -O2"
20937  else
20938    OBJCFLAGS="-g"
20939  fi
20940else
20941  if test "$GOBJC" = yes; then
20942    OBJCFLAGS="-O2"
20943  else
20944    OBJCFLAGS=
20945  fi
20946fi
20947ac_ext=cpp
20948ac_cpp='$CXXCPP $CPPFLAGS'
20949ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20950ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20951ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20952
20953
20954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20955
20956  # First separate the path from the arguments. This will split at the first
20957  # space.
20958  complete="$OBJC"
20959  path="${complete%% *}"
20960  tmp="$complete EOL"
20961  arguments="${tmp#* }"
20962
20963  # Input might be given as Windows format, start by converting to
20964  # unix format.
20965  new_path=`$CYGPATH -u "$path"`
20966
20967  # Now try to locate executable using which
20968  new_path=`$WHICH "$new_path" 2> /dev/null`
20969  # bat and cmd files are not always considered executable in cygwin causing which
20970  # to not find them
20971  if test "x$new_path" = x \
20972           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20973           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20974    new_path=`$CYGPATH -u "$path"`
20975  fi
20976  if test "x$new_path" = x; then
20977    # Oops. Which didn't find the executable.
20978    # The splitting of arguments from the executable at a space might have been incorrect,
20979    # since paths with space are more likely in Windows. Give it another try with the whole
20980    # argument.
20981    path="$complete"
20982    arguments="EOL"
20983    new_path=`$CYGPATH -u "$path"`
20984    new_path=`$WHICH "$new_path" 2> /dev/null`
20985    # bat and cmd files are not always considered executable in cygwin causing which
20986    # to not find them
20987    if test "x$new_path" = x \
20988             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20989             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20990      new_path=`$CYGPATH -u "$path"`
20991    fi
20992    if test "x$new_path" = x; then
20993      # It's still not found. Now this is an unrecoverable error.
20994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20995$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20996      has_space=`$ECHO "$complete" | $GREP " "`
20997      if test "x$has_space" != x; then
20998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21000      fi
21001      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21002    fi
21003  fi
21004
21005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21008  # "foo.exe" is OK but "foo" is an error.
21009  #
21010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21011  # It is also a way to make sure we got the proper file name for the real test later on.
21012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21013  if test "x$test_shortpath" = x; then
21014    # Short path failed, file does not exist as specified.
21015    # Try adding .exe or .cmd
21016    if test -f "${new_path}.exe"; then
21017       input_to_shortpath="${new_path}.exe"
21018    elif test -f "${new_path}.cmd"; then
21019       input_to_shortpath="${new_path}.cmd"
21020    else
21021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21022$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21025      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21026    fi
21027  else
21028    input_to_shortpath="$new_path"
21029  fi
21030
21031  # Call helper function which possibly converts this using DOS-style short mode.
21032  # If so, the updated path is stored in $new_path.
21033  new_path="$input_to_shortpath"
21034
21035  input_path="$input_to_shortpath"
21036  # Check if we need to convert this using DOS-style short mode. If the path
21037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21038  # take no chances and rewrite it.
21039  # Note: m4 eats our [], so we need to use [ and ] instead.
21040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21041  if test "x$has_forbidden_chars" != x; then
21042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21046      # Going to short mode and back again did indeed matter. Since short mode is
21047      # case insensitive, let's make it lowercase to improve readability.
21048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21049      # Now convert it back to Unix-stile (cygpath)
21050      input_path=`$CYGPATH -u "$shortmode_path"`
21051      new_path="$input_path"
21052    fi
21053  fi
21054
21055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21056  if test "x$test_cygdrive_prefix" = x; then
21057    # As a simple fix, exclude /usr/bin since it's not a real path.
21058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21060      # a path prefixed by /cygdrive for fixpath to work.
21061      new_path="$CYGWIN_ROOT_PATH$input_path"
21062    fi
21063  fi
21064
21065  # remove trailing .exe if any
21066  new_path="${new_path/%.exe/}"
21067
21068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21069
21070  # First separate the path from the arguments. This will split at the first
21071  # space.
21072  complete="$OBJC"
21073  path="${complete%% *}"
21074  tmp="$complete EOL"
21075  arguments="${tmp#* }"
21076
21077  # Input might be given as Windows format, start by converting to
21078  # unix format.
21079  new_path="$path"
21080
21081  windows_path="$new_path"
21082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21083    unix_path=`$CYGPATH -u "$windows_path"`
21084    new_path="$unix_path"
21085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21087    new_path="$unix_path"
21088  fi
21089
21090
21091  # Now try to locate executable using which
21092  new_path=`$WHICH "$new_path" 2> /dev/null`
21093
21094  if test "x$new_path" = x; then
21095    # Oops. Which didn't find the executable.
21096    # The splitting of arguments from the executable at a space might have been incorrect,
21097    # since paths with space are more likely in Windows. Give it another try with the whole
21098    # argument.
21099    path="$complete"
21100    arguments="EOL"
21101    new_path="$path"
21102
21103  windows_path="$new_path"
21104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21105    unix_path=`$CYGPATH -u "$windows_path"`
21106    new_path="$unix_path"
21107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21109    new_path="$unix_path"
21110  fi
21111
21112
21113    new_path=`$WHICH "$new_path" 2> /dev/null`
21114
21115    if test "x$new_path" = x; then
21116      # It's still not found. Now this is an unrecoverable error.
21117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21118$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21119      has_space=`$ECHO "$complete" | $GREP " "`
21120      if test "x$has_space" != x; then
21121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21123      fi
21124      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21125    fi
21126  fi
21127
21128  # Now new_path has a complete unix path to the binary
21129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21130    # Keep paths in /bin as-is, but remove trailing .exe if any
21131    new_path="${new_path/%.exe/}"
21132    # Do not save /bin paths to all_fixpath_prefixes!
21133  else
21134    # Not in mixed or Windows style, start by that.
21135    new_path=`cmd //c echo $new_path`
21136
21137  input_path="$new_path"
21138  # Check if we need to convert this using DOS-style short mode. If the path
21139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21140  # take no chances and rewrite it.
21141  # Note: m4 eats our [], so we need to use [ and ] instead.
21142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21143  if test "x$has_forbidden_chars" != x; then
21144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21146  fi
21147
21148    # Output is in $new_path
21149
21150  windows_path="$new_path"
21151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152    unix_path=`$CYGPATH -u "$windows_path"`
21153    new_path="$unix_path"
21154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21156    new_path="$unix_path"
21157  fi
21158
21159    # remove trailing .exe if any
21160    new_path="${new_path/%.exe/}"
21161
21162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21164  fi
21165
21166  else
21167    # We're on a posix platform. Hooray! :)
21168    # First separate the path from the arguments. This will split at the first
21169    # space.
21170    complete="$OBJC"
21171    path="${complete%% *}"
21172    tmp="$complete EOL"
21173    arguments="${tmp#* }"
21174
21175    # Cannot rely on the command "which" here since it doesn't always work.
21176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21177    if test -z "$is_absolute_path"; then
21178      # Path to executable is not absolute. Find it.
21179      IFS_save="$IFS"
21180      IFS=:
21181      for p in $PATH; do
21182        if test -f "$p/$path" && test -x "$p/$path"; then
21183          new_path="$p/$path"
21184          break
21185        fi
21186      done
21187      IFS="$IFS_save"
21188    else
21189      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21190$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21191      new_path="$path"
21192    fi
21193
21194    if test "x$new_path" = x; then
21195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21196$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21197        has_space=`$ECHO "$complete" | $GREP " "`
21198        if test "x$has_space" != x; then
21199          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21201        fi
21202        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21203      fi
21204  fi
21205
21206      # Now join together the path and the arguments once again
21207      if test "x$arguments" != xEOL; then
21208        new_complete="$new_path ${arguments% *}"
21209      else
21210        new_complete="$new_path"
21211      fi
21212
21213  if test "x$complete" != "x$new_complete"; then
21214      OBJC="$new_complete"
21215      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21216$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21217    fi
21218
21219else
21220    OBJC=
21221fi
21222
21223# Restore the flags to the user specified values.
21224# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21225CFLAGS="$ORG_CFLAGS"
21226CXXFLAGS="$ORG_CXXFLAGS"
21227OBJCFLAGS="$ORG_OBJCFLAGS"
21228
21229LD="$CC"
21230LDEXE="$CC"
21231LDCXX="$CXX"
21232LDEXECXX="$CXX"
21233
21234# LDEXE is the linker to use, when creating executables.
21235
21236# Linking C++ libraries.
21237
21238# Linking C++ executables.
21239
21240
21241if test "x$OPENJDK_TARGET_OS" != xwindows; then
21242    if test -n "$ac_tool_prefix"; then
21243  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21244set dummy ${ac_tool_prefix}ar; ac_word=$2
21245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21246$as_echo_n "checking for $ac_word... " >&6; }
21247if ${ac_cv_prog_AR+:} false; then :
21248  $as_echo_n "(cached) " >&6
21249else
21250  if test -n "$AR"; then
21251  ac_cv_prog_AR="$AR" # Let the user override the test.
21252else
21253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21254for as_dir in $PATH
21255do
21256  IFS=$as_save_IFS
21257  test -z "$as_dir" && as_dir=.
21258    for ac_exec_ext in '' $ac_executable_extensions; do
21259  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21260    ac_cv_prog_AR="${ac_tool_prefix}ar"
21261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21262    break 2
21263  fi
21264done
21265  done
21266IFS=$as_save_IFS
21267
21268fi
21269fi
21270AR=$ac_cv_prog_AR
21271if test -n "$AR"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21273$as_echo "$AR" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280fi
21281if test -z "$ac_cv_prog_AR"; then
21282  ac_ct_AR=$AR
21283  # Extract the first word of "ar", so it can be a program name with args.
21284set dummy ar; ac_word=$2
21285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21286$as_echo_n "checking for $ac_word... " >&6; }
21287if ${ac_cv_prog_ac_ct_AR+:} false; then :
21288  $as_echo_n "(cached) " >&6
21289else
21290  if test -n "$ac_ct_AR"; then
21291  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21292else
21293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21294for as_dir in $PATH
21295do
21296  IFS=$as_save_IFS
21297  test -z "$as_dir" && as_dir=.
21298    for ac_exec_ext in '' $ac_executable_extensions; do
21299  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21300    ac_cv_prog_ac_ct_AR="ar"
21301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21302    break 2
21303  fi
21304done
21305  done
21306IFS=$as_save_IFS
21307
21308fi
21309fi
21310ac_ct_AR=$ac_cv_prog_ac_ct_AR
21311if test -n "$ac_ct_AR"; then
21312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21313$as_echo "$ac_ct_AR" >&6; }
21314else
21315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21316$as_echo "no" >&6; }
21317fi
21318
21319  if test "x$ac_ct_AR" = x; then
21320    AR=""
21321  else
21322    case $cross_compiling:$ac_tool_warned in
21323yes:)
21324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21326ac_tool_warned=yes ;;
21327esac
21328    AR=$ac_ct_AR
21329  fi
21330else
21331  AR="$ac_cv_prog_AR"
21332fi
21333
21334
21335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21336
21337  # First separate the path from the arguments. This will split at the first
21338  # space.
21339  complete="$AR"
21340  path="${complete%% *}"
21341  tmp="$complete EOL"
21342  arguments="${tmp#* }"
21343
21344  # Input might be given as Windows format, start by converting to
21345  # unix format.
21346  new_path=`$CYGPATH -u "$path"`
21347
21348  # Now try to locate executable using which
21349  new_path=`$WHICH "$new_path" 2> /dev/null`
21350  # bat and cmd files are not always considered executable in cygwin causing which
21351  # to not find them
21352  if test "x$new_path" = x \
21353           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21354           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21355    new_path=`$CYGPATH -u "$path"`
21356  fi
21357  if test "x$new_path" = x; then
21358    # Oops. Which didn't find the executable.
21359    # The splitting of arguments from the executable at a space might have been incorrect,
21360    # since paths with space are more likely in Windows. Give it another try with the whole
21361    # argument.
21362    path="$complete"
21363    arguments="EOL"
21364    new_path=`$CYGPATH -u "$path"`
21365    new_path=`$WHICH "$new_path" 2> /dev/null`
21366    # bat and cmd files are not always considered executable in cygwin causing which
21367    # to not find them
21368    if test "x$new_path" = x \
21369             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21370             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21371      new_path=`$CYGPATH -u "$path"`
21372    fi
21373    if test "x$new_path" = x; then
21374      # It's still not found. Now this is an unrecoverable error.
21375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21376$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21377      has_space=`$ECHO "$complete" | $GREP " "`
21378      if test "x$has_space" != x; then
21379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21381      fi
21382      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21383    fi
21384  fi
21385
21386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21389  # "foo.exe" is OK but "foo" is an error.
21390  #
21391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21392  # It is also a way to make sure we got the proper file name for the real test later on.
21393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21394  if test "x$test_shortpath" = x; then
21395    # Short path failed, file does not exist as specified.
21396    # Try adding .exe or .cmd
21397    if test -f "${new_path}.exe"; then
21398       input_to_shortpath="${new_path}.exe"
21399    elif test -f "${new_path}.cmd"; then
21400       input_to_shortpath="${new_path}.cmd"
21401    else
21402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21403$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21406      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21407    fi
21408  else
21409    input_to_shortpath="$new_path"
21410  fi
21411
21412  # Call helper function which possibly converts this using DOS-style short mode.
21413  # If so, the updated path is stored in $new_path.
21414  new_path="$input_to_shortpath"
21415
21416  input_path="$input_to_shortpath"
21417  # Check if we need to convert this using DOS-style short mode. If the path
21418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21419  # take no chances and rewrite it.
21420  # Note: m4 eats our [], so we need to use [ and ] instead.
21421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21422  if test "x$has_forbidden_chars" != x; then
21423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21427      # Going to short mode and back again did indeed matter. Since short mode is
21428      # case insensitive, let's make it lowercase to improve readability.
21429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21430      # Now convert it back to Unix-stile (cygpath)
21431      input_path=`$CYGPATH -u "$shortmode_path"`
21432      new_path="$input_path"
21433    fi
21434  fi
21435
21436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21437  if test "x$test_cygdrive_prefix" = x; then
21438    # As a simple fix, exclude /usr/bin since it's not a real path.
21439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21441      # a path prefixed by /cygdrive for fixpath to work.
21442      new_path="$CYGWIN_ROOT_PATH$input_path"
21443    fi
21444  fi
21445
21446  # remove trailing .exe if any
21447  new_path="${new_path/%.exe/}"
21448
21449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21450
21451  # First separate the path from the arguments. This will split at the first
21452  # space.
21453  complete="$AR"
21454  path="${complete%% *}"
21455  tmp="$complete EOL"
21456  arguments="${tmp#* }"
21457
21458  # Input might be given as Windows format, start by converting to
21459  # unix format.
21460  new_path="$path"
21461
21462  windows_path="$new_path"
21463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21464    unix_path=`$CYGPATH -u "$windows_path"`
21465    new_path="$unix_path"
21466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21468    new_path="$unix_path"
21469  fi
21470
21471
21472  # Now try to locate executable using which
21473  new_path=`$WHICH "$new_path" 2> /dev/null`
21474
21475  if test "x$new_path" = x; then
21476    # Oops. Which didn't find the executable.
21477    # The splitting of arguments from the executable at a space might have been incorrect,
21478    # since paths with space are more likely in Windows. Give it another try with the whole
21479    # argument.
21480    path="$complete"
21481    arguments="EOL"
21482    new_path="$path"
21483
21484  windows_path="$new_path"
21485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21486    unix_path=`$CYGPATH -u "$windows_path"`
21487    new_path="$unix_path"
21488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21490    new_path="$unix_path"
21491  fi
21492
21493
21494    new_path=`$WHICH "$new_path" 2> /dev/null`
21495
21496    if test "x$new_path" = x; then
21497      # It's still not found. Now this is an unrecoverable error.
21498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21499$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21500      has_space=`$ECHO "$complete" | $GREP " "`
21501      if test "x$has_space" != x; then
21502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21504      fi
21505      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21506    fi
21507  fi
21508
21509  # Now new_path has a complete unix path to the binary
21510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21511    # Keep paths in /bin as-is, but remove trailing .exe if any
21512    new_path="${new_path/%.exe/}"
21513    # Do not save /bin paths to all_fixpath_prefixes!
21514  else
21515    # Not in mixed or Windows style, start by that.
21516    new_path=`cmd //c echo $new_path`
21517
21518  input_path="$new_path"
21519  # Check if we need to convert this using DOS-style short mode. If the path
21520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21521  # take no chances and rewrite it.
21522  # Note: m4 eats our [], so we need to use [ and ] instead.
21523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21524  if test "x$has_forbidden_chars" != x; then
21525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21527  fi
21528
21529    # Output is in $new_path
21530
21531  windows_path="$new_path"
21532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21533    unix_path=`$CYGPATH -u "$windows_path"`
21534    new_path="$unix_path"
21535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21537    new_path="$unix_path"
21538  fi
21539
21540    # remove trailing .exe if any
21541    new_path="${new_path/%.exe/}"
21542
21543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21545  fi
21546
21547  else
21548    # We're on a posix platform. Hooray! :)
21549    # First separate the path from the arguments. This will split at the first
21550    # space.
21551    complete="$AR"
21552    path="${complete%% *}"
21553    tmp="$complete EOL"
21554    arguments="${tmp#* }"
21555
21556    # Cannot rely on the command "which" here since it doesn't always work.
21557    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21558    if test -z "$is_absolute_path"; then
21559      # Path to executable is not absolute. Find it.
21560      IFS_save="$IFS"
21561      IFS=:
21562      for p in $PATH; do
21563        if test -f "$p/$path" && test -x "$p/$path"; then
21564          new_path="$p/$path"
21565          break
21566        fi
21567      done
21568      IFS="$IFS_save"
21569    else
21570      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21571$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21572      new_path="$path"
21573    fi
21574
21575    if test "x$new_path" = x; then
21576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21577$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21578        has_space=`$ECHO "$complete" | $GREP " "`
21579        if test "x$has_space" != x; then
21580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21582        fi
21583        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21584      fi
21585  fi
21586
21587      # Now join together the path and the arguments once again
21588      if test "x$arguments" != xEOL; then
21589        new_complete="$new_path ${arguments% *}"
21590      else
21591        new_complete="$new_path"
21592      fi
21593
21594  if test "x$complete" != "x$new_complete"; then
21595      AR="$new_complete"
21596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21597$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21598    fi
21599
21600fi
21601if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21602    ARFLAGS="-r"
21603else
21604    ARFLAGS=""
21605fi
21606
21607
21608# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21609HOTSPOT_CXX="$CXX"
21610HOTSPOT_LD="$LD"
21611
21612
21613
21614COMPILER_NAME=gcc
21615COMPILER_TYPE=CC
21616if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21617
21618    # For now, assume that we are always compiling using cl.exe.
21619    CC_OUT_OPTION=-Fo
21620    EXE_OUT_OPTION=-out:
21621    LD_OUT_OPTION=-out:
21622    AR_OUT_OPTION=-out:
21623    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21624    # program for something completely different.
21625    # Extract the first word of "link", so it can be a program name with args.
21626set dummy link; ac_word=$2
21627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21628$as_echo_n "checking for $ac_word... " >&6; }
21629if ${ac_cv_prog_WINLD+:} false; then :
21630  $as_echo_n "(cached) " >&6
21631else
21632  if test -n "$WINLD"; then
21633  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21634else
21635  ac_prog_rejected=no
21636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21637for as_dir in $PATH
21638do
21639  IFS=$as_save_IFS
21640  test -z "$as_dir" && as_dir=.
21641    for ac_exec_ext in '' $ac_executable_extensions; do
21642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21643    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21644       ac_prog_rejected=yes
21645       continue
21646     fi
21647    ac_cv_prog_WINLD="link"
21648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21649    break 2
21650  fi
21651done
21652  done
21653IFS=$as_save_IFS
21654
21655if test $ac_prog_rejected = yes; then
21656  # We found a bogon in the path, so make sure we never use it.
21657  set dummy $ac_cv_prog_WINLD
21658  shift
21659  if test $# != 0; then
21660    # We chose a different compiler from the bogus one.
21661    # However, it has the same basename, so the bogon will be chosen
21662    # first if we set WINLD to just the basename; use the full file name.
21663    shift
21664    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21665  fi
21666fi
21667fi
21668fi
21669WINLD=$ac_cv_prog_WINLD
21670if test -n "$WINLD"; then
21671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21672$as_echo "$WINLD" >&6; }
21673else
21674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21675$as_echo "no" >&6; }
21676fi
21677
21678
21679    # Since we must ignore the first found link, WINLD will contain
21680    # the full path to the link.exe program.
21681
21682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21683
21684  # First separate the path from the arguments. This will split at the first
21685  # space.
21686  complete="$WINLD"
21687  path="${complete%% *}"
21688  tmp="$complete EOL"
21689  arguments="${tmp#* }"
21690
21691  # Input might be given as Windows format, start by converting to
21692  # unix format.
21693  new_path=`$CYGPATH -u "$path"`
21694
21695  # Now try to locate executable using which
21696  new_path=`$WHICH "$new_path" 2> /dev/null`
21697  # bat and cmd files are not always considered executable in cygwin causing which
21698  # to not find them
21699  if test "x$new_path" = x \
21700           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21701           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21702    new_path=`$CYGPATH -u "$path"`
21703  fi
21704  if test "x$new_path" = x; then
21705    # Oops. Which didn't find the executable.
21706    # The splitting of arguments from the executable at a space might have been incorrect,
21707    # since paths with space are more likely in Windows. Give it another try with the whole
21708    # argument.
21709    path="$complete"
21710    arguments="EOL"
21711    new_path=`$CYGPATH -u "$path"`
21712    new_path=`$WHICH "$new_path" 2> /dev/null`
21713    # bat and cmd files are not always considered executable in cygwin causing which
21714    # to not find them
21715    if test "x$new_path" = x \
21716             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21717             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21718      new_path=`$CYGPATH -u "$path"`
21719    fi
21720    if test "x$new_path" = x; then
21721      # It's still not found. Now this is an unrecoverable error.
21722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21723$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21724      has_space=`$ECHO "$complete" | $GREP " "`
21725      if test "x$has_space" != x; then
21726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21728      fi
21729      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21730    fi
21731  fi
21732
21733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21736  # "foo.exe" is OK but "foo" is an error.
21737  #
21738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21739  # It is also a way to make sure we got the proper file name for the real test later on.
21740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21741  if test "x$test_shortpath" = x; then
21742    # Short path failed, file does not exist as specified.
21743    # Try adding .exe or .cmd
21744    if test -f "${new_path}.exe"; then
21745       input_to_shortpath="${new_path}.exe"
21746    elif test -f "${new_path}.cmd"; then
21747       input_to_shortpath="${new_path}.cmd"
21748    else
21749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21750$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21753      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21754    fi
21755  else
21756    input_to_shortpath="$new_path"
21757  fi
21758
21759  # Call helper function which possibly converts this using DOS-style short mode.
21760  # If so, the updated path is stored in $new_path.
21761  new_path="$input_to_shortpath"
21762
21763  input_path="$input_to_shortpath"
21764  # Check if we need to convert this using DOS-style short mode. If the path
21765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21766  # take no chances and rewrite it.
21767  # Note: m4 eats our [], so we need to use [ and ] instead.
21768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21769  if test "x$has_forbidden_chars" != x; then
21770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21774      # Going to short mode and back again did indeed matter. Since short mode is
21775      # case insensitive, let's make it lowercase to improve readability.
21776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21777      # Now convert it back to Unix-stile (cygpath)
21778      input_path=`$CYGPATH -u "$shortmode_path"`
21779      new_path="$input_path"
21780    fi
21781  fi
21782
21783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21784  if test "x$test_cygdrive_prefix" = x; then
21785    # As a simple fix, exclude /usr/bin since it's not a real path.
21786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21788      # a path prefixed by /cygdrive for fixpath to work.
21789      new_path="$CYGWIN_ROOT_PATH$input_path"
21790    fi
21791  fi
21792
21793  # remove trailing .exe if any
21794  new_path="${new_path/%.exe/}"
21795
21796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21797
21798  # First separate the path from the arguments. This will split at the first
21799  # space.
21800  complete="$WINLD"
21801  path="${complete%% *}"
21802  tmp="$complete EOL"
21803  arguments="${tmp#* }"
21804
21805  # Input might be given as Windows format, start by converting to
21806  # unix format.
21807  new_path="$path"
21808
21809  windows_path="$new_path"
21810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21811    unix_path=`$CYGPATH -u "$windows_path"`
21812    new_path="$unix_path"
21813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21815    new_path="$unix_path"
21816  fi
21817
21818
21819  # Now try to locate executable using which
21820  new_path=`$WHICH "$new_path" 2> /dev/null`
21821
21822  if test "x$new_path" = x; then
21823    # Oops. Which didn't find the executable.
21824    # The splitting of arguments from the executable at a space might have been incorrect,
21825    # since paths with space are more likely in Windows. Give it another try with the whole
21826    # argument.
21827    path="$complete"
21828    arguments="EOL"
21829    new_path="$path"
21830
21831  windows_path="$new_path"
21832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21833    unix_path=`$CYGPATH -u "$windows_path"`
21834    new_path="$unix_path"
21835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21837    new_path="$unix_path"
21838  fi
21839
21840
21841    new_path=`$WHICH "$new_path" 2> /dev/null`
21842
21843    if test "x$new_path" = x; then
21844      # It's still not found. Now this is an unrecoverable error.
21845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21846$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21847      has_space=`$ECHO "$complete" | $GREP " "`
21848      if test "x$has_space" != x; then
21849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21851      fi
21852      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21853    fi
21854  fi
21855
21856  # Now new_path has a complete unix path to the binary
21857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21858    # Keep paths in /bin as-is, but remove trailing .exe if any
21859    new_path="${new_path/%.exe/}"
21860    # Do not save /bin paths to all_fixpath_prefixes!
21861  else
21862    # Not in mixed or Windows style, start by that.
21863    new_path=`cmd //c echo $new_path`
21864
21865  input_path="$new_path"
21866  # Check if we need to convert this using DOS-style short mode. If the path
21867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21868  # take no chances and rewrite it.
21869  # Note: m4 eats our [], so we need to use [ and ] instead.
21870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21871  if test "x$has_forbidden_chars" != x; then
21872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21874  fi
21875
21876    # Output is in $new_path
21877
21878  windows_path="$new_path"
21879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21880    unix_path=`$CYGPATH -u "$windows_path"`
21881    new_path="$unix_path"
21882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21884    new_path="$unix_path"
21885  fi
21886
21887    # remove trailing .exe if any
21888    new_path="${new_path/%.exe/}"
21889
21890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21892  fi
21893
21894  else
21895    # We're on a posix platform. Hooray! :)
21896    # First separate the path from the arguments. This will split at the first
21897    # space.
21898    complete="$WINLD"
21899    path="${complete%% *}"
21900    tmp="$complete EOL"
21901    arguments="${tmp#* }"
21902
21903    # Cannot rely on the command "which" here since it doesn't always work.
21904    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21905    if test -z "$is_absolute_path"; then
21906      # Path to executable is not absolute. Find it.
21907      IFS_save="$IFS"
21908      IFS=:
21909      for p in $PATH; do
21910        if test -f "$p/$path" && test -x "$p/$path"; then
21911          new_path="$p/$path"
21912          break
21913        fi
21914      done
21915      IFS="$IFS_save"
21916    else
21917      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
21918$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
21919      new_path="$path"
21920    fi
21921
21922    if test "x$new_path" = x; then
21923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21924$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21925        has_space=`$ECHO "$complete" | $GREP " "`
21926        if test "x$has_space" != x; then
21927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21929        fi
21930        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21931      fi
21932  fi
21933
21934      # Now join together the path and the arguments once again
21935      if test "x$arguments" != xEOL; then
21936        new_complete="$new_path ${arguments% *}"
21937      else
21938        new_complete="$new_path"
21939      fi
21940
21941  if test "x$complete" != "x$new_complete"; then
21942      WINLD="$new_complete"
21943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21944$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21945    fi
21946
21947    printf "Windows linker was found at $WINLD\n"
21948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21949$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21950    "$WINLD" --version > /dev/null
21951    if test $? -eq 0 ; then
21952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21953$as_echo "no" >&6; }
21954      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21955    else
21956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21957$as_echo "yes" >&6; }
21958    fi
21959    LD="$WINLD"
21960    LDEXE="$WINLD"
21961    LDCXX="$WINLD"
21962    LDEXECXX="$WINLD"
21963
21964    # Extract the first word of "mt", so it can be a program name with args.
21965set dummy mt; ac_word=$2
21966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967$as_echo_n "checking for $ac_word... " >&6; }
21968if ${ac_cv_prog_MT+:} false; then :
21969  $as_echo_n "(cached) " >&6
21970else
21971  if test -n "$MT"; then
21972  ac_cv_prog_MT="$MT" # Let the user override the test.
21973else
21974  ac_prog_rejected=no
21975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21976for as_dir in $PATH
21977do
21978  IFS=$as_save_IFS
21979  test -z "$as_dir" && as_dir=.
21980    for ac_exec_ext in '' $ac_executable_extensions; do
21981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21982    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21983       ac_prog_rejected=yes
21984       continue
21985     fi
21986    ac_cv_prog_MT="mt"
21987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21988    break 2
21989  fi
21990done
21991  done
21992IFS=$as_save_IFS
21993
21994if test $ac_prog_rejected = yes; then
21995  # We found a bogon in the path, so make sure we never use it.
21996  set dummy $ac_cv_prog_MT
21997  shift
21998  if test $# != 0; then
21999    # We chose a different compiler from the bogus one.
22000    # However, it has the same basename, so the bogon will be chosen
22001    # first if we set MT to just the basename; use the full file name.
22002    shift
22003    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22004  fi
22005fi
22006fi
22007fi
22008MT=$ac_cv_prog_MT
22009if test -n "$MT"; then
22010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22011$as_echo "$MT" >&6; }
22012else
22013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22014$as_echo "no" >&6; }
22015fi
22016
22017
22018
22019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22020
22021  # First separate the path from the arguments. This will split at the first
22022  # space.
22023  complete="$MT"
22024  path="${complete%% *}"
22025  tmp="$complete EOL"
22026  arguments="${tmp#* }"
22027
22028  # Input might be given as Windows format, start by converting to
22029  # unix format.
22030  new_path=`$CYGPATH -u "$path"`
22031
22032  # Now try to locate executable using which
22033  new_path=`$WHICH "$new_path" 2> /dev/null`
22034  # bat and cmd files are not always considered executable in cygwin causing which
22035  # to not find them
22036  if test "x$new_path" = x \
22037           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22038           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22039    new_path=`$CYGPATH -u "$path"`
22040  fi
22041  if test "x$new_path" = x; then
22042    # Oops. Which didn't find the executable.
22043    # The splitting of arguments from the executable at a space might have been incorrect,
22044    # since paths with space are more likely in Windows. Give it another try with the whole
22045    # argument.
22046    path="$complete"
22047    arguments="EOL"
22048    new_path=`$CYGPATH -u "$path"`
22049    new_path=`$WHICH "$new_path" 2> /dev/null`
22050    # bat and cmd files are not always considered executable in cygwin causing which
22051    # to not find them
22052    if test "x$new_path" = x \
22053             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22054             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22055      new_path=`$CYGPATH -u "$path"`
22056    fi
22057    if test "x$new_path" = x; then
22058      # It's still not found. Now this is an unrecoverable error.
22059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22060$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22061      has_space=`$ECHO "$complete" | $GREP " "`
22062      if test "x$has_space" != x; then
22063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22065      fi
22066      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22067    fi
22068  fi
22069
22070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22073  # "foo.exe" is OK but "foo" is an error.
22074  #
22075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22076  # It is also a way to make sure we got the proper file name for the real test later on.
22077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22078  if test "x$test_shortpath" = x; then
22079    # Short path failed, file does not exist as specified.
22080    # Try adding .exe or .cmd
22081    if test -f "${new_path}.exe"; then
22082       input_to_shortpath="${new_path}.exe"
22083    elif test -f "${new_path}.cmd"; then
22084       input_to_shortpath="${new_path}.cmd"
22085    else
22086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22087$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22090      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22091    fi
22092  else
22093    input_to_shortpath="$new_path"
22094  fi
22095
22096  # Call helper function which possibly converts this using DOS-style short mode.
22097  # If so, the updated path is stored in $new_path.
22098  new_path="$input_to_shortpath"
22099
22100  input_path="$input_to_shortpath"
22101  # Check if we need to convert this using DOS-style short mode. If the path
22102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22103  # take no chances and rewrite it.
22104  # Note: m4 eats our [], so we need to use [ and ] instead.
22105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22106  if test "x$has_forbidden_chars" != x; then
22107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22111      # Going to short mode and back again did indeed matter. Since short mode is
22112      # case insensitive, let's make it lowercase to improve readability.
22113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22114      # Now convert it back to Unix-stile (cygpath)
22115      input_path=`$CYGPATH -u "$shortmode_path"`
22116      new_path="$input_path"
22117    fi
22118  fi
22119
22120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22121  if test "x$test_cygdrive_prefix" = x; then
22122    # As a simple fix, exclude /usr/bin since it's not a real path.
22123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22125      # a path prefixed by /cygdrive for fixpath to work.
22126      new_path="$CYGWIN_ROOT_PATH$input_path"
22127    fi
22128  fi
22129
22130  # remove trailing .exe if any
22131  new_path="${new_path/%.exe/}"
22132
22133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22134
22135  # First separate the path from the arguments. This will split at the first
22136  # space.
22137  complete="$MT"
22138  path="${complete%% *}"
22139  tmp="$complete EOL"
22140  arguments="${tmp#* }"
22141
22142  # Input might be given as Windows format, start by converting to
22143  # unix format.
22144  new_path="$path"
22145
22146  windows_path="$new_path"
22147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148    unix_path=`$CYGPATH -u "$windows_path"`
22149    new_path="$unix_path"
22150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22152    new_path="$unix_path"
22153  fi
22154
22155
22156  # Now try to locate executable using which
22157  new_path=`$WHICH "$new_path" 2> /dev/null`
22158
22159  if test "x$new_path" = x; then
22160    # Oops. Which didn't find the executable.
22161    # The splitting of arguments from the executable at a space might have been incorrect,
22162    # since paths with space are more likely in Windows. Give it another try with the whole
22163    # argument.
22164    path="$complete"
22165    arguments="EOL"
22166    new_path="$path"
22167
22168  windows_path="$new_path"
22169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22170    unix_path=`$CYGPATH -u "$windows_path"`
22171    new_path="$unix_path"
22172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22174    new_path="$unix_path"
22175  fi
22176
22177
22178    new_path=`$WHICH "$new_path" 2> /dev/null`
22179
22180    if test "x$new_path" = x; then
22181      # It's still not found. Now this is an unrecoverable error.
22182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22183$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22184      has_space=`$ECHO "$complete" | $GREP " "`
22185      if test "x$has_space" != x; then
22186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22188      fi
22189      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22190    fi
22191  fi
22192
22193  # Now new_path has a complete unix path to the binary
22194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22195    # Keep paths in /bin as-is, but remove trailing .exe if any
22196    new_path="${new_path/%.exe/}"
22197    # Do not save /bin paths to all_fixpath_prefixes!
22198  else
22199    # Not in mixed or Windows style, start by that.
22200    new_path=`cmd //c echo $new_path`
22201
22202  input_path="$new_path"
22203  # Check if we need to convert this using DOS-style short mode. If the path
22204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22205  # take no chances and rewrite it.
22206  # Note: m4 eats our [], so we need to use [ and ] instead.
22207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22208  if test "x$has_forbidden_chars" != x; then
22209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22211  fi
22212
22213    # Output is in $new_path
22214
22215  windows_path="$new_path"
22216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22217    unix_path=`$CYGPATH -u "$windows_path"`
22218    new_path="$unix_path"
22219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22221    new_path="$unix_path"
22222  fi
22223
22224    # remove trailing .exe if any
22225    new_path="${new_path/%.exe/}"
22226
22227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22229  fi
22230
22231  else
22232    # We're on a posix platform. Hooray! :)
22233    # First separate the path from the arguments. This will split at the first
22234    # space.
22235    complete="$MT"
22236    path="${complete%% *}"
22237    tmp="$complete EOL"
22238    arguments="${tmp#* }"
22239
22240    # Cannot rely on the command "which" here since it doesn't always work.
22241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22242    if test -z "$is_absolute_path"; then
22243      # Path to executable is not absolute. Find it.
22244      IFS_save="$IFS"
22245      IFS=:
22246      for p in $PATH; do
22247        if test -f "$p/$path" && test -x "$p/$path"; then
22248          new_path="$p/$path"
22249          break
22250        fi
22251      done
22252      IFS="$IFS_save"
22253    else
22254      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22255$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22256      new_path="$path"
22257    fi
22258
22259    if test "x$new_path" = x; then
22260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22261$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22262        has_space=`$ECHO "$complete" | $GREP " "`
22263        if test "x$has_space" != x; then
22264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22266        fi
22267        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22268      fi
22269  fi
22270
22271      # Now join together the path and the arguments once again
22272      if test "x$arguments" != xEOL; then
22273        new_complete="$new_path ${arguments% *}"
22274      else
22275        new_complete="$new_path"
22276      fi
22277
22278  if test "x$complete" != "x$new_complete"; then
22279      MT="$new_complete"
22280      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22281$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22282    fi
22283
22284    # The resource compiler
22285    # Extract the first word of "rc", so it can be a program name with args.
22286set dummy rc; ac_word=$2
22287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22288$as_echo_n "checking for $ac_word... " >&6; }
22289if ${ac_cv_prog_RC+:} false; then :
22290  $as_echo_n "(cached) " >&6
22291else
22292  if test -n "$RC"; then
22293  ac_cv_prog_RC="$RC" # Let the user override the test.
22294else
22295  ac_prog_rejected=no
22296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22297for as_dir in $PATH
22298do
22299  IFS=$as_save_IFS
22300  test -z "$as_dir" && as_dir=.
22301    for ac_exec_ext in '' $ac_executable_extensions; do
22302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22303    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22304       ac_prog_rejected=yes
22305       continue
22306     fi
22307    ac_cv_prog_RC="rc"
22308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22309    break 2
22310  fi
22311done
22312  done
22313IFS=$as_save_IFS
22314
22315if test $ac_prog_rejected = yes; then
22316  # We found a bogon in the path, so make sure we never use it.
22317  set dummy $ac_cv_prog_RC
22318  shift
22319  if test $# != 0; then
22320    # We chose a different compiler from the bogus one.
22321    # However, it has the same basename, so the bogon will be chosen
22322    # first if we set RC to just the basename; use the full file name.
22323    shift
22324    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22325  fi
22326fi
22327fi
22328fi
22329RC=$ac_cv_prog_RC
22330if test -n "$RC"; then
22331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22332$as_echo "$RC" >&6; }
22333else
22334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22335$as_echo "no" >&6; }
22336fi
22337
22338
22339
22340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22341
22342  # First separate the path from the arguments. This will split at the first
22343  # space.
22344  complete="$RC"
22345  path="${complete%% *}"
22346  tmp="$complete EOL"
22347  arguments="${tmp#* }"
22348
22349  # Input might be given as Windows format, start by converting to
22350  # unix format.
22351  new_path=`$CYGPATH -u "$path"`
22352
22353  # Now try to locate executable using which
22354  new_path=`$WHICH "$new_path" 2> /dev/null`
22355  # bat and cmd files are not always considered executable in cygwin causing which
22356  # to not find them
22357  if test "x$new_path" = x \
22358           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22359           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22360    new_path=`$CYGPATH -u "$path"`
22361  fi
22362  if test "x$new_path" = x; then
22363    # Oops. Which didn't find the executable.
22364    # The splitting of arguments from the executable at a space might have been incorrect,
22365    # since paths with space are more likely in Windows. Give it another try with the whole
22366    # argument.
22367    path="$complete"
22368    arguments="EOL"
22369    new_path=`$CYGPATH -u "$path"`
22370    new_path=`$WHICH "$new_path" 2> /dev/null`
22371    # bat and cmd files are not always considered executable in cygwin causing which
22372    # to not find them
22373    if test "x$new_path" = x \
22374             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22375             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22376      new_path=`$CYGPATH -u "$path"`
22377    fi
22378    if test "x$new_path" = x; then
22379      # It's still not found. Now this is an unrecoverable error.
22380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22381$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22382      has_space=`$ECHO "$complete" | $GREP " "`
22383      if test "x$has_space" != x; then
22384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22386      fi
22387      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22388    fi
22389  fi
22390
22391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22394  # "foo.exe" is OK but "foo" is an error.
22395  #
22396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22397  # It is also a way to make sure we got the proper file name for the real test later on.
22398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22399  if test "x$test_shortpath" = x; then
22400    # Short path failed, file does not exist as specified.
22401    # Try adding .exe or .cmd
22402    if test -f "${new_path}.exe"; then
22403       input_to_shortpath="${new_path}.exe"
22404    elif test -f "${new_path}.cmd"; then
22405       input_to_shortpath="${new_path}.cmd"
22406    else
22407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22408$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22411      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22412    fi
22413  else
22414    input_to_shortpath="$new_path"
22415  fi
22416
22417  # Call helper function which possibly converts this using DOS-style short mode.
22418  # If so, the updated path is stored in $new_path.
22419  new_path="$input_to_shortpath"
22420
22421  input_path="$input_to_shortpath"
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-stile (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 $input_to_shortpath | $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  # remove trailing .exe if any
22452  new_path="${new_path/%.exe/}"
22453
22454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22455
22456  # First separate the path from the arguments. This will split at the first
22457  # space.
22458  complete="$RC"
22459  path="${complete%% *}"
22460  tmp="$complete EOL"
22461  arguments="${tmp#* }"
22462
22463  # Input might be given as Windows format, start by converting to
22464  # unix format.
22465  new_path="$path"
22466
22467  windows_path="$new_path"
22468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22469    unix_path=`$CYGPATH -u "$windows_path"`
22470    new_path="$unix_path"
22471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22473    new_path="$unix_path"
22474  fi
22475
22476
22477  # Now try to locate executable using which
22478  new_path=`$WHICH "$new_path" 2> /dev/null`
22479
22480  if test "x$new_path" = x; then
22481    # Oops. Which didn't find the executable.
22482    # The splitting of arguments from the executable at a space might have been incorrect,
22483    # since paths with space are more likely in Windows. Give it another try with the whole
22484    # argument.
22485    path="$complete"
22486    arguments="EOL"
22487    new_path="$path"
22488
22489  windows_path="$new_path"
22490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22491    unix_path=`$CYGPATH -u "$windows_path"`
22492    new_path="$unix_path"
22493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22495    new_path="$unix_path"
22496  fi
22497
22498
22499    new_path=`$WHICH "$new_path" 2> /dev/null`
22500
22501    if test "x$new_path" = x; then
22502      # It's still not found. Now this is an unrecoverable error.
22503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22504$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22505      has_space=`$ECHO "$complete" | $GREP " "`
22506      if test "x$has_space" != x; then
22507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22509      fi
22510      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22511    fi
22512  fi
22513
22514  # Now new_path has a complete unix path to the binary
22515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22516    # Keep paths in /bin as-is, but remove trailing .exe if any
22517    new_path="${new_path/%.exe/}"
22518    # Do not save /bin paths to all_fixpath_prefixes!
22519  else
22520    # Not in mixed or Windows style, start by that.
22521    new_path=`cmd //c echo $new_path`
22522
22523  input_path="$new_path"
22524  # Check if we need to convert this using DOS-style short mode. If the path
22525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22526  # take no chances and rewrite it.
22527  # Note: m4 eats our [], so we need to use [ and ] instead.
22528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22529  if test "x$has_forbidden_chars" != x; then
22530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22532  fi
22533
22534    # Output is in $new_path
22535
22536  windows_path="$new_path"
22537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22538    unix_path=`$CYGPATH -u "$windows_path"`
22539    new_path="$unix_path"
22540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22542    new_path="$unix_path"
22543  fi
22544
22545    # remove trailing .exe if any
22546    new_path="${new_path/%.exe/}"
22547
22548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22550  fi
22551
22552  else
22553    # We're on a posix platform. Hooray! :)
22554    # First separate the path from the arguments. This will split at the first
22555    # space.
22556    complete="$RC"
22557    path="${complete%% *}"
22558    tmp="$complete EOL"
22559    arguments="${tmp#* }"
22560
22561    # Cannot rely on the command "which" here since it doesn't always work.
22562    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22563    if test -z "$is_absolute_path"; then
22564      # Path to executable is not absolute. Find it.
22565      IFS_save="$IFS"
22566      IFS=:
22567      for p in $PATH; do
22568        if test -f "$p/$path" && test -x "$p/$path"; then
22569          new_path="$p/$path"
22570          break
22571        fi
22572      done
22573      IFS="$IFS_save"
22574    else
22575      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22576$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22577      new_path="$path"
22578    fi
22579
22580    if test "x$new_path" = x; then
22581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22582$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22583        has_space=`$ECHO "$complete" | $GREP " "`
22584        if test "x$has_space" != x; then
22585          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22586$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22587        fi
22588        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22589      fi
22590  fi
22591
22592      # Now join together the path and the arguments once again
22593      if test "x$arguments" != xEOL; then
22594        new_complete="$new_path ${arguments% *}"
22595      else
22596        new_complete="$new_path"
22597      fi
22598
22599  if test "x$complete" != "x$new_complete"; then
22600      RC="$new_complete"
22601      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22602$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22603    fi
22604
22605
22606    # For hotspot, we need these in Windows mixed path,
22607    # so rewrite them all. Need added .exe suffix.
22608    HOTSPOT_CXX="$CXX.exe"
22609    HOTSPOT_LD="$LD.exe"
22610    HOTSPOT_MT="$MT.exe"
22611    HOTSPOT_RC="$RC.exe"
22612
22613  unix_path="$HOTSPOT_CXX"
22614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615    windows_path=`$CYGPATH -m "$unix_path"`
22616    HOTSPOT_CXX="$windows_path"
22617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22618    windows_path=`cmd //c echo $unix_path`
22619    HOTSPOT_CXX="$windows_path"
22620  fi
22621
22622
22623  unix_path="$HOTSPOT_LD"
22624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625    windows_path=`$CYGPATH -m "$unix_path"`
22626    HOTSPOT_LD="$windows_path"
22627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22628    windows_path=`cmd //c echo $unix_path`
22629    HOTSPOT_LD="$windows_path"
22630  fi
22631
22632
22633  unix_path="$HOTSPOT_MT"
22634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22635    windows_path=`$CYGPATH -m "$unix_path"`
22636    HOTSPOT_MT="$windows_path"
22637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22638    windows_path=`cmd //c echo $unix_path`
22639    HOTSPOT_MT="$windows_path"
22640  fi
22641
22642
22643  unix_path="$HOTSPOT_RC"
22644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22645    windows_path=`$CYGPATH -m "$unix_path"`
22646    HOTSPOT_RC="$windows_path"
22647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22648    windows_path=`cmd //c echo $unix_path`
22649    HOTSPOT_RC="$windows_path"
22650  fi
22651
22652
22653
22654
22655    RC_FLAGS="-nologo -l 0x409 -r"
22656    if test "x$VARIANT" = xOPT; then :
22657
22658        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22659
22660fi
22661    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22662    if test "x$JDK_UPDATE_VERSION" = x; then :
22663
22664        JDK_UPDATE_VERSION_NOTNULL=0
22665
22666fi
22667    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22668    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22669    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22670    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22671    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22672    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22673    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22674
22675    # lib.exe is used to create static libraries.
22676    # Extract the first word of "lib", so it can be a program name with args.
22677set dummy lib; ac_word=$2
22678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22679$as_echo_n "checking for $ac_word... " >&6; }
22680if ${ac_cv_prog_WINAR+:} false; then :
22681  $as_echo_n "(cached) " >&6
22682else
22683  if test -n "$WINAR"; then
22684  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22685else
22686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22687for as_dir in $PATH
22688do
22689  IFS=$as_save_IFS
22690  test -z "$as_dir" && as_dir=.
22691    for ac_exec_ext in '' $ac_executable_extensions; do
22692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22693    ac_cv_prog_WINAR="lib"
22694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22695    break 2
22696  fi
22697done
22698  done
22699IFS=$as_save_IFS
22700
22701fi
22702fi
22703WINAR=$ac_cv_prog_WINAR
22704if test -n "$WINAR"; then
22705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22706$as_echo "$WINAR" >&6; }
22707else
22708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22709$as_echo "no" >&6; }
22710fi
22711
22712
22713
22714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22715
22716  # First separate the path from the arguments. This will split at the first
22717  # space.
22718  complete="$WINAR"
22719  path="${complete%% *}"
22720  tmp="$complete EOL"
22721  arguments="${tmp#* }"
22722
22723  # Input might be given as Windows format, start by converting to
22724  # unix format.
22725  new_path=`$CYGPATH -u "$path"`
22726
22727  # Now try to locate executable using which
22728  new_path=`$WHICH "$new_path" 2> /dev/null`
22729  # bat and cmd files are not always considered executable in cygwin causing which
22730  # to not find them
22731  if test "x$new_path" = x \
22732           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22733           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22734    new_path=`$CYGPATH -u "$path"`
22735  fi
22736  if test "x$new_path" = x; then
22737    # Oops. Which didn't find the executable.
22738    # The splitting of arguments from the executable at a space might have been incorrect,
22739    # since paths with space are more likely in Windows. Give it another try with the whole
22740    # argument.
22741    path="$complete"
22742    arguments="EOL"
22743    new_path=`$CYGPATH -u "$path"`
22744    new_path=`$WHICH "$new_path" 2> /dev/null`
22745    # bat and cmd files are not always considered executable in cygwin causing which
22746    # to not find them
22747    if test "x$new_path" = x \
22748             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22749             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22750      new_path=`$CYGPATH -u "$path"`
22751    fi
22752    if test "x$new_path" = x; then
22753      # It's still not found. Now this is an unrecoverable error.
22754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22755$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22756      has_space=`$ECHO "$complete" | $GREP " "`
22757      if test "x$has_space" != x; then
22758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22760      fi
22761      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22762    fi
22763  fi
22764
22765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22768  # "foo.exe" is OK but "foo" is an error.
22769  #
22770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22771  # It is also a way to make sure we got the proper file name for the real test later on.
22772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22773  if test "x$test_shortpath" = x; then
22774    # Short path failed, file does not exist as specified.
22775    # Try adding .exe or .cmd
22776    if test -f "${new_path}.exe"; then
22777       input_to_shortpath="${new_path}.exe"
22778    elif test -f "${new_path}.cmd"; then
22779       input_to_shortpath="${new_path}.cmd"
22780    else
22781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22782$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22785      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22786    fi
22787  else
22788    input_to_shortpath="$new_path"
22789  fi
22790
22791  # Call helper function which possibly converts this using DOS-style short mode.
22792  # If so, the updated path is stored in $new_path.
22793  new_path="$input_to_shortpath"
22794
22795  input_path="$input_to_shortpath"
22796  # Check if we need to convert this using DOS-style short mode. If the path
22797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22798  # take no chances and rewrite it.
22799  # Note: m4 eats our [], so we need to use [ and ] instead.
22800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22801  if test "x$has_forbidden_chars" != x; then
22802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22806      # Going to short mode and back again did indeed matter. Since short mode is
22807      # case insensitive, let's make it lowercase to improve readability.
22808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22809      # Now convert it back to Unix-stile (cygpath)
22810      input_path=`$CYGPATH -u "$shortmode_path"`
22811      new_path="$input_path"
22812    fi
22813  fi
22814
22815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22816  if test "x$test_cygdrive_prefix" = x; then
22817    # As a simple fix, exclude /usr/bin since it's not a real path.
22818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22820      # a path prefixed by /cygdrive for fixpath to work.
22821      new_path="$CYGWIN_ROOT_PATH$input_path"
22822    fi
22823  fi
22824
22825  # remove trailing .exe if any
22826  new_path="${new_path/%.exe/}"
22827
22828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22829
22830  # First separate the path from the arguments. This will split at the first
22831  # space.
22832  complete="$WINAR"
22833  path="${complete%% *}"
22834  tmp="$complete EOL"
22835  arguments="${tmp#* }"
22836
22837  # Input might be given as Windows format, start by converting to
22838  # unix format.
22839  new_path="$path"
22840
22841  windows_path="$new_path"
22842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843    unix_path=`$CYGPATH -u "$windows_path"`
22844    new_path="$unix_path"
22845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22847    new_path="$unix_path"
22848  fi
22849
22850
22851  # Now try to locate executable using which
22852  new_path=`$WHICH "$new_path" 2> /dev/null`
22853
22854  if test "x$new_path" = x; then
22855    # Oops. Which didn't find the executable.
22856    # The splitting of arguments from the executable at a space might have been incorrect,
22857    # since paths with space are more likely in Windows. Give it another try with the whole
22858    # argument.
22859    path="$complete"
22860    arguments="EOL"
22861    new_path="$path"
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
22873    new_path=`$WHICH "$new_path" 2> /dev/null`
22874
22875    if test "x$new_path" = x; then
22876      # It's still not found. Now this is an unrecoverable error.
22877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22878$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22879      has_space=`$ECHO "$complete" | $GREP " "`
22880      if test "x$has_space" != x; then
22881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22883      fi
22884      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22885    fi
22886  fi
22887
22888  # Now new_path has a complete unix path to the binary
22889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22890    # Keep paths in /bin as-is, but remove trailing .exe if any
22891    new_path="${new_path/%.exe/}"
22892    # Do not save /bin paths to all_fixpath_prefixes!
22893  else
22894    # Not in mixed or Windows style, start by that.
22895    new_path=`cmd //c echo $new_path`
22896
22897  input_path="$new_path"
22898  # Check if we need to convert this using DOS-style short mode. If the path
22899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22900  # take no chances and rewrite it.
22901  # Note: m4 eats our [], so we need to use [ and ] instead.
22902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22903  if test "x$has_forbidden_chars" != x; then
22904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22906  fi
22907
22908    # Output is in $new_path
22909
22910  windows_path="$new_path"
22911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22912    unix_path=`$CYGPATH -u "$windows_path"`
22913    new_path="$unix_path"
22914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22916    new_path="$unix_path"
22917  fi
22918
22919    # remove trailing .exe if any
22920    new_path="${new_path/%.exe/}"
22921
22922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22924  fi
22925
22926  else
22927    # We're on a posix platform. Hooray! :)
22928    # First separate the path from the arguments. This will split at the first
22929    # space.
22930    complete="$WINAR"
22931    path="${complete%% *}"
22932    tmp="$complete EOL"
22933    arguments="${tmp#* }"
22934
22935    # Cannot rely on the command "which" here since it doesn't always work.
22936    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22937    if test -z "$is_absolute_path"; then
22938      # Path to executable is not absolute. Find it.
22939      IFS_save="$IFS"
22940      IFS=:
22941      for p in $PATH; do
22942        if test -f "$p/$path" && test -x "$p/$path"; then
22943          new_path="$p/$path"
22944          break
22945        fi
22946      done
22947      IFS="$IFS_save"
22948    else
22949      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
22950$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
22951      new_path="$path"
22952    fi
22953
22954    if test "x$new_path" = x; then
22955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22956$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22957        has_space=`$ECHO "$complete" | $GREP " "`
22958        if test "x$has_space" != x; then
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22961        fi
22962        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22963      fi
22964  fi
22965
22966      # Now join together the path and the arguments once again
22967      if test "x$arguments" != xEOL; then
22968        new_complete="$new_path ${arguments% *}"
22969      else
22970        new_complete="$new_path"
22971      fi
22972
22973  if test "x$complete" != "x$new_complete"; then
22974      WINAR="$new_complete"
22975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22976$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22977    fi
22978
22979    AR="$WINAR"
22980    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22981
22982    # Extract the first word of "dumpbin", so it can be a program name with args.
22983set dummy dumpbin; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_prog_DUMPBIN+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  if test -n "$DUMPBIN"; then
22990  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22991else
22992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22993for as_dir in $PATH
22994do
22995  IFS=$as_save_IFS
22996  test -z "$as_dir" && as_dir=.
22997    for ac_exec_ext in '' $ac_executable_extensions; do
22998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22999    ac_cv_prog_DUMPBIN="dumpbin"
23000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23001    break 2
23002  fi
23003done
23004  done
23005IFS=$as_save_IFS
23006
23007fi
23008fi
23009DUMPBIN=$ac_cv_prog_DUMPBIN
23010if test -n "$DUMPBIN"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23012$as_echo "$DUMPBIN" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019
23020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23021
23022  # First separate the path from the arguments. This will split at the first
23023  # space.
23024  complete="$DUMPBIN"
23025  path="${complete%% *}"
23026  tmp="$complete EOL"
23027  arguments="${tmp#* }"
23028
23029  # Input might be given as Windows format, start by converting to
23030  # unix format.
23031  new_path=`$CYGPATH -u "$path"`
23032
23033  # Now try to locate executable using which
23034  new_path=`$WHICH "$new_path" 2> /dev/null`
23035  # bat and cmd files are not always considered executable in cygwin causing which
23036  # to not find them
23037  if test "x$new_path" = x \
23038           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23039           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23040    new_path=`$CYGPATH -u "$path"`
23041  fi
23042  if test "x$new_path" = x; then
23043    # Oops. Which didn't find the executable.
23044    # The splitting of arguments from the executable at a space might have been incorrect,
23045    # since paths with space are more likely in Windows. Give it another try with the whole
23046    # argument.
23047    path="$complete"
23048    arguments="EOL"
23049    new_path=`$CYGPATH -u "$path"`
23050    new_path=`$WHICH "$new_path" 2> /dev/null`
23051    # bat and cmd files are not always considered executable in cygwin causing which
23052    # to not find them
23053    if test "x$new_path" = x \
23054             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23055             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23056      new_path=`$CYGPATH -u "$path"`
23057    fi
23058    if test "x$new_path" = x; then
23059      # It's still not found. Now this is an unrecoverable error.
23060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23061$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23062      has_space=`$ECHO "$complete" | $GREP " "`
23063      if test "x$has_space" != x; then
23064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23066      fi
23067      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23068    fi
23069  fi
23070
23071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23074  # "foo.exe" is OK but "foo" is an error.
23075  #
23076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23077  # It is also a way to make sure we got the proper file name for the real test later on.
23078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23079  if test "x$test_shortpath" = x; then
23080    # Short path failed, file does not exist as specified.
23081    # Try adding .exe or .cmd
23082    if test -f "${new_path}.exe"; then
23083       input_to_shortpath="${new_path}.exe"
23084    elif test -f "${new_path}.cmd"; then
23085       input_to_shortpath="${new_path}.cmd"
23086    else
23087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23088$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23091      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23092    fi
23093  else
23094    input_to_shortpath="$new_path"
23095  fi
23096
23097  # Call helper function which possibly converts this using DOS-style short mode.
23098  # If so, the updated path is stored in $new_path.
23099  new_path="$input_to_shortpath"
23100
23101  input_path="$input_to_shortpath"
23102  # Check if we need to convert this using DOS-style short mode. If the path
23103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23104  # take no chances and rewrite it.
23105  # Note: m4 eats our [], so we need to use [ and ] instead.
23106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23107  if test "x$has_forbidden_chars" != x; then
23108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23112      # Going to short mode and back again did indeed matter. Since short mode is
23113      # case insensitive, let's make it lowercase to improve readability.
23114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23115      # Now convert it back to Unix-stile (cygpath)
23116      input_path=`$CYGPATH -u "$shortmode_path"`
23117      new_path="$input_path"
23118    fi
23119  fi
23120
23121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23122  if test "x$test_cygdrive_prefix" = x; then
23123    # As a simple fix, exclude /usr/bin since it's not a real path.
23124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23126      # a path prefixed by /cygdrive for fixpath to work.
23127      new_path="$CYGWIN_ROOT_PATH$input_path"
23128    fi
23129  fi
23130
23131  # remove trailing .exe if any
23132  new_path="${new_path/%.exe/}"
23133
23134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23135
23136  # First separate the path from the arguments. This will split at the first
23137  # space.
23138  complete="$DUMPBIN"
23139  path="${complete%% *}"
23140  tmp="$complete EOL"
23141  arguments="${tmp#* }"
23142
23143  # Input might be given as Windows format, start by converting to
23144  # unix format.
23145  new_path="$path"
23146
23147  windows_path="$new_path"
23148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23149    unix_path=`$CYGPATH -u "$windows_path"`
23150    new_path="$unix_path"
23151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23153    new_path="$unix_path"
23154  fi
23155
23156
23157  # Now try to locate executable using which
23158  new_path=`$WHICH "$new_path" 2> /dev/null`
23159
23160  if test "x$new_path" = x; then
23161    # Oops. Which didn't find the executable.
23162    # The splitting of arguments from the executable at a space might have been incorrect,
23163    # since paths with space are more likely in Windows. Give it another try with the whole
23164    # argument.
23165    path="$complete"
23166    arguments="EOL"
23167    new_path="$path"
23168
23169  windows_path="$new_path"
23170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23171    unix_path=`$CYGPATH -u "$windows_path"`
23172    new_path="$unix_path"
23173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23175    new_path="$unix_path"
23176  fi
23177
23178
23179    new_path=`$WHICH "$new_path" 2> /dev/null`
23180
23181    if test "x$new_path" = x; then
23182      # It's still not found. Now this is an unrecoverable error.
23183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23184$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23185      has_space=`$ECHO "$complete" | $GREP " "`
23186      if test "x$has_space" != x; then
23187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23189      fi
23190      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23191    fi
23192  fi
23193
23194  # Now new_path has a complete unix path to the binary
23195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23196    # Keep paths in /bin as-is, but remove trailing .exe if any
23197    new_path="${new_path/%.exe/}"
23198    # Do not save /bin paths to all_fixpath_prefixes!
23199  else
23200    # Not in mixed or Windows style, start by that.
23201    new_path=`cmd //c echo $new_path`
23202
23203  input_path="$new_path"
23204  # Check if we need to convert this using DOS-style short mode. If the path
23205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23206  # take no chances and rewrite it.
23207  # Note: m4 eats our [], so we need to use [ and ] instead.
23208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23209  if test "x$has_forbidden_chars" != x; then
23210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23212  fi
23213
23214    # Output is in $new_path
23215
23216  windows_path="$new_path"
23217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23218    unix_path=`$CYGPATH -u "$windows_path"`
23219    new_path="$unix_path"
23220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23222    new_path="$unix_path"
23223  fi
23224
23225    # remove trailing .exe if any
23226    new_path="${new_path/%.exe/}"
23227
23228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23230  fi
23231
23232  else
23233    # We're on a posix platform. Hooray! :)
23234    # First separate the path from the arguments. This will split at the first
23235    # space.
23236    complete="$DUMPBIN"
23237    path="${complete%% *}"
23238    tmp="$complete EOL"
23239    arguments="${tmp#* }"
23240
23241    # Cannot rely on the command "which" here since it doesn't always work.
23242    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23243    if test -z "$is_absolute_path"; then
23244      # Path to executable is not absolute. Find it.
23245      IFS_save="$IFS"
23246      IFS=:
23247      for p in $PATH; do
23248        if test -f "$p/$path" && test -x "$p/$path"; then
23249          new_path="$p/$path"
23250          break
23251        fi
23252      done
23253      IFS="$IFS_save"
23254    else
23255      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23256$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23257      new_path="$path"
23258    fi
23259
23260    if test "x$new_path" = x; then
23261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23262$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23263        has_space=`$ECHO "$complete" | $GREP " "`
23264        if test "x$has_space" != x; then
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23267        fi
23268        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23269      fi
23270  fi
23271
23272      # Now join together the path and the arguments once again
23273      if test "x$arguments" != xEOL; then
23274        new_complete="$new_path ${arguments% *}"
23275      else
23276        new_complete="$new_path"
23277      fi
23278
23279  if test "x$complete" != "x$new_complete"; then
23280      DUMPBIN="$new_complete"
23281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23282$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23283    fi
23284
23285
23286    COMPILER_TYPE=CL
23287    CCXXFLAGS="$CCXXFLAGS -nologo"
23288
23289fi
23290
23291
23292
23293ac_ext=c
23294ac_cpp='$CPP $CPPFLAGS'
23295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23297ac_compiler_gnu=$ac_cv_c_compiler_gnu
23298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23299$as_echo_n "checking how to run the C preprocessor... " >&6; }
23300# On Suns, sometimes $CPP names a directory.
23301if test -n "$CPP" && test -d "$CPP"; then
23302  CPP=
23303fi
23304if test -z "$CPP"; then
23305  if ${ac_cv_prog_CPP+:} false; then :
23306  $as_echo_n "(cached) " >&6
23307else
23308      # Double quotes because CPP needs to be expanded
23309    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23310    do
23311      ac_preproc_ok=false
23312for ac_c_preproc_warn_flag in '' yes
23313do
23314  # Use a header file that comes with gcc, so configuring glibc
23315  # with a fresh cross-compiler works.
23316  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23317  # <limits.h> exists even on freestanding compilers.
23318  # On the NeXT, cc -E runs the code through the compiler's parser,
23319  # not just through cpp. "Syntax error" is here to catch this case.
23320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23321/* end confdefs.h.  */
23322#ifdef __STDC__
23323# include <limits.h>
23324#else
23325# include <assert.h>
23326#endif
23327		     Syntax error
23328_ACEOF
23329if ac_fn_c_try_cpp "$LINENO"; then :
23330
23331else
23332  # Broken: fails on valid input.
23333continue
23334fi
23335rm -f conftest.err conftest.i conftest.$ac_ext
23336
23337  # OK, works on sane cases.  Now check whether nonexistent headers
23338  # can be detected and how.
23339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23340/* end confdefs.h.  */
23341#include <ac_nonexistent.h>
23342_ACEOF
23343if ac_fn_c_try_cpp "$LINENO"; then :
23344  # Broken: success on invalid input.
23345continue
23346else
23347  # Passes both tests.
23348ac_preproc_ok=:
23349break
23350fi
23351rm -f conftest.err conftest.i conftest.$ac_ext
23352
23353done
23354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23355rm -f conftest.i conftest.err conftest.$ac_ext
23356if $ac_preproc_ok; then :
23357  break
23358fi
23359
23360    done
23361    ac_cv_prog_CPP=$CPP
23362
23363fi
23364  CPP=$ac_cv_prog_CPP
23365else
23366  ac_cv_prog_CPP=$CPP
23367fi
23368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23369$as_echo "$CPP" >&6; }
23370ac_preproc_ok=false
23371for ac_c_preproc_warn_flag in '' yes
23372do
23373  # Use a header file that comes with gcc, so configuring glibc
23374  # with a fresh cross-compiler works.
23375  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23376  # <limits.h> exists even on freestanding compilers.
23377  # On the NeXT, cc -E runs the code through the compiler's parser,
23378  # not just through cpp. "Syntax error" is here to catch this case.
23379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23380/* end confdefs.h.  */
23381#ifdef __STDC__
23382# include <limits.h>
23383#else
23384# include <assert.h>
23385#endif
23386		     Syntax error
23387_ACEOF
23388if ac_fn_c_try_cpp "$LINENO"; then :
23389
23390else
23391  # Broken: fails on valid input.
23392continue
23393fi
23394rm -f conftest.err conftest.i conftest.$ac_ext
23395
23396  # OK, works on sane cases.  Now check whether nonexistent headers
23397  # can be detected and how.
23398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23399/* end confdefs.h.  */
23400#include <ac_nonexistent.h>
23401_ACEOF
23402if ac_fn_c_try_cpp "$LINENO"; then :
23403  # Broken: success on invalid input.
23404continue
23405else
23406  # Passes both tests.
23407ac_preproc_ok=:
23408break
23409fi
23410rm -f conftest.err conftest.i conftest.$ac_ext
23411
23412done
23413# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23414rm -f conftest.i conftest.err conftest.$ac_ext
23415if $ac_preproc_ok; then :
23416
23417else
23418  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23420as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23421See \`config.log' for more details" "$LINENO" 5; }
23422fi
23423
23424ac_ext=cpp
23425ac_cpp='$CXXCPP $CPPFLAGS'
23426ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23427ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23428ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23429
23430
23431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23432
23433  # First separate the path from the arguments. This will split at the first
23434  # space.
23435  complete="$CPP"
23436  path="${complete%% *}"
23437  tmp="$complete EOL"
23438  arguments="${tmp#* }"
23439
23440  # Input might be given as Windows format, start by converting to
23441  # unix format.
23442  new_path=`$CYGPATH -u "$path"`
23443
23444  # Now try to locate executable using which
23445  new_path=`$WHICH "$new_path" 2> /dev/null`
23446  # bat and cmd files are not always considered executable in cygwin causing which
23447  # to not find them
23448  if test "x$new_path" = x \
23449           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23450           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23451    new_path=`$CYGPATH -u "$path"`
23452  fi
23453  if test "x$new_path" = x; then
23454    # Oops. Which didn't find the executable.
23455    # The splitting of arguments from the executable at a space might have been incorrect,
23456    # since paths with space are more likely in Windows. Give it another try with the whole
23457    # argument.
23458    path="$complete"
23459    arguments="EOL"
23460    new_path=`$CYGPATH -u "$path"`
23461    new_path=`$WHICH "$new_path" 2> /dev/null`
23462    # bat and cmd files are not always considered executable in cygwin causing which
23463    # to not find them
23464    if test "x$new_path" = x \
23465             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23466             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23467      new_path=`$CYGPATH -u "$path"`
23468    fi
23469    if test "x$new_path" = x; then
23470      # It's still not found. Now this is an unrecoverable error.
23471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23472$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23473      has_space=`$ECHO "$complete" | $GREP " "`
23474      if test "x$has_space" != x; then
23475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23477      fi
23478      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23479    fi
23480  fi
23481
23482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23485  # "foo.exe" is OK but "foo" is an error.
23486  #
23487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23488  # It is also a way to make sure we got the proper file name for the real test later on.
23489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23490  if test "x$test_shortpath" = x; then
23491    # Short path failed, file does not exist as specified.
23492    # Try adding .exe or .cmd
23493    if test -f "${new_path}.exe"; then
23494       input_to_shortpath="${new_path}.exe"
23495    elif test -f "${new_path}.cmd"; then
23496       input_to_shortpath="${new_path}.cmd"
23497    else
23498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23499$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23500      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23501$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23502      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23503    fi
23504  else
23505    input_to_shortpath="$new_path"
23506  fi
23507
23508  # Call helper function which possibly converts this using DOS-style short mode.
23509  # If so, the updated path is stored in $new_path.
23510  new_path="$input_to_shortpath"
23511
23512  input_path="$input_to_shortpath"
23513  # Check if we need to convert this using DOS-style short mode. If the path
23514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23515  # take no chances and rewrite it.
23516  # Note: m4 eats our [], so we need to use [ and ] instead.
23517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23518  if test "x$has_forbidden_chars" != x; then
23519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23523      # Going to short mode and back again did indeed matter. Since short mode is
23524      # case insensitive, let's make it lowercase to improve readability.
23525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23526      # Now convert it back to Unix-stile (cygpath)
23527      input_path=`$CYGPATH -u "$shortmode_path"`
23528      new_path="$input_path"
23529    fi
23530  fi
23531
23532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23533  if test "x$test_cygdrive_prefix" = x; then
23534    # As a simple fix, exclude /usr/bin since it's not a real path.
23535    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23537      # a path prefixed by /cygdrive for fixpath to work.
23538      new_path="$CYGWIN_ROOT_PATH$input_path"
23539    fi
23540  fi
23541
23542  # remove trailing .exe if any
23543  new_path="${new_path/%.exe/}"
23544
23545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23546
23547  # First separate the path from the arguments. This will split at the first
23548  # space.
23549  complete="$CPP"
23550  path="${complete%% *}"
23551  tmp="$complete EOL"
23552  arguments="${tmp#* }"
23553
23554  # Input might be given as Windows format, start by converting to
23555  # unix format.
23556  new_path="$path"
23557
23558  windows_path="$new_path"
23559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23560    unix_path=`$CYGPATH -u "$windows_path"`
23561    new_path="$unix_path"
23562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23564    new_path="$unix_path"
23565  fi
23566
23567
23568  # Now try to locate executable using which
23569  new_path=`$WHICH "$new_path" 2> /dev/null`
23570
23571  if test "x$new_path" = x; then
23572    # Oops. Which didn't find the executable.
23573    # The splitting of arguments from the executable at a space might have been incorrect,
23574    # since paths with space are more likely in Windows. Give it another try with the whole
23575    # argument.
23576    path="$complete"
23577    arguments="EOL"
23578    new_path="$path"
23579
23580  windows_path="$new_path"
23581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23582    unix_path=`$CYGPATH -u "$windows_path"`
23583    new_path="$unix_path"
23584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23586    new_path="$unix_path"
23587  fi
23588
23589
23590    new_path=`$WHICH "$new_path" 2> /dev/null`
23591
23592    if test "x$new_path" = x; then
23593      # It's still not found. Now this is an unrecoverable error.
23594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23595$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23596      has_space=`$ECHO "$complete" | $GREP " "`
23597      if test "x$has_space" != x; then
23598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23600      fi
23601      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23602    fi
23603  fi
23604
23605  # Now new_path has a complete unix path to the binary
23606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23607    # Keep paths in /bin as-is, but remove trailing .exe if any
23608    new_path="${new_path/%.exe/}"
23609    # Do not save /bin paths to all_fixpath_prefixes!
23610  else
23611    # Not in mixed or Windows style, start by that.
23612    new_path=`cmd //c echo $new_path`
23613
23614  input_path="$new_path"
23615  # Check if we need to convert this using DOS-style short mode. If the path
23616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23617  # take no chances and rewrite it.
23618  # Note: m4 eats our [], so we need to use [ and ] instead.
23619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23620  if test "x$has_forbidden_chars" != x; then
23621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623  fi
23624
23625    # Output is in $new_path
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    # remove trailing .exe if any
23637    new_path="${new_path/%.exe/}"
23638
23639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23641  fi
23642
23643  else
23644    # We're on a posix platform. Hooray! :)
23645    # First separate the path from the arguments. This will split at the first
23646    # space.
23647    complete="$CPP"
23648    path="${complete%% *}"
23649    tmp="$complete EOL"
23650    arguments="${tmp#* }"
23651
23652    # Cannot rely on the command "which" here since it doesn't always work.
23653    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23654    if test -z "$is_absolute_path"; then
23655      # Path to executable is not absolute. Find it.
23656      IFS_save="$IFS"
23657      IFS=:
23658      for p in $PATH; do
23659        if test -f "$p/$path" && test -x "$p/$path"; then
23660          new_path="$p/$path"
23661          break
23662        fi
23663      done
23664      IFS="$IFS_save"
23665    else
23666      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23667$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23668      new_path="$path"
23669    fi
23670
23671    if test "x$new_path" = x; then
23672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23673$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23674        has_space=`$ECHO "$complete" | $GREP " "`
23675        if test "x$has_space" != x; then
23676          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23678        fi
23679        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23680      fi
23681  fi
23682
23683      # Now join together the path and the arguments once again
23684      if test "x$arguments" != xEOL; then
23685        new_complete="$new_path ${arguments% *}"
23686      else
23687        new_complete="$new_path"
23688      fi
23689
23690  if test "x$complete" != "x$new_complete"; then
23691      CPP="$new_complete"
23692      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23693$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23694    fi
23695
23696
23697ac_ext=cpp
23698ac_cpp='$CXXCPP $CPPFLAGS'
23699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23703$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23704if test -z "$CXXCPP"; then
23705  if ${ac_cv_prog_CXXCPP+:} false; then :
23706  $as_echo_n "(cached) " >&6
23707else
23708      # Double quotes because CXXCPP needs to be expanded
23709    for CXXCPP in "$CXX -E" "/lib/cpp"
23710    do
23711      ac_preproc_ok=false
23712for ac_cxx_preproc_warn_flag in '' yes
23713do
23714  # Use a header file that comes with gcc, so configuring glibc
23715  # with a fresh cross-compiler works.
23716  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23717  # <limits.h> exists even on freestanding compilers.
23718  # On the NeXT, cc -E runs the code through the compiler's parser,
23719  # not just through cpp. "Syntax error" is here to catch this case.
23720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23721/* end confdefs.h.  */
23722#ifdef __STDC__
23723# include <limits.h>
23724#else
23725# include <assert.h>
23726#endif
23727		     Syntax error
23728_ACEOF
23729if ac_fn_cxx_try_cpp "$LINENO"; then :
23730
23731else
23732  # Broken: fails on valid input.
23733continue
23734fi
23735rm -f conftest.err conftest.i conftest.$ac_ext
23736
23737  # OK, works on sane cases.  Now check whether nonexistent headers
23738  # can be detected and how.
23739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23740/* end confdefs.h.  */
23741#include <ac_nonexistent.h>
23742_ACEOF
23743if ac_fn_cxx_try_cpp "$LINENO"; then :
23744  # Broken: success on invalid input.
23745continue
23746else
23747  # Passes both tests.
23748ac_preproc_ok=:
23749break
23750fi
23751rm -f conftest.err conftest.i conftest.$ac_ext
23752
23753done
23754# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23755rm -f conftest.i conftest.err conftest.$ac_ext
23756if $ac_preproc_ok; then :
23757  break
23758fi
23759
23760    done
23761    ac_cv_prog_CXXCPP=$CXXCPP
23762
23763fi
23764  CXXCPP=$ac_cv_prog_CXXCPP
23765else
23766  ac_cv_prog_CXXCPP=$CXXCPP
23767fi
23768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23769$as_echo "$CXXCPP" >&6; }
23770ac_preproc_ok=false
23771for ac_cxx_preproc_warn_flag in '' yes
23772do
23773  # Use a header file that comes with gcc, so configuring glibc
23774  # with a fresh cross-compiler works.
23775  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23776  # <limits.h> exists even on freestanding compilers.
23777  # On the NeXT, cc -E runs the code through the compiler's parser,
23778  # not just through cpp. "Syntax error" is here to catch this case.
23779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23780/* end confdefs.h.  */
23781#ifdef __STDC__
23782# include <limits.h>
23783#else
23784# include <assert.h>
23785#endif
23786		     Syntax error
23787_ACEOF
23788if ac_fn_cxx_try_cpp "$LINENO"; then :
23789
23790else
23791  # Broken: fails on valid input.
23792continue
23793fi
23794rm -f conftest.err conftest.i conftest.$ac_ext
23795
23796  # OK, works on sane cases.  Now check whether nonexistent headers
23797  # can be detected and how.
23798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23799/* end confdefs.h.  */
23800#include <ac_nonexistent.h>
23801_ACEOF
23802if ac_fn_cxx_try_cpp "$LINENO"; then :
23803  # Broken: success on invalid input.
23804continue
23805else
23806  # Passes both tests.
23807ac_preproc_ok=:
23808break
23809fi
23810rm -f conftest.err conftest.i conftest.$ac_ext
23811
23812done
23813# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23814rm -f conftest.i conftest.err conftest.$ac_ext
23815if $ac_preproc_ok; then :
23816
23817else
23818  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23820as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23821See \`config.log' for more details" "$LINENO" 5; }
23822fi
23823
23824ac_ext=cpp
23825ac_cpp='$CXXCPP $CPPFLAGS'
23826ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23827ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23828ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23829
23830
23831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23832
23833  # First separate the path from the arguments. This will split at the first
23834  # space.
23835  complete="$CXXCPP"
23836  path="${complete%% *}"
23837  tmp="$complete EOL"
23838  arguments="${tmp#* }"
23839
23840  # Input might be given as Windows format, start by converting to
23841  # unix format.
23842  new_path=`$CYGPATH -u "$path"`
23843
23844  # Now try to locate executable using which
23845  new_path=`$WHICH "$new_path" 2> /dev/null`
23846  # bat and cmd files are not always considered executable in cygwin causing which
23847  # to not find them
23848  if test "x$new_path" = x \
23849           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23850           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23851    new_path=`$CYGPATH -u "$path"`
23852  fi
23853  if test "x$new_path" = x; then
23854    # Oops. Which didn't find the executable.
23855    # The splitting of arguments from the executable at a space might have been incorrect,
23856    # since paths with space are more likely in Windows. Give it another try with the whole
23857    # argument.
23858    path="$complete"
23859    arguments="EOL"
23860    new_path=`$CYGPATH -u "$path"`
23861    new_path=`$WHICH "$new_path" 2> /dev/null`
23862    # bat and cmd files are not always considered executable in cygwin causing which
23863    # to not find them
23864    if test "x$new_path" = x \
23865             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23866             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23867      new_path=`$CYGPATH -u "$path"`
23868    fi
23869    if test "x$new_path" = x; then
23870      # It's still not found. Now this is an unrecoverable error.
23871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23872$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23873      has_space=`$ECHO "$complete" | $GREP " "`
23874      if test "x$has_space" != x; then
23875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23877      fi
23878      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23879    fi
23880  fi
23881
23882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23885  # "foo.exe" is OK but "foo" is an error.
23886  #
23887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23888  # It is also a way to make sure we got the proper file name for the real test later on.
23889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23890  if test "x$test_shortpath" = x; then
23891    # Short path failed, file does not exist as specified.
23892    # Try adding .exe or .cmd
23893    if test -f "${new_path}.exe"; then
23894       input_to_shortpath="${new_path}.exe"
23895    elif test -f "${new_path}.cmd"; then
23896       input_to_shortpath="${new_path}.cmd"
23897    else
23898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23899$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23902      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23903    fi
23904  else
23905    input_to_shortpath="$new_path"
23906  fi
23907
23908  # Call helper function which possibly converts this using DOS-style short mode.
23909  # If so, the updated path is stored in $new_path.
23910  new_path="$input_to_shortpath"
23911
23912  input_path="$input_to_shortpath"
23913  # Check if we need to convert this using DOS-style short mode. If the path
23914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23915  # take no chances and rewrite it.
23916  # Note: m4 eats our [], so we need to use [ and ] instead.
23917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23918  if test "x$has_forbidden_chars" != x; then
23919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23923      # Going to short mode and back again did indeed matter. Since short mode is
23924      # case insensitive, let's make it lowercase to improve readability.
23925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23926      # Now convert it back to Unix-stile (cygpath)
23927      input_path=`$CYGPATH -u "$shortmode_path"`
23928      new_path="$input_path"
23929    fi
23930  fi
23931
23932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23933  if test "x$test_cygdrive_prefix" = x; then
23934    # As a simple fix, exclude /usr/bin since it's not a real path.
23935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23937      # a path prefixed by /cygdrive for fixpath to work.
23938      new_path="$CYGWIN_ROOT_PATH$input_path"
23939    fi
23940  fi
23941
23942  # remove trailing .exe if any
23943  new_path="${new_path/%.exe/}"
23944
23945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23946
23947  # First separate the path from the arguments. This will split at the first
23948  # space.
23949  complete="$CXXCPP"
23950  path="${complete%% *}"
23951  tmp="$complete EOL"
23952  arguments="${tmp#* }"
23953
23954  # Input might be given as Windows format, start by converting to
23955  # unix format.
23956  new_path="$path"
23957
23958  windows_path="$new_path"
23959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23960    unix_path=`$CYGPATH -u "$windows_path"`
23961    new_path="$unix_path"
23962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23964    new_path="$unix_path"
23965  fi
23966
23967
23968  # Now try to locate executable using which
23969  new_path=`$WHICH "$new_path" 2> /dev/null`
23970
23971  if test "x$new_path" = x; then
23972    # Oops. Which didn't find the executable.
23973    # The splitting of arguments from the executable at a space might have been incorrect,
23974    # since paths with space are more likely in Windows. Give it another try with the whole
23975    # argument.
23976    path="$complete"
23977    arguments="EOL"
23978    new_path="$path"
23979
23980  windows_path="$new_path"
23981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23982    unix_path=`$CYGPATH -u "$windows_path"`
23983    new_path="$unix_path"
23984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23986    new_path="$unix_path"
23987  fi
23988
23989
23990    new_path=`$WHICH "$new_path" 2> /dev/null`
23991
23992    if test "x$new_path" = x; then
23993      # It's still not found. Now this is an unrecoverable error.
23994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23995$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23996      has_space=`$ECHO "$complete" | $GREP " "`
23997      if test "x$has_space" != x; then
23998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24000      fi
24001      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24002    fi
24003  fi
24004
24005  # Now new_path has a complete unix path to the binary
24006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24007    # Keep paths in /bin as-is, but remove trailing .exe if any
24008    new_path="${new_path/%.exe/}"
24009    # Do not save /bin paths to all_fixpath_prefixes!
24010  else
24011    # Not in mixed or Windows style, start by that.
24012    new_path=`cmd //c echo $new_path`
24013
24014  input_path="$new_path"
24015  # Check if we need to convert this using DOS-style short mode. If the path
24016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24017  # take no chances and rewrite it.
24018  # Note: m4 eats our [], so we need to use [ and ] instead.
24019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24020  if test "x$has_forbidden_chars" != x; then
24021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24023  fi
24024
24025    # Output is in $new_path
24026
24027  windows_path="$new_path"
24028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24029    unix_path=`$CYGPATH -u "$windows_path"`
24030    new_path="$unix_path"
24031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24033    new_path="$unix_path"
24034  fi
24035
24036    # remove trailing .exe if any
24037    new_path="${new_path/%.exe/}"
24038
24039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24041  fi
24042
24043  else
24044    # We're on a posix platform. Hooray! :)
24045    # First separate the path from the arguments. This will split at the first
24046    # space.
24047    complete="$CXXCPP"
24048    path="${complete%% *}"
24049    tmp="$complete EOL"
24050    arguments="${tmp#* }"
24051
24052    # Cannot rely on the command "which" here since it doesn't always work.
24053    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24054    if test -z "$is_absolute_path"; then
24055      # Path to executable is not absolute. Find it.
24056      IFS_save="$IFS"
24057      IFS=:
24058      for p in $PATH; do
24059        if test -f "$p/$path" && test -x "$p/$path"; then
24060          new_path="$p/$path"
24061          break
24062        fi
24063      done
24064      IFS="$IFS_save"
24065    else
24066      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24067$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24068      new_path="$path"
24069    fi
24070
24071    if test "x$new_path" = x; then
24072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24073$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24074        has_space=`$ECHO "$complete" | $GREP " "`
24075        if test "x$has_space" != x; then
24076          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24077$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24078        fi
24079        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24080      fi
24081  fi
24082
24083      # Now join together the path and the arguments once again
24084      if test "x$arguments" != xEOL; then
24085        new_complete="$new_path ${arguments% *}"
24086      else
24087        new_complete="$new_path"
24088      fi
24089
24090  if test "x$complete" != "x$new_complete"; then
24091      CXXCPP="$new_complete"
24092      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24093$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24094    fi
24095
24096
24097if test "x$COMPILE_TYPE" != "xcross"; then
24098    # If we are not cross compiling, use the same compilers for
24099    # building the build platform executables. The cross-compilation
24100    # case needed to be done earlier, but this can only be done after
24101    # the native tools have been localized.
24102    BUILD_CC="$CC"
24103    BUILD_CXX="$CXX"
24104    BUILD_LD="$LD"
24105fi
24106
24107# for solaris we really need solaris tools, and not gnu equivalent
24108#   these seems to normally reside in /usr/ccs/bin so add that to path before
24109#   starting to probe
24110#
24111#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24112#         so that it can be overriden --with-tools-dir
24113if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24114    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24115fi
24116
24117# Find the right assembler.
24118if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24119    # Extract the first word of "as", so it can be a program name with args.
24120set dummy as; ac_word=$2
24121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24122$as_echo_n "checking for $ac_word... " >&6; }
24123if ${ac_cv_path_AS+:} false; then :
24124  $as_echo_n "(cached) " >&6
24125else
24126  case $AS in
24127  [\\/]* | ?:[\\/]*)
24128  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24129  ;;
24130  *)
24131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24132for as_dir in $PATH
24133do
24134  IFS=$as_save_IFS
24135  test -z "$as_dir" && as_dir=.
24136    for ac_exec_ext in '' $ac_executable_extensions; do
24137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24138    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24140    break 2
24141  fi
24142done
24143  done
24144IFS=$as_save_IFS
24145
24146  ;;
24147esac
24148fi
24149AS=$ac_cv_path_AS
24150if test -n "$AS"; then
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24152$as_echo "$AS" >&6; }
24153else
24154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24155$as_echo "no" >&6; }
24156fi
24157
24158
24159
24160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161
24162  # First separate the path from the arguments. This will split at the first
24163  # space.
24164  complete="$AS"
24165  path="${complete%% *}"
24166  tmp="$complete EOL"
24167  arguments="${tmp#* }"
24168
24169  # Input might be given as Windows format, start by converting to
24170  # unix format.
24171  new_path=`$CYGPATH -u "$path"`
24172
24173  # Now try to locate executable using which
24174  new_path=`$WHICH "$new_path" 2> /dev/null`
24175  # bat and cmd files are not always considered executable in cygwin causing which
24176  # to not find them
24177  if test "x$new_path" = x \
24178           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24179           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24180    new_path=`$CYGPATH -u "$path"`
24181  fi
24182  if test "x$new_path" = x; then
24183    # Oops. Which didn't find the executable.
24184    # The splitting of arguments from the executable at a space might have been incorrect,
24185    # since paths with space are more likely in Windows. Give it another try with the whole
24186    # argument.
24187    path="$complete"
24188    arguments="EOL"
24189    new_path=`$CYGPATH -u "$path"`
24190    new_path=`$WHICH "$new_path" 2> /dev/null`
24191    # bat and cmd files are not always considered executable in cygwin causing which
24192    # to not find them
24193    if test "x$new_path" = x \
24194             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24195             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24196      new_path=`$CYGPATH -u "$path"`
24197    fi
24198    if test "x$new_path" = x; then
24199      # It's still not found. Now this is an unrecoverable error.
24200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24201$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24202      has_space=`$ECHO "$complete" | $GREP " "`
24203      if test "x$has_space" != x; then
24204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24206      fi
24207      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24208    fi
24209  fi
24210
24211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24214  # "foo.exe" is OK but "foo" is an error.
24215  #
24216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24217  # It is also a way to make sure we got the proper file name for the real test later on.
24218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24219  if test "x$test_shortpath" = x; then
24220    # Short path failed, file does not exist as specified.
24221    # Try adding .exe or .cmd
24222    if test -f "${new_path}.exe"; then
24223       input_to_shortpath="${new_path}.exe"
24224    elif test -f "${new_path}.cmd"; then
24225       input_to_shortpath="${new_path}.cmd"
24226    else
24227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24228$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24231      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24232    fi
24233  else
24234    input_to_shortpath="$new_path"
24235  fi
24236
24237  # Call helper function which possibly converts this using DOS-style short mode.
24238  # If so, the updated path is stored in $new_path.
24239  new_path="$input_to_shortpath"
24240
24241  input_path="$input_to_shortpath"
24242  # Check if we need to convert this using DOS-style short mode. If the path
24243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24244  # take no chances and rewrite it.
24245  # Note: m4 eats our [], so we need to use [ and ] instead.
24246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24247  if test "x$has_forbidden_chars" != x; then
24248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24252      # Going to short mode and back again did indeed matter. Since short mode is
24253      # case insensitive, let's make it lowercase to improve readability.
24254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24255      # Now convert it back to Unix-stile (cygpath)
24256      input_path=`$CYGPATH -u "$shortmode_path"`
24257      new_path="$input_path"
24258    fi
24259  fi
24260
24261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24262  if test "x$test_cygdrive_prefix" = x; then
24263    # As a simple fix, exclude /usr/bin since it's not a real path.
24264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24266      # a path prefixed by /cygdrive for fixpath to work.
24267      new_path="$CYGWIN_ROOT_PATH$input_path"
24268    fi
24269  fi
24270
24271  # remove trailing .exe if any
24272  new_path="${new_path/%.exe/}"
24273
24274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24275
24276  # First separate the path from the arguments. This will split at the first
24277  # space.
24278  complete="$AS"
24279  path="${complete%% *}"
24280  tmp="$complete EOL"
24281  arguments="${tmp#* }"
24282
24283  # Input might be given as Windows format, start by converting to
24284  # unix format.
24285  new_path="$path"
24286
24287  windows_path="$new_path"
24288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24289    unix_path=`$CYGPATH -u "$windows_path"`
24290    new_path="$unix_path"
24291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24293    new_path="$unix_path"
24294  fi
24295
24296
24297  # Now try to locate executable using which
24298  new_path=`$WHICH "$new_path" 2> /dev/null`
24299
24300  if test "x$new_path" = x; then
24301    # Oops. Which didn't find the executable.
24302    # The splitting of arguments from the executable at a space might have been incorrect,
24303    # since paths with space are more likely in Windows. Give it another try with the whole
24304    # argument.
24305    path="$complete"
24306    arguments="EOL"
24307    new_path="$path"
24308
24309  windows_path="$new_path"
24310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24311    unix_path=`$CYGPATH -u "$windows_path"`
24312    new_path="$unix_path"
24313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24315    new_path="$unix_path"
24316  fi
24317
24318
24319    new_path=`$WHICH "$new_path" 2> /dev/null`
24320
24321    if test "x$new_path" = x; then
24322      # It's still not found. Now this is an unrecoverable error.
24323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24324$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24325      has_space=`$ECHO "$complete" | $GREP " "`
24326      if test "x$has_space" != x; then
24327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24329      fi
24330      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24331    fi
24332  fi
24333
24334  # Now new_path has a complete unix path to the binary
24335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24336    # Keep paths in /bin as-is, but remove trailing .exe if any
24337    new_path="${new_path/%.exe/}"
24338    # Do not save /bin paths to all_fixpath_prefixes!
24339  else
24340    # Not in mixed or Windows style, start by that.
24341    new_path=`cmd //c echo $new_path`
24342
24343  input_path="$new_path"
24344  # Check if we need to convert this using DOS-style short mode. If the path
24345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24346  # take no chances and rewrite it.
24347  # Note: m4 eats our [], so we need to use [ and ] instead.
24348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24349  if test "x$has_forbidden_chars" != x; then
24350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24352  fi
24353
24354    # Output is in $new_path
24355
24356  windows_path="$new_path"
24357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24358    unix_path=`$CYGPATH -u "$windows_path"`
24359    new_path="$unix_path"
24360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24362    new_path="$unix_path"
24363  fi
24364
24365    # remove trailing .exe if any
24366    new_path="${new_path/%.exe/}"
24367
24368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24370  fi
24371
24372  else
24373    # We're on a posix platform. Hooray! :)
24374    # First separate the path from the arguments. This will split at the first
24375    # space.
24376    complete="$AS"
24377    path="${complete%% *}"
24378    tmp="$complete EOL"
24379    arguments="${tmp#* }"
24380
24381    # Cannot rely on the command "which" here since it doesn't always work.
24382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24383    if test -z "$is_absolute_path"; then
24384      # Path to executable is not absolute. Find it.
24385      IFS_save="$IFS"
24386      IFS=:
24387      for p in $PATH; do
24388        if test -f "$p/$path" && test -x "$p/$path"; then
24389          new_path="$p/$path"
24390          break
24391        fi
24392      done
24393      IFS="$IFS_save"
24394    else
24395      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24396$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24397      new_path="$path"
24398    fi
24399
24400    if test "x$new_path" = x; then
24401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24402$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24403        has_space=`$ECHO "$complete" | $GREP " "`
24404        if test "x$has_space" != x; then
24405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24407        fi
24408        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24409      fi
24410  fi
24411
24412      # Now join together the path and the arguments once again
24413      if test "x$arguments" != xEOL; then
24414        new_complete="$new_path ${arguments% *}"
24415      else
24416        new_complete="$new_path"
24417      fi
24418
24419  if test "x$complete" != "x$new_complete"; then
24420      AS="$new_complete"
24421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24422$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24423    fi
24424
24425else
24426    AS="$CC -c"
24427fi
24428
24429
24430if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24431    for ac_prog in gnm nm
24432do
24433  # Extract the first word of "$ac_prog", so it can be a program name with args.
24434set dummy $ac_prog; ac_word=$2
24435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24436$as_echo_n "checking for $ac_word... " >&6; }
24437if ${ac_cv_path_NM+:} false; then :
24438  $as_echo_n "(cached) " >&6
24439else
24440  case $NM in
24441  [\\/]* | ?:[\\/]*)
24442  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24443  ;;
24444  *)
24445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24446for as_dir in $PATH
24447do
24448  IFS=$as_save_IFS
24449  test -z "$as_dir" && as_dir=.
24450    for ac_exec_ext in '' $ac_executable_extensions; do
24451  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24452    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24454    break 2
24455  fi
24456done
24457  done
24458IFS=$as_save_IFS
24459
24460  ;;
24461esac
24462fi
24463NM=$ac_cv_path_NM
24464if test -n "$NM"; then
24465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24466$as_echo "$NM" >&6; }
24467else
24468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24469$as_echo "no" >&6; }
24470fi
24471
24472
24473  test -n "$NM" && break
24474done
24475
24476
24477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24478
24479  # First separate the path from the arguments. This will split at the first
24480  # space.
24481  complete="$NM"
24482  path="${complete%% *}"
24483  tmp="$complete EOL"
24484  arguments="${tmp#* }"
24485
24486  # Input might be given as Windows format, start by converting to
24487  # unix format.
24488  new_path=`$CYGPATH -u "$path"`
24489
24490  # Now try to locate executable using which
24491  new_path=`$WHICH "$new_path" 2> /dev/null`
24492  # bat and cmd files are not always considered executable in cygwin causing which
24493  # to not find them
24494  if test "x$new_path" = x \
24495           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24496           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24497    new_path=`$CYGPATH -u "$path"`
24498  fi
24499  if test "x$new_path" = x; then
24500    # Oops. Which didn't find the executable.
24501    # The splitting of arguments from the executable at a space might have been incorrect,
24502    # since paths with space are more likely in Windows. Give it another try with the whole
24503    # argument.
24504    path="$complete"
24505    arguments="EOL"
24506    new_path=`$CYGPATH -u "$path"`
24507    new_path=`$WHICH "$new_path" 2> /dev/null`
24508    # bat and cmd files are not always considered executable in cygwin causing which
24509    # to not find them
24510    if test "x$new_path" = x \
24511             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24512             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24513      new_path=`$CYGPATH -u "$path"`
24514    fi
24515    if test "x$new_path" = x; then
24516      # It's still not found. Now this is an unrecoverable error.
24517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24518$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24519      has_space=`$ECHO "$complete" | $GREP " "`
24520      if test "x$has_space" != x; then
24521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24523      fi
24524      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24525    fi
24526  fi
24527
24528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24531  # "foo.exe" is OK but "foo" is an error.
24532  #
24533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24534  # It is also a way to make sure we got the proper file name for the real test later on.
24535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24536  if test "x$test_shortpath" = x; then
24537    # Short path failed, file does not exist as specified.
24538    # Try adding .exe or .cmd
24539    if test -f "${new_path}.exe"; then
24540       input_to_shortpath="${new_path}.exe"
24541    elif test -f "${new_path}.cmd"; then
24542       input_to_shortpath="${new_path}.cmd"
24543    else
24544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24545$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24548      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24549    fi
24550  else
24551    input_to_shortpath="$new_path"
24552  fi
24553
24554  # Call helper function which possibly converts this using DOS-style short mode.
24555  # If so, the updated path is stored in $new_path.
24556  new_path="$input_to_shortpath"
24557
24558  input_path="$input_to_shortpath"
24559  # Check if we need to convert this using DOS-style short mode. If the path
24560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24561  # take no chances and rewrite it.
24562  # Note: m4 eats our [], so we need to use [ and ] instead.
24563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24564  if test "x$has_forbidden_chars" != x; then
24565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24569      # Going to short mode and back again did indeed matter. Since short mode is
24570      # case insensitive, let's make it lowercase to improve readability.
24571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24572      # Now convert it back to Unix-stile (cygpath)
24573      input_path=`$CYGPATH -u "$shortmode_path"`
24574      new_path="$input_path"
24575    fi
24576  fi
24577
24578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24579  if test "x$test_cygdrive_prefix" = x; then
24580    # As a simple fix, exclude /usr/bin since it's not a real path.
24581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24583      # a path prefixed by /cygdrive for fixpath to work.
24584      new_path="$CYGWIN_ROOT_PATH$input_path"
24585    fi
24586  fi
24587
24588  # remove trailing .exe if any
24589  new_path="${new_path/%.exe/}"
24590
24591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592
24593  # First separate the path from the arguments. This will split at the first
24594  # space.
24595  complete="$NM"
24596  path="${complete%% *}"
24597  tmp="$complete EOL"
24598  arguments="${tmp#* }"
24599
24600  # Input might be given as Windows format, start by converting to
24601  # unix format.
24602  new_path="$path"
24603
24604  windows_path="$new_path"
24605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24606    unix_path=`$CYGPATH -u "$windows_path"`
24607    new_path="$unix_path"
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24610    new_path="$unix_path"
24611  fi
24612
24613
24614  # Now try to locate executable using which
24615  new_path=`$WHICH "$new_path" 2> /dev/null`
24616
24617  if test "x$new_path" = x; then
24618    # Oops. Which didn't find the executable.
24619    # The splitting of arguments from the executable at a space might have been incorrect,
24620    # since paths with space are more likely in Windows. Give it another try with the whole
24621    # argument.
24622    path="$complete"
24623    arguments="EOL"
24624    new_path="$path"
24625
24626  windows_path="$new_path"
24627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628    unix_path=`$CYGPATH -u "$windows_path"`
24629    new_path="$unix_path"
24630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24632    new_path="$unix_path"
24633  fi
24634
24635
24636    new_path=`$WHICH "$new_path" 2> /dev/null`
24637
24638    if test "x$new_path" = x; then
24639      # It's still not found. Now this is an unrecoverable error.
24640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24641$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24642      has_space=`$ECHO "$complete" | $GREP " "`
24643      if test "x$has_space" != x; then
24644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24646      fi
24647      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24648    fi
24649  fi
24650
24651  # Now new_path has a complete unix path to the binary
24652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24653    # Keep paths in /bin as-is, but remove trailing .exe if any
24654    new_path="${new_path/%.exe/}"
24655    # Do not save /bin paths to all_fixpath_prefixes!
24656  else
24657    # Not in mixed or Windows style, start by that.
24658    new_path=`cmd //c echo $new_path`
24659
24660  input_path="$new_path"
24661  # Check if we need to convert this using DOS-style short mode. If the path
24662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24663  # take no chances and rewrite it.
24664  # Note: m4 eats our [], so we need to use [ and ] instead.
24665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24666  if test "x$has_forbidden_chars" != x; then
24667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24669  fi
24670
24671    # Output is in $new_path
24672
24673  windows_path="$new_path"
24674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24675    unix_path=`$CYGPATH -u "$windows_path"`
24676    new_path="$unix_path"
24677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24679    new_path="$unix_path"
24680  fi
24681
24682    # remove trailing .exe if any
24683    new_path="${new_path/%.exe/}"
24684
24685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24687  fi
24688
24689  else
24690    # We're on a posix platform. Hooray! :)
24691    # First separate the path from the arguments. This will split at the first
24692    # space.
24693    complete="$NM"
24694    path="${complete%% *}"
24695    tmp="$complete EOL"
24696    arguments="${tmp#* }"
24697
24698    # Cannot rely on the command "which" here since it doesn't always work.
24699    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24700    if test -z "$is_absolute_path"; then
24701      # Path to executable is not absolute. Find it.
24702      IFS_save="$IFS"
24703      IFS=:
24704      for p in $PATH; do
24705        if test -f "$p/$path" && test -x "$p/$path"; then
24706          new_path="$p/$path"
24707          break
24708        fi
24709      done
24710      IFS="$IFS_save"
24711    else
24712      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24713$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24714      new_path="$path"
24715    fi
24716
24717    if test "x$new_path" = x; then
24718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24719$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24720        has_space=`$ECHO "$complete" | $GREP " "`
24721        if test "x$has_space" != x; then
24722          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24724        fi
24725        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24726      fi
24727  fi
24728
24729      # Now join together the path and the arguments once again
24730      if test "x$arguments" != xEOL; then
24731        new_complete="$new_path ${arguments% *}"
24732      else
24733        new_complete="$new_path"
24734      fi
24735
24736  if test "x$complete" != "x$new_complete"; then
24737      NM="$new_complete"
24738      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24739$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24740    fi
24741
24742    # Extract the first word of "strip", so it can be a program name with args.
24743set dummy strip; ac_word=$2
24744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24745$as_echo_n "checking for $ac_word... " >&6; }
24746if ${ac_cv_path_STRIP+:} false; then :
24747  $as_echo_n "(cached) " >&6
24748else
24749  case $STRIP in
24750  [\\/]* | ?:[\\/]*)
24751  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24752  ;;
24753  *)
24754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24755for as_dir in $PATH
24756do
24757  IFS=$as_save_IFS
24758  test -z "$as_dir" && as_dir=.
24759    for ac_exec_ext in '' $ac_executable_extensions; do
24760  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24761    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24763    break 2
24764  fi
24765done
24766  done
24767IFS=$as_save_IFS
24768
24769  ;;
24770esac
24771fi
24772STRIP=$ac_cv_path_STRIP
24773if test -n "$STRIP"; then
24774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24775$as_echo "$STRIP" >&6; }
24776else
24777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24778$as_echo "no" >&6; }
24779fi
24780
24781
24782
24783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24784
24785  # First separate the path from the arguments. This will split at the first
24786  # space.
24787  complete="$STRIP"
24788  path="${complete%% *}"
24789  tmp="$complete EOL"
24790  arguments="${tmp#* }"
24791
24792  # Input might be given as Windows format, start by converting to
24793  # unix format.
24794  new_path=`$CYGPATH -u "$path"`
24795
24796  # Now try to locate executable using which
24797  new_path=`$WHICH "$new_path" 2> /dev/null`
24798  # bat and cmd files are not always considered executable in cygwin causing which
24799  # to not find them
24800  if test "x$new_path" = x \
24801           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24802           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24803    new_path=`$CYGPATH -u "$path"`
24804  fi
24805  if test "x$new_path" = x; then
24806    # Oops. Which didn't find the executable.
24807    # The splitting of arguments from the executable at a space might have been incorrect,
24808    # since paths with space are more likely in Windows. Give it another try with the whole
24809    # argument.
24810    path="$complete"
24811    arguments="EOL"
24812    new_path=`$CYGPATH -u "$path"`
24813    new_path=`$WHICH "$new_path" 2> /dev/null`
24814    # bat and cmd files are not always considered executable in cygwin causing which
24815    # to not find them
24816    if test "x$new_path" = x \
24817             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24818             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24819      new_path=`$CYGPATH -u "$path"`
24820    fi
24821    if test "x$new_path" = x; then
24822      # It's still not found. Now this is an unrecoverable error.
24823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24824$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24825      has_space=`$ECHO "$complete" | $GREP " "`
24826      if test "x$has_space" != x; then
24827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24829      fi
24830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24831    fi
24832  fi
24833
24834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24837  # "foo.exe" is OK but "foo" is an error.
24838  #
24839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24840  # It is also a way to make sure we got the proper file name for the real test later on.
24841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24842  if test "x$test_shortpath" = x; then
24843    # Short path failed, file does not exist as specified.
24844    # Try adding .exe or .cmd
24845    if test -f "${new_path}.exe"; then
24846       input_to_shortpath="${new_path}.exe"
24847    elif test -f "${new_path}.cmd"; then
24848       input_to_shortpath="${new_path}.cmd"
24849    else
24850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24851$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24854      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24855    fi
24856  else
24857    input_to_shortpath="$new_path"
24858  fi
24859
24860  # Call helper function which possibly converts this using DOS-style short mode.
24861  # If so, the updated path is stored in $new_path.
24862  new_path="$input_to_shortpath"
24863
24864  input_path="$input_to_shortpath"
24865  # Check if we need to convert this using DOS-style short mode. If the path
24866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24867  # take no chances and rewrite it.
24868  # Note: m4 eats our [], so we need to use [ and ] instead.
24869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24870  if test "x$has_forbidden_chars" != x; then
24871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24875      # Going to short mode and back again did indeed matter. Since short mode is
24876      # case insensitive, let's make it lowercase to improve readability.
24877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24878      # Now convert it back to Unix-stile (cygpath)
24879      input_path=`$CYGPATH -u "$shortmode_path"`
24880      new_path="$input_path"
24881    fi
24882  fi
24883
24884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24885  if test "x$test_cygdrive_prefix" = x; then
24886    # As a simple fix, exclude /usr/bin since it's not a real path.
24887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24889      # a path prefixed by /cygdrive for fixpath to work.
24890      new_path="$CYGWIN_ROOT_PATH$input_path"
24891    fi
24892  fi
24893
24894  # remove trailing .exe if any
24895  new_path="${new_path/%.exe/}"
24896
24897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24898
24899  # First separate the path from the arguments. This will split at the first
24900  # space.
24901  complete="$STRIP"
24902  path="${complete%% *}"
24903  tmp="$complete EOL"
24904  arguments="${tmp#* }"
24905
24906  # Input might be given as Windows format, start by converting to
24907  # unix format.
24908  new_path="$path"
24909
24910  windows_path="$new_path"
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912    unix_path=`$CYGPATH -u "$windows_path"`
24913    new_path="$unix_path"
24914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24916    new_path="$unix_path"
24917  fi
24918
24919
24920  # Now try to locate executable using which
24921  new_path=`$WHICH "$new_path" 2> /dev/null`
24922
24923  if test "x$new_path" = x; then
24924    # Oops. Which didn't find the executable.
24925    # The splitting of arguments from the executable at a space might have been incorrect,
24926    # since paths with space are more likely in Windows. Give it another try with the whole
24927    # argument.
24928    path="$complete"
24929    arguments="EOL"
24930    new_path="$path"
24931
24932  windows_path="$new_path"
24933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24934    unix_path=`$CYGPATH -u "$windows_path"`
24935    new_path="$unix_path"
24936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24938    new_path="$unix_path"
24939  fi
24940
24941
24942    new_path=`$WHICH "$new_path" 2> /dev/null`
24943
24944    if test "x$new_path" = x; then
24945      # It's still not found. Now this is an unrecoverable error.
24946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24947$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24948      has_space=`$ECHO "$complete" | $GREP " "`
24949      if test "x$has_space" != x; then
24950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24952      fi
24953      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24954    fi
24955  fi
24956
24957  # Now new_path has a complete unix path to the binary
24958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24959    # Keep paths in /bin as-is, but remove trailing .exe if any
24960    new_path="${new_path/%.exe/}"
24961    # Do not save /bin paths to all_fixpath_prefixes!
24962  else
24963    # Not in mixed or Windows style, start by that.
24964    new_path=`cmd //c echo $new_path`
24965
24966  input_path="$new_path"
24967  # Check if we need to convert this using DOS-style short mode. If the path
24968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969  # take no chances and rewrite it.
24970  # Note: m4 eats our [], so we need to use [ and ] instead.
24971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24972  if test "x$has_forbidden_chars" != x; then
24973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975  fi
24976
24977    # Output is in $new_path
24978
24979  windows_path="$new_path"
24980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24981    unix_path=`$CYGPATH -u "$windows_path"`
24982    new_path="$unix_path"
24983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24985    new_path="$unix_path"
24986  fi
24987
24988    # remove trailing .exe if any
24989    new_path="${new_path/%.exe/}"
24990
24991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24993  fi
24994
24995  else
24996    # We're on a posix platform. Hooray! :)
24997    # First separate the path from the arguments. This will split at the first
24998    # space.
24999    complete="$STRIP"
25000    path="${complete%% *}"
25001    tmp="$complete EOL"
25002    arguments="${tmp#* }"
25003
25004    # Cannot rely on the command "which" here since it doesn't always work.
25005    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25006    if test -z "$is_absolute_path"; then
25007      # Path to executable is not absolute. Find it.
25008      IFS_save="$IFS"
25009      IFS=:
25010      for p in $PATH; do
25011        if test -f "$p/$path" && test -x "$p/$path"; then
25012          new_path="$p/$path"
25013          break
25014        fi
25015      done
25016      IFS="$IFS_save"
25017    else
25018      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25019$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25020      new_path="$path"
25021    fi
25022
25023    if test "x$new_path" = x; then
25024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25025$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25026        has_space=`$ECHO "$complete" | $GREP " "`
25027        if test "x$has_space" != x; then
25028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25030        fi
25031        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25032      fi
25033  fi
25034
25035      # Now join together the path and the arguments once again
25036      if test "x$arguments" != xEOL; then
25037        new_complete="$new_path ${arguments% *}"
25038      else
25039        new_complete="$new_path"
25040      fi
25041
25042  if test "x$complete" != "x$new_complete"; then
25043      STRIP="$new_complete"
25044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25045$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25046    fi
25047
25048    # Extract the first word of "mcs", so it can be a program name with args.
25049set dummy mcs; ac_word=$2
25050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25051$as_echo_n "checking for $ac_word... " >&6; }
25052if ${ac_cv_path_MCS+:} false; then :
25053  $as_echo_n "(cached) " >&6
25054else
25055  case $MCS in
25056  [\\/]* | ?:[\\/]*)
25057  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25058  ;;
25059  *)
25060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25061for as_dir in $PATH
25062do
25063  IFS=$as_save_IFS
25064  test -z "$as_dir" && as_dir=.
25065    for ac_exec_ext in '' $ac_executable_extensions; do
25066  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25067    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25069    break 2
25070  fi
25071done
25072  done
25073IFS=$as_save_IFS
25074
25075  ;;
25076esac
25077fi
25078MCS=$ac_cv_path_MCS
25079if test -n "$MCS"; then
25080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25081$as_echo "$MCS" >&6; }
25082else
25083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25084$as_echo "no" >&6; }
25085fi
25086
25087
25088
25089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25090
25091  # First separate the path from the arguments. This will split at the first
25092  # space.
25093  complete="$MCS"
25094  path="${complete%% *}"
25095  tmp="$complete EOL"
25096  arguments="${tmp#* }"
25097
25098  # Input might be given as Windows format, start by converting to
25099  # unix format.
25100  new_path=`$CYGPATH -u "$path"`
25101
25102  # Now try to locate executable using which
25103  new_path=`$WHICH "$new_path" 2> /dev/null`
25104  # bat and cmd files are not always considered executable in cygwin causing which
25105  # to not find them
25106  if test "x$new_path" = x \
25107           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25108           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25109    new_path=`$CYGPATH -u "$path"`
25110  fi
25111  if test "x$new_path" = x; then
25112    # Oops. Which didn't find the executable.
25113    # The splitting of arguments from the executable at a space might have been incorrect,
25114    # since paths with space are more likely in Windows. Give it another try with the whole
25115    # argument.
25116    path="$complete"
25117    arguments="EOL"
25118    new_path=`$CYGPATH -u "$path"`
25119    new_path=`$WHICH "$new_path" 2> /dev/null`
25120    # bat and cmd files are not always considered executable in cygwin causing which
25121    # to not find them
25122    if test "x$new_path" = x \
25123             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25124             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25125      new_path=`$CYGPATH -u "$path"`
25126    fi
25127    if test "x$new_path" = x; then
25128      # It's still not found. Now this is an unrecoverable error.
25129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25130$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25131      has_space=`$ECHO "$complete" | $GREP " "`
25132      if test "x$has_space" != x; then
25133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25135      fi
25136      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25137    fi
25138  fi
25139
25140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25143  # "foo.exe" is OK but "foo" is an error.
25144  #
25145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25146  # It is also a way to make sure we got the proper file name for the real test later on.
25147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25148  if test "x$test_shortpath" = x; then
25149    # Short path failed, file does not exist as specified.
25150    # Try adding .exe or .cmd
25151    if test -f "${new_path}.exe"; then
25152       input_to_shortpath="${new_path}.exe"
25153    elif test -f "${new_path}.cmd"; then
25154       input_to_shortpath="${new_path}.cmd"
25155    else
25156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25157$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25158      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25159$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25160      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25161    fi
25162  else
25163    input_to_shortpath="$new_path"
25164  fi
25165
25166  # Call helper function which possibly converts this using DOS-style short mode.
25167  # If so, the updated path is stored in $new_path.
25168  new_path="$input_to_shortpath"
25169
25170  input_path="$input_to_shortpath"
25171  # Check if we need to convert this using DOS-style short mode. If the path
25172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25173  # take no chances and rewrite it.
25174  # Note: m4 eats our [], so we need to use [ and ] instead.
25175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25176  if test "x$has_forbidden_chars" != x; then
25177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25181      # Going to short mode and back again did indeed matter. Since short mode is
25182      # case insensitive, let's make it lowercase to improve readability.
25183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184      # Now convert it back to Unix-stile (cygpath)
25185      input_path=`$CYGPATH -u "$shortmode_path"`
25186      new_path="$input_path"
25187    fi
25188  fi
25189
25190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25191  if test "x$test_cygdrive_prefix" = x; then
25192    # As a simple fix, exclude /usr/bin since it's not a real path.
25193    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25195      # a path prefixed by /cygdrive for fixpath to work.
25196      new_path="$CYGWIN_ROOT_PATH$input_path"
25197    fi
25198  fi
25199
25200  # remove trailing .exe if any
25201  new_path="${new_path/%.exe/}"
25202
25203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25204
25205  # First separate the path from the arguments. This will split at the first
25206  # space.
25207  complete="$MCS"
25208  path="${complete%% *}"
25209  tmp="$complete EOL"
25210  arguments="${tmp#* }"
25211
25212  # Input might be given as Windows format, start by converting to
25213  # unix format.
25214  new_path="$path"
25215
25216  windows_path="$new_path"
25217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25218    unix_path=`$CYGPATH -u "$windows_path"`
25219    new_path="$unix_path"
25220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25222    new_path="$unix_path"
25223  fi
25224
25225
25226  # Now try to locate executable using which
25227  new_path=`$WHICH "$new_path" 2> /dev/null`
25228
25229  if test "x$new_path" = x; then
25230    # Oops. Which didn't find the executable.
25231    # The splitting of arguments from the executable at a space might have been incorrect,
25232    # since paths with space are more likely in Windows. Give it another try with the whole
25233    # argument.
25234    path="$complete"
25235    arguments="EOL"
25236    new_path="$path"
25237
25238  windows_path="$new_path"
25239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25240    unix_path=`$CYGPATH -u "$windows_path"`
25241    new_path="$unix_path"
25242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25244    new_path="$unix_path"
25245  fi
25246
25247
25248    new_path=`$WHICH "$new_path" 2> /dev/null`
25249
25250    if test "x$new_path" = x; then
25251      # It's still not found. Now this is an unrecoverable error.
25252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25253$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25254      has_space=`$ECHO "$complete" | $GREP " "`
25255      if test "x$has_space" != x; then
25256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25258      fi
25259      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25260    fi
25261  fi
25262
25263  # Now new_path has a complete unix path to the binary
25264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25265    # Keep paths in /bin as-is, but remove trailing .exe if any
25266    new_path="${new_path/%.exe/}"
25267    # Do not save /bin paths to all_fixpath_prefixes!
25268  else
25269    # Not in mixed or Windows style, start by that.
25270    new_path=`cmd //c echo $new_path`
25271
25272  input_path="$new_path"
25273  # Check if we need to convert this using DOS-style short mode. If the path
25274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25275  # take no chances and rewrite it.
25276  # Note: m4 eats our [], so we need to use [ and ] instead.
25277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25278  if test "x$has_forbidden_chars" != x; then
25279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25281  fi
25282
25283    # Output is in $new_path
25284
25285  windows_path="$new_path"
25286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25287    unix_path=`$CYGPATH -u "$windows_path"`
25288    new_path="$unix_path"
25289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25291    new_path="$unix_path"
25292  fi
25293
25294    # remove trailing .exe if any
25295    new_path="${new_path/%.exe/}"
25296
25297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25299  fi
25300
25301  else
25302    # We're on a posix platform. Hooray! :)
25303    # First separate the path from the arguments. This will split at the first
25304    # space.
25305    complete="$MCS"
25306    path="${complete%% *}"
25307    tmp="$complete EOL"
25308    arguments="${tmp#* }"
25309
25310    # Cannot rely on the command "which" here since it doesn't always work.
25311    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25312    if test -z "$is_absolute_path"; then
25313      # Path to executable is not absolute. Find it.
25314      IFS_save="$IFS"
25315      IFS=:
25316      for p in $PATH; do
25317        if test -f "$p/$path" && test -x "$p/$path"; then
25318          new_path="$p/$path"
25319          break
25320        fi
25321      done
25322      IFS="$IFS_save"
25323    else
25324      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25325$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25326      new_path="$path"
25327    fi
25328
25329    if test "x$new_path" = x; then
25330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25331$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25332        has_space=`$ECHO "$complete" | $GREP " "`
25333        if test "x$has_space" != x; then
25334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25336        fi
25337        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25338      fi
25339  fi
25340
25341      # Now join together the path and the arguments once again
25342      if test "x$arguments" != xEOL; then
25343        new_complete="$new_path ${arguments% *}"
25344      else
25345        new_complete="$new_path"
25346      fi
25347
25348  if test "x$complete" != "x$new_complete"; then
25349      MCS="$new_complete"
25350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25351$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25352    fi
25353
25354elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25355    if test -n "$ac_tool_prefix"; then
25356  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25357set dummy ${ac_tool_prefix}nm; ac_word=$2
25358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25359$as_echo_n "checking for $ac_word... " >&6; }
25360if ${ac_cv_prog_NM+:} false; then :
25361  $as_echo_n "(cached) " >&6
25362else
25363  if test -n "$NM"; then
25364  ac_cv_prog_NM="$NM" # Let the user override the test.
25365else
25366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25367for as_dir in $PATH
25368do
25369  IFS=$as_save_IFS
25370  test -z "$as_dir" && as_dir=.
25371    for ac_exec_ext in '' $ac_executable_extensions; do
25372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25373    ac_cv_prog_NM="${ac_tool_prefix}nm"
25374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25375    break 2
25376  fi
25377done
25378  done
25379IFS=$as_save_IFS
25380
25381fi
25382fi
25383NM=$ac_cv_prog_NM
25384if test -n "$NM"; then
25385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25386$as_echo "$NM" >&6; }
25387else
25388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25389$as_echo "no" >&6; }
25390fi
25391
25392
25393fi
25394if test -z "$ac_cv_prog_NM"; then
25395  ac_ct_NM=$NM
25396  # Extract the first word of "nm", so it can be a program name with args.
25397set dummy nm; ac_word=$2
25398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25399$as_echo_n "checking for $ac_word... " >&6; }
25400if ${ac_cv_prog_ac_ct_NM+:} false; then :
25401  $as_echo_n "(cached) " >&6
25402else
25403  if test -n "$ac_ct_NM"; then
25404  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25405else
25406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25407for as_dir in $PATH
25408do
25409  IFS=$as_save_IFS
25410  test -z "$as_dir" && as_dir=.
25411    for ac_exec_ext in '' $ac_executable_extensions; do
25412  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25413    ac_cv_prog_ac_ct_NM="nm"
25414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25415    break 2
25416  fi
25417done
25418  done
25419IFS=$as_save_IFS
25420
25421fi
25422fi
25423ac_ct_NM=$ac_cv_prog_ac_ct_NM
25424if test -n "$ac_ct_NM"; then
25425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25426$as_echo "$ac_ct_NM" >&6; }
25427else
25428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25429$as_echo "no" >&6; }
25430fi
25431
25432  if test "x$ac_ct_NM" = x; then
25433    NM=""
25434  else
25435    case $cross_compiling:$ac_tool_warned in
25436yes:)
25437{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25438$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25439ac_tool_warned=yes ;;
25440esac
25441    NM=$ac_ct_NM
25442  fi
25443else
25444  NM="$ac_cv_prog_NM"
25445fi
25446
25447
25448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25449
25450  # First separate the path from the arguments. This will split at the first
25451  # space.
25452  complete="$NM"
25453  path="${complete%% *}"
25454  tmp="$complete EOL"
25455  arguments="${tmp#* }"
25456
25457  # Input might be given as Windows format, start by converting to
25458  # unix format.
25459  new_path=`$CYGPATH -u "$path"`
25460
25461  # Now try to locate executable using which
25462  new_path=`$WHICH "$new_path" 2> /dev/null`
25463  # bat and cmd files are not always considered executable in cygwin causing which
25464  # to not find them
25465  if test "x$new_path" = x \
25466           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25467           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25468    new_path=`$CYGPATH -u "$path"`
25469  fi
25470  if test "x$new_path" = x; then
25471    # Oops. Which didn't find the executable.
25472    # The splitting of arguments from the executable at a space might have been incorrect,
25473    # since paths with space are more likely in Windows. Give it another try with the whole
25474    # argument.
25475    path="$complete"
25476    arguments="EOL"
25477    new_path=`$CYGPATH -u "$path"`
25478    new_path=`$WHICH "$new_path" 2> /dev/null`
25479    # bat and cmd files are not always considered executable in cygwin causing which
25480    # to not find them
25481    if test "x$new_path" = x \
25482             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25483             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25484      new_path=`$CYGPATH -u "$path"`
25485    fi
25486    if test "x$new_path" = x; then
25487      # It's still not found. Now this is an unrecoverable error.
25488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25490      has_space=`$ECHO "$complete" | $GREP " "`
25491      if test "x$has_space" != x; then
25492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25494      fi
25495      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25496    fi
25497  fi
25498
25499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25502  # "foo.exe" is OK but "foo" is an error.
25503  #
25504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25505  # It is also a way to make sure we got the proper file name for the real test later on.
25506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25507  if test "x$test_shortpath" = x; then
25508    # Short path failed, file does not exist as specified.
25509    # Try adding .exe or .cmd
25510    if test -f "${new_path}.exe"; then
25511       input_to_shortpath="${new_path}.exe"
25512    elif test -f "${new_path}.cmd"; then
25513       input_to_shortpath="${new_path}.cmd"
25514    else
25515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25516$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25519      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25520    fi
25521  else
25522    input_to_shortpath="$new_path"
25523  fi
25524
25525  # Call helper function which possibly converts this using DOS-style short mode.
25526  # If so, the updated path is stored in $new_path.
25527  new_path="$input_to_shortpath"
25528
25529  input_path="$input_to_shortpath"
25530  # Check if we need to convert this using DOS-style short mode. If the path
25531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25532  # take no chances and rewrite it.
25533  # Note: m4 eats our [], so we need to use [ and ] instead.
25534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25535  if test "x$has_forbidden_chars" != x; then
25536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25540      # Going to short mode and back again did indeed matter. Since short mode is
25541      # case insensitive, let's make it lowercase to improve readability.
25542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25543      # Now convert it back to Unix-stile (cygpath)
25544      input_path=`$CYGPATH -u "$shortmode_path"`
25545      new_path="$input_path"
25546    fi
25547  fi
25548
25549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25550  if test "x$test_cygdrive_prefix" = x; then
25551    # As a simple fix, exclude /usr/bin since it's not a real path.
25552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25554      # a path prefixed by /cygdrive for fixpath to work.
25555      new_path="$CYGWIN_ROOT_PATH$input_path"
25556    fi
25557  fi
25558
25559  # remove trailing .exe if any
25560  new_path="${new_path/%.exe/}"
25561
25562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25563
25564  # First separate the path from the arguments. This will split at the first
25565  # space.
25566  complete="$NM"
25567  path="${complete%% *}"
25568  tmp="$complete EOL"
25569  arguments="${tmp#* }"
25570
25571  # Input might be given as Windows format, start by converting to
25572  # unix format.
25573  new_path="$path"
25574
25575  windows_path="$new_path"
25576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25577    unix_path=`$CYGPATH -u "$windows_path"`
25578    new_path="$unix_path"
25579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25581    new_path="$unix_path"
25582  fi
25583
25584
25585  # Now try to locate executable using which
25586  new_path=`$WHICH "$new_path" 2> /dev/null`
25587
25588  if test "x$new_path" = x; then
25589    # Oops. Which didn't find the executable.
25590    # The splitting of arguments from the executable at a space might have been incorrect,
25591    # since paths with space are more likely in Windows. Give it another try with the whole
25592    # argument.
25593    path="$complete"
25594    arguments="EOL"
25595    new_path="$path"
25596
25597  windows_path="$new_path"
25598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25599    unix_path=`$CYGPATH -u "$windows_path"`
25600    new_path="$unix_path"
25601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25603    new_path="$unix_path"
25604  fi
25605
25606
25607    new_path=`$WHICH "$new_path" 2> /dev/null`
25608
25609    if test "x$new_path" = x; then
25610      # It's still not found. Now this is an unrecoverable error.
25611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25612$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25613      has_space=`$ECHO "$complete" | $GREP " "`
25614      if test "x$has_space" != x; then
25615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25617      fi
25618      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25619    fi
25620  fi
25621
25622  # Now new_path has a complete unix path to the binary
25623  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25624    # Keep paths in /bin as-is, but remove trailing .exe if any
25625    new_path="${new_path/%.exe/}"
25626    # Do not save /bin paths to all_fixpath_prefixes!
25627  else
25628    # Not in mixed or Windows style, start by that.
25629    new_path=`cmd //c echo $new_path`
25630
25631  input_path="$new_path"
25632  # Check if we need to convert this using DOS-style short mode. If the path
25633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25634  # take no chances and rewrite it.
25635  # Note: m4 eats our [], so we need to use [ and ] instead.
25636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25637  if test "x$has_forbidden_chars" != x; then
25638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25640  fi
25641
25642    # Output is in $new_path
25643
25644  windows_path="$new_path"
25645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25646    unix_path=`$CYGPATH -u "$windows_path"`
25647    new_path="$unix_path"
25648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25650    new_path="$unix_path"
25651  fi
25652
25653    # remove trailing .exe if any
25654    new_path="${new_path/%.exe/}"
25655
25656    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25657    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25658  fi
25659
25660  else
25661    # We're on a posix platform. Hooray! :)
25662    # First separate the path from the arguments. This will split at the first
25663    # space.
25664    complete="$NM"
25665    path="${complete%% *}"
25666    tmp="$complete EOL"
25667    arguments="${tmp#* }"
25668
25669    # Cannot rely on the command "which" here since it doesn't always work.
25670    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25671    if test -z "$is_absolute_path"; then
25672      # Path to executable is not absolute. Find it.
25673      IFS_save="$IFS"
25674      IFS=:
25675      for p in $PATH; do
25676        if test -f "$p/$path" && test -x "$p/$path"; then
25677          new_path="$p/$path"
25678          break
25679        fi
25680      done
25681      IFS="$IFS_save"
25682    else
25683      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25684$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25685      new_path="$path"
25686    fi
25687
25688    if test "x$new_path" = x; then
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25690$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25691        has_space=`$ECHO "$complete" | $GREP " "`
25692        if test "x$has_space" != x; then
25693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25695        fi
25696        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25697      fi
25698  fi
25699
25700      # Now join together the path and the arguments once again
25701      if test "x$arguments" != xEOL; then
25702        new_complete="$new_path ${arguments% *}"
25703      else
25704        new_complete="$new_path"
25705      fi
25706
25707  if test "x$complete" != "x$new_complete"; then
25708      NM="$new_complete"
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25710$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25711    fi
25712
25713    if test -n "$ac_tool_prefix"; then
25714  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25715set dummy ${ac_tool_prefix}strip; ac_word=$2
25716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25717$as_echo_n "checking for $ac_word... " >&6; }
25718if ${ac_cv_prog_STRIP+:} false; then :
25719  $as_echo_n "(cached) " >&6
25720else
25721  if test -n "$STRIP"; then
25722  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25723else
25724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25725for as_dir in $PATH
25726do
25727  IFS=$as_save_IFS
25728  test -z "$as_dir" && as_dir=.
25729    for ac_exec_ext in '' $ac_executable_extensions; do
25730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25731    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25733    break 2
25734  fi
25735done
25736  done
25737IFS=$as_save_IFS
25738
25739fi
25740fi
25741STRIP=$ac_cv_prog_STRIP
25742if test -n "$STRIP"; then
25743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25744$as_echo "$STRIP" >&6; }
25745else
25746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25747$as_echo "no" >&6; }
25748fi
25749
25750
25751fi
25752if test -z "$ac_cv_prog_STRIP"; then
25753  ac_ct_STRIP=$STRIP
25754  # Extract the first word of "strip", so it can be a program name with args.
25755set dummy strip; ac_word=$2
25756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25757$as_echo_n "checking for $ac_word... " >&6; }
25758if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25759  $as_echo_n "(cached) " >&6
25760else
25761  if test -n "$ac_ct_STRIP"; then
25762  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25763else
25764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25765for as_dir in $PATH
25766do
25767  IFS=$as_save_IFS
25768  test -z "$as_dir" && as_dir=.
25769    for ac_exec_ext in '' $ac_executable_extensions; do
25770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25771    ac_cv_prog_ac_ct_STRIP="strip"
25772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25773    break 2
25774  fi
25775done
25776  done
25777IFS=$as_save_IFS
25778
25779fi
25780fi
25781ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25782if test -n "$ac_ct_STRIP"; then
25783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25784$as_echo "$ac_ct_STRIP" >&6; }
25785else
25786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25787$as_echo "no" >&6; }
25788fi
25789
25790  if test "x$ac_ct_STRIP" = x; then
25791    STRIP=""
25792  else
25793    case $cross_compiling:$ac_tool_warned in
25794yes:)
25795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25797ac_tool_warned=yes ;;
25798esac
25799    STRIP=$ac_ct_STRIP
25800  fi
25801else
25802  STRIP="$ac_cv_prog_STRIP"
25803fi
25804
25805
25806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25807
25808  # First separate the path from the arguments. This will split at the first
25809  # space.
25810  complete="$STRIP"
25811  path="${complete%% *}"
25812  tmp="$complete EOL"
25813  arguments="${tmp#* }"
25814
25815  # Input might be given as Windows format, start by converting to
25816  # unix format.
25817  new_path=`$CYGPATH -u "$path"`
25818
25819  # Now try to locate executable using which
25820  new_path=`$WHICH "$new_path" 2> /dev/null`
25821  # bat and cmd files are not always considered executable in cygwin causing which
25822  # to not find them
25823  if test "x$new_path" = x \
25824           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25825           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25826    new_path=`$CYGPATH -u "$path"`
25827  fi
25828  if test "x$new_path" = x; then
25829    # Oops. Which didn't find the executable.
25830    # The splitting of arguments from the executable at a space might have been incorrect,
25831    # since paths with space are more likely in Windows. Give it another try with the whole
25832    # argument.
25833    path="$complete"
25834    arguments="EOL"
25835    new_path=`$CYGPATH -u "$path"`
25836    new_path=`$WHICH "$new_path" 2> /dev/null`
25837    # bat and cmd files are not always considered executable in cygwin causing which
25838    # to not find them
25839    if test "x$new_path" = x \
25840             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25841             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25842      new_path=`$CYGPATH -u "$path"`
25843    fi
25844    if test "x$new_path" = x; then
25845      # It's still not found. Now this is an unrecoverable error.
25846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25847$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25848      has_space=`$ECHO "$complete" | $GREP " "`
25849      if test "x$has_space" != x; then
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25852      fi
25853      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25854    fi
25855  fi
25856
25857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25860  # "foo.exe" is OK but "foo" is an error.
25861  #
25862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25863  # It is also a way to make sure we got the proper file name for the real test later on.
25864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25865  if test "x$test_shortpath" = x; then
25866    # Short path failed, file does not exist as specified.
25867    # Try adding .exe or .cmd
25868    if test -f "${new_path}.exe"; then
25869       input_to_shortpath="${new_path}.exe"
25870    elif test -f "${new_path}.cmd"; then
25871       input_to_shortpath="${new_path}.cmd"
25872    else
25873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25874$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25877      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25878    fi
25879  else
25880    input_to_shortpath="$new_path"
25881  fi
25882
25883  # Call helper function which possibly converts this using DOS-style short mode.
25884  # If so, the updated path is stored in $new_path.
25885  new_path="$input_to_shortpath"
25886
25887  input_path="$input_to_shortpath"
25888  # Check if we need to convert this using DOS-style short mode. If the path
25889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25890  # take no chances and rewrite it.
25891  # Note: m4 eats our [], so we need to use [ and ] instead.
25892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25893  if test "x$has_forbidden_chars" != x; then
25894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25898      # Going to short mode and back again did indeed matter. Since short mode is
25899      # case insensitive, let's make it lowercase to improve readability.
25900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25901      # Now convert it back to Unix-stile (cygpath)
25902      input_path=`$CYGPATH -u "$shortmode_path"`
25903      new_path="$input_path"
25904    fi
25905  fi
25906
25907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25908  if test "x$test_cygdrive_prefix" = x; then
25909    # As a simple fix, exclude /usr/bin since it's not a real path.
25910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25912      # a path prefixed by /cygdrive for fixpath to work.
25913      new_path="$CYGWIN_ROOT_PATH$input_path"
25914    fi
25915  fi
25916
25917  # remove trailing .exe if any
25918  new_path="${new_path/%.exe/}"
25919
25920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25921
25922  # First separate the path from the arguments. This will split at the first
25923  # space.
25924  complete="$STRIP"
25925  path="${complete%% *}"
25926  tmp="$complete EOL"
25927  arguments="${tmp#* }"
25928
25929  # Input might be given as Windows format, start by converting to
25930  # unix format.
25931  new_path="$path"
25932
25933  windows_path="$new_path"
25934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25935    unix_path=`$CYGPATH -u "$windows_path"`
25936    new_path="$unix_path"
25937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25939    new_path="$unix_path"
25940  fi
25941
25942
25943  # Now try to locate executable using which
25944  new_path=`$WHICH "$new_path" 2> /dev/null`
25945
25946  if test "x$new_path" = x; then
25947    # Oops. Which didn't find the executable.
25948    # The splitting of arguments from the executable at a space might have been incorrect,
25949    # since paths with space are more likely in Windows. Give it another try with the whole
25950    # argument.
25951    path="$complete"
25952    arguments="EOL"
25953    new_path="$path"
25954
25955  windows_path="$new_path"
25956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25957    unix_path=`$CYGPATH -u "$windows_path"`
25958    new_path="$unix_path"
25959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25961    new_path="$unix_path"
25962  fi
25963
25964
25965    new_path=`$WHICH "$new_path" 2> /dev/null`
25966
25967    if test "x$new_path" = x; then
25968      # It's still not found. Now this is an unrecoverable error.
25969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25970$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25971      has_space=`$ECHO "$complete" | $GREP " "`
25972      if test "x$has_space" != x; then
25973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25975      fi
25976      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25977    fi
25978  fi
25979
25980  # Now new_path has a complete unix path to the binary
25981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25982    # Keep paths in /bin as-is, but remove trailing .exe if any
25983    new_path="${new_path/%.exe/}"
25984    # Do not save /bin paths to all_fixpath_prefixes!
25985  else
25986    # Not in mixed or Windows style, start by that.
25987    new_path=`cmd //c echo $new_path`
25988
25989  input_path="$new_path"
25990  # Check if we need to convert this using DOS-style short mode. If the path
25991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25992  # take no chances and rewrite it.
25993  # Note: m4 eats our [], so we need to use [ and ] instead.
25994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25995  if test "x$has_forbidden_chars" != x; then
25996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998  fi
25999
26000    # Output is in $new_path
26001
26002  windows_path="$new_path"
26003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26004    unix_path=`$CYGPATH -u "$windows_path"`
26005    new_path="$unix_path"
26006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26008    new_path="$unix_path"
26009  fi
26010
26011    # remove trailing .exe if any
26012    new_path="${new_path/%.exe/}"
26013
26014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26016  fi
26017
26018  else
26019    # We're on a posix platform. Hooray! :)
26020    # First separate the path from the arguments. This will split at the first
26021    # space.
26022    complete="$STRIP"
26023    path="${complete%% *}"
26024    tmp="$complete EOL"
26025    arguments="${tmp#* }"
26026
26027    # Cannot rely on the command "which" here since it doesn't always work.
26028    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26029    if test -z "$is_absolute_path"; then
26030      # Path to executable is not absolute. Find it.
26031      IFS_save="$IFS"
26032      IFS=:
26033      for p in $PATH; do
26034        if test -f "$p/$path" && test -x "$p/$path"; then
26035          new_path="$p/$path"
26036          break
26037        fi
26038      done
26039      IFS="$IFS_save"
26040    else
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26042$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26043      new_path="$path"
26044    fi
26045
26046    if test "x$new_path" = x; then
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26048$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26049        has_space=`$ECHO "$complete" | $GREP " "`
26050        if test "x$has_space" != x; then
26051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26053        fi
26054        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26055      fi
26056  fi
26057
26058      # Now join together the path and the arguments once again
26059      if test "x$arguments" != xEOL; then
26060        new_complete="$new_path ${arguments% *}"
26061      else
26062        new_complete="$new_path"
26063      fi
26064
26065  if test "x$complete" != "x$new_complete"; then
26066      STRIP="$new_complete"
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26068$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26069    fi
26070
26071fi
26072
26073# objcopy is used for moving debug symbols to separate files when
26074# full debug symbols are enabled.
26075if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26076    if test -n "$ac_tool_prefix"; then
26077  for ac_prog in gobjcopy objcopy
26078  do
26079    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26082$as_echo_n "checking for $ac_word... " >&6; }
26083if ${ac_cv_prog_OBJCOPY+:} false; then :
26084  $as_echo_n "(cached) " >&6
26085else
26086  if test -n "$OBJCOPY"; then
26087  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26088else
26089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26090for as_dir in $PATH
26091do
26092  IFS=$as_save_IFS
26093  test -z "$as_dir" && as_dir=.
26094    for ac_exec_ext in '' $ac_executable_extensions; do
26095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26096    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26098    break 2
26099  fi
26100done
26101  done
26102IFS=$as_save_IFS
26103
26104fi
26105fi
26106OBJCOPY=$ac_cv_prog_OBJCOPY
26107if test -n "$OBJCOPY"; then
26108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26109$as_echo "$OBJCOPY" >&6; }
26110else
26111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26112$as_echo "no" >&6; }
26113fi
26114
26115
26116    test -n "$OBJCOPY" && break
26117  done
26118fi
26119if test -z "$OBJCOPY"; then
26120  ac_ct_OBJCOPY=$OBJCOPY
26121  for ac_prog in gobjcopy objcopy
26122do
26123  # Extract the first word of "$ac_prog", so it can be a program name with args.
26124set dummy $ac_prog; ac_word=$2
26125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26126$as_echo_n "checking for $ac_word... " >&6; }
26127if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26128  $as_echo_n "(cached) " >&6
26129else
26130  if test -n "$ac_ct_OBJCOPY"; then
26131  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26132else
26133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26134for as_dir in $PATH
26135do
26136  IFS=$as_save_IFS
26137  test -z "$as_dir" && as_dir=.
26138    for ac_exec_ext in '' $ac_executable_extensions; do
26139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26140    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26142    break 2
26143  fi
26144done
26145  done
26146IFS=$as_save_IFS
26147
26148fi
26149fi
26150ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26151if test -n "$ac_ct_OBJCOPY"; then
26152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26153$as_echo "$ac_ct_OBJCOPY" >&6; }
26154else
26155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26156$as_echo "no" >&6; }
26157fi
26158
26159
26160  test -n "$ac_ct_OBJCOPY" && break
26161done
26162
26163  if test "x$ac_ct_OBJCOPY" = x; then
26164    OBJCOPY=""
26165  else
26166    case $cross_compiling:$ac_tool_warned in
26167yes:)
26168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26170ac_tool_warned=yes ;;
26171esac
26172    OBJCOPY=$ac_ct_OBJCOPY
26173  fi
26174fi
26175
26176    # Only call fixup if objcopy was found.
26177    if test -n "$OBJCOPY"; then
26178
26179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26180
26181  # First separate the path from the arguments. This will split at the first
26182  # space.
26183  complete="$OBJCOPY"
26184  path="${complete%% *}"
26185  tmp="$complete EOL"
26186  arguments="${tmp#* }"
26187
26188  # Input might be given as Windows format, start by converting to
26189  # unix format.
26190  new_path=`$CYGPATH -u "$path"`
26191
26192  # Now try to locate executable using which
26193  new_path=`$WHICH "$new_path" 2> /dev/null`
26194  # bat and cmd files are not always considered executable in cygwin causing which
26195  # to not find them
26196  if test "x$new_path" = x \
26197           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26198           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26199    new_path=`$CYGPATH -u "$path"`
26200  fi
26201  if test "x$new_path" = x; then
26202    # Oops. Which didn't find the executable.
26203    # The splitting of arguments from the executable at a space might have been incorrect,
26204    # since paths with space are more likely in Windows. Give it another try with the whole
26205    # argument.
26206    path="$complete"
26207    arguments="EOL"
26208    new_path=`$CYGPATH -u "$path"`
26209    new_path=`$WHICH "$new_path" 2> /dev/null`
26210    # bat and cmd files are not always considered executable in cygwin causing which
26211    # to not find them
26212    if test "x$new_path" = x \
26213             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26214             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26215      new_path=`$CYGPATH -u "$path"`
26216    fi
26217    if test "x$new_path" = x; then
26218      # It's still not found. Now this is an unrecoverable error.
26219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26220$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26221      has_space=`$ECHO "$complete" | $GREP " "`
26222      if test "x$has_space" != x; then
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26225      fi
26226      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26227    fi
26228  fi
26229
26230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26233  # "foo.exe" is OK but "foo" is an error.
26234  #
26235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26236  # It is also a way to make sure we got the proper file name for the real test later on.
26237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26238  if test "x$test_shortpath" = x; then
26239    # Short path failed, file does not exist as specified.
26240    # Try adding .exe or .cmd
26241    if test -f "${new_path}.exe"; then
26242       input_to_shortpath="${new_path}.exe"
26243    elif test -f "${new_path}.cmd"; then
26244       input_to_shortpath="${new_path}.cmd"
26245    else
26246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26247$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26250      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26251    fi
26252  else
26253    input_to_shortpath="$new_path"
26254  fi
26255
26256  # Call helper function which possibly converts this using DOS-style short mode.
26257  # If so, the updated path is stored in $new_path.
26258  new_path="$input_to_shortpath"
26259
26260  input_path="$input_to_shortpath"
26261  # Check if we need to convert this using DOS-style short mode. If the path
26262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26263  # take no chances and rewrite it.
26264  # Note: m4 eats our [], so we need to use [ and ] instead.
26265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26266  if test "x$has_forbidden_chars" != x; then
26267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26271      # Going to short mode and back again did indeed matter. Since short mode is
26272      # case insensitive, let's make it lowercase to improve readability.
26273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26274      # Now convert it back to Unix-stile (cygpath)
26275      input_path=`$CYGPATH -u "$shortmode_path"`
26276      new_path="$input_path"
26277    fi
26278  fi
26279
26280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26281  if test "x$test_cygdrive_prefix" = x; then
26282    # As a simple fix, exclude /usr/bin since it's not a real path.
26283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26285      # a path prefixed by /cygdrive for fixpath to work.
26286      new_path="$CYGWIN_ROOT_PATH$input_path"
26287    fi
26288  fi
26289
26290  # remove trailing .exe if any
26291  new_path="${new_path/%.exe/}"
26292
26293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26294
26295  # First separate the path from the arguments. This will split at the first
26296  # space.
26297  complete="$OBJCOPY"
26298  path="${complete%% *}"
26299  tmp="$complete EOL"
26300  arguments="${tmp#* }"
26301
26302  # Input might be given as Windows format, start by converting to
26303  # unix format.
26304  new_path="$path"
26305
26306  windows_path="$new_path"
26307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26308    unix_path=`$CYGPATH -u "$windows_path"`
26309    new_path="$unix_path"
26310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26312    new_path="$unix_path"
26313  fi
26314
26315
26316  # Now try to locate executable using which
26317  new_path=`$WHICH "$new_path" 2> /dev/null`
26318
26319  if test "x$new_path" = x; then
26320    # Oops. Which didn't find the executable.
26321    # The splitting of arguments from the executable at a space might have been incorrect,
26322    # since paths with space are more likely in Windows. Give it another try with the whole
26323    # argument.
26324    path="$complete"
26325    arguments="EOL"
26326    new_path="$path"
26327
26328  windows_path="$new_path"
26329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26330    unix_path=`$CYGPATH -u "$windows_path"`
26331    new_path="$unix_path"
26332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26334    new_path="$unix_path"
26335  fi
26336
26337
26338    new_path=`$WHICH "$new_path" 2> /dev/null`
26339
26340    if test "x$new_path" = x; then
26341      # It's still not found. Now this is an unrecoverable error.
26342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26343$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26344      has_space=`$ECHO "$complete" | $GREP " "`
26345      if test "x$has_space" != x; then
26346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26348      fi
26349      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26350    fi
26351  fi
26352
26353  # Now new_path has a complete unix path to the binary
26354  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26355    # Keep paths in /bin as-is, but remove trailing .exe if any
26356    new_path="${new_path/%.exe/}"
26357    # Do not save /bin paths to all_fixpath_prefixes!
26358  else
26359    # Not in mixed or Windows style, start by that.
26360    new_path=`cmd //c echo $new_path`
26361
26362  input_path="$new_path"
26363  # Check if we need to convert this using DOS-style short mode. If the path
26364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26365  # take no chances and rewrite it.
26366  # Note: m4 eats our [], so we need to use [ and ] instead.
26367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26368  if test "x$has_forbidden_chars" != x; then
26369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26371  fi
26372
26373    # Output is in $new_path
26374
26375  windows_path="$new_path"
26376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26377    unix_path=`$CYGPATH -u "$windows_path"`
26378    new_path="$unix_path"
26379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26381    new_path="$unix_path"
26382  fi
26383
26384    # remove trailing .exe if any
26385    new_path="${new_path/%.exe/}"
26386
26387    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26388    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26389  fi
26390
26391  else
26392    # We're on a posix platform. Hooray! :)
26393    # First separate the path from the arguments. This will split at the first
26394    # space.
26395    complete="$OBJCOPY"
26396    path="${complete%% *}"
26397    tmp="$complete EOL"
26398    arguments="${tmp#* }"
26399
26400    # Cannot rely on the command "which" here since it doesn't always work.
26401    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26402    if test -z "$is_absolute_path"; then
26403      # Path to executable is not absolute. Find it.
26404      IFS_save="$IFS"
26405      IFS=:
26406      for p in $PATH; do
26407        if test -f "$p/$path" && test -x "$p/$path"; then
26408          new_path="$p/$path"
26409          break
26410        fi
26411      done
26412      IFS="$IFS_save"
26413    else
26414      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26415$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26416      new_path="$path"
26417    fi
26418
26419    if test "x$new_path" = x; then
26420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26421$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26422        has_space=`$ECHO "$complete" | $GREP " "`
26423        if test "x$has_space" != x; then
26424          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26425$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26426        fi
26427        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26428      fi
26429  fi
26430
26431      # Now join together the path and the arguments once again
26432      if test "x$arguments" != xEOL; then
26433        new_complete="$new_path ${arguments% *}"
26434      else
26435        new_complete="$new_path"
26436      fi
26437
26438  if test "x$complete" != "x$new_complete"; then
26439      OBJCOPY="$new_complete"
26440      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26441$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26442    fi
26443
26444    fi
26445fi
26446
26447if test -n "$ac_tool_prefix"; then
26448  for ac_prog in gobjdump objdump
26449  do
26450    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26451set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26453$as_echo_n "checking for $ac_word... " >&6; }
26454if ${ac_cv_prog_OBJDUMP+:} false; then :
26455  $as_echo_n "(cached) " >&6
26456else
26457  if test -n "$OBJDUMP"; then
26458  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26459else
26460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26461for as_dir in $PATH
26462do
26463  IFS=$as_save_IFS
26464  test -z "$as_dir" && as_dir=.
26465    for ac_exec_ext in '' $ac_executable_extensions; do
26466  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26467    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26469    break 2
26470  fi
26471done
26472  done
26473IFS=$as_save_IFS
26474
26475fi
26476fi
26477OBJDUMP=$ac_cv_prog_OBJDUMP
26478if test -n "$OBJDUMP"; then
26479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26480$as_echo "$OBJDUMP" >&6; }
26481else
26482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26483$as_echo "no" >&6; }
26484fi
26485
26486
26487    test -n "$OBJDUMP" && break
26488  done
26489fi
26490if test -z "$OBJDUMP"; then
26491  ac_ct_OBJDUMP=$OBJDUMP
26492  for ac_prog in gobjdump objdump
26493do
26494  # Extract the first word of "$ac_prog", so it can be a program name with args.
26495set dummy $ac_prog; ac_word=$2
26496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26497$as_echo_n "checking for $ac_word... " >&6; }
26498if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26499  $as_echo_n "(cached) " >&6
26500else
26501  if test -n "$ac_ct_OBJDUMP"; then
26502  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26503else
26504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26505for as_dir in $PATH
26506do
26507  IFS=$as_save_IFS
26508  test -z "$as_dir" && as_dir=.
26509    for ac_exec_ext in '' $ac_executable_extensions; do
26510  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26511    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26513    break 2
26514  fi
26515done
26516  done
26517IFS=$as_save_IFS
26518
26519fi
26520fi
26521ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26522if test -n "$ac_ct_OBJDUMP"; then
26523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26524$as_echo "$ac_ct_OBJDUMP" >&6; }
26525else
26526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26527$as_echo "no" >&6; }
26528fi
26529
26530
26531  test -n "$ac_ct_OBJDUMP" && break
26532done
26533
26534  if test "x$ac_ct_OBJDUMP" = x; then
26535    OBJDUMP=""
26536  else
26537    case $cross_compiling:$ac_tool_warned in
26538yes:)
26539{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26540$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26541ac_tool_warned=yes ;;
26542esac
26543    OBJDUMP=$ac_ct_OBJDUMP
26544  fi
26545fi
26546
26547if test "x$OBJDUMP" != x; then
26548  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26549
26550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26551
26552  # First separate the path from the arguments. This will split at the first
26553  # space.
26554  complete="$OBJDUMP"
26555  path="${complete%% *}"
26556  tmp="$complete EOL"
26557  arguments="${tmp#* }"
26558
26559  # Input might be given as Windows format, start by converting to
26560  # unix format.
26561  new_path=`$CYGPATH -u "$path"`
26562
26563  # Now try to locate executable using which
26564  new_path=`$WHICH "$new_path" 2> /dev/null`
26565  # bat and cmd files are not always considered executable in cygwin causing which
26566  # to not find them
26567  if test "x$new_path" = x \
26568           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26569           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26570    new_path=`$CYGPATH -u "$path"`
26571  fi
26572  if test "x$new_path" = x; then
26573    # Oops. Which didn't find the executable.
26574    # The splitting of arguments from the executable at a space might have been incorrect,
26575    # since paths with space are more likely in Windows. Give it another try with the whole
26576    # argument.
26577    path="$complete"
26578    arguments="EOL"
26579    new_path=`$CYGPATH -u "$path"`
26580    new_path=`$WHICH "$new_path" 2> /dev/null`
26581    # bat and cmd files are not always considered executable in cygwin causing which
26582    # to not find them
26583    if test "x$new_path" = x \
26584             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26585             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26586      new_path=`$CYGPATH -u "$path"`
26587    fi
26588    if test "x$new_path" = x; then
26589      # It's still not found. Now this is an unrecoverable error.
26590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26591$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26592      has_space=`$ECHO "$complete" | $GREP " "`
26593      if test "x$has_space" != x; then
26594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26596      fi
26597      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26598    fi
26599  fi
26600
26601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26604  # "foo.exe" is OK but "foo" is an error.
26605  #
26606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26607  # It is also a way to make sure we got the proper file name for the real test later on.
26608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26609  if test "x$test_shortpath" = x; then
26610    # Short path failed, file does not exist as specified.
26611    # Try adding .exe or .cmd
26612    if test -f "${new_path}.exe"; then
26613       input_to_shortpath="${new_path}.exe"
26614    elif test -f "${new_path}.cmd"; then
26615       input_to_shortpath="${new_path}.cmd"
26616    else
26617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26618$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26619      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26620$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26621      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26622    fi
26623  else
26624    input_to_shortpath="$new_path"
26625  fi
26626
26627  # Call helper function which possibly converts this using DOS-style short mode.
26628  # If so, the updated path is stored in $new_path.
26629  new_path="$input_to_shortpath"
26630
26631  input_path="$input_to_shortpath"
26632  # Check if we need to convert this using DOS-style short mode. If the path
26633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26634  # take no chances and rewrite it.
26635  # Note: m4 eats our [], so we need to use [ and ] instead.
26636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26637  if test "x$has_forbidden_chars" != x; then
26638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26642      # Going to short mode and back again did indeed matter. Since short mode is
26643      # case insensitive, let's make it lowercase to improve readability.
26644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26645      # Now convert it back to Unix-stile (cygpath)
26646      input_path=`$CYGPATH -u "$shortmode_path"`
26647      new_path="$input_path"
26648    fi
26649  fi
26650
26651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26652  if test "x$test_cygdrive_prefix" = x; then
26653    # As a simple fix, exclude /usr/bin since it's not a real path.
26654    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26656      # a path prefixed by /cygdrive for fixpath to work.
26657      new_path="$CYGWIN_ROOT_PATH$input_path"
26658    fi
26659  fi
26660
26661  # remove trailing .exe if any
26662  new_path="${new_path/%.exe/}"
26663
26664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26665
26666  # First separate the path from the arguments. This will split at the first
26667  # space.
26668  complete="$OBJDUMP"
26669  path="${complete%% *}"
26670  tmp="$complete EOL"
26671  arguments="${tmp#* }"
26672
26673  # Input might be given as Windows format, start by converting to
26674  # unix format.
26675  new_path="$path"
26676
26677  windows_path="$new_path"
26678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26679    unix_path=`$CYGPATH -u "$windows_path"`
26680    new_path="$unix_path"
26681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26683    new_path="$unix_path"
26684  fi
26685
26686
26687  # Now try to locate executable using which
26688  new_path=`$WHICH "$new_path" 2> /dev/null`
26689
26690  if test "x$new_path" = x; then
26691    # Oops. Which didn't find the executable.
26692    # The splitting of arguments from the executable at a space might have been incorrect,
26693    # since paths with space are more likely in Windows. Give it another try with the whole
26694    # argument.
26695    path="$complete"
26696    arguments="EOL"
26697    new_path="$path"
26698
26699  windows_path="$new_path"
26700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26701    unix_path=`$CYGPATH -u "$windows_path"`
26702    new_path="$unix_path"
26703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26705    new_path="$unix_path"
26706  fi
26707
26708
26709    new_path=`$WHICH "$new_path" 2> /dev/null`
26710
26711    if test "x$new_path" = x; then
26712      # It's still not found. Now this is an unrecoverable error.
26713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26714$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26715      has_space=`$ECHO "$complete" | $GREP " "`
26716      if test "x$has_space" != x; then
26717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26719      fi
26720      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26721    fi
26722  fi
26723
26724  # Now new_path has a complete unix path to the binary
26725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26726    # Keep paths in /bin as-is, but remove trailing .exe if any
26727    new_path="${new_path/%.exe/}"
26728    # Do not save /bin paths to all_fixpath_prefixes!
26729  else
26730    # Not in mixed or Windows style, start by that.
26731    new_path=`cmd //c echo $new_path`
26732
26733  input_path="$new_path"
26734  # Check if we need to convert this using DOS-style short mode. If the path
26735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26736  # take no chances and rewrite it.
26737  # Note: m4 eats our [], so we need to use [ and ] instead.
26738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26739  if test "x$has_forbidden_chars" != x; then
26740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26742  fi
26743
26744    # Output is in $new_path
26745
26746  windows_path="$new_path"
26747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26748    unix_path=`$CYGPATH -u "$windows_path"`
26749    new_path="$unix_path"
26750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26752    new_path="$unix_path"
26753  fi
26754
26755    # remove trailing .exe if any
26756    new_path="${new_path/%.exe/}"
26757
26758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26760  fi
26761
26762  else
26763    # We're on a posix platform. Hooray! :)
26764    # First separate the path from the arguments. This will split at the first
26765    # space.
26766    complete="$OBJDUMP"
26767    path="${complete%% *}"
26768    tmp="$complete EOL"
26769    arguments="${tmp#* }"
26770
26771    # Cannot rely on the command "which" here since it doesn't always work.
26772    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26773    if test -z "$is_absolute_path"; then
26774      # Path to executable is not absolute. Find it.
26775      IFS_save="$IFS"
26776      IFS=:
26777      for p in $PATH; do
26778        if test -f "$p/$path" && test -x "$p/$path"; then
26779          new_path="$p/$path"
26780          break
26781        fi
26782      done
26783      IFS="$IFS_save"
26784    else
26785      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26786$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26787      new_path="$path"
26788    fi
26789
26790    if test "x$new_path" = x; then
26791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26792$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26793        has_space=`$ECHO "$complete" | $GREP " "`
26794        if test "x$has_space" != x; then
26795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26797        fi
26798        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26799      fi
26800  fi
26801
26802      # Now join together the path and the arguments once again
26803      if test "x$arguments" != xEOL; then
26804        new_complete="$new_path ${arguments% *}"
26805      else
26806        new_complete="$new_path"
26807      fi
26808
26809  if test "x$complete" != "x$new_complete"; then
26810      OBJDUMP="$new_complete"
26811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26812$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26813    fi
26814
26815fi
26816
26817if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26818   # Extract the first word of "lipo", so it can be a program name with args.
26819set dummy lipo; ac_word=$2
26820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26821$as_echo_n "checking for $ac_word... " >&6; }
26822if ${ac_cv_path_LIPO+:} false; then :
26823  $as_echo_n "(cached) " >&6
26824else
26825  case $LIPO in
26826  [\\/]* | ?:[\\/]*)
26827  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26828  ;;
26829  *)
26830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26831for as_dir in $PATH
26832do
26833  IFS=$as_save_IFS
26834  test -z "$as_dir" && as_dir=.
26835    for ac_exec_ext in '' $ac_executable_extensions; do
26836  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26837    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26839    break 2
26840  fi
26841done
26842  done
26843IFS=$as_save_IFS
26844
26845  ;;
26846esac
26847fi
26848LIPO=$ac_cv_path_LIPO
26849if test -n "$LIPO"; then
26850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26851$as_echo "$LIPO" >&6; }
26852else
26853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26854$as_echo "no" >&6; }
26855fi
26856
26857
26858
26859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26860
26861  # First separate the path from the arguments. This will split at the first
26862  # space.
26863  complete="$LIPO"
26864  path="${complete%% *}"
26865  tmp="$complete EOL"
26866  arguments="${tmp#* }"
26867
26868  # Input might be given as Windows format, start by converting to
26869  # unix format.
26870  new_path=`$CYGPATH -u "$path"`
26871
26872  # Now try to locate executable using which
26873  new_path=`$WHICH "$new_path" 2> /dev/null`
26874  # bat and cmd files are not always considered executable in cygwin causing which
26875  # to not find them
26876  if test "x$new_path" = x \
26877           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26878           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26879    new_path=`$CYGPATH -u "$path"`
26880  fi
26881  if test "x$new_path" = x; then
26882    # Oops. Which didn't find the executable.
26883    # The splitting of arguments from the executable at a space might have been incorrect,
26884    # since paths with space are more likely in Windows. Give it another try with the whole
26885    # argument.
26886    path="$complete"
26887    arguments="EOL"
26888    new_path=`$CYGPATH -u "$path"`
26889    new_path=`$WHICH "$new_path" 2> /dev/null`
26890    # bat and cmd files are not always considered executable in cygwin causing which
26891    # to not find them
26892    if test "x$new_path" = x \
26893             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26894             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26895      new_path=`$CYGPATH -u "$path"`
26896    fi
26897    if test "x$new_path" = x; then
26898      # It's still not found. Now this is an unrecoverable error.
26899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26900$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26901      has_space=`$ECHO "$complete" | $GREP " "`
26902      if test "x$has_space" != x; then
26903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26905      fi
26906      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26907    fi
26908  fi
26909
26910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26913  # "foo.exe" is OK but "foo" is an error.
26914  #
26915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26916  # It is also a way to make sure we got the proper file name for the real test later on.
26917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26918  if test "x$test_shortpath" = x; then
26919    # Short path failed, file does not exist as specified.
26920    # Try adding .exe or .cmd
26921    if test -f "${new_path}.exe"; then
26922       input_to_shortpath="${new_path}.exe"
26923    elif test -f "${new_path}.cmd"; then
26924       input_to_shortpath="${new_path}.cmd"
26925    else
26926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26927$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26930      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26931    fi
26932  else
26933    input_to_shortpath="$new_path"
26934  fi
26935
26936  # Call helper function which possibly converts this using DOS-style short mode.
26937  # If so, the updated path is stored in $new_path.
26938  new_path="$input_to_shortpath"
26939
26940  input_path="$input_to_shortpath"
26941  # Check if we need to convert this using DOS-style short mode. If the path
26942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26943  # take no chances and rewrite it.
26944  # Note: m4 eats our [], so we need to use [ and ] instead.
26945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26946  if test "x$has_forbidden_chars" != x; then
26947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26951      # Going to short mode and back again did indeed matter. Since short mode is
26952      # case insensitive, let's make it lowercase to improve readability.
26953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26954      # Now convert it back to Unix-stile (cygpath)
26955      input_path=`$CYGPATH -u "$shortmode_path"`
26956      new_path="$input_path"
26957    fi
26958  fi
26959
26960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26961  if test "x$test_cygdrive_prefix" = x; then
26962    # As a simple fix, exclude /usr/bin since it's not a real path.
26963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26965      # a path prefixed by /cygdrive for fixpath to work.
26966      new_path="$CYGWIN_ROOT_PATH$input_path"
26967    fi
26968  fi
26969
26970  # remove trailing .exe if any
26971  new_path="${new_path/%.exe/}"
26972
26973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26974
26975  # First separate the path from the arguments. This will split at the first
26976  # space.
26977  complete="$LIPO"
26978  path="${complete%% *}"
26979  tmp="$complete EOL"
26980  arguments="${tmp#* }"
26981
26982  # Input might be given as Windows format, start by converting to
26983  # unix format.
26984  new_path="$path"
26985
26986  windows_path="$new_path"
26987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26988    unix_path=`$CYGPATH -u "$windows_path"`
26989    new_path="$unix_path"
26990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26992    new_path="$unix_path"
26993  fi
26994
26995
26996  # Now try to locate executable using which
26997  new_path=`$WHICH "$new_path" 2> /dev/null`
26998
26999  if test "x$new_path" = x; then
27000    # Oops. Which didn't find the executable.
27001    # The splitting of arguments from the executable at a space might have been incorrect,
27002    # since paths with space are more likely in Windows. Give it another try with the whole
27003    # argument.
27004    path="$complete"
27005    arguments="EOL"
27006    new_path="$path"
27007
27008  windows_path="$new_path"
27009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010    unix_path=`$CYGPATH -u "$windows_path"`
27011    new_path="$unix_path"
27012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014    new_path="$unix_path"
27015  fi
27016
27017
27018    new_path=`$WHICH "$new_path" 2> /dev/null`
27019
27020    if test "x$new_path" = x; then
27021      # It's still not found. Now this is an unrecoverable error.
27022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27023$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27024      has_space=`$ECHO "$complete" | $GREP " "`
27025      if test "x$has_space" != x; then
27026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27028      fi
27029      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27030    fi
27031  fi
27032
27033  # Now new_path has a complete unix path to the binary
27034  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27035    # Keep paths in /bin as-is, but remove trailing .exe if any
27036    new_path="${new_path/%.exe/}"
27037    # Do not save /bin paths to all_fixpath_prefixes!
27038  else
27039    # Not in mixed or Windows style, start by that.
27040    new_path=`cmd //c echo $new_path`
27041
27042  input_path="$new_path"
27043  # Check if we need to convert this using DOS-style short mode. If the path
27044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27045  # take no chances and rewrite it.
27046  # Note: m4 eats our [], so we need to use [ and ] instead.
27047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27048  if test "x$has_forbidden_chars" != x; then
27049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27051  fi
27052
27053    # Output is in $new_path
27054
27055  windows_path="$new_path"
27056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057    unix_path=`$CYGPATH -u "$windows_path"`
27058    new_path="$unix_path"
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061    new_path="$unix_path"
27062  fi
27063
27064    # remove trailing .exe if any
27065    new_path="${new_path/%.exe/}"
27066
27067    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27068    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27069  fi
27070
27071  else
27072    # We're on a posix platform. Hooray! :)
27073    # First separate the path from the arguments. This will split at the first
27074    # space.
27075    complete="$LIPO"
27076    path="${complete%% *}"
27077    tmp="$complete EOL"
27078    arguments="${tmp#* }"
27079
27080    # Cannot rely on the command "which" here since it doesn't always work.
27081    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27082    if test -z "$is_absolute_path"; then
27083      # Path to executable is not absolute. Find it.
27084      IFS_save="$IFS"
27085      IFS=:
27086      for p in $PATH; do
27087        if test -f "$p/$path" && test -x "$p/$path"; then
27088          new_path="$p/$path"
27089          break
27090        fi
27091      done
27092      IFS="$IFS_save"
27093    else
27094      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27095$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27096      new_path="$path"
27097    fi
27098
27099    if test "x$new_path" = x; then
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27101$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27102        has_space=`$ECHO "$complete" | $GREP " "`
27103        if test "x$has_space" != x; then
27104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27106        fi
27107        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27108      fi
27109  fi
27110
27111      # Now join together the path and the arguments once again
27112      if test "x$arguments" != xEOL; then
27113        new_complete="$new_path ${arguments% *}"
27114      else
27115        new_complete="$new_path"
27116      fi
27117
27118  if test "x$complete" != "x$new_complete"; then
27119      LIPO="$new_complete"
27120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27121$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27122    fi
27123
27124fi
27125
27126# Restore old path without tools dir
27127PATH="$OLD_PATH"
27128
27129
27130# FIXME: Currently we must test this after paths but before flags. Fix!
27131
27132# And we can test some aspects on the target using configure macros.
27133
27134
27135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27136$as_echo_n "checking for ANSI C header files... " >&6; }
27137if ${ac_cv_header_stdc+:} false; then :
27138  $as_echo_n "(cached) " >&6
27139else
27140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27141/* end confdefs.h.  */
27142#include <stdlib.h>
27143#include <stdarg.h>
27144#include <string.h>
27145#include <float.h>
27146
27147int
27148main ()
27149{
27150
27151  ;
27152  return 0;
27153}
27154_ACEOF
27155if ac_fn_cxx_try_compile "$LINENO"; then :
27156  ac_cv_header_stdc=yes
27157else
27158  ac_cv_header_stdc=no
27159fi
27160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27161
27162if test $ac_cv_header_stdc = yes; then
27163  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27165/* end confdefs.h.  */
27166#include <string.h>
27167
27168_ACEOF
27169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27170  $EGREP "memchr" >/dev/null 2>&1; then :
27171
27172else
27173  ac_cv_header_stdc=no
27174fi
27175rm -f conftest*
27176
27177fi
27178
27179if test $ac_cv_header_stdc = yes; then
27180  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27182/* end confdefs.h.  */
27183#include <stdlib.h>
27184
27185_ACEOF
27186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27187  $EGREP "free" >/dev/null 2>&1; then :
27188
27189else
27190  ac_cv_header_stdc=no
27191fi
27192rm -f conftest*
27193
27194fi
27195
27196if test $ac_cv_header_stdc = yes; then
27197  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27198  if test "$cross_compiling" = yes; then :
27199  :
27200else
27201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27202/* end confdefs.h.  */
27203#include <ctype.h>
27204#include <stdlib.h>
27205#if ((' ' & 0x0FF) == 0x020)
27206# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27207# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27208#else
27209# define ISLOWER(c) \
27210		   (('a' <= (c) && (c) <= 'i') \
27211		     || ('j' <= (c) && (c) <= 'r') \
27212		     || ('s' <= (c) && (c) <= 'z'))
27213# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27214#endif
27215
27216#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27217int
27218main ()
27219{
27220  int i;
27221  for (i = 0; i < 256; i++)
27222    if (XOR (islower (i), ISLOWER (i))
27223	|| toupper (i) != TOUPPER (i))
27224      return 2;
27225  return 0;
27226}
27227_ACEOF
27228if ac_fn_cxx_try_run "$LINENO"; then :
27229
27230else
27231  ac_cv_header_stdc=no
27232fi
27233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27234  conftest.$ac_objext conftest.beam conftest.$ac_ext
27235fi
27236
27237fi
27238fi
27239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27240$as_echo "$ac_cv_header_stdc" >&6; }
27241if test $ac_cv_header_stdc = yes; then
27242
27243$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27244
27245fi
27246
27247# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27248for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27249		  inttypes.h stdint.h unistd.h
27250do :
27251  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27252ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27253"
27254if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27255  cat >>confdefs.h <<_ACEOF
27256#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27257_ACEOF
27258
27259fi
27260
27261done
27262
27263
27264
27265###############################################################################
27266#
27267# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27268# (The JVM can use 32 or 64 bit Java pointers but that decision
27269# is made at runtime.)
27270#
27271if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27272  # Always specify -m flags on Solaris
27273
27274  # keep track of c/cxx flags that we added outselves...
27275  #   to prevent emitting warning...
27276  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27277  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27278  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27279
27280  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27281  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27282  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27283
27284  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27285  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27286  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27287
27288elif test "x$COMPILE_TYPE" = xreduced; then
27289  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27290    # Specify -m if running reduced on other Posix platforms
27291
27292  # keep track of c/cxx flags that we added outselves...
27293  #   to prevent emitting warning...
27294  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27295  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27296  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27297
27298  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27299  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27300  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27301
27302  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27303  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27304  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27305
27306  fi
27307fi
27308
27309# Make compilation sanity check
27310for ac_header in stdio.h
27311do :
27312  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27313if test "x$ac_cv_header_stdio_h" = xyes; then :
27314  cat >>confdefs.h <<_ACEOF
27315#define HAVE_STDIO_H 1
27316_ACEOF
27317
27318else
27319
27320  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27321$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27322  if test "x$COMPILE_TYPE" = xreduced; then
27323    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27324$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27325  elif test "x$COMPILE_TYPE" = xcross; then
27326    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27327$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27328  fi
27329  as_fn_error $? "Cannot continue." "$LINENO" 5
27330
27331fi
27332
27333done
27334
27335
27336# The cast to long int works around a bug in the HP C Compiler
27337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27339# This bug is HP SR number 8606223364.
27340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27341$as_echo_n "checking size of int *... " >&6; }
27342if ${ac_cv_sizeof_int_p+:} false; then :
27343  $as_echo_n "(cached) " >&6
27344else
27345  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27346
27347else
27348  if test "$ac_cv_type_int_p" = yes; then
27349     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27351as_fn_error 77 "cannot compute sizeof (int *)
27352See \`config.log' for more details" "$LINENO" 5; }
27353   else
27354     ac_cv_sizeof_int_p=0
27355   fi
27356fi
27357
27358fi
27359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27360$as_echo "$ac_cv_sizeof_int_p" >&6; }
27361
27362
27363
27364cat >>confdefs.h <<_ACEOF
27365#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27366_ACEOF
27367
27368
27369
27370if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27371  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27372  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27373fi
27374
27375if test "x$SIZEOF_INT_P" = x; then
27376    # The test failed, lets stick to the assumed value.
27377    { $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
27378$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27379else
27380    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27381
27382    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27383        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
27384    fi
27385fi
27386
27387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27388$as_echo_n "checking for target address size... " >&6; }
27389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27390$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27391
27392
27393###############################################################################
27394#
27395# Is the target little of big endian?
27396#
27397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27398$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27399if ${ac_cv_c_bigendian+:} false; then :
27400  $as_echo_n "(cached) " >&6
27401else
27402  ac_cv_c_bigendian=unknown
27403    # See if we're dealing with a universal compiler.
27404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27405/* end confdefs.h.  */
27406#ifndef __APPLE_CC__
27407	       not a universal capable compiler
27408	     #endif
27409	     typedef int dummy;
27410
27411_ACEOF
27412if ac_fn_cxx_try_compile "$LINENO"; then :
27413
27414	# Check for potential -arch flags.  It is not universal unless
27415	# there are at least two -arch flags with different values.
27416	ac_arch=
27417	ac_prev=
27418	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27419	 if test -n "$ac_prev"; then
27420	   case $ac_word in
27421	     i?86 | x86_64 | ppc | ppc64)
27422	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27423		 ac_arch=$ac_word
27424	       else
27425		 ac_cv_c_bigendian=universal
27426		 break
27427	       fi
27428	       ;;
27429	   esac
27430	   ac_prev=
27431	 elif test "x$ac_word" = "x-arch"; then
27432	   ac_prev=arch
27433	 fi
27434       done
27435fi
27436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27437    if test $ac_cv_c_bigendian = unknown; then
27438      # See if sys/param.h defines the BYTE_ORDER macro.
27439      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27440/* end confdefs.h.  */
27441#include <sys/types.h>
27442	     #include <sys/param.h>
27443
27444int
27445main ()
27446{
27447#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27448		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27449		     && LITTLE_ENDIAN)
27450	      bogus endian macros
27451	     #endif
27452
27453  ;
27454  return 0;
27455}
27456_ACEOF
27457if ac_fn_cxx_try_compile "$LINENO"; then :
27458  # It does; now see whether it defined to BIG_ENDIAN or not.
27459	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27460/* end confdefs.h.  */
27461#include <sys/types.h>
27462		#include <sys/param.h>
27463
27464int
27465main ()
27466{
27467#if BYTE_ORDER != BIG_ENDIAN
27468		 not big endian
27469		#endif
27470
27471  ;
27472  return 0;
27473}
27474_ACEOF
27475if ac_fn_cxx_try_compile "$LINENO"; then :
27476  ac_cv_c_bigendian=yes
27477else
27478  ac_cv_c_bigendian=no
27479fi
27480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27481fi
27482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27483    fi
27484    if test $ac_cv_c_bigendian = unknown; then
27485      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27486      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27487/* end confdefs.h.  */
27488#include <limits.h>
27489
27490int
27491main ()
27492{
27493#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27494	      bogus endian macros
27495	     #endif
27496
27497  ;
27498  return 0;
27499}
27500_ACEOF
27501if ac_fn_cxx_try_compile "$LINENO"; then :
27502  # It does; now see whether it defined to _BIG_ENDIAN or not.
27503	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27504/* end confdefs.h.  */
27505#include <limits.h>
27506
27507int
27508main ()
27509{
27510#ifndef _BIG_ENDIAN
27511		 not big endian
27512		#endif
27513
27514  ;
27515  return 0;
27516}
27517_ACEOF
27518if ac_fn_cxx_try_compile "$LINENO"; then :
27519  ac_cv_c_bigendian=yes
27520else
27521  ac_cv_c_bigendian=no
27522fi
27523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27524fi
27525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27526    fi
27527    if test $ac_cv_c_bigendian = unknown; then
27528      # Compile a test program.
27529      if test "$cross_compiling" = yes; then :
27530  # Try to guess by grepping values from an object file.
27531	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27532/* end confdefs.h.  */
27533short int ascii_mm[] =
27534		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27535		short int ascii_ii[] =
27536		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27537		int use_ascii (int i) {
27538		  return ascii_mm[i] + ascii_ii[i];
27539		}
27540		short int ebcdic_ii[] =
27541		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27542		short int ebcdic_mm[] =
27543		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27544		int use_ebcdic (int i) {
27545		  return ebcdic_mm[i] + ebcdic_ii[i];
27546		}
27547		extern int foo;
27548
27549int
27550main ()
27551{
27552return use_ascii (foo) == use_ebcdic (foo);
27553  ;
27554  return 0;
27555}
27556_ACEOF
27557if ac_fn_cxx_try_compile "$LINENO"; then :
27558  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27559	      ac_cv_c_bigendian=yes
27560	    fi
27561	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27562	      if test "$ac_cv_c_bigendian" = unknown; then
27563		ac_cv_c_bigendian=no
27564	      else
27565		# finding both strings is unlikely to happen, but who knows?
27566		ac_cv_c_bigendian=unknown
27567	      fi
27568	    fi
27569fi
27570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27571else
27572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27573/* end confdefs.h.  */
27574$ac_includes_default
27575int
27576main ()
27577{
27578
27579	     /* Are we little or big endian?  From Harbison&Steele.  */
27580	     union
27581	     {
27582	       long int l;
27583	       char c[sizeof (long int)];
27584	     } u;
27585	     u.l = 1;
27586	     return u.c[sizeof (long int) - 1] == 1;
27587
27588  ;
27589  return 0;
27590}
27591_ACEOF
27592if ac_fn_cxx_try_run "$LINENO"; then :
27593  ac_cv_c_bigendian=no
27594else
27595  ac_cv_c_bigendian=yes
27596fi
27597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27598  conftest.$ac_objext conftest.beam conftest.$ac_ext
27599fi
27600
27601    fi
27602fi
27603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27604$as_echo "$ac_cv_c_bigendian" >&6; }
27605 case $ac_cv_c_bigendian in #(
27606   yes)
27607     ENDIAN="big";; #(
27608   no)
27609     ENDIAN="little" ;; #(
27610   universal)
27611     ENDIAN="universal_endianness"
27612     ;; #(
27613   *)
27614     ENDIAN="unknown" ;;
27615 esac
27616
27617
27618if test "x$ENDIAN" = xuniversal_endianness; then
27619    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27620fi
27621if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27622    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
27623fi
27624
27625
27626# Configure flags for the tools
27627
27628
27629###############################################################################
27630#
27631# How to compile shared libraries.
27632#
27633
27634if test "x$GCC" = xyes; then
27635    COMPILER_NAME=gcc
27636    PICFLAG="-fPIC"
27637    LIBRARY_PREFIX=lib
27638    SHARED_LIBRARY='lib$1.so'
27639    STATIC_LIBRARY='lib$1.a'
27640    SHARED_LIBRARY_FLAGS="-shared"
27641    SHARED_LIBRARY_SUFFIX='.so'
27642    STATIC_LIBRARY_SUFFIX='.a'
27643    OBJ_SUFFIX='.o'
27644    EXE_SUFFIX=''
27645    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27646    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27647    C_FLAG_REORDER=''
27648    CXX_FLAG_REORDER=''
27649    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27650    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27651    LD="$CC"
27652    LDEXE="$CC"
27653    LDCXX="$CXX"
27654    LDEXECXX="$CXX"
27655    POST_STRIP_CMD="$STRIP -g"
27656
27657    # Linking is different on MacOSX
27658    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27659        # Might change in the future to clang.
27660        COMPILER_NAME=gcc
27661        SHARED_LIBRARY='lib$1.dylib'
27662        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27663        SHARED_LIBRARY_SUFFIX='.dylib'
27664        EXE_SUFFIX=''
27665        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27666        SET_SHARED_LIBRARY_MAPFILE=''
27667        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27668        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27669        POST_STRIP_CMD="$STRIP -S"
27670    fi
27671else
27672    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27673        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27674        COMPILER_NAME=ossc
27675        PICFLAG="-KPIC"
27676        LIBRARY_PREFIX=lib
27677        SHARED_LIBRARY='lib$1.so'
27678        STATIC_LIBRARY='lib$1.a'
27679        SHARED_LIBRARY_FLAGS="-G"
27680        SHARED_LIBRARY_SUFFIX='.so'
27681        STATIC_LIBRARY_SUFFIX='.a'
27682        OBJ_SUFFIX='.o'
27683        EXE_SUFFIX=''
27684        SET_SHARED_LIBRARY_NAME=''
27685        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27686	C_FLAG_REORDER='-xF'
27687	CXX_FLAG_REORDER='-xF'
27688        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27689        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27690        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27691        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27692        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27693        POST_STRIP_CMD="$STRIP -x"
27694        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27695    fi
27696    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27697        # If it is not gcc, then assume it is the MS Visual Studio compiler
27698        COMPILER_NAME=cl
27699        PICFLAG=""
27700        LIBRARY_PREFIX=
27701        SHARED_LIBRARY='$1.dll'
27702        STATIC_LIBRARY='$1.lib'
27703        SHARED_LIBRARY_FLAGS="-LD"
27704        SHARED_LIBRARY_SUFFIX='.dll'
27705        STATIC_LIBRARY_SUFFIX='.lib'
27706        OBJ_SUFFIX='.obj'
27707        EXE_SUFFIX='.exe'
27708        SET_SHARED_LIBRARY_NAME=''
27709        SET_SHARED_LIBRARY_MAPFILE=''
27710        SET_SHARED_LIBRARY_ORIGIN=''
27711        SET_EXECUTABLE_ORIGIN=''
27712    fi
27713fi
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732# The (cross) compiler is now configured, we can now test capabilities
27733# of the target platform.
27734
27735
27736
27737###############################################################################
27738#
27739# Setup the opt flags for different compilers
27740# and different operating systems.
27741#
27742
27743#
27744# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27745#
27746if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27747    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27748    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27749    CFLAGS="$CFLAGS -mstackrealign"
27750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27751$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27752    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27753/* end confdefs.h.  */
27754int main() { return 0; }
27755_ACEOF
27756if ac_fn_cxx_try_link "$LINENO"; then :
27757
27758		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27759$as_echo "yes" >&6; }
27760
27761else
27762
27763		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27764$as_echo "no" >&6; }
27765	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27766
27767fi
27768rm -f core conftest.err conftest.$ac_objext \
27769    conftest$ac_exeext conftest.$ac_ext
27770fi
27771
27772C_FLAG_DEPS="-MMD -MF"
27773CXX_FLAG_DEPS="-MMD -MF"
27774
27775case $COMPILER_TYPE in
27776  CC )
27777    D_FLAG="-g"
27778    case $COMPILER_NAME in
27779      gcc )
27780      	case $OPENJDK_TARGET_OS in
27781	  macosx )
27782	    # On MacOSX we optimize for size, something
27783	    # we should do for all platforms?
27784	    C_O_FLAG_HI="-Os"
27785	    C_O_FLAG_NORM="-Os"
27786	    C_O_FLAG_NONE=""
27787	    ;;
27788	  *)
27789	    C_O_FLAG_HI="-O3"
27790	    C_O_FLAG_NORM="-O2"
27791	    C_O_FLAG_NONE="-O0"
27792	    CFLAGS_DEBUG_SYMBOLS="-g"
27793	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27794	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27795	       CFLAGS_DEBUG_SYMBOLS="-g1"
27796	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27797	    fi
27798	    ;;
27799	esac
27800        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27801        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27802        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27803        ;;
27804      ossc )
27805        #
27806        # Forte has different names for this with their C++ compiler...
27807        #
27808        C_FLAG_DEPS="-xMMD -xMF"
27809        CXX_FLAG_DEPS="-xMMD -xMF"
27810
27811        # Extra options used with HIGHEST
27812        #
27813        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27814        #          done with care, there are some assumptions below that need to
27815        #          be understood about the use of pointers, and IEEE behavior.
27816        #
27817        # Use non-standard floating point mode (not IEEE 754)
27818        CC_HIGHEST="$CC_HIGHEST -fns"
27819        # Do some simplification of floating point arithmetic (not IEEE 754)
27820        CC_HIGHEST="$CC_HIGHEST -fsimple"
27821        # Use single precision floating point with 'float'
27822        CC_HIGHEST="$CC_HIGHEST -fsingle"
27823        # Assume memory references via basic pointer types do not alias
27824        #   (Source with excessing pointer casting and data access with mixed
27825        #    pointer types are not recommended)
27826        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27827        # Use intrinsic or inline versions for math/std functions
27828        #   (If you expect perfect errno behavior, do not use this)
27829        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27830        # Loop data dependency optimizations (need -xO3 or higher)
27831        CC_HIGHEST="$CC_HIGHEST -xdepend"
27832        # Pointer parameters to functions do not overlap
27833        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27834        #    If you pass in multiple pointers to the same data, do not use this)
27835        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27836        # Inline some library routines
27837        #   (If you expect perfect errno behavior, do not use this)
27838        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27839        # Use optimized math routines
27840        #   (If you expect perfect errno behavior, do not use this)
27841        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27842        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27843
27844        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27845          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27846          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27847        fi
27848
27849        case $OPENJDK_TARGET_CPU_ARCH in
27850          x86)
27851            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27852            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27853            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27854            C_O_FLAG_NONE="-xregs=no%frameptr"
27855            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27856            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27857            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27858            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27859            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27860               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27861               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27862            fi
27863            ;;
27864          sparc)
27865            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27866            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27867            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27868            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27869            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27870            C_O_FLAG_NONE=""
27871            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27872            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27873            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27874            CXX_O_FLAG_NONE=""
27875            ;;
27876        esac
27877
27878    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27879    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27880    esac
27881    ;;
27882  CL )
27883    D_FLAG=
27884    C_O_FLAG_HIGHEST="-O2"
27885    C_O_FLAG_HI="-O1"
27886    C_O_FLAG_NORM="-O1"
27887    C_O_FLAG_NONE="-Od"
27888    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27889    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27890    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27891    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27892    ;;
27893esac
27894
27895if test -z "$C_O_FLAG_HIGHEST"; then
27896   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27897fi
27898
27899if test -z "$CXX_O_FLAG_HIGHEST"; then
27900   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27901fi
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27917   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27918$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27919fi
27920
27921if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27922   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27923$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27924fi
27925
27926if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27927   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27928$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27929fi
27930
27931
27932# Check whether --with-extra-cflags was given.
27933if test "${with_extra_cflags+set}" = set; then :
27934  withval=$with_extra_cflags;
27935fi
27936
27937
27938
27939# Check whether --with-extra-cxxflags was given.
27940if test "${with_extra_cxxflags+set}" = set; then :
27941  withval=$with_extra_cxxflags;
27942fi
27943
27944
27945
27946# Check whether --with-extra-ldflags was given.
27947if test "${with_extra_ldflags+set}" = set; then :
27948  withval=$with_extra_ldflags;
27949fi
27950
27951
27952CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27953CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27954LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27955
27956# Hotspot needs these set in their legacy form
27957LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27958LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27959LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27960
27961
27962
27963
27964
27965###############################################################################
27966#
27967# Now setup the CFLAGS and LDFLAGS for the JDK build.
27968# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27969#
27970case $COMPILER_NAME in
27971      gcc )
27972      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27973                          -pipe \
27974                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27975	  case $OPENJDK_TARGET_CPU_ARCH in
27976	  arm )
27977            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27978	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27979	  ;;
27980	  ppc )
27981            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27982	  ;;
27983	  * )
27984	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27985	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27986          ;;
27987	  esac
27988          ;;
27989      ossc )
27990          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27991          case $OPENJDK_TARGET_CPU_ARCH in
27992          x86 )
27993            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27994       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27995          ;;
27996          esac
27997
27998      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27999      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28000
28001          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28002          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28003          ;;
28004      cl )
28005          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28006               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28007	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28008	       -DWIN32 -DIAL"
28009          case $OPENJDK_TARGET_CPU in
28010              x86 )
28011                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28012                  ;;
28013              x86_64 )
28014                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28015                  ;;
28016          esac
28017          ;;
28018esac
28019
28020###############################################################################
28021
28022CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28023
28024# The package path is used only on macosx?
28025PACKAGE_PATH=/opt/local
28026
28027
28028if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28029    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28030    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28031    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28032    #   Note: -Dmacro         is the same as    #define macro 1
28033    #         -Dmacro=	    is the same as    #define macro
28034    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28035        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28036    else
28037        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28038    fi
28039else
28040    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28041fi
28042if test "x$OPENJDK_TARGET_OS" = xlinux; then
28043    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28044fi
28045if test "x$OPENJDK_TARGET_OS" = xwindows; then
28046    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28047fi
28048if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28049    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28050fi
28051if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28052    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28053fi
28054if test "x$OPENJDK_TARGET_OS" = xbsd; then
28055    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28056fi
28057if test "x$DEBUG_LEVEL" = xrelease; then
28058    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28059    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28060        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28061    fi
28062else
28063    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28064fi
28065
28066CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28067CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28068
28069CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28070        -I${JDK_OUTPUTDIR}/include \
28071        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28072        -I${JDK_TOPDIR}/src/share/javavm/export \
28073        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28074        -I${JDK_TOPDIR}/src/share/native/common \
28075        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28076
28077# The shared libraries are compiled using the picflag.
28078CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28079CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28080
28081# Executable flags
28082CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28083CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28084
28085# Now this is odd. The JDK native libraries have to link against libjvm.so
28086# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28087# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28088# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28089# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28090# libraries will link to whatever is in memory. Yuck.
28091#
28092# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28093if test "x$COMPILER_NAME" = xcl; then
28094    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28095    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28096        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28097    fi
28098    # TODO: make -debug optional "--disable-full-debug-symbols"
28099    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28100    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28101    LDFLAGS_JDKLIB_SUFFIX=""
28102    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28103        LDFLAGS_STACK_SIZE=1048576
28104    else
28105        LDFLAGS_STACK_SIZE=327680
28106    fi
28107    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28108else
28109    if test "x$COMPILER_NAME" = xgcc; then
28110        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28111        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28112        if test -n "$HAS_GNU_HASH"; then
28113            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28114        fi
28115        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28116          # And since we now know that the linker is gnu, then add -z defs, to forbid
28117          # undefined symbols in object files.
28118          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28119          if test "x$DEBUG_LEVEL" = "xrelease"; then
28120              # When building release libraries, tell the linker optimize them.
28121              # Should this be supplied to the OSS linker as well?
28122              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28123          fi
28124        fi
28125    fi
28126    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28127                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28128
28129    # On some platforms (mac) the linker warns about non existing -L dirs.
28130    # Add server first if available. Linking aginst client does not always produce the same results.
28131    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28132    # Default to server for other variants.
28133    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28134        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28135    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28136        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28137    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28138        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28139    else
28140        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28141    fi
28142
28143    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28144    if test "x$COMPILER_NAME" = xossc; then
28145        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28146    fi
28147
28148    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28149    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28150        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28151    fi
28152fi
28153
28154# Adjust flags according to debug level.
28155case $DEBUG_LEVEL in
28156      fastdebug )
28157              CFLAGS="$CFLAGS $D_FLAG"
28158              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28159              ;;
28160      slowdebug )
28161              CFLAGS="$CFLAGS $D_FLAG"
28162	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28163	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28164	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28165	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28166              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28167              ;;
28168esac
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184# Setup debug symbols (need objcopy from the toolchain for that)
28185
28186#
28187# ENABLE_DEBUG_SYMBOLS
28188# This must be done after the toolchain is setup, since we're looking at objcopy.
28189#
28190# Check whether --enable-debug-symbols was given.
28191if test "${enable_debug_symbols+set}" = set; then :
28192  enableval=$enable_debug_symbols;
28193fi
28194
28195
28196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28197$as_echo_n "checking if we should generate debug symbols... " >&6; }
28198
28199if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28200   # explicit enabling of enable-debug-symbols and can't find objcopy
28201   #   this is an error
28202   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28203fi
28204
28205if test "x$enable_debug_symbols" = "xyes"; then
28206  ENABLE_DEBUG_SYMBOLS=true
28207elif test "x$enable_debug_symbols" = "xno"; then
28208  ENABLE_DEBUG_SYMBOLS=false
28209else
28210  # default on macosx is false
28211  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28212    ENABLE_DEBUG_SYMBOLS=false
28213  # Default is on if objcopy is found, otherwise off
28214  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28215    ENABLE_DEBUG_SYMBOLS=true
28216  else
28217    ENABLE_DEBUG_SYMBOLS=false
28218  fi
28219fi
28220
28221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28222$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28223
28224#
28225# ZIP_DEBUGINFO_FILES
28226#
28227# Check whether --enable-zip-debug-info was given.
28228if test "${enable_zip_debug_info+set}" = set; then :
28229  enableval=$enable_zip_debug_info;
28230fi
28231
28232
28233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28234$as_echo_n "checking if we should zip debug-info files... " >&6; }
28235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28236$as_echo "${enable_zip_debug_info}" >&6; }
28237
28238if test "x${enable_zip_debug_info}" = "xno"; then
28239   ZIP_DEBUGINFO_FILES=false
28240else
28241   ZIP_DEBUGINFO_FILES=true
28242fi
28243
28244
28245
28246
28247
28248
28249
28250###############################################################################
28251#
28252# Check dependencies for external and internal libraries.
28253#
28254###############################################################################
28255
28256
28257
28258###############################################################################
28259#
28260# OS specific settings that we never will need to probe.
28261#
28262if test "x$OPENJDK_TARGET_OS" = xlinux; then
28263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28264$as_echo_n "checking what is not needed on Linux?... " >&6; }
28265    PULSE_NOT_NEEDED=yes
28266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28267$as_echo "pulse" >&6; }
28268fi
28269
28270if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28272$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28273    ALSA_NOT_NEEDED=yes
28274    PULSE_NOT_NEEDED=yes
28275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28276$as_echo "alsa pulse" >&6; }
28277fi
28278
28279if test "x$OPENJDK_TARGET_OS" = xwindows; then
28280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28281$as_echo_n "checking what is not needed on Windows?... " >&6; }
28282    CUPS_NOT_NEEDED=yes
28283    ALSA_NOT_NEEDED=yes
28284    PULSE_NOT_NEEDED=yes
28285    X11_NOT_NEEDED=yes
28286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28287$as_echo "alsa cups pulse x11" >&6; }
28288fi
28289
28290if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28292$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28293    ALSA_NOT_NEEDED=yes
28294    PULSE_NOT_NEEDED=yes
28295    X11_NOT_NEEDED=yes
28296    FREETYPE2_NOT_NEEDED=yes
28297    # If the java runtime framework is disabled, then we need X11.
28298    # This will be adjusted below.
28299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28300$as_echo "alsa pulse x11" >&6; }
28301fi
28302
28303if test "x$OPENJDK_TARGET_OS" = xbsd; then
28304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28305$as_echo_n "checking what is not needed on bsd?... " >&6; }
28306    ALSA_NOT_NEEDED=yes
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28308$as_echo "alsa" >&6; }
28309fi
28310
28311if test "x$OPENJDK" = "xfalse"; then
28312    FREETYPE2_NOT_NEEDED=yes
28313fi
28314
28315if test "x$SUPPORT_HEADFUL" = xno; then
28316    X11_NOT_NEEDED=yes
28317fi
28318
28319###############################################################################
28320#
28321# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28322# that uses this API.
28323#
28324# Check whether --enable-macosx-runtime-support was given.
28325if test "${enable_macosx_runtime_support+set}" = set; then :
28326  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28327else
28328  MACOSX_RUNTIME_SUPPORT="no"
28329fi
28330
28331
28332USE_MACOSX_RUNTIME_SUPPORT=no
28333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28334$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28335if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28336    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28337        MACOSX_RUNTIME_SUPPORT=yes
28338        USE_MACOSX_RUNTIME_SUPPORT=yes
28339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28340$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28341    else
28342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28343$as_echo "yes, but explicitly disabled." >&6; }
28344    fi
28345else
28346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28347$as_echo "no" >&6; }
28348fi
28349
28350if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28352$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28353    X11_NOT_NEEDED=
28354    FREETYPE2_NOT_NEEDED=
28355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28356$as_echo "alsa pulse" >&6; }
28357fi
28358
28359
28360
28361
28362###############################################################################
28363#
28364# Check for X Windows
28365#
28366
28367# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28368# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28369# --x-libraries for the sysroot, if that seems to be correct.
28370if test "x$SYS_ROOT" != "x/"; then
28371  if test "x$x_includes" = xNONE; then
28372    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28373      x_includes="$SYS_ROOT/usr/X11R6/include"
28374    fi
28375  fi
28376  if test "x$x_libraries" = xNONE; then
28377    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28378      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28379    fi
28380  fi
28381fi
28382
28383# Now let autoconf do it's magic
28384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28385$as_echo_n "checking for X... " >&6; }
28386
28387
28388# Check whether --with-x was given.
28389if test "${with_x+set}" = set; then :
28390  withval=$with_x;
28391fi
28392
28393# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28394if test "x$with_x" = xno; then
28395  # The user explicitly disabled X.
28396  have_x=disabled
28397else
28398  case $x_includes,$x_libraries in #(
28399    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28400    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28401  $as_echo_n "(cached) " >&6
28402else
28403  # One or both of the vars are not set, and there is no cached value.
28404ac_x_includes=no ac_x_libraries=no
28405rm -f -r conftest.dir
28406if mkdir conftest.dir; then
28407  cd conftest.dir
28408  cat >Imakefile <<'_ACEOF'
28409incroot:
28410	@echo incroot='${INCROOT}'
28411usrlibdir:
28412	@echo usrlibdir='${USRLIBDIR}'
28413libdir:
28414	@echo libdir='${LIBDIR}'
28415_ACEOF
28416  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28417    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28418    for ac_var in incroot usrlibdir libdir; do
28419      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28420    done
28421    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28422    for ac_extension in a so sl dylib la dll; do
28423      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28424	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28425	ac_im_usrlibdir=$ac_im_libdir; break
28426      fi
28427    done
28428    # Screen out bogus values from the imake configuration.  They are
28429    # bogus both because they are the default anyway, and because
28430    # using them would break gcc on systems where it needs fixed includes.
28431    case $ac_im_incroot in
28432	/usr/include) ac_x_includes= ;;
28433	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28434    esac
28435    case $ac_im_usrlibdir in
28436	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28437	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28438    esac
28439  fi
28440  cd ..
28441  rm -f -r conftest.dir
28442fi
28443
28444# Standard set of common directories for X headers.
28445# Check X11 before X11Rn because it is often a symlink to the current release.
28446ac_x_header_dirs='
28447/usr/X11/include
28448/usr/X11R7/include
28449/usr/X11R6/include
28450/usr/X11R5/include
28451/usr/X11R4/include
28452
28453/usr/include/X11
28454/usr/include/X11R7
28455/usr/include/X11R6
28456/usr/include/X11R5
28457/usr/include/X11R4
28458
28459/usr/local/X11/include
28460/usr/local/X11R7/include
28461/usr/local/X11R6/include
28462/usr/local/X11R5/include
28463/usr/local/X11R4/include
28464
28465/usr/local/include/X11
28466/usr/local/include/X11R7
28467/usr/local/include/X11R6
28468/usr/local/include/X11R5
28469/usr/local/include/X11R4
28470
28471/usr/X386/include
28472/usr/x386/include
28473/usr/XFree86/include/X11
28474
28475/usr/include
28476/usr/local/include
28477/usr/unsupported/include
28478/usr/athena/include
28479/usr/local/x11r5/include
28480/usr/lpp/Xamples/include
28481
28482/usr/openwin/include
28483/usr/openwin/share/include'
28484
28485if test "$ac_x_includes" = no; then
28486  # Guess where to find include files, by looking for Xlib.h.
28487  # First, try using that file with no special directory specified.
28488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28489/* end confdefs.h.  */
28490#include <X11/Xlib.h>
28491_ACEOF
28492if ac_fn_cxx_try_cpp "$LINENO"; then :
28493  # We can compile using X headers with no special include directory.
28494ac_x_includes=
28495else
28496  for ac_dir in $ac_x_header_dirs; do
28497  if test -r "$ac_dir/X11/Xlib.h"; then
28498    ac_x_includes=$ac_dir
28499    break
28500  fi
28501done
28502fi
28503rm -f conftest.err conftest.i conftest.$ac_ext
28504fi # $ac_x_includes = no
28505
28506if test "$ac_x_libraries" = no; then
28507  # Check for the libraries.
28508  # See if we find them without any special options.
28509  # Don't add to $LIBS permanently.
28510  ac_save_LIBS=$LIBS
28511  LIBS="-lX11 $LIBS"
28512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28513/* end confdefs.h.  */
28514#include <X11/Xlib.h>
28515int
28516main ()
28517{
28518XrmInitialize ()
28519  ;
28520  return 0;
28521}
28522_ACEOF
28523if ac_fn_cxx_try_link "$LINENO"; then :
28524  LIBS=$ac_save_LIBS
28525# We can link X programs with no special library path.
28526ac_x_libraries=
28527else
28528  LIBS=$ac_save_LIBS
28529for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28530do
28531  # Don't even attempt the hair of trying to link an X program!
28532  for ac_extension in a so sl dylib la dll; do
28533    if test -r "$ac_dir/libX11.$ac_extension"; then
28534      ac_x_libraries=$ac_dir
28535      break 2
28536    fi
28537  done
28538done
28539fi
28540rm -f core conftest.err conftest.$ac_objext \
28541    conftest$ac_exeext conftest.$ac_ext
28542fi # $ac_x_libraries = no
28543
28544case $ac_x_includes,$ac_x_libraries in #(
28545  no,* | *,no | *\'*)
28546    # Didn't find X, or a directory has "'" in its name.
28547    ac_cv_have_x="have_x=no";; #(
28548  *)
28549    # Record where we found X for the cache.
28550    ac_cv_have_x="have_x=yes\
28551	ac_x_includes='$ac_x_includes'\
28552	ac_x_libraries='$ac_x_libraries'"
28553esac
28554fi
28555;; #(
28556    *) have_x=yes;;
28557  esac
28558  eval "$ac_cv_have_x"
28559fi # $with_x != no
28560
28561if test "$have_x" != yes; then
28562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28563$as_echo "$have_x" >&6; }
28564  no_x=yes
28565else
28566  # If each of the values was on the command line, it overrides each guess.
28567  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28568  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28569  # Update the cache value to reflect the command line values.
28570  ac_cv_have_x="have_x=yes\
28571	ac_x_includes='$x_includes'\
28572	ac_x_libraries='$x_libraries'"
28573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28574$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28575fi
28576
28577if test "$no_x" = yes; then
28578  # Not all programs may use this symbol, but it does not hurt to define it.
28579
28580$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28581
28582  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28583else
28584  if test -n "$x_includes"; then
28585    X_CFLAGS="$X_CFLAGS -I$x_includes"
28586  fi
28587
28588  # It would also be nice to do this for all -L options, not just this one.
28589  if test -n "$x_libraries"; then
28590    X_LIBS="$X_LIBS -L$x_libraries"
28591    # For Solaris; some versions of Sun CC require a space after -R and
28592    # others require no space.  Words are not sufficient . . . .
28593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28594$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28595    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28596    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28597    ac_cxx_werror_flag=yes
28598    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28599/* end confdefs.h.  */
28600
28601int
28602main ()
28603{
28604
28605  ;
28606  return 0;
28607}
28608_ACEOF
28609if ac_fn_cxx_try_link "$LINENO"; then :
28610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28611$as_echo "no" >&6; }
28612       X_LIBS="$X_LIBS -R$x_libraries"
28613else
28614  LIBS="$ac_xsave_LIBS -R $x_libraries"
28615       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28616/* end confdefs.h.  */
28617
28618int
28619main ()
28620{
28621
28622  ;
28623  return 0;
28624}
28625_ACEOF
28626if ac_fn_cxx_try_link "$LINENO"; then :
28627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28628$as_echo "yes" >&6; }
28629	  X_LIBS="$X_LIBS -R $x_libraries"
28630else
28631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28632$as_echo "neither works" >&6; }
28633fi
28634rm -f core conftest.err conftest.$ac_objext \
28635    conftest$ac_exeext conftest.$ac_ext
28636fi
28637rm -f core conftest.err conftest.$ac_objext \
28638    conftest$ac_exeext conftest.$ac_ext
28639    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28640    LIBS=$ac_xsave_LIBS
28641  fi
28642
28643  # Check for system-dependent libraries X programs must link with.
28644  # Do this before checking for the system-independent R6 libraries
28645  # (-lICE), since we may need -lsocket or whatever for X linking.
28646
28647  if test "$ISC" = yes; then
28648    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28649  else
28650    # Martyn Johnson says this is needed for Ultrix, if the X
28651    # libraries were built with DECnet support.  And Karl Berry says
28652    # the Alpha needs dnet_stub (dnet does not exist).
28653    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28654    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28655/* end confdefs.h.  */
28656
28657/* Override any GCC internal prototype to avoid an error.
28658   Use char because int might match the return type of a GCC
28659   builtin and then its argument prototype would still apply.  */
28660#ifdef __cplusplus
28661extern "C"
28662#endif
28663char XOpenDisplay ();
28664int
28665main ()
28666{
28667return XOpenDisplay ();
28668  ;
28669  return 0;
28670}
28671_ACEOF
28672if ac_fn_cxx_try_link "$LINENO"; then :
28673
28674else
28675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28676$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28677if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28678  $as_echo_n "(cached) " >&6
28679else
28680  ac_check_lib_save_LIBS=$LIBS
28681LIBS="-ldnet  $LIBS"
28682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28683/* end confdefs.h.  */
28684
28685/* Override any GCC internal prototype to avoid an error.
28686   Use char because int might match the return type of a GCC
28687   builtin and then its argument prototype would still apply.  */
28688#ifdef __cplusplus
28689extern "C"
28690#endif
28691char dnet_ntoa ();
28692int
28693main ()
28694{
28695return dnet_ntoa ();
28696  ;
28697  return 0;
28698}
28699_ACEOF
28700if ac_fn_cxx_try_link "$LINENO"; then :
28701  ac_cv_lib_dnet_dnet_ntoa=yes
28702else
28703  ac_cv_lib_dnet_dnet_ntoa=no
28704fi
28705rm -f core conftest.err conftest.$ac_objext \
28706    conftest$ac_exeext conftest.$ac_ext
28707LIBS=$ac_check_lib_save_LIBS
28708fi
28709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28710$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28711if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28712  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28713fi
28714
28715    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28717$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28718if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28719  $as_echo_n "(cached) " >&6
28720else
28721  ac_check_lib_save_LIBS=$LIBS
28722LIBS="-ldnet_stub  $LIBS"
28723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28724/* end confdefs.h.  */
28725
28726/* Override any GCC internal prototype to avoid an error.
28727   Use char because int might match the return type of a GCC
28728   builtin and then its argument prototype would still apply.  */
28729#ifdef __cplusplus
28730extern "C"
28731#endif
28732char dnet_ntoa ();
28733int
28734main ()
28735{
28736return dnet_ntoa ();
28737  ;
28738  return 0;
28739}
28740_ACEOF
28741if ac_fn_cxx_try_link "$LINENO"; then :
28742  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28743else
28744  ac_cv_lib_dnet_stub_dnet_ntoa=no
28745fi
28746rm -f core conftest.err conftest.$ac_objext \
28747    conftest$ac_exeext conftest.$ac_ext
28748LIBS=$ac_check_lib_save_LIBS
28749fi
28750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28751$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28752if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28753  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28754fi
28755
28756    fi
28757fi
28758rm -f core conftest.err conftest.$ac_objext \
28759    conftest$ac_exeext conftest.$ac_ext
28760    LIBS="$ac_xsave_LIBS"
28761
28762    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28763    # to get the SysV transport functions.
28764    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28765    # needs -lnsl.
28766    # The nsl library prevents programs from opening the X display
28767    # on Irix 5.2, according to T.E. Dickey.
28768    # The functions gethostbyname, getservbyname, and inet_addr are
28769    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28770    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28771if test "x$ac_cv_func_gethostbyname" = xyes; then :
28772
28773fi
28774
28775    if test $ac_cv_func_gethostbyname = no; then
28776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28777$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28778if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28779  $as_echo_n "(cached) " >&6
28780else
28781  ac_check_lib_save_LIBS=$LIBS
28782LIBS="-lnsl  $LIBS"
28783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28784/* end confdefs.h.  */
28785
28786/* Override any GCC internal prototype to avoid an error.
28787   Use char because int might match the return type of a GCC
28788   builtin and then its argument prototype would still apply.  */
28789#ifdef __cplusplus
28790extern "C"
28791#endif
28792char gethostbyname ();
28793int
28794main ()
28795{
28796return gethostbyname ();
28797  ;
28798  return 0;
28799}
28800_ACEOF
28801if ac_fn_cxx_try_link "$LINENO"; then :
28802  ac_cv_lib_nsl_gethostbyname=yes
28803else
28804  ac_cv_lib_nsl_gethostbyname=no
28805fi
28806rm -f core conftest.err conftest.$ac_objext \
28807    conftest$ac_exeext conftest.$ac_ext
28808LIBS=$ac_check_lib_save_LIBS
28809fi
28810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28811$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28812if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
28813  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28814fi
28815
28816      if test $ac_cv_lib_nsl_gethostbyname = no; then
28817	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28818$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28819if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
28820  $as_echo_n "(cached) " >&6
28821else
28822  ac_check_lib_save_LIBS=$LIBS
28823LIBS="-lbsd  $LIBS"
28824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28825/* end confdefs.h.  */
28826
28827/* Override any GCC internal prototype to avoid an error.
28828   Use char because int might match the return type of a GCC
28829   builtin and then its argument prototype would still apply.  */
28830#ifdef __cplusplus
28831extern "C"
28832#endif
28833char gethostbyname ();
28834int
28835main ()
28836{
28837return gethostbyname ();
28838  ;
28839  return 0;
28840}
28841_ACEOF
28842if ac_fn_cxx_try_link "$LINENO"; then :
28843  ac_cv_lib_bsd_gethostbyname=yes
28844else
28845  ac_cv_lib_bsd_gethostbyname=no
28846fi
28847rm -f core conftest.err conftest.$ac_objext \
28848    conftest$ac_exeext conftest.$ac_ext
28849LIBS=$ac_check_lib_save_LIBS
28850fi
28851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28852$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28853if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
28854  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28855fi
28856
28857      fi
28858    fi
28859
28860    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28861    # socket/setsockopt and other routines are undefined under SCO ODT
28862    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28863    # on later versions), says Simon Leinen: it contains gethostby*
28864    # variants that don't use the name server (or something).  -lsocket
28865    # must be given before -lnsl if both are needed.  We assume that
28866    # if connect needs -lnsl, so does gethostbyname.
28867    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28868if test "x$ac_cv_func_connect" = xyes; then :
28869
28870fi
28871
28872    if test $ac_cv_func_connect = no; then
28873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28874$as_echo_n "checking for connect in -lsocket... " >&6; }
28875if ${ac_cv_lib_socket_connect+:} false; then :
28876  $as_echo_n "(cached) " >&6
28877else
28878  ac_check_lib_save_LIBS=$LIBS
28879LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28881/* end confdefs.h.  */
28882
28883/* Override any GCC internal prototype to avoid an error.
28884   Use char because int might match the return type of a GCC
28885   builtin and then its argument prototype would still apply.  */
28886#ifdef __cplusplus
28887extern "C"
28888#endif
28889char connect ();
28890int
28891main ()
28892{
28893return connect ();
28894  ;
28895  return 0;
28896}
28897_ACEOF
28898if ac_fn_cxx_try_link "$LINENO"; then :
28899  ac_cv_lib_socket_connect=yes
28900else
28901  ac_cv_lib_socket_connect=no
28902fi
28903rm -f core conftest.err conftest.$ac_objext \
28904    conftest$ac_exeext conftest.$ac_ext
28905LIBS=$ac_check_lib_save_LIBS
28906fi
28907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28908$as_echo "$ac_cv_lib_socket_connect" >&6; }
28909if test "x$ac_cv_lib_socket_connect" = xyes; then :
28910  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28911fi
28912
28913    fi
28914
28915    # Guillermo Gomez says -lposix is necessary on A/UX.
28916    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28917if test "x$ac_cv_func_remove" = xyes; then :
28918
28919fi
28920
28921    if test $ac_cv_func_remove = no; then
28922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28923$as_echo_n "checking for remove in -lposix... " >&6; }
28924if ${ac_cv_lib_posix_remove+:} false; then :
28925  $as_echo_n "(cached) " >&6
28926else
28927  ac_check_lib_save_LIBS=$LIBS
28928LIBS="-lposix  $LIBS"
28929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28930/* end confdefs.h.  */
28931
28932/* Override any GCC internal prototype to avoid an error.
28933   Use char because int might match the return type of a GCC
28934   builtin and then its argument prototype would still apply.  */
28935#ifdef __cplusplus
28936extern "C"
28937#endif
28938char remove ();
28939int
28940main ()
28941{
28942return remove ();
28943  ;
28944  return 0;
28945}
28946_ACEOF
28947if ac_fn_cxx_try_link "$LINENO"; then :
28948  ac_cv_lib_posix_remove=yes
28949else
28950  ac_cv_lib_posix_remove=no
28951fi
28952rm -f core conftest.err conftest.$ac_objext \
28953    conftest$ac_exeext conftest.$ac_ext
28954LIBS=$ac_check_lib_save_LIBS
28955fi
28956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28957$as_echo "$ac_cv_lib_posix_remove" >&6; }
28958if test "x$ac_cv_lib_posix_remove" = xyes; then :
28959  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28960fi
28961
28962    fi
28963
28964    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28965    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28966if test "x$ac_cv_func_shmat" = xyes; then :
28967
28968fi
28969
28970    if test $ac_cv_func_shmat = no; then
28971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28972$as_echo_n "checking for shmat in -lipc... " >&6; }
28973if ${ac_cv_lib_ipc_shmat+:} false; then :
28974  $as_echo_n "(cached) " >&6
28975else
28976  ac_check_lib_save_LIBS=$LIBS
28977LIBS="-lipc  $LIBS"
28978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28979/* end confdefs.h.  */
28980
28981/* Override any GCC internal prototype to avoid an error.
28982   Use char because int might match the return type of a GCC
28983   builtin and then its argument prototype would still apply.  */
28984#ifdef __cplusplus
28985extern "C"
28986#endif
28987char shmat ();
28988int
28989main ()
28990{
28991return shmat ();
28992  ;
28993  return 0;
28994}
28995_ACEOF
28996if ac_fn_cxx_try_link "$LINENO"; then :
28997  ac_cv_lib_ipc_shmat=yes
28998else
28999  ac_cv_lib_ipc_shmat=no
29000fi
29001rm -f core conftest.err conftest.$ac_objext \
29002    conftest$ac_exeext conftest.$ac_ext
29003LIBS=$ac_check_lib_save_LIBS
29004fi
29005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29006$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29007if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29008  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29009fi
29010
29011    fi
29012  fi
29013
29014  # Check for libraries that X11R6 Xt/Xaw programs need.
29015  ac_save_LDFLAGS=$LDFLAGS
29016  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29017  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29018  # check for ICE first), but we must link in the order -lSM -lICE or
29019  # we get undefined symbols.  So assume we have SM if we have ICE.
29020  # These have to be linked with before -lX11, unlike the other
29021  # libraries we check for below, so use a different variable.
29022  # John Interrante, Karl Berry
29023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29024$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29025if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29026  $as_echo_n "(cached) " >&6
29027else
29028  ac_check_lib_save_LIBS=$LIBS
29029LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29031/* end confdefs.h.  */
29032
29033/* Override any GCC internal prototype to avoid an error.
29034   Use char because int might match the return type of a GCC
29035   builtin and then its argument prototype would still apply.  */
29036#ifdef __cplusplus
29037extern "C"
29038#endif
29039char IceConnectionNumber ();
29040int
29041main ()
29042{
29043return IceConnectionNumber ();
29044  ;
29045  return 0;
29046}
29047_ACEOF
29048if ac_fn_cxx_try_link "$LINENO"; then :
29049  ac_cv_lib_ICE_IceConnectionNumber=yes
29050else
29051  ac_cv_lib_ICE_IceConnectionNumber=no
29052fi
29053rm -f core conftest.err conftest.$ac_objext \
29054    conftest$ac_exeext conftest.$ac_ext
29055LIBS=$ac_check_lib_save_LIBS
29056fi
29057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29058$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29059if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29060  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29061fi
29062
29063  LDFLAGS=$ac_save_LDFLAGS
29064
29065fi
29066
29067
29068if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29069
29070    # Print a helpful message on how to acquire the necessary build dependency.
29071    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29072    MISSING_DEPENDENCY=x11
29073    PKGHANDLER_COMMAND=
29074
29075    case $PKGHANDLER in
29076	apt-get)
29077                apt_help     $MISSING_DEPENDENCY ;;
29078    yum)
29079                yum_help     $MISSING_DEPENDENCY ;;
29080	port)
29081                port_help    $MISSING_DEPENDENCY ;;
29082	pkgutil)
29083                pkgutil_help $MISSING_DEPENDENCY ;;
29084	pkgadd)
29085                pkgadd_help  $MISSING_DEPENDENCY ;;
29086    * )
29087      break ;;
29088    esac
29089
29090    if test "x$PKGHANDLER_COMMAND" != x; then
29091        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29092    fi
29093
29094    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29095fi
29096
29097# Some of the old makefiles require a setting of OPENWIN_HOME
29098# Since the X11R6 directory has disappeared on later Linuxes,
29099# we need to probe for it.
29100if test "x$OPENJDK_TARGET_OS" = xlinux; then
29101    if test -d "$SYS_ROOT/usr/X11R6"; then
29102        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29103    fi
29104    if test -d "$SYS_ROOT/usr/include/X11"; then
29105        OPENWIN_HOME="$SYS_ROOT/usr"
29106    fi
29107fi
29108if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29109    OPENWIN_HOME="/usr/openwin"
29110fi
29111
29112
29113
29114#
29115# Weird Sol10 something check...TODO change to try compile
29116#
29117if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29118  if test "`uname -r`" = "5.10"; then
29119     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29120     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29121     fi
29122  fi
29123fi
29124
29125ac_ext=c
29126ac_cpp='$CPP $CPPFLAGS'
29127ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29128ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29129ac_compiler_gnu=$ac_cv_c_compiler_gnu
29130
29131OLD_CFLAGS="$CFLAGS"
29132CFLAGS="$CFLAGS $X_CFLAGS"
29133
29134# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29135for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29136do :
29137  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29138ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29139                   # include <X11/Xutil.h>
29140
29141"
29142if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29143  cat >>confdefs.h <<_ACEOF
29144#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29145_ACEOF
29146 X11_A_OK=yes
29147else
29148  X11_A_OK=no
29149fi
29150
29151done
29152
29153
29154CFLAGS="$OLD_CFLAGS"
29155ac_ext=cpp
29156ac_cpp='$CXXCPP $CPPFLAGS'
29157ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29158ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29159ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29160
29161
29162if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29163
29164    # Print a helpful message on how to acquire the necessary build dependency.
29165    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29166    MISSING_DEPENDENCY=x11
29167    PKGHANDLER_COMMAND=
29168
29169    case $PKGHANDLER in
29170	apt-get)
29171                apt_help     $MISSING_DEPENDENCY ;;
29172    yum)
29173                yum_help     $MISSING_DEPENDENCY ;;
29174	port)
29175                port_help    $MISSING_DEPENDENCY ;;
29176	pkgutil)
29177                pkgutil_help $MISSING_DEPENDENCY ;;
29178	pkgadd)
29179                pkgadd_help  $MISSING_DEPENDENCY ;;
29180    * )
29181      break ;;
29182    esac
29183
29184    if test "x$PKGHANDLER_COMMAND" != x; then
29185        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29186    fi
29187
29188    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29189fi
29190
29191
29192
29193
29194
29195
29196###############################################################################
29197#
29198# The common unix printing system cups is used to print from java.
29199#
29200
29201# Check whether --with-cups was given.
29202if test "${with_cups+set}" = set; then :
29203  withval=$with_cups;
29204fi
29205
29206
29207# Check whether --with-cups-include was given.
29208if test "${with_cups_include+set}" = set; then :
29209  withval=$with_cups_include;
29210fi
29211
29212
29213if test "x$CUPS_NOT_NEEDED" = xyes; then
29214	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29215		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29216$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29217	fi
29218	CUPS_CFLAGS=
29219else
29220	CUPS_FOUND=no
29221
29222	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29223	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29224	fi
29225
29226	if test "x${with_cups}" != x; then
29227	    CUPS_CFLAGS="-I${with_cups}/include"
29228	    CUPS_FOUND=yes
29229	fi
29230	if test "x${with_cups_include}" != x; then
29231	    CUPS_CFLAGS="-I${with_cups_include}"
29232	    CUPS_FOUND=yes
29233	fi
29234	if test "x$CUPS_FOUND" = xno; then
29235
29236
29237    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29238        # Source the builddeps file again, to make sure it uses the latest variables!
29239        . $builddepsfile
29240        # Look for a target and build machine specific resource!
29241        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29242        if test "x$resource" = x; then
29243            # Ok, lets instead look for a target specific resource
29244            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29245        fi
29246        if test "x$resource" = x; then
29247            # Ok, lets instead look for a build specific resource
29248            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29249        fi
29250        if test "x$resource" = x; then
29251            # Ok, lets instead look for a generic resource
29252            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29253            resource=${builddep_cups}
29254        fi
29255        if test "x$resource" != x; then
29256            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29257$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29258	    # If the resource in the builddeps.conf file is an existing directory,
29259	    # for example /java/linux/cups
29260	    if test -d ${resource}; then
29261	       depdir=${resource}
29262	    else
29263
29264# cups is for example mymodule
29265# $resource is for example libs/general/libmymod_1_2_3.zip
29266# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29267# $with_builddeps_dir is for example /localhome/builddeps
29268# depdir is the name of the variable into which we store the depdir, eg MYMOD
29269# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29270# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29271    filename=`basename $resource`
29272    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29273    filebase=${filename%%.*}
29274    extension=${filename#*.}
29275    installdir=$with_builddeps_dir/$filebase
29276    if test ! -f $installdir/$filename.unpacked; then
29277        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29278$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29279        if test ! -d $installdir; then
29280            mkdir -p $installdir
29281        fi
29282        if test ! -d $installdir; then
29283            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29284        fi
29285        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29286        touch $tmpfile
29287        if test ! -f $tmpfile; then
29288            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29289        fi
29290
29291    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29292    # $tmpfile is the local file name for the downloaded file.
29293    VALID_TOOL=no
29294    if test "x$BDEPS_FTP" = xwget; then
29295       VALID_TOOL=yes
29296       wget -O $tmpfile $with_builddeps_server/$resource
29297    fi
29298    if test "x$BDEPS_FTP" = xlftp; then
29299       VALID_TOOL=yes
29300       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29301    fi
29302    if test "x$BDEPS_FTP" = xftp; then
29303        VALID_TOOL=yes
29304        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29305        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29306        FTPUSERPWD=${FTPSERVER%%@*}
29307        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29308            FTPUSER=${userpwd%%:*}
29309            FTPPWD=${userpwd#*@}
29310            FTPSERVER=${FTPSERVER#*@}
29311        else
29312            FTPUSER=ftp
29313            FTPPWD=ftp
29314        fi
29315        # the "pass" command does not work on some
29316        # ftp clients (read ftp.exe) but if it works,
29317        # passive mode is better!
29318        (\
29319            echo "user $FTPUSER $FTPPWD"        ;\
29320            echo "pass"                         ;\
29321            echo "bin"                          ;\
29322            echo "get $FTPPATH $tmpfile"              ;\
29323        ) | ftp -in $FTPSERVER
29324    fi
29325    if test "x$VALID_TOOL" != xyes; then
29326       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29327    fi
29328
29329        mv $tmpfile $installdir/$filename
29330        if test ! -s $installdir/$filename; then
29331            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29332        fi
29333        case "$extension" in
29334            zip)  echo "Unzipping $installdir/$filename..."
29335               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29336            ;;
29337            tar.gz) echo "Untaring $installdir/$filename..."
29338               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29339            ;;
29340            tgz) echo "Untaring $installdir/$filename..."
29341               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29342            ;;
29343            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29344            ;;
29345        esac
29346    fi
29347    if test -f $installdir/$filename.unpacked; then
29348        depdir=$installdir
29349    fi
29350
29351	    fi
29352            # Source the builddeps file again, because in the previous command, the depdir
29353            # was updated to point at the current build dependency install directory.
29354            . $builddepsfile
29355            # Now extract variables from the builddeps.conf files.
29356            theroot=${builddep_cups_ROOT}
29357            thecflags=${builddep_cups_CFLAGS}
29358            thelibs=${builddep_cups_LIBS}
29359            if test "x$depdir" = x; then
29360                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29361            fi
29362            CUPS=$depdir
29363            if test "x$theroot" != x; then
29364               CUPS="$theroot"
29365            fi
29366            if test "x$thecflags" != x; then
29367               CUPS_CFLAGS="$thecflags"
29368            fi
29369            if test "x$thelibs" != x; then
29370               CUPS_LIBS="$thelibs"
29371            fi
29372            CUPS_FOUND=yes
29373
29374        fi
29375
29376    fi
29377
29378	fi
29379	if test "x$CUPS_FOUND" = xno; then
29380	    # Are the cups headers installed in the default /usr/include location?
29381	    for ac_header in cups/cups.h cups/ppd.h
29382do :
29383  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29384ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29385if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29386  cat >>confdefs.h <<_ACEOF
29387#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29388_ACEOF
29389 CUPS_FOUND=yes
29390	                      CUPS_CFLAGS=
29391	                      DEFAULT_CUPS=yes
29392fi
29393
29394done
29395
29396	fi
29397	if test "x$CUPS_FOUND" = xno; then
29398	    # Getting nervous now? Lets poke around for standard Solaris third-party
29399	    # package installation locations.
29400	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29401$as_echo_n "checking for cups headers... " >&6; }
29402	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29403	       # An SFW package seems to be installed!
29404	       CUPS_FOUND=yes
29405	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29406	    elif test -s /opt/csw/include/cups/cups.h; then
29407	       # A CSW package seems to be installed!
29408	       CUPS_FOUND=yes
29409	       CUPS_CFLAGS="-I/opt/csw/include"
29410	    fi
29411	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29412$as_echo "$CUPS_FOUND" >&6; }
29413	fi
29414	if test "x$CUPS_FOUND" = xno; then
29415
29416    # Print a helpful message on how to acquire the necessary build dependency.
29417    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29418    MISSING_DEPENDENCY=cups
29419    PKGHANDLER_COMMAND=
29420
29421    case $PKGHANDLER in
29422	apt-get)
29423                apt_help     $MISSING_DEPENDENCY ;;
29424    yum)
29425                yum_help     $MISSING_DEPENDENCY ;;
29426	port)
29427                port_help    $MISSING_DEPENDENCY ;;
29428	pkgutil)
29429                pkgutil_help $MISSING_DEPENDENCY ;;
29430	pkgadd)
29431                pkgadd_help  $MISSING_DEPENDENCY ;;
29432    * )
29433      break ;;
29434    esac
29435
29436    if test "x$PKGHANDLER_COMMAND" != x; then
29437        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29438    fi
29439
29440	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29441	fi
29442fi
29443
29444
29445
29446
29447
29448
29449###############################################################################
29450#
29451# The ubiquitous freetype2 library is used to render fonts.
29452#
29453
29454# Check whether --with-freetype was given.
29455if test "${with_freetype+set}" = set; then :
29456  withval=$with_freetype;
29457fi
29458
29459
29460# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29461USING_SYSTEM_FT_LIB=false
29462
29463if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29464	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29465		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29466$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29467	fi
29468	FREETYPE2_CFLAGS=
29469	FREETYPE2_LIBS=
29470        FREETYPE2_LIB_PATH=
29471else
29472	FREETYPE2_FOUND=no
29473
29474	if test "x$with_freetype" != x; then
29475
29476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29477
29478  # Input might be given as Windows format, start by converting to
29479  # unix format.
29480  path="$with_freetype"
29481  new_path=`$CYGPATH -u "$path"`
29482
29483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29486  # "foo.exe" is OK but "foo" is an error.
29487  #
29488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29489  # It is also a way to make sure we got the proper file name for the real test later on.
29490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29491  if test "x$test_shortpath" = x; then
29492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29493$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29494    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29495  fi
29496
29497  # Call helper function which possibly converts this using DOS-style short mode.
29498  # If so, the updated path is stored in $new_path.
29499
29500  input_path="$new_path"
29501  # Check if we need to convert this using DOS-style short mode. If the path
29502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29503  # take no chances and rewrite it.
29504  # Note: m4 eats our [], so we need to use [ and ] instead.
29505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29506  if test "x$has_forbidden_chars" != x; then
29507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29511      # Going to short mode and back again did indeed matter. Since short mode is
29512      # case insensitive, let's make it lowercase to improve readability.
29513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29514      # Now convert it back to Unix-stile (cygpath)
29515      input_path=`$CYGPATH -u "$shortmode_path"`
29516      new_path="$input_path"
29517    fi
29518  fi
29519
29520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29521  if test "x$test_cygdrive_prefix" = x; then
29522    # As a simple fix, exclude /usr/bin since it's not a real path.
29523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29525      # a path prefixed by /cygdrive for fixpath to work.
29526      new_path="$CYGWIN_ROOT_PATH$input_path"
29527    fi
29528  fi
29529
29530
29531  if test "x$path" != "x$new_path"; then
29532    with_freetype="$new_path"
29533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29534$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29535  fi
29536
29537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29538
29539  path="$with_freetype"
29540  has_colon=`$ECHO $path | $GREP ^.:`
29541  new_path="$path"
29542  if test "x$has_colon" = x; then
29543    # Not in mixed or Windows style, start by that.
29544    new_path=`cmd //c echo $path`
29545  fi
29546
29547
29548  input_path="$new_path"
29549  # Check if we need to convert this using DOS-style short mode. If the path
29550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29551  # take no chances and rewrite it.
29552  # Note: m4 eats our [], so we need to use [ and ] instead.
29553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29554  if test "x$has_forbidden_chars" != x; then
29555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29557  fi
29558
29559
29560  windows_path="$new_path"
29561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29562    unix_path=`$CYGPATH -u "$windows_path"`
29563    new_path="$unix_path"
29564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29566    new_path="$unix_path"
29567  fi
29568
29569  if test "x$path" != "x$new_path"; then
29570    with_freetype="$new_path"
29571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29572$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29573  fi
29574
29575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29577
29578  else
29579    # We're on a posix platform. Hooray! :)
29580    path="$with_freetype"
29581
29582    if test ! -f "$path" && test ! -d "$path"; then
29583      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29584    fi
29585
29586    has_space=`$ECHO "$path" | $GREP " "`
29587    if test "x$has_space" != x; then
29588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29589$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29590      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29591    fi
29592  fi
29593
29594	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29595            FREETYPE2_LIB_PATH="$with_freetype/lib"
29596            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29597                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29598                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29599            fi
29600            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29601                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29602            fi
29603	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29604            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29605                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29606            fi
29607 	    FREETYPE2_FOUND=yes
29608   	    if test "x$FREETYPE2_FOUND" = xyes; then
29609	        # Verify that the directories exist
29610                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29611		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29612		fi
29613	        # List the contents of the lib.
29614		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29615                if test "x$FREETYPELIB" = x; then
29616		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29617		fi
29618	        # Check one h-file
29619                if ! test -s "$with_freetype/include/ft2build.h"; then
29620		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29621		fi
29622            fi
29623        fi
29624	if test "x$FREETYPE2_FOUND" = xno; then
29625
29626
29627    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29628        # Source the builddeps file again, to make sure it uses the latest variables!
29629        . $builddepsfile
29630        # Look for a target and build machine specific resource!
29631        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29632        if test "x$resource" = x; then
29633            # Ok, lets instead look for a target specific resource
29634            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29635        fi
29636        if test "x$resource" = x; then
29637            # Ok, lets instead look for a build specific resource
29638            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29639        fi
29640        if test "x$resource" = x; then
29641            # Ok, lets instead look for a generic resource
29642            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29643            resource=${builddep_freetype2}
29644        fi
29645        if test "x$resource" != x; then
29646            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29647$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29648	    # If the resource in the builddeps.conf file is an existing directory,
29649	    # for example /java/linux/cups
29650	    if test -d ${resource}; then
29651	       depdir=${resource}
29652	    else
29653
29654# freetype2 is for example mymodule
29655# $resource is for example libs/general/libmymod_1_2_3.zip
29656# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29657# $with_builddeps_dir is for example /localhome/builddeps
29658# depdir is the name of the variable into which we store the depdir, eg MYMOD
29659# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29660# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29661    filename=`basename $resource`
29662    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29663    filebase=${filename%%.*}
29664    extension=${filename#*.}
29665    installdir=$with_builddeps_dir/$filebase
29666    if test ! -f $installdir/$filename.unpacked; then
29667        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29668$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29669        if test ! -d $installdir; then
29670            mkdir -p $installdir
29671        fi
29672        if test ! -d $installdir; then
29673            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29674        fi
29675        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29676        touch $tmpfile
29677        if test ! -f $tmpfile; then
29678            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29679        fi
29680
29681    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29682    # $tmpfile is the local file name for the downloaded file.
29683    VALID_TOOL=no
29684    if test "x$BDEPS_FTP" = xwget; then
29685       VALID_TOOL=yes
29686       wget -O $tmpfile $with_builddeps_server/$resource
29687    fi
29688    if test "x$BDEPS_FTP" = xlftp; then
29689       VALID_TOOL=yes
29690       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29691    fi
29692    if test "x$BDEPS_FTP" = xftp; then
29693        VALID_TOOL=yes
29694        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29695        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29696        FTPUSERPWD=${FTPSERVER%%@*}
29697        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29698            FTPUSER=${userpwd%%:*}
29699            FTPPWD=${userpwd#*@}
29700            FTPSERVER=${FTPSERVER#*@}
29701        else
29702            FTPUSER=ftp
29703            FTPPWD=ftp
29704        fi
29705        # the "pass" command does not work on some
29706        # ftp clients (read ftp.exe) but if it works,
29707        # passive mode is better!
29708        (\
29709            echo "user $FTPUSER $FTPPWD"        ;\
29710            echo "pass"                         ;\
29711            echo "bin"                          ;\
29712            echo "get $FTPPATH $tmpfile"              ;\
29713        ) | ftp -in $FTPSERVER
29714    fi
29715    if test "x$VALID_TOOL" != xyes; then
29716       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29717    fi
29718
29719        mv $tmpfile $installdir/$filename
29720        if test ! -s $installdir/$filename; then
29721            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29722        fi
29723        case "$extension" in
29724            zip)  echo "Unzipping $installdir/$filename..."
29725               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29726            ;;
29727            tar.gz) echo "Untaring $installdir/$filename..."
29728               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29729            ;;
29730            tgz) echo "Untaring $installdir/$filename..."
29731               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29732            ;;
29733            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29734            ;;
29735        esac
29736    fi
29737    if test -f $installdir/$filename.unpacked; then
29738        depdir=$installdir
29739    fi
29740
29741	    fi
29742            # Source the builddeps file again, because in the previous command, the depdir
29743            # was updated to point at the current build dependency install directory.
29744            . $builddepsfile
29745            # Now extract variables from the builddeps.conf files.
29746            theroot=${builddep_freetype2_ROOT}
29747            thecflags=${builddep_freetype2_CFLAGS}
29748            thelibs=${builddep_freetype2_LIBS}
29749            if test "x$depdir" = x; then
29750                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29751            fi
29752            FREETYPE2=$depdir
29753            if test "x$theroot" != x; then
29754               FREETYPE2="$theroot"
29755            fi
29756            if test "x$thecflags" != x; then
29757               FREETYPE2_CFLAGS="$thecflags"
29758            fi
29759            if test "x$thelibs" != x; then
29760               FREETYPE2_LIBS="$thelibs"
29761            fi
29762            FREETYPE2_FOUND=yes
29763            else FREETYPE2_FOUND=no
29764
29765        fi
29766        else FREETYPE2_FOUND=no
29767
29768    fi
29769
29770            USING_SYSTEM_FT_LIB=true
29771	fi
29772	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29773            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29774
29775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29776
29777  # Input might be given as Windows format, start by converting to
29778  # unix format.
29779  path="$FREETYPELOCATION"
29780  new_path=`$CYGPATH -u "$path"`
29781
29782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29785  # "foo.exe" is OK but "foo" is an error.
29786  #
29787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29788  # It is also a way to make sure we got the proper file name for the real test later on.
29789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29790  if test "x$test_shortpath" = x; then
29791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29792$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29793    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29794  fi
29795
29796  # Call helper function which possibly converts this using DOS-style short mode.
29797  # If so, the updated path is stored in $new_path.
29798
29799  input_path="$new_path"
29800  # Check if we need to convert this using DOS-style short mode. If the path
29801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29802  # take no chances and rewrite it.
29803  # Note: m4 eats our [], so we need to use [ and ] instead.
29804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29805  if test "x$has_forbidden_chars" != x; then
29806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29810      # Going to short mode and back again did indeed matter. Since short mode is
29811      # case insensitive, let's make it lowercase to improve readability.
29812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29813      # Now convert it back to Unix-stile (cygpath)
29814      input_path=`$CYGPATH -u "$shortmode_path"`
29815      new_path="$input_path"
29816    fi
29817  fi
29818
29819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29820  if test "x$test_cygdrive_prefix" = x; then
29821    # As a simple fix, exclude /usr/bin since it's not a real path.
29822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29824      # a path prefixed by /cygdrive for fixpath to work.
29825      new_path="$CYGWIN_ROOT_PATH$input_path"
29826    fi
29827  fi
29828
29829
29830  if test "x$path" != "x$new_path"; then
29831    FREETYPELOCATION="$new_path"
29832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29833$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29834  fi
29835
29836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29837
29838  path="$FREETYPELOCATION"
29839  has_colon=`$ECHO $path | $GREP ^.:`
29840  new_path="$path"
29841  if test "x$has_colon" = x; then
29842    # Not in mixed or Windows style, start by that.
29843    new_path=`cmd //c echo $path`
29844  fi
29845
29846
29847  input_path="$new_path"
29848  # Check if we need to convert this using DOS-style short mode. If the path
29849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29850  # take no chances and rewrite it.
29851  # Note: m4 eats our [], so we need to use [ and ] instead.
29852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29853  if test "x$has_forbidden_chars" != x; then
29854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29856  fi
29857
29858
29859  windows_path="$new_path"
29860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29861    unix_path=`$CYGPATH -u "$windows_path"`
29862    new_path="$unix_path"
29863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29865    new_path="$unix_path"
29866  fi
29867
29868  if test "x$path" != "x$new_path"; then
29869    FREETYPELOCATION="$new_path"
29870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29871$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29872  fi
29873
29874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29876
29877  else
29878    # We're on a posix platform. Hooray! :)
29879    path="$FREETYPELOCATION"
29880
29881    if test ! -f "$path" && test ! -d "$path"; then
29882      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29883    fi
29884
29885    has_space=`$ECHO "$path" | $GREP " "`
29886    if test "x$has_space" != x; then
29887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29888$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29890    fi
29891  fi
29892
29893	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29894$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29895	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29896	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29897	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29898 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29899                if ! test -s "$FREETYPE2_LIBS"; then
29900		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29901		fi
29902                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29903		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29904		fi
29905                USING_SYSTEM_FT_LIB=true
29906                FREETYPE2_FOUND=yes
29907	    fi
29908	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29909$as_echo "$FREETYPE2_FOUND" >&6; }
29910        fi
29911	if test "x$FREETYPE2_FOUND" = xno; then
29912
29913pkg_failed=no
29914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29915$as_echo_n "checking for FREETYPE2... " >&6; }
29916
29917if test -n "$FREETYPE2_CFLAGS"; then
29918    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29919 elif test -n "$PKG_CONFIG"; then
29920    if test -n "$PKG_CONFIG" && \
29921    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29922  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29923  ac_status=$?
29924  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29925  test $ac_status = 0; }; then
29926  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29927else
29928  pkg_failed=yes
29929fi
29930 else
29931    pkg_failed=untried
29932fi
29933if test -n "$FREETYPE2_LIBS"; then
29934    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29935 elif test -n "$PKG_CONFIG"; then
29936    if test -n "$PKG_CONFIG" && \
29937    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29938  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29939  ac_status=$?
29940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29941  test $ac_status = 0; }; then
29942  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29943else
29944  pkg_failed=yes
29945fi
29946 else
29947    pkg_failed=untried
29948fi
29949
29950
29951
29952if test $pkg_failed = yes; then
29953
29954if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29955        _pkg_short_errors_supported=yes
29956else
29957        _pkg_short_errors_supported=no
29958fi
29959        if test $_pkg_short_errors_supported = yes; then
29960	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29961        else
29962	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29963        fi
29964	# Put the nasty error message in config.log where it belongs
29965	echo "$FREETYPE2_PKG_ERRORS" >&5
29966
29967	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29968$as_echo "no" >&6; }
29969                FREETYPE2_FOUND=no
29970elif test $pkg_failed = untried; then
29971	FREETYPE2_FOUND=no
29972else
29973	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29974	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29976$as_echo "yes" >&6; }
29977	FREETYPE2_FOUND=yes
29978fi
29979            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29980            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29981            USING_SYSTEM_FT_LIB=true
29982            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29983            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29984              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29985            fi
29986	fi
29987	if test "x$FREETYPE2_FOUND" = xno; then
29988	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29989$as_echo_n "checking for freetype in some standard locations... " >&6; }
29990
29991	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29992	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29993	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29994	    fi
29995	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29996	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29997	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29998	    fi
29999
30000	    PREV_CXXCFLAGS="$CXXFLAGS"
30001	    PREV_LDFLAGS="$LDFLAGS"
30002	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30003	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30004	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30005/* end confdefs.h.  */
30006#include<ft2build.h>
30007	                    #include FT_FREETYPE_H
30008	                   int main() { return 0; }
30009
30010_ACEOF
30011if ac_fn_cxx_try_link "$LINENO"; then :
30012
30013	                      # Yes, the default cflags and libs did the trick.
30014	                      FREETYPE2_FOUND=yes
30015	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30016	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30017
30018else
30019
30020	                      FREETYPE2_FOUND=no
30021
30022fi
30023rm -f core conftest.err conftest.$ac_objext \
30024    conftest$ac_exeext conftest.$ac_ext
30025            CXXCFLAGS="$PREV_CXXFLAGS"
30026	    LDFLAGS="$PREV_LDFLAGS"
30027	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30028$as_echo "$FREETYPE2_FOUND" >&6; }
30029            USING_SYSTEM_FT_LIB=true
30030	fi
30031	if test "x$FREETYPE2_FOUND" = xno; then
30032
30033    # Print a helpful message on how to acquire the necessary build dependency.
30034    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30035    MISSING_DEPENDENCY=freetype2
30036    PKGHANDLER_COMMAND=
30037
30038    case $PKGHANDLER in
30039	apt-get)
30040                apt_help     $MISSING_DEPENDENCY ;;
30041    yum)
30042                yum_help     $MISSING_DEPENDENCY ;;
30043	port)
30044                port_help    $MISSING_DEPENDENCY ;;
30045	pkgutil)
30046                pkgutil_help $MISSING_DEPENDENCY ;;
30047	pkgadd)
30048                pkgadd_help  $MISSING_DEPENDENCY ;;
30049    * )
30050      break ;;
30051    esac
30052
30053    if test "x$PKGHANDLER_COMMAND" != x; then
30054        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30055    fi
30056
30057		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30058	fi
30059
30060        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30061            # AC_CHECK_LIB does not support use of cl.exe
30062            PREV_LDFLAGS="$LDFLAGS"
30063            LDFLAGS="$FREETYPE2_LIBS"
30064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30065$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30066if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30067  $as_echo_n "(cached) " >&6
30068else
30069  ac_check_lib_save_LIBS=$LIBS
30070LIBS="-lfreetype  $LIBS"
30071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30072/* end confdefs.h.  */
30073
30074/* Override any GCC internal prototype to avoid an error.
30075   Use char because int might match the return type of a GCC
30076   builtin and then its argument prototype would still apply.  */
30077#ifdef __cplusplus
30078extern "C"
30079#endif
30080char FT_Init_FreeType ();
30081int
30082main ()
30083{
30084return FT_Init_FreeType ();
30085  ;
30086  return 0;
30087}
30088_ACEOF
30089if ac_fn_cxx_try_link "$LINENO"; then :
30090  ac_cv_lib_freetype_FT_Init_FreeType=yes
30091else
30092  ac_cv_lib_freetype_FT_Init_FreeType=no
30093fi
30094rm -f core conftest.err conftest.$ac_objext \
30095    conftest$ac_exeext conftest.$ac_ext
30096LIBS=$ac_check_lib_save_LIBS
30097fi
30098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30099$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30100if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30101  FREETYPE2_FOUND=true
30102else
30103  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30104fi
30105
30106            LDFLAGS="$PREV_LDFLAGS"
30107        fi
30108fi
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118###############################################################################
30119#
30120# Check for alsa headers and libraries. Used on Linux/GNU systems.
30121#
30122
30123# Check whether --with-alsa was given.
30124if test "${with_alsa+set}" = set; then :
30125  withval=$with_alsa;
30126fi
30127
30128
30129# Check whether --with-alsa-include was given.
30130if test "${with_alsa_include+set}" = set; then :
30131  withval=$with_alsa_include;
30132fi
30133
30134
30135# Check whether --with-alsa-lib was given.
30136if test "${with_alsa_lib+set}" = set; then :
30137  withval=$with_alsa_lib;
30138fi
30139
30140
30141if test "x$ALSA_NOT_NEEDED" = xyes; then
30142	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30143		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30144$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30145	fi
30146	ALSA_CFLAGS=
30147	ALSA_LIBS=
30148else
30149	ALSA_FOUND=no
30150
30151	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30152	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30153	fi
30154
30155	if test "x${with_alsa}" != x; then
30156	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30157	    ALSA_CFLAGS="-I${with_alsa}/include"
30158	    ALSA_FOUND=yes
30159	fi
30160	if test "x${with_alsa_include}" != x; then
30161	    ALSA_CFLAGS="-I${with_alsa_include}"
30162	    ALSA_FOUND=yes
30163	fi
30164	if test "x${with_alsa_lib}" != x; then
30165	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30166	    ALSA_FOUND=yes
30167	fi
30168	if test "x$ALSA_FOUND" = xno; then
30169
30170
30171    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30172        # Source the builddeps file again, to make sure it uses the latest variables!
30173        . $builddepsfile
30174        # Look for a target and build machine specific resource!
30175        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30176        if test "x$resource" = x; then
30177            # Ok, lets instead look for a target specific resource
30178            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30179        fi
30180        if test "x$resource" = x; then
30181            # Ok, lets instead look for a build specific resource
30182            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30183        fi
30184        if test "x$resource" = x; then
30185            # Ok, lets instead look for a generic resource
30186            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30187            resource=${builddep_alsa}
30188        fi
30189        if test "x$resource" != x; then
30190            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30191$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30192	    # If the resource in the builddeps.conf file is an existing directory,
30193	    # for example /java/linux/cups
30194	    if test -d ${resource}; then
30195	       depdir=${resource}
30196	    else
30197
30198# alsa is for example mymodule
30199# $resource is for example libs/general/libmymod_1_2_3.zip
30200# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30201# $with_builddeps_dir is for example /localhome/builddeps
30202# depdir is the name of the variable into which we store the depdir, eg MYMOD
30203# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30204# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30205    filename=`basename $resource`
30206    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30207    filebase=${filename%%.*}
30208    extension=${filename#*.}
30209    installdir=$with_builddeps_dir/$filebase
30210    if test ! -f $installdir/$filename.unpacked; then
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30212$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30213        if test ! -d $installdir; then
30214            mkdir -p $installdir
30215        fi
30216        if test ! -d $installdir; then
30217            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30218        fi
30219        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30220        touch $tmpfile
30221        if test ! -f $tmpfile; then
30222            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30223        fi
30224
30225    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30226    # $tmpfile is the local file name for the downloaded file.
30227    VALID_TOOL=no
30228    if test "x$BDEPS_FTP" = xwget; then
30229       VALID_TOOL=yes
30230       wget -O $tmpfile $with_builddeps_server/$resource
30231    fi
30232    if test "x$BDEPS_FTP" = xlftp; then
30233       VALID_TOOL=yes
30234       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30235    fi
30236    if test "x$BDEPS_FTP" = xftp; then
30237        VALID_TOOL=yes
30238        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30239        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30240        FTPUSERPWD=${FTPSERVER%%@*}
30241        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30242            FTPUSER=${userpwd%%:*}
30243            FTPPWD=${userpwd#*@}
30244            FTPSERVER=${FTPSERVER#*@}
30245        else
30246            FTPUSER=ftp
30247            FTPPWD=ftp
30248        fi
30249        # the "pass" command does not work on some
30250        # ftp clients (read ftp.exe) but if it works,
30251        # passive mode is better!
30252        (\
30253            echo "user $FTPUSER $FTPPWD"        ;\
30254            echo "pass"                         ;\
30255            echo "bin"                          ;\
30256            echo "get $FTPPATH $tmpfile"              ;\
30257        ) | ftp -in $FTPSERVER
30258    fi
30259    if test "x$VALID_TOOL" != xyes; then
30260       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30261    fi
30262
30263        mv $tmpfile $installdir/$filename
30264        if test ! -s $installdir/$filename; then
30265            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30266        fi
30267        case "$extension" in
30268            zip)  echo "Unzipping $installdir/$filename..."
30269               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30270            ;;
30271            tar.gz) echo "Untaring $installdir/$filename..."
30272               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30273            ;;
30274            tgz) echo "Untaring $installdir/$filename..."
30275               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30276            ;;
30277            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30278            ;;
30279        esac
30280    fi
30281    if test -f $installdir/$filename.unpacked; then
30282        depdir=$installdir
30283    fi
30284
30285	    fi
30286            # Source the builddeps file again, because in the previous command, the depdir
30287            # was updated to point at the current build dependency install directory.
30288            . $builddepsfile
30289            # Now extract variables from the builddeps.conf files.
30290            theroot=${builddep_alsa_ROOT}
30291            thecflags=${builddep_alsa_CFLAGS}
30292            thelibs=${builddep_alsa_LIBS}
30293            if test "x$depdir" = x; then
30294                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30295            fi
30296            ALSA=$depdir
30297            if test "x$theroot" != x; then
30298               ALSA="$theroot"
30299            fi
30300            if test "x$thecflags" != x; then
30301               ALSA_CFLAGS="$thecflags"
30302            fi
30303            if test "x$thelibs" != x; then
30304               ALSA_LIBS="$thelibs"
30305            fi
30306            ALSA_FOUND=yes
30307            else ALSA_FOUND=no
30308
30309        fi
30310        else ALSA_FOUND=no
30311
30312    fi
30313
30314	fi
30315	if test "x$ALSA_FOUND" = xno; then
30316
30317pkg_failed=no
30318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30319$as_echo_n "checking for ALSA... " >&6; }
30320
30321if test -n "$ALSA_CFLAGS"; then
30322    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30323 elif test -n "$PKG_CONFIG"; then
30324    if test -n "$PKG_CONFIG" && \
30325    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30326  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30327  ac_status=$?
30328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30329  test $ac_status = 0; }; then
30330  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30331else
30332  pkg_failed=yes
30333fi
30334 else
30335    pkg_failed=untried
30336fi
30337if test -n "$ALSA_LIBS"; then
30338    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30339 elif test -n "$PKG_CONFIG"; then
30340    if test -n "$PKG_CONFIG" && \
30341    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30342  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30343  ac_status=$?
30344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30345  test $ac_status = 0; }; then
30346  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30347else
30348  pkg_failed=yes
30349fi
30350 else
30351    pkg_failed=untried
30352fi
30353
30354
30355
30356if test $pkg_failed = yes; then
30357
30358if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30359        _pkg_short_errors_supported=yes
30360else
30361        _pkg_short_errors_supported=no
30362fi
30363        if test $_pkg_short_errors_supported = yes; then
30364	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30365        else
30366	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30367        fi
30368	# Put the nasty error message in config.log where it belongs
30369	echo "$ALSA_PKG_ERRORS" >&5
30370
30371	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30372$as_echo "no" >&6; }
30373                ALSA_FOUND=no
30374elif test $pkg_failed = untried; then
30375	ALSA_FOUND=no
30376else
30377	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30378	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30380$as_echo "yes" >&6; }
30381	ALSA_FOUND=yes
30382fi
30383	fi
30384	if test "x$ALSA_FOUND" = xno; then
30385	    for ac_header in alsa/asoundlib.h
30386do :
30387  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30388if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30389  cat >>confdefs.h <<_ACEOF
30390#define HAVE_ALSA_ASOUNDLIB_H 1
30391_ACEOF
30392 ALSA_FOUND=yes
30393	                      ALSA_CFLAGS=-Iignoreme
30394	                      ALSA_LIBS=-lasound
30395	                      DEFAULT_ALSA=yes
30396else
30397  ALSA_FOUND=no
30398fi
30399
30400done
30401
30402	fi
30403	if test "x$ALSA_FOUND" = xno; then
30404
30405    # Print a helpful message on how to acquire the necessary build dependency.
30406    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30407    MISSING_DEPENDENCY=alsa
30408    PKGHANDLER_COMMAND=
30409
30410    case $PKGHANDLER in
30411	apt-get)
30412                apt_help     $MISSING_DEPENDENCY ;;
30413    yum)
30414                yum_help     $MISSING_DEPENDENCY ;;
30415	port)
30416                port_help    $MISSING_DEPENDENCY ;;
30417	pkgutil)
30418                pkgutil_help $MISSING_DEPENDENCY ;;
30419	pkgadd)
30420                pkgadd_help  $MISSING_DEPENDENCY ;;
30421    * )
30422      break ;;
30423    esac
30424
30425    if test "x$PKGHANDLER_COMMAND" != x; then
30426        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30427    fi
30428
30429	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30430	fi
30431fi
30432
30433
30434
30435
30436
30437
30438
30439###############################################################################
30440#
30441# Check for the jpeg library
30442#
30443
30444USE_EXTERNAL_LIBJPEG=true
30445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30446$as_echo_n "checking for main in -ljpeg... " >&6; }
30447if ${ac_cv_lib_jpeg_main+:} false; then :
30448  $as_echo_n "(cached) " >&6
30449else
30450  ac_check_lib_save_LIBS=$LIBS
30451LIBS="-ljpeg  $LIBS"
30452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30453/* end confdefs.h.  */
30454
30455
30456int
30457main ()
30458{
30459return main ();
30460  ;
30461  return 0;
30462}
30463_ACEOF
30464if ac_fn_cxx_try_link "$LINENO"; then :
30465  ac_cv_lib_jpeg_main=yes
30466else
30467  ac_cv_lib_jpeg_main=no
30468fi
30469rm -f core conftest.err conftest.$ac_objext \
30470    conftest$ac_exeext conftest.$ac_ext
30471LIBS=$ac_check_lib_save_LIBS
30472fi
30473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30474$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30475if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30476  cat >>confdefs.h <<_ACEOF
30477#define HAVE_LIBJPEG 1
30478_ACEOF
30479
30480  LIBS="-ljpeg $LIBS"
30481
30482else
30483   USE_EXTERNAL_LIBJPEG=false
30484               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30485$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30486
30487fi
30488
30489
30490
30491###############################################################################
30492#
30493# Check for the gif library
30494#
30495
30496USE_EXTERNAL_LIBJPEG=true
30497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30498$as_echo_n "checking for main in -lgif... " >&6; }
30499if ${ac_cv_lib_gif_main+:} false; then :
30500  $as_echo_n "(cached) " >&6
30501else
30502  ac_check_lib_save_LIBS=$LIBS
30503LIBS="-lgif  $LIBS"
30504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30505/* end confdefs.h.  */
30506
30507
30508int
30509main ()
30510{
30511return main ();
30512  ;
30513  return 0;
30514}
30515_ACEOF
30516if ac_fn_cxx_try_link "$LINENO"; then :
30517  ac_cv_lib_gif_main=yes
30518else
30519  ac_cv_lib_gif_main=no
30520fi
30521rm -f core conftest.err conftest.$ac_objext \
30522    conftest$ac_exeext conftest.$ac_ext
30523LIBS=$ac_check_lib_save_LIBS
30524fi
30525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30526$as_echo "$ac_cv_lib_gif_main" >&6; }
30527if test "x$ac_cv_lib_gif_main" = xyes; then :
30528  cat >>confdefs.h <<_ACEOF
30529#define HAVE_LIBGIF 1
30530_ACEOF
30531
30532  LIBS="-lgif $LIBS"
30533
30534else
30535   USE_EXTERNAL_LIBGIF=false
30536               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30537$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30538
30539fi
30540
30541
30542
30543###############################################################################
30544#
30545# Check for the zlib library
30546#
30547
30548
30549# Check whether --with-zlib was given.
30550if test "${with_zlib+set}" = set; then :
30551  withval=$with_zlib;
30552fi
30553
30554
30555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30556$as_echo_n "checking for compress in -lz... " >&6; }
30557if ${ac_cv_lib_z_compress+:} false; then :
30558  $as_echo_n "(cached) " >&6
30559else
30560  ac_check_lib_save_LIBS=$LIBS
30561LIBS="-lz  $LIBS"
30562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30563/* end confdefs.h.  */
30564
30565/* Override any GCC internal prototype to avoid an error.
30566   Use char because int might match the return type of a GCC
30567   builtin and then its argument prototype would still apply.  */
30568#ifdef __cplusplus
30569extern "C"
30570#endif
30571char compress ();
30572int
30573main ()
30574{
30575return compress ();
30576  ;
30577  return 0;
30578}
30579_ACEOF
30580if ac_fn_cxx_try_link "$LINENO"; then :
30581  ac_cv_lib_z_compress=yes
30582else
30583  ac_cv_lib_z_compress=no
30584fi
30585rm -f core conftest.err conftest.$ac_objext \
30586    conftest$ac_exeext conftest.$ac_ext
30587LIBS=$ac_check_lib_save_LIBS
30588fi
30589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30590$as_echo "$ac_cv_lib_z_compress" >&6; }
30591if test "x$ac_cv_lib_z_compress" = xyes; then :
30592   ZLIB_FOUND=yes
30593else
30594   ZLIB_FOUND=no
30595fi
30596
30597
30598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30599$as_echo_n "checking for which zlib to use... " >&6; }
30600
30601DEFAULT_ZLIB=bundled
30602if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30603#
30604# On macosx default is system...on others default is
30605#
30606    DEFAULT_ZLIB=system
30607fi
30608
30609if test "x${ZLIB_FOUND}" != "xyes"; then
30610#
30611# If we don't find any system...set default to bundled
30612#
30613    DEFAULT_ZLIB=bundled
30614fi
30615
30616#
30617# If user didn't specify, use DEFAULT_ZLIB
30618#
30619if test "x${with_zlib}" = "x"; then
30620    with_zlib=${DEFAULT_ZLIB}
30621fi
30622
30623if test "x${with_zlib}" = "xbundled"; then
30624    USE_EXTERNAL_LIBZ=false
30625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30626$as_echo "bundled" >&6; }
30627elif test "x${with_zlib}" = "xsystem"; then
30628    if test "x${ZLIB_FOUND}" = "xyes"; then
30629        USE_EXTERNAL_LIBZ=true
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30631$as_echo "system" >&6; }
30632    else
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30634$as_echo "system not found" >&6; }
30635        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30636    fi
30637else
30638    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30639fi
30640
30641
30642
30643###############################################################################
30644LIBZIP_CAN_USE_MMAP=true
30645
30646
30647
30648###############################################################################
30649#
30650# Check if altzone exists in time.h
30651#
30652
30653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30654/* end confdefs.h.  */
30655#include <time.h>
30656int
30657main ()
30658{
30659return (int)altzone;
30660  ;
30661  return 0;
30662}
30663_ACEOF
30664if ac_fn_cxx_try_link "$LINENO"; then :
30665  has_altzone=yes
30666else
30667  has_altzone=no
30668fi
30669rm -f core conftest.err conftest.$ac_objext \
30670    conftest$ac_exeext conftest.$ac_ext
30671if test "x$has_altzone" = xyes; then
30672
30673$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30674
30675fi
30676
30677###############################################################################
30678#
30679# Check the maths library
30680#
30681
30682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30683$as_echo_n "checking for cos in -lm... " >&6; }
30684if ${ac_cv_lib_m_cos+:} false; then :
30685  $as_echo_n "(cached) " >&6
30686else
30687  ac_check_lib_save_LIBS=$LIBS
30688LIBS="-lm  $LIBS"
30689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30690/* end confdefs.h.  */
30691
30692/* Override any GCC internal prototype to avoid an error.
30693   Use char because int might match the return type of a GCC
30694   builtin and then its argument prototype would still apply.  */
30695#ifdef __cplusplus
30696extern "C"
30697#endif
30698char cos ();
30699int
30700main ()
30701{
30702return cos ();
30703  ;
30704  return 0;
30705}
30706_ACEOF
30707if ac_fn_cxx_try_link "$LINENO"; then :
30708  ac_cv_lib_m_cos=yes
30709else
30710  ac_cv_lib_m_cos=no
30711fi
30712rm -f core conftest.err conftest.$ac_objext \
30713    conftest$ac_exeext conftest.$ac_ext
30714LIBS=$ac_check_lib_save_LIBS
30715fi
30716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30717$as_echo "$ac_cv_lib_m_cos" >&6; }
30718if test "x$ac_cv_lib_m_cos" = xyes; then :
30719  cat >>confdefs.h <<_ACEOF
30720#define HAVE_LIBM 1
30721_ACEOF
30722
30723  LIBS="-lm $LIBS"
30724
30725else
30726
30727                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30728$as_echo "$as_me: Maths library was not found" >&6;}
30729
30730fi
30731
30732
30733
30734###############################################################################
30735#
30736# Check for libdl.so
30737
30738save_LIBS="$LIBS"
30739LIBS=""
30740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30741$as_echo_n "checking for dlopen in -ldl... " >&6; }
30742if ${ac_cv_lib_dl_dlopen+:} false; then :
30743  $as_echo_n "(cached) " >&6
30744else
30745  ac_check_lib_save_LIBS=$LIBS
30746LIBS="-ldl  $LIBS"
30747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30748/* end confdefs.h.  */
30749
30750/* Override any GCC internal prototype to avoid an error.
30751   Use char because int might match the return type of a GCC
30752   builtin and then its argument prototype would still apply.  */
30753#ifdef __cplusplus
30754extern "C"
30755#endif
30756char dlopen ();
30757int
30758main ()
30759{
30760return dlopen ();
30761  ;
30762  return 0;
30763}
30764_ACEOF
30765if ac_fn_cxx_try_link "$LINENO"; then :
30766  ac_cv_lib_dl_dlopen=yes
30767else
30768  ac_cv_lib_dl_dlopen=no
30769fi
30770rm -f core conftest.err conftest.$ac_objext \
30771    conftest$ac_exeext conftest.$ac_ext
30772LIBS=$ac_check_lib_save_LIBS
30773fi
30774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30775$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30776if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30777  cat >>confdefs.h <<_ACEOF
30778#define HAVE_LIBDL 1
30779_ACEOF
30780
30781  LIBS="-ldl $LIBS"
30782
30783fi
30784
30785LIBDL="$LIBS"
30786
30787LIBS="$save_LIBS"
30788
30789
30790
30791###############################################################################
30792#
30793# statically link libstdc++ before C++ ABI is stablized on Linux unless
30794# dynamic build is configured on command line.
30795#
30796
30797# Check whether --with-stdc++lib was given.
30798if test "${with_stdc__lib+set}" = set; then :
30799  withval=$with_stdc__lib;
30800    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30801        && test "x$with_stdc__lib" != xdefault; then
30802      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30803    fi
30804
30805else
30806  with_stdc__lib=default
30807
30808fi
30809
30810
30811if test "x$OPENJDK_TARGET_OS" = xlinux; then
30812    # Test if -lstdc++ works.
30813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30814$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30815    ac_ext=cpp
30816ac_cpp='$CXXCPP $CPPFLAGS'
30817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30820
30821    OLD_CXXFLAGS="$CXXFLAGS"
30822    CXXFLAGS="$CXXFLAGS -lstdc++"
30823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30824/* end confdefs.h.  */
30825
30826int
30827main ()
30828{
30829return 0;
30830  ;
30831  return 0;
30832}
30833_ACEOF
30834if ac_fn_cxx_try_link "$LINENO"; then :
30835  has_dynamic_libstdcxx=yes
30836else
30837  has_dynamic_libstdcxx=no
30838fi
30839rm -f core conftest.err conftest.$ac_objext \
30840    conftest$ac_exeext conftest.$ac_ext
30841    CXXFLAGS="$OLD_CXXFLAGS"
30842    ac_ext=cpp
30843ac_cpp='$CXXCPP $CPPFLAGS'
30844ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30845ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30846ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30847
30848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30849$as_echo "$has_dynamic_libstdcxx" >&6; }
30850
30851    # Test if stdc++ can be linked statically.
30852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30853$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30854    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30855    ac_ext=cpp
30856ac_cpp='$CXXCPP $CPPFLAGS'
30857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30860
30861    OLD_LIBS="$LIBS"
30862    OLD_CXX="$CXX"
30863    LIBS="$STATIC_STDCXX_FLAGS"
30864    CXX="$CC"
30865    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30866/* end confdefs.h.  */
30867
30868int
30869main ()
30870{
30871return 0;
30872  ;
30873  return 0;
30874}
30875_ACEOF
30876if ac_fn_cxx_try_link "$LINENO"; then :
30877  has_static_libstdcxx=yes
30878else
30879  has_static_libstdcxx=no
30880fi
30881rm -f core conftest.err conftest.$ac_objext \
30882    conftest$ac_exeext conftest.$ac_ext
30883    LIBS="$OLD_LIBS"
30884    CXX="$OLD_CXX"
30885    ac_ext=cpp
30886ac_cpp='$CXXCPP $CPPFLAGS'
30887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30890
30891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30892$as_echo "$has_static_libstdcxx" >&6; }
30893
30894    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30895        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30896    fi
30897
30898    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30899        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30900    fi
30901
30902    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30903        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30904    fi
30905
30906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30907$as_echo_n "checking how to link with libstdc++... " >&6; }
30908    # If dynamic was requested, it's available since it would fail above otherwise.
30909    # If dynamic wasn't requested, go with static unless it isn't available.
30910    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30911        LIBCXX="$LIBCXX -lstdc++"
30912        LDCXX="$CXX"
30913        STATIC_CXX_SETTING="STATIC_CXX=false"
30914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30915$as_echo "dynamic" >&6; }
30916    else
30917        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30918        LDCXX="$CC"
30919        STATIC_CXX_SETTING="STATIC_CXX=true"
30920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30921$as_echo "static" >&6; }
30922    fi
30923fi
30924
30925
30926# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30927if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30928    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30929fi
30930
30931# TODO better (platform agnostic) test
30932if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30933    LIBCXX="-lstdc++"
30934fi
30935
30936
30937
30938
30939
30940# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30941
30942# When using cygwin or msys, we need a wrapper binary that renames
30943# /cygdrive/c/ arguments into c:/ arguments and peeks into
30944# @files and rewrites these too! This wrapper binary is
30945# called fixpath.
30946FIXPATH=
30947if test "x$OPENJDK_BUILD_OS" = xwindows; then
30948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30949$as_echo_n "checking if fixpath can be created... " >&6; }
30950    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30951    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30952    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30953      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30954      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30955      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30956      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30957    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30958      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30959      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30960
30961      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30962      # @ was chosen as separator to minimize risk of other tools messing around with it
30963      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30964      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30965
30966      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30967    fi
30968    rm -f $OUTPUT_ROOT/fixpath*
30969    cd $OUTPUT_ROOT
30970    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30971    cd $CURDIR
30972
30973    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30975$as_echo "no" >&6; }
30976        cat $OUTPUT_ROOT/fixpath1.log
30977        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30978    fi
30979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30980$as_echo "yes" >&6; }
30981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30982$as_echo_n "checking if fixpath.exe works... " >&6; }
30983    cd $OUTPUT_ROOT
30984    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30985    cd $CURDIR
30986    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30988$as_echo "no" >&6; }
30989        cat $OUTPUT_ROOT/fixpath2.log
30990        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30991    fi
30992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30993$as_echo "yes" >&6; }
30994    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30995fi
30996
30997
30998
30999
31000###############################################################################
31001#
31002# We need to do some final tweaking, when everything else is done.
31003#
31004###############################################################################
31005
31006
31007HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31008
31009
31010# The name of the Service Agent jar.
31011SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31012if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31013    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31014fi
31015
31016
31017
31018
31019###############################################################################
31020#
31021# Configure parts of the build that only affect the build performance,
31022# not the result.
31023#
31024###############################################################################
31025
31026
31027# How many cores do we have on this build system?
31028
31029# Check whether --with-num-cores was given.
31030if test "${with_num_cores+set}" = set; then :
31031  withval=$with_num_cores;
31032fi
31033
31034if test "x$with_num_cores" = x; then
31035    # The number of cores were not specified, try to probe them.
31036
31037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31038$as_echo_n "checking for number of cores... " >&6; }
31039    NUM_CORES=1
31040    FOUND_CORES=no
31041
31042    if test -f /proc/cpuinfo; then
31043        # Looks like a Linux (or cygwin) system
31044        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31045        FOUND_CORES=yes
31046    elif test -x /usr/sbin/psrinfo; then
31047        # Looks like a Solaris system
31048        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31049        FOUND_CORES=yes
31050    elif test -x /usr/sbin/system_profiler; then
31051        # Looks like a MacOSX system
31052        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31053        FOUND_CORES=yes
31054    elif test -n "$NUMBER_OF_PROCESSORS"; then
31055        # On windows, look in the env
31056        NUM_CORES=$NUMBER_OF_PROCESSORS
31057        FOUND_CORES=yes
31058    fi
31059
31060    # For c/c++ code we run twice as many concurrent build
31061    # jobs than we have cores, otherwise we will stall on io.
31062    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31063
31064    if test "x$FOUND_CORES" = xyes; then
31065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31066$as_echo "$NUM_CORES" >&6; }
31067    else
31068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31069$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31071$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31072    fi
31073
31074
31075else
31076    NUM_CORES=$with_num_cores
31077    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31078fi
31079
31080
31081
31082
31083# How much memory do we have on this build system?
31084
31085# Check whether --with-memory-size was given.
31086if test "${with_memory_size+set}" = set; then :
31087  withval=$with_memory_size;
31088fi
31089
31090if test "x$with_memory_size" = x; then
31091    # The memory size was not specified, try to probe it.
31092
31093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31094$as_echo_n "checking for memory size... " >&6; }
31095    # Default to 1024 MB
31096    MEMORY_SIZE=1024
31097    FOUND_MEM=no
31098
31099    if test -f /proc/meminfo; then
31100        # Looks like a Linux (or cygwin) system
31101        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31102        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31103        FOUND_MEM=yes
31104    elif test -x /usr/sbin/prtconf; then
31105        # Looks like a Solaris system
31106        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31107        FOUND_MEM=yes
31108    elif test -x /usr/sbin/system_profiler; then
31109        # Looks like a MacOSX system
31110        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31111        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31112        FOUND_MEM=yes
31113    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31114        # Windows, but without cygwin
31115        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31116        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31117        FOUND_MEM=yes
31118    fi
31119
31120    if test "x$FOUND_MEM" = xyes; then
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31122$as_echo "$MEMORY_SIZE MB" >&6; }
31123    else
31124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31125$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31127$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31128    fi
31129
31130else
31131    MEMORY_SIZE=$with_memory_size
31132fi
31133
31134
31135
31136# Setup smart javac (after cores and memory have been setup)
31137
31138
31139# Check whether --with-sjavac-server-java was given.
31140if test "${with_sjavac_server_java+set}" = set; then :
31141  withval=$with_sjavac_server_java;
31142fi
31143
31144
31145if test "x$with_sjavac_server_java" != x; then
31146    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31147    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31148    if test "x$FOUND_VERSION" = x; then
31149        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31150    fi
31151else
31152    SJAVAC_SERVER_JAVA=""
31153    # Hotspot specific options.
31154
31155    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31156    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31157    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31158    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31159    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31160        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31161    fi
31162
31163    # JRockit specific options.
31164
31165    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31166    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31167    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31168    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31169    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31170        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31171    fi
31172
31173    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31174fi
31175
31176
31177
31178# Check whether --with-sjavac-server-cores was given.
31179if test "${with_sjavac_server_cores+set}" = set; then :
31180  withval=$with_sjavac_server_cores;
31181fi
31182
31183if test "x$with_sjavac_server_cores" != x; then
31184    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31185else
31186    if test "$NUM_CORES" -gt 16; then
31187        # We set this arbitrary limit because we want to limit the heap
31188        # size of the javac server.
31189        # In the future we will make the javac compilers in the server
31190        # share more and more state, thus enabling us to use more and
31191        # more concurrent threads in the server.
31192        SJAVAC_SERVER_CORES="16"
31193    else
31194        SJAVAC_SERVER_CORES="$NUM_CORES"
31195    fi
31196
31197    if test "$MEMORY_SIZE" -gt "17000"; then
31198        MAX_HEAP_MEM=10000
31199
31200    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31201    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31202    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31203    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31204    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31205        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31206    fi
31207
31208
31209    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31210    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31211    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31212    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31213    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31214        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31215    fi
31216
31217    elif test "$MEMORY_SIZE" -gt "10000"; then
31218        MAX_HEAP_MEM=6000
31219
31220    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31221    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31222    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31223    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31224    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31225        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31226    fi
31227
31228
31229    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31230    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31231    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31232    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31233    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31234        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31235    fi
31236
31237    elif test "$MEMORY_SIZE" -gt "5000"; then
31238        MAX_HEAP_MEM=3000
31239
31240    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31241    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31242    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31243    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31244    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31245        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31246    fi
31247
31248
31249    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31250    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31251    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31252    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31253    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31254        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31255    fi
31256
31257    elif test "$MEMORY_SIZE" -gt "3800"; then
31258        MAX_HEAP_MEM=2500
31259
31260    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31261    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31262    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31263    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31264    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31265        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31266    fi
31267
31268    elif test "$MEMORY_SIZE" -gt "1900"; then
31269        MAX_HEAP_MEM=1200
31270
31271    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31272    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31273    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31274    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31275    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31276        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31277    fi
31278
31279    elif test "$MEMORY_SIZE" -gt "1000"; then
31280        MAX_HEAP_MEM=900
31281
31282    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31283    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31284    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31285    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31286    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31287        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31288    fi
31289
31290    else
31291        MAX_HEAP_MEM=512
31292
31293    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31294    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31295    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31296    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31297    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31298        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31299    fi
31300
31301    fi
31302
31303
31304    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31305    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31306    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31307    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31308    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31309        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31310    fi
31311
31312
31313    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31314    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31315    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31316    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31317    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31318        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31319    fi
31320
31321
31322    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31323    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31324    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31325    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31326    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31327        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31328    fi
31329
31330
31331    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31332    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31333        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31334$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31335        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31337$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31338    fi
31339fi
31340
31341
31342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31343$as_echo_n "checking whether to use sjavac... " >&6; }
31344# Check whether --enable-sjavac was given.
31345if test "${enable_sjavac+set}" = set; then :
31346  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31347else
31348  ENABLE_SJAVAC='no'
31349fi
31350
31351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31352$as_echo "$ENABLE_SJAVAC" >&6; }
31353
31354
31355if test "x$ENABLE_SJAVAC" = xyes; then
31356    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31357else
31358    SJAVAC_SERVER_DIR=
31359fi
31360
31361
31362
31363
31364# Can the C/C++ compiler use precompiled headers?
31365
31366
31367###############################################################################
31368#
31369# Can the C/C++ compiler use precompiled headers?
31370#
31371# Check whether --enable-precompiled-headers was given.
31372if test "${enable_precompiled_headers+set}" = set; then :
31373  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31374else
31375  ENABLE_PRECOMPH=yes
31376fi
31377
31378
31379USE_PRECOMPILED_HEADER=1
31380if test "x$ENABLE_PRECOMPH" = xno; then
31381    USE_PRECOMPILED_HEADER=0
31382fi
31383
31384if test "x$ENABLE_PRECOMPH" = xyes; then
31385    # Check that the compiler actually supports precomp headers.
31386    if test "x$GCC" = xyes; then
31387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31388$as_echo_n "checking that precompiled headers work... " >&6; }
31389         echo "int alfa();" > conftest.h
31390         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31391         if test ! -f conftest.hpp.gch; then
31392             USE_PRECOMPILED_HEADER=0
31393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31394$as_echo "no" >&6; }
31395         else
31396             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31397$as_echo "yes" >&6; }
31398         fi
31399         rm -f conftest.h conftest.hpp.gch
31400    fi
31401fi
31402
31403
31404
31405
31406# Setup use of ccache, if available
31407
31408    # Check whether --enable-ccache was given.
31409if test "${enable_ccache+set}" = set; then :
31410  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31411else
31412  ENABLE_CCACHE=yes
31413fi
31414
31415    if test "x$ENABLE_CCACHE" = xyes; then
31416        # Extract the first word of "ccache", so it can be a program name with args.
31417set dummy ccache; ac_word=$2
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31419$as_echo_n "checking for $ac_word... " >&6; }
31420if ${ac_cv_path_CCACHE+:} false; then :
31421  $as_echo_n "(cached) " >&6
31422else
31423  case $CCACHE in
31424  [\\/]* | ?:[\\/]*)
31425  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31426  ;;
31427  *)
31428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31429for as_dir in $PATH
31430do
31431  IFS=$as_save_IFS
31432  test -z "$as_dir" && as_dir=.
31433    for ac_exec_ext in '' $ac_executable_extensions; do
31434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31435    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31437    break 2
31438  fi
31439done
31440  done
31441IFS=$as_save_IFS
31442
31443  ;;
31444esac
31445fi
31446CCACHE=$ac_cv_path_CCACHE
31447if test -n "$CCACHE"; then
31448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31449$as_echo "$CCACHE" >&6; }
31450else
31451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31452$as_echo "no" >&6; }
31453fi
31454
31455
31456    else
31457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31458$as_echo_n "checking for ccache... " >&6; }
31459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31460$as_echo "explicitly disabled" >&6; }
31461        CCACHE=
31462    fi
31463
31464
31465
31466# Check whether --with-ccache-dir was given.
31467if test "${with_ccache_dir+set}" = set; then :
31468  withval=$with_ccache_dir;
31469fi
31470
31471
31472    if test "x$with_ccache_dir" != x; then
31473        # When using a non home ccache directory, assume the use is to share ccache files
31474        # with other users. Thus change the umask.
31475        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31476    fi
31477    CCACHE_FOUND=""
31478    if test "x$CCACHE" != x; then
31479
31480    if test "x$CCACHE" != x; then
31481        CCACHE_FOUND="true"
31482        # Only use ccache if it is 3.1.4 or later, which supports
31483        # precompiled headers.
31484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31485$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31486        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31487        if test "x$HAS_GOOD_CCACHE" = x; then
31488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31489$as_echo "no, disabling ccache" >&6; }
31490            CCACHE=
31491        else
31492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31493$as_echo "yes" >&6; }
31494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31495$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31496            PUSHED_FLAGS="$CXXFLAGS"
31497            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31498            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31499/* end confdefs.h.  */
31500
31501int
31502main ()
31503{
31504
31505  ;
31506  return 0;
31507}
31508_ACEOF
31509if ac_fn_cxx_try_compile "$LINENO"; then :
31510  CC_KNOWS_CCACHE_TRICK=yes
31511else
31512  CC_KNOWS_CCACHE_TRICK=no
31513fi
31514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31515            CXXFLAGS="$PUSHED_FLAGS"
31516            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31517                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31518$as_echo "yes" >&6; }
31519            else
31520                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31521$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31522                CCACHE=
31523            fi
31524        fi
31525    fi
31526
31527    if test "x$CCACHE" != x; then
31528        CCACHE_SLOPPINESS=time_macros
31529        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31530        CCACHE_FLAGS=-fpch-preprocess
31531
31532        if test "x$SET_CCACHE_DIR" != x; then
31533            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31534	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31535        fi
31536    fi
31537
31538    fi
31539
31540
31541###############################################################################
31542#
31543# And now the finish...
31544#
31545###############################################################################
31546
31547# Check for some common pitfalls
31548
31549
31550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31551$as_echo_n "checking if build directory is on local disk... " >&6; }
31552
31553	# df -l lists only local disks; if the given directory is not found then
31554	# a non-zero exit code is given
31555  if test "x$DF" = x; then
31556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31557      # msys does not have df; use Windows "net use" instead.
31558      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31559      if test "x$IS_NETWORK_DISK" = x; then
31560        OUTPUT_DIR_IS_LOCAL="yes"
31561      else
31562        OUTPUT_DIR_IS_LOCAL="no"
31563      fi
31564    else
31565      # No df here, say it's local
31566      OUTPUT_DIR_IS_LOCAL="yes"
31567    fi
31568  else
31569    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31570      OUTPUT_DIR_IS_LOCAL="yes"
31571    else
31572      OUTPUT_DIR_IS_LOCAL="no"
31573    fi
31574  fi
31575
31576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31577$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31578
31579# Check if the user has any old-style ALT_ variables set.
31580FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31581
31582# Before generating output files, test if they exist. If they do, this is a reconfigure.
31583# Since we can't properly handle the dependencies for this, warn the user about the situation
31584if test -e $OUTPUT_ROOT/spec.gmk; then
31585  IS_RECONFIGURE=yes
31586else
31587  IS_RECONFIGURE=no
31588fi
31589
31590if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31591  HIDE_PERFORMANCE_HINTS=yes
31592else
31593  HIDE_PERFORMANCE_HINTS=no
31594  # Hide it the next time around...
31595  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31596fi
31597
31598
31599
31600# At the end, call the custom hook. (Dummy macro if no custom sources available)
31601
31602
31603# We're messing a bit with internal autoconf variables to put the config.status
31604# in the output directory instead of the current directory.
31605CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31606# Create the actual output files. Now the main work of configure is done.
31607cat >confcache <<\_ACEOF
31608# This file is a shell script that caches the results of configure
31609# tests run on this system so they can be shared between configure
31610# scripts and configure runs, see configure's option --config-cache.
31611# It is not useful on other systems.  If it contains results you don't
31612# want to keep, you may remove or edit it.
31613#
31614# config.status only pays attention to the cache file if you give it
31615# the --recheck option to rerun configure.
31616#
31617# `ac_cv_env_foo' variables (set or unset) will be overridden when
31618# loading this file, other *unset* `ac_cv_foo' will be assigned the
31619# following values.
31620
31621_ACEOF
31622
31623# The following way of writing the cache mishandles newlines in values,
31624# but we know of no workaround that is simple, portable, and efficient.
31625# So, we kill variables containing newlines.
31626# Ultrix sh set writes to stderr and can't be redirected directly,
31627# and sets the high bit in the cache file unless we assign to the vars.
31628(
31629  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31630    eval ac_val=\$$ac_var
31631    case $ac_val in #(
31632    *${as_nl}*)
31633      case $ac_var in #(
31634      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31635$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31636      esac
31637      case $ac_var in #(
31638      _ | IFS | as_nl) ;; #(
31639      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31640      *) { eval $ac_var=; unset $ac_var;} ;;
31641      esac ;;
31642    esac
31643  done
31644
31645  (set) 2>&1 |
31646    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31647    *${as_nl}ac_space=\ *)
31648      # `set' does not quote correctly, so add quotes: double-quote
31649      # substitution turns \\\\ into \\, and sed turns \\ into \.
31650      sed -n \
31651	"s/'/'\\\\''/g;
31652	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31653      ;; #(
31654    *)
31655      # `set' quotes correctly as required by POSIX, so do not add quotes.
31656      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31657      ;;
31658    esac |
31659    sort
31660) |
31661  sed '
31662     /^ac_cv_env_/b end
31663     t clear
31664     :clear
31665     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31666     t end
31667     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31668     :end' >>confcache
31669if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31670  if test -w "$cache_file"; then
31671    if test "x$cache_file" != "x/dev/null"; then
31672      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31673$as_echo "$as_me: updating cache $cache_file" >&6;}
31674      if test ! -f "$cache_file" || test -h "$cache_file"; then
31675	cat confcache >"$cache_file"
31676      else
31677        case $cache_file in #(
31678        */* | ?:*)
31679	  mv -f confcache "$cache_file"$$ &&
31680	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31681        *)
31682	  mv -f confcache "$cache_file" ;;
31683	esac
31684      fi
31685    fi
31686  else
31687    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31688$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31689  fi
31690fi
31691rm -f confcache
31692
31693test "x$prefix" = xNONE && prefix=$ac_default_prefix
31694# Let make expand exec_prefix.
31695test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31696
31697DEFS=-DHAVE_CONFIG_H
31698
31699ac_libobjs=
31700ac_ltlibobjs=
31701U=
31702for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31703  # 1. Remove the extension, and $U if already installed.
31704  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31705  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31706  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31707  #    will be set to the directory where LIBOBJS objects are built.
31708  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31709  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31710done
31711LIBOBJS=$ac_libobjs
31712
31713LTLIBOBJS=$ac_ltlibobjs
31714
31715
31716
31717: "${CONFIG_STATUS=./config.status}"
31718ac_write_fail=0
31719ac_clean_files_save=$ac_clean_files
31720ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31721{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31722$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31723as_write_fail=0
31724cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31725#! $SHELL
31726# Generated by $as_me.
31727# Run this file to recreate the current configuration.
31728# Compiler output produced by configure, useful for debugging
31729# configure, is in config.log if it exists.
31730
31731debug=false
31732ac_cs_recheck=false
31733ac_cs_silent=false
31734
31735SHELL=\${CONFIG_SHELL-$SHELL}
31736export SHELL
31737_ASEOF
31738cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31739## -------------------- ##
31740## M4sh Initialization. ##
31741## -------------------- ##
31742
31743# Be more Bourne compatible
31744DUALCASE=1; export DUALCASE # for MKS sh
31745if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31746  emulate sh
31747  NULLCMD=:
31748  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31749  # is contrary to our usage.  Disable this feature.
31750  alias -g '${1+"$@"}'='"$@"'
31751  setopt NO_GLOB_SUBST
31752else
31753  case `(set -o) 2>/dev/null` in #(
31754  *posix*) :
31755    set -o posix ;; #(
31756  *) :
31757     ;;
31758esac
31759fi
31760
31761
31762as_nl='
31763'
31764export as_nl
31765# Printing a long string crashes Solaris 7 /usr/bin/printf.
31766as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31767as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31768as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31769# Prefer a ksh shell builtin over an external printf program on Solaris,
31770# but without wasting forks for bash or zsh.
31771if test -z "$BASH_VERSION$ZSH_VERSION" \
31772    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31773  as_echo='print -r --'
31774  as_echo_n='print -rn --'
31775elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31776  as_echo='printf %s\n'
31777  as_echo_n='printf %s'
31778else
31779  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31780    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31781    as_echo_n='/usr/ucb/echo -n'
31782  else
31783    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31784    as_echo_n_body='eval
31785      arg=$1;
31786      case $arg in #(
31787      *"$as_nl"*)
31788	expr "X$arg" : "X\\(.*\\)$as_nl";
31789	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31790      esac;
31791      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31792    '
31793    export as_echo_n_body
31794    as_echo_n='sh -c $as_echo_n_body as_echo'
31795  fi
31796  export as_echo_body
31797  as_echo='sh -c $as_echo_body as_echo'
31798fi
31799
31800# The user is always right.
31801if test "${PATH_SEPARATOR+set}" != set; then
31802  PATH_SEPARATOR=:
31803  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31804    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31805      PATH_SEPARATOR=';'
31806  }
31807fi
31808
31809
31810# IFS
31811# We need space, tab and new line, in precisely that order.  Quoting is
31812# there to prevent editors from complaining about space-tab.
31813# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31814# splitting by setting IFS to empty value.)
31815IFS=" ""	$as_nl"
31816
31817# Find who we are.  Look in the path if we contain no directory separator.
31818as_myself=
31819case $0 in #((
31820  *[\\/]* ) as_myself=$0 ;;
31821  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31822for as_dir in $PATH
31823do
31824  IFS=$as_save_IFS
31825  test -z "$as_dir" && as_dir=.
31826    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31827  done
31828IFS=$as_save_IFS
31829
31830     ;;
31831esac
31832# We did not find ourselves, most probably we were run as `sh COMMAND'
31833# in which case we are not to be found in the path.
31834if test "x$as_myself" = x; then
31835  as_myself=$0
31836fi
31837if test ! -f "$as_myself"; then
31838  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31839  exit 1
31840fi
31841
31842# Unset variables that we do not need and which cause bugs (e.g. in
31843# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31844# suppresses any "Segmentation fault" message there.  '((' could
31845# trigger a bug in pdksh 5.2.14.
31846for as_var in BASH_ENV ENV MAIL MAILPATH
31847do eval test x\${$as_var+set} = xset \
31848  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31849done
31850PS1='$ '
31851PS2='> '
31852PS4='+ '
31853
31854# NLS nuisances.
31855LC_ALL=C
31856export LC_ALL
31857LANGUAGE=C
31858export LANGUAGE
31859
31860# CDPATH.
31861(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31862
31863
31864# as_fn_error STATUS ERROR [LINENO LOG_FD]
31865# ----------------------------------------
31866# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31867# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31868# script with STATUS, using 1 if that was 0.
31869as_fn_error ()
31870{
31871  as_status=$1; test $as_status -eq 0 && as_status=1
31872  if test "$4"; then
31873    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31874    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31875  fi
31876  $as_echo "$as_me: error: $2" >&2
31877  as_fn_exit $as_status
31878} # as_fn_error
31879
31880
31881# as_fn_set_status STATUS
31882# -----------------------
31883# Set $? to STATUS, without forking.
31884as_fn_set_status ()
31885{
31886  return $1
31887} # as_fn_set_status
31888
31889# as_fn_exit STATUS
31890# -----------------
31891# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31892as_fn_exit ()
31893{
31894  set +e
31895  as_fn_set_status $1
31896  exit $1
31897} # as_fn_exit
31898
31899# as_fn_unset VAR
31900# ---------------
31901# Portably unset VAR.
31902as_fn_unset ()
31903{
31904  { eval $1=; unset $1;}
31905}
31906as_unset=as_fn_unset
31907# as_fn_append VAR VALUE
31908# ----------------------
31909# Append the text in VALUE to the end of the definition contained in VAR. Take
31910# advantage of any shell optimizations that allow amortized linear growth over
31911# repeated appends, instead of the typical quadratic growth present in naive
31912# implementations.
31913if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31914  eval 'as_fn_append ()
31915  {
31916    eval $1+=\$2
31917  }'
31918else
31919  as_fn_append ()
31920  {
31921    eval $1=\$$1\$2
31922  }
31923fi # as_fn_append
31924
31925# as_fn_arith ARG...
31926# ------------------
31927# Perform arithmetic evaluation on the ARGs, and store the result in the
31928# global $as_val. Take advantage of shells that can avoid forks. The arguments
31929# must be portable across $(()) and expr.
31930if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31931  eval 'as_fn_arith ()
31932  {
31933    as_val=$(( $* ))
31934  }'
31935else
31936  as_fn_arith ()
31937  {
31938    as_val=`expr "$@" || test $? -eq 1`
31939  }
31940fi # as_fn_arith
31941
31942
31943if expr a : '\(a\)' >/dev/null 2>&1 &&
31944   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31945  as_expr=expr
31946else
31947  as_expr=false
31948fi
31949
31950if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31951  as_basename=basename
31952else
31953  as_basename=false
31954fi
31955
31956if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31957  as_dirname=dirname
31958else
31959  as_dirname=false
31960fi
31961
31962as_me=`$as_basename -- "$0" ||
31963$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31964	 X"$0" : 'X\(//\)$' \| \
31965	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31966$as_echo X/"$0" |
31967    sed '/^.*\/\([^/][^/]*\)\/*$/{
31968	    s//\1/
31969	    q
31970	  }
31971	  /^X\/\(\/\/\)$/{
31972	    s//\1/
31973	    q
31974	  }
31975	  /^X\/\(\/\).*/{
31976	    s//\1/
31977	    q
31978	  }
31979	  s/.*/./; q'`
31980
31981# Avoid depending upon Character Ranges.
31982as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31983as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31984as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31985as_cr_digits='0123456789'
31986as_cr_alnum=$as_cr_Letters$as_cr_digits
31987
31988ECHO_C= ECHO_N= ECHO_T=
31989case `echo -n x` in #(((((
31990-n*)
31991  case `echo 'xy\c'` in
31992  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31993  xy)  ECHO_C='\c';;
31994  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31995       ECHO_T='	';;
31996  esac;;
31997*)
31998  ECHO_N='-n';;
31999esac
32000
32001rm -f conf$$ conf$$.exe conf$$.file
32002if test -d conf$$.dir; then
32003  rm -f conf$$.dir/conf$$.file
32004else
32005  rm -f conf$$.dir
32006  mkdir conf$$.dir 2>/dev/null
32007fi
32008if (echo >conf$$.file) 2>/dev/null; then
32009  if ln -s conf$$.file conf$$ 2>/dev/null; then
32010    as_ln_s='ln -s'
32011    # ... but there are two gotchas:
32012    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32013    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32014    # In both cases, we have to default to `cp -p'.
32015    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32016      as_ln_s='cp -p'
32017  elif ln conf$$.file conf$$ 2>/dev/null; then
32018    as_ln_s=ln
32019  else
32020    as_ln_s='cp -p'
32021  fi
32022else
32023  as_ln_s='cp -p'
32024fi
32025rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32026rmdir conf$$.dir 2>/dev/null
32027
32028
32029# as_fn_mkdir_p
32030# -------------
32031# Create "$as_dir" as a directory, including parents if necessary.
32032as_fn_mkdir_p ()
32033{
32034
32035  case $as_dir in #(
32036  -*) as_dir=./$as_dir;;
32037  esac
32038  test -d "$as_dir" || eval $as_mkdir_p || {
32039    as_dirs=
32040    while :; do
32041      case $as_dir in #(
32042      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32043      *) as_qdir=$as_dir;;
32044      esac
32045      as_dirs="'$as_qdir' $as_dirs"
32046      as_dir=`$as_dirname -- "$as_dir" ||
32047$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32048	 X"$as_dir" : 'X\(//\)[^/]' \| \
32049	 X"$as_dir" : 'X\(//\)$' \| \
32050	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32051$as_echo X"$as_dir" |
32052    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32053	    s//\1/
32054	    q
32055	  }
32056	  /^X\(\/\/\)[^/].*/{
32057	    s//\1/
32058	    q
32059	  }
32060	  /^X\(\/\/\)$/{
32061	    s//\1/
32062	    q
32063	  }
32064	  /^X\(\/\).*/{
32065	    s//\1/
32066	    q
32067	  }
32068	  s/.*/./; q'`
32069      test -d "$as_dir" && break
32070    done
32071    test -z "$as_dirs" || eval "mkdir $as_dirs"
32072  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32073
32074
32075} # as_fn_mkdir_p
32076if mkdir -p . 2>/dev/null; then
32077  as_mkdir_p='mkdir -p "$as_dir"'
32078else
32079  test -d ./-p && rmdir ./-p
32080  as_mkdir_p=false
32081fi
32082
32083if test -x / >/dev/null 2>&1; then
32084  as_test_x='test -x'
32085else
32086  if ls -dL / >/dev/null 2>&1; then
32087    as_ls_L_option=L
32088  else
32089    as_ls_L_option=
32090  fi
32091  as_test_x='
32092    eval sh -c '\''
32093      if test -d "$1"; then
32094	test -d "$1/.";
32095      else
32096	case $1 in #(
32097	-*)set "./$1";;
32098	esac;
32099	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32100	???[sx]*):;;*)false;;esac;fi
32101    '\'' sh
32102  '
32103fi
32104as_executable_p=$as_test_x
32105
32106# Sed expression to map a string onto a valid CPP name.
32107as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32108
32109# Sed expression to map a string onto a valid variable name.
32110as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32111
32112
32113exec 6>&1
32114## ----------------------------------- ##
32115## Main body of $CONFIG_STATUS script. ##
32116## ----------------------------------- ##
32117_ASEOF
32118test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32119
32120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32121# Save the log message, to keep $0 and so on meaningful, and to
32122# report actual input values of CONFIG_FILES etc. instead of their
32123# values after options handling.
32124ac_log="
32125This file was extended by OpenJDK $as_me jdk8, which was
32126generated by GNU Autoconf 2.68.  Invocation command line was
32127
32128  CONFIG_FILES    = $CONFIG_FILES
32129  CONFIG_HEADERS  = $CONFIG_HEADERS
32130  CONFIG_LINKS    = $CONFIG_LINKS
32131  CONFIG_COMMANDS = $CONFIG_COMMANDS
32132  $ $0 $@
32133
32134on `(hostname || uname -n) 2>/dev/null | sed 1q`
32135"
32136
32137_ACEOF
32138
32139case $ac_config_files in *"
32140"*) set x $ac_config_files; shift; ac_config_files=$*;;
32141esac
32142
32143case $ac_config_headers in *"
32144"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32145esac
32146
32147
32148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32149# Files that config.status was made for.
32150config_files="$ac_config_files"
32151config_headers="$ac_config_headers"
32152
32153_ACEOF
32154
32155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32156ac_cs_usage="\
32157\`$as_me' instantiates files and other configuration actions
32158from templates according to the current configuration.  Unless the files
32159and actions are specified as TAGs, all are instantiated by default.
32160
32161Usage: $0 [OPTION]... [TAG]...
32162
32163  -h, --help       print this help, then exit
32164  -V, --version    print version number and configuration settings, then exit
32165      --config     print configuration, then exit
32166  -q, --quiet, --silent
32167                   do not print progress messages
32168  -d, --debug      don't remove temporary files
32169      --recheck    update $as_me by reconfiguring in the same conditions
32170      --file=FILE[:TEMPLATE]
32171                   instantiate the configuration file FILE
32172      --header=FILE[:TEMPLATE]
32173                   instantiate the configuration header FILE
32174
32175Configuration files:
32176$config_files
32177
32178Configuration headers:
32179$config_headers
32180
32181Report bugs to <build-dev@openjdk.java.net>.
32182OpenJDK home page: <http://openjdk.java.net>."
32183
32184_ACEOF
32185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32186ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32187ac_cs_version="\\
32188OpenJDK config.status jdk8
32189configured by $0, generated by GNU Autoconf 2.68,
32190  with options \\"\$ac_cs_config\\"
32191
32192Copyright (C) 2010 Free Software Foundation, Inc.
32193This config.status script is free software; the Free Software Foundation
32194gives unlimited permission to copy, distribute and modify it."
32195
32196ac_pwd='$ac_pwd'
32197srcdir='$srcdir'
32198AWK='$AWK'
32199test -n "\$AWK" || AWK=awk
32200_ACEOF
32201
32202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32203# The default lists apply if the user does not specify any file.
32204ac_need_defaults=:
32205while test $# != 0
32206do
32207  case $1 in
32208  --*=?*)
32209    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32210    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32211    ac_shift=:
32212    ;;
32213  --*=)
32214    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32215    ac_optarg=
32216    ac_shift=:
32217    ;;
32218  *)
32219    ac_option=$1
32220    ac_optarg=$2
32221    ac_shift=shift
32222    ;;
32223  esac
32224
32225  case $ac_option in
32226  # Handling of the options.
32227  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32228    ac_cs_recheck=: ;;
32229  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32230    $as_echo "$ac_cs_version"; exit ;;
32231  --config | --confi | --conf | --con | --co | --c )
32232    $as_echo "$ac_cs_config"; exit ;;
32233  --debug | --debu | --deb | --de | --d | -d )
32234    debug=: ;;
32235  --file | --fil | --fi | --f )
32236    $ac_shift
32237    case $ac_optarg in
32238    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32239    '') as_fn_error $? "missing file argument" ;;
32240    esac
32241    as_fn_append CONFIG_FILES " '$ac_optarg'"
32242    ac_need_defaults=false;;
32243  --header | --heade | --head | --hea )
32244    $ac_shift
32245    case $ac_optarg in
32246    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32247    esac
32248    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32249    ac_need_defaults=false;;
32250  --he | --h)
32251    # Conflict between --help and --header
32252    as_fn_error $? "ambiguous option: \`$1'
32253Try \`$0 --help' for more information.";;
32254  --help | --hel | -h )
32255    $as_echo "$ac_cs_usage"; exit ;;
32256  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32257  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32258    ac_cs_silent=: ;;
32259
32260  # This is an error.
32261  -*) as_fn_error $? "unrecognized option: \`$1'
32262Try \`$0 --help' for more information." ;;
32263
32264  *) as_fn_append ac_config_targets " $1"
32265     ac_need_defaults=false ;;
32266
32267  esac
32268  shift
32269done
32270
32271ac_configure_extra_args=
32272
32273if $ac_cs_silent; then
32274  exec 6>/dev/null
32275  ac_configure_extra_args="$ac_configure_extra_args --silent"
32276fi
32277
32278_ACEOF
32279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32280if \$ac_cs_recheck; then
32281  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32282  shift
32283  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32284  CONFIG_SHELL='$SHELL'
32285  export CONFIG_SHELL
32286  exec "\$@"
32287fi
32288
32289_ACEOF
32290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32291exec 5>>config.log
32292{
32293  echo
32294  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32295## Running $as_me. ##
32296_ASBOX
32297  $as_echo "$ac_log"
32298} >&5
32299
32300_ACEOF
32301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32302_ACEOF
32303
32304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32305
32306# Handling of arguments.
32307for ac_config_target in $ac_config_targets
32308do
32309  case $ac_config_target in
32310    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32311    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32312    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32313    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32314    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32315    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32316    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32317
32318  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32319  esac
32320done
32321
32322
32323# If the user did not use the arguments to specify the items to instantiate,
32324# then the envvar interface is used.  Set only those that are not.
32325# We use the long form for the default assignment because of an extremely
32326# bizarre bug on SunOS 4.1.3.
32327if $ac_need_defaults; then
32328  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32329  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32330fi
32331
32332# Have a temporary directory for convenience.  Make it in the build tree
32333# simply because there is no reason against having it here, and in addition,
32334# creating and moving files from /tmp can sometimes cause problems.
32335# Hook for its removal unless debugging.
32336# Note that there is a small window in which the directory will not be cleaned:
32337# after its creation but before its name has been assigned to `$tmp'.
32338$debug ||
32339{
32340  tmp= ac_tmp=
32341  trap 'exit_status=$?
32342  : "${ac_tmp:=$tmp}"
32343  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32344' 0
32345  trap 'as_fn_exit 1' 1 2 13 15
32346}
32347# Create a (secure) tmp directory for tmp files.
32348
32349{
32350  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32351  test -d "$tmp"
32352}  ||
32353{
32354  tmp=./conf$$-$RANDOM
32355  (umask 077 && mkdir "$tmp")
32356} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32357ac_tmp=$tmp
32358
32359# Set up the scripts for CONFIG_FILES section.
32360# No need to generate them if there are no CONFIG_FILES.
32361# This happens for instance with `./config.status config.h'.
32362if test -n "$CONFIG_FILES"; then
32363
32364
32365ac_cr=`echo X | tr X '\015'`
32366# On cygwin, bash can eat \r inside `` if the user requested igncr.
32367# But we know of no other shell where ac_cr would be empty at this
32368# point, so we can use a bashism as a fallback.
32369if test "x$ac_cr" = x; then
32370  eval ac_cr=\$\'\\r\'
32371fi
32372ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32373if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32374  ac_cs_awk_cr='\\r'
32375else
32376  ac_cs_awk_cr=$ac_cr
32377fi
32378
32379echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32380_ACEOF
32381
32382
32383{
32384  echo "cat >conf$$subs.awk <<_ACEOF" &&
32385  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32386  echo "_ACEOF"
32387} >conf$$subs.sh ||
32388  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32389ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32390ac_delim='%!_!# '
32391for ac_last_try in false false false false false :; do
32392  . ./conf$$subs.sh ||
32393    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32394
32395  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32396  if test $ac_delim_n = $ac_delim_num; then
32397    break
32398  elif $ac_last_try; then
32399    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32400  else
32401    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32402  fi
32403done
32404rm -f conf$$subs.sh
32405
32406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32407cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32408_ACEOF
32409sed -n '
32410h
32411s/^/S["/; s/!.*/"]=/
32412p
32413g
32414s/^[^!]*!//
32415:repl
32416t repl
32417s/'"$ac_delim"'$//
32418t delim
32419:nl
32420h
32421s/\(.\{148\}\)..*/\1/
32422t more1
32423s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32424p
32425n
32426b repl
32427:more1
32428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32429p
32430g
32431s/.\{148\}//
32432t nl
32433:delim
32434h
32435s/\(.\{148\}\)..*/\1/
32436t more2
32437s/["\\]/\\&/g; s/^/"/; s/$/"/
32438p
32439b
32440:more2
32441s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32442p
32443g
32444s/.\{148\}//
32445t delim
32446' <conf$$subs.awk | sed '
32447/^[^""]/{
32448  N
32449  s/\n//
32450}
32451' >>$CONFIG_STATUS || ac_write_fail=1
32452rm -f conf$$subs.awk
32453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32454_ACAWK
32455cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32456  for (key in S) S_is_set[key] = 1
32457  FS = ""
32458
32459}
32460{
32461  line = $ 0
32462  nfields = split(line, field, "@")
32463  substed = 0
32464  len = length(field[1])
32465  for (i = 2; i < nfields; i++) {
32466    key = field[i]
32467    keylen = length(key)
32468    if (S_is_set[key]) {
32469      value = S[key]
32470      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32471      len += length(value) + length(field[++i])
32472      substed = 1
32473    } else
32474      len += 1 + keylen
32475  }
32476
32477  print line
32478}
32479
32480_ACAWK
32481_ACEOF
32482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32483if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32484  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32485else
32486  cat
32487fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32488  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32489_ACEOF
32490
32491# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32492# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32493# trailing colons and then remove the whole line if VPATH becomes empty
32494# (actually we leave an empty line to preserve line numbers).
32495if test "x$srcdir" = x.; then
32496  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32497h
32498s///
32499s/^/:/
32500s/[	 ]*$/:/
32501s/:\$(srcdir):/:/g
32502s/:\${srcdir}:/:/g
32503s/:@srcdir@:/:/g
32504s/^:*//
32505s/:*$//
32506x
32507s/\(=[	 ]*\).*/\1/
32508G
32509s/\n//
32510s/^[^=]*=[	 ]*$//
32511}'
32512fi
32513
32514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32515fi # test -n "$CONFIG_FILES"
32516
32517# Set up the scripts for CONFIG_HEADERS section.
32518# No need to generate them if there are no CONFIG_HEADERS.
32519# This happens for instance with `./config.status Makefile'.
32520if test -n "$CONFIG_HEADERS"; then
32521cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32522BEGIN {
32523_ACEOF
32524
32525# Transform confdefs.h into an awk script `defines.awk', embedded as
32526# here-document in config.status, that substitutes the proper values into
32527# config.h.in to produce config.h.
32528
32529# Create a delimiter string that does not exist in confdefs.h, to ease
32530# handling of long lines.
32531ac_delim='%!_!# '
32532for ac_last_try in false false :; do
32533  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32534  if test -z "$ac_tt"; then
32535    break
32536  elif $ac_last_try; then
32537    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32538  else
32539    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32540  fi
32541done
32542
32543# For the awk script, D is an array of macro values keyed by name,
32544# likewise P contains macro parameters if any.  Preserve backslash
32545# newline sequences.
32546
32547ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32548sed -n '
32549s/.\{148\}/&'"$ac_delim"'/g
32550t rset
32551:rset
32552s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32553t def
32554d
32555:def
32556s/\\$//
32557t bsnl
32558s/["\\]/\\&/g
32559s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32560D["\1"]=" \3"/p
32561s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32562d
32563:bsnl
32564s/["\\]/\\&/g
32565s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32566D["\1"]=" \3\\\\\\n"\\/p
32567t cont
32568s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32569t cont
32570d
32571:cont
32572n
32573s/.\{148\}/&'"$ac_delim"'/g
32574t clear
32575:clear
32576s/\\$//
32577t bsnlc
32578s/["\\]/\\&/g; s/^/"/; s/$/"/p
32579d
32580:bsnlc
32581s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32582b cont
32583' <confdefs.h | sed '
32584s/'"$ac_delim"'/"\\\
32585"/g' >>$CONFIG_STATUS || ac_write_fail=1
32586
32587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32588  for (key in D) D_is_set[key] = 1
32589  FS = ""
32590}
32591/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32592  line = \$ 0
32593  split(line, arg, " ")
32594  if (arg[1] == "#") {
32595    defundef = arg[2]
32596    mac1 = arg[3]
32597  } else {
32598    defundef = substr(arg[1], 2)
32599    mac1 = arg[2]
32600  }
32601  split(mac1, mac2, "(") #)
32602  macro = mac2[1]
32603  prefix = substr(line, 1, index(line, defundef) - 1)
32604  if (D_is_set[macro]) {
32605    # Preserve the white space surrounding the "#".
32606    print prefix "define", macro P[macro] D[macro]
32607    next
32608  } else {
32609    # Replace #undef with comments.  This is necessary, for example,
32610    # in the case of _POSIX_SOURCE, which is predefined and required
32611    # on some systems where configure will not decide to define it.
32612    if (defundef == "undef") {
32613      print "/*", prefix defundef, macro, "*/"
32614      next
32615    }
32616  }
32617}
32618{ print }
32619_ACAWK
32620_ACEOF
32621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32622  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32623fi # test -n "$CONFIG_HEADERS"
32624
32625
32626eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32627shift
32628for ac_tag
32629do
32630  case $ac_tag in
32631  :[FHLC]) ac_mode=$ac_tag; continue;;
32632  esac
32633  case $ac_mode$ac_tag in
32634  :[FHL]*:*);;
32635  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32636  :[FH]-) ac_tag=-:-;;
32637  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32638  esac
32639  ac_save_IFS=$IFS
32640  IFS=:
32641  set x $ac_tag
32642  IFS=$ac_save_IFS
32643  shift
32644  ac_file=$1
32645  shift
32646
32647  case $ac_mode in
32648  :L) ac_source=$1;;
32649  :[FH])
32650    ac_file_inputs=
32651    for ac_f
32652    do
32653      case $ac_f in
32654      -) ac_f="$ac_tmp/stdin";;
32655      *) # Look for the file first in the build tree, then in the source tree
32656	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32657	 # because $ac_f cannot contain `:'.
32658	 test -f "$ac_f" ||
32659	   case $ac_f in
32660	   [\\/$]*) false;;
32661	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32662	   esac ||
32663	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32664      esac
32665      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32666      as_fn_append ac_file_inputs " '$ac_f'"
32667    done
32668
32669    # Let's still pretend it is `configure' which instantiates (i.e., don't
32670    # use $as_me), people would be surprised to read:
32671    #    /* config.h.  Generated by config.status.  */
32672    configure_input='Generated from '`
32673	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32674	`' by configure.'
32675    if test x"$ac_file" != x-; then
32676      configure_input="$ac_file.  $configure_input"
32677      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32678$as_echo "$as_me: creating $ac_file" >&6;}
32679    fi
32680    # Neutralize special characters interpreted by sed in replacement strings.
32681    case $configure_input in #(
32682    *\&* | *\|* | *\\* )
32683       ac_sed_conf_input=`$as_echo "$configure_input" |
32684       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32685    *) ac_sed_conf_input=$configure_input;;
32686    esac
32687
32688    case $ac_tag in
32689    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32690      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32691    esac
32692    ;;
32693  esac
32694
32695  ac_dir=`$as_dirname -- "$ac_file" ||
32696$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32697	 X"$ac_file" : 'X\(//\)[^/]' \| \
32698	 X"$ac_file" : 'X\(//\)$' \| \
32699	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32700$as_echo X"$ac_file" |
32701    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32702	    s//\1/
32703	    q
32704	  }
32705	  /^X\(\/\/\)[^/].*/{
32706	    s//\1/
32707	    q
32708	  }
32709	  /^X\(\/\/\)$/{
32710	    s//\1/
32711	    q
32712	  }
32713	  /^X\(\/\).*/{
32714	    s//\1/
32715	    q
32716	  }
32717	  s/.*/./; q'`
32718  as_dir="$ac_dir"; as_fn_mkdir_p
32719  ac_builddir=.
32720
32721case "$ac_dir" in
32722.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32723*)
32724  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32725  # A ".." for each directory in $ac_dir_suffix.
32726  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32727  case $ac_top_builddir_sub in
32728  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32729  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32730  esac ;;
32731esac
32732ac_abs_top_builddir=$ac_pwd
32733ac_abs_builddir=$ac_pwd$ac_dir_suffix
32734# for backward compatibility:
32735ac_top_builddir=$ac_top_build_prefix
32736
32737case $srcdir in
32738  .)  # We are building in place.
32739    ac_srcdir=.
32740    ac_top_srcdir=$ac_top_builddir_sub
32741    ac_abs_top_srcdir=$ac_pwd ;;
32742  [\\/]* | ?:[\\/]* )  # Absolute name.
32743    ac_srcdir=$srcdir$ac_dir_suffix;
32744    ac_top_srcdir=$srcdir
32745    ac_abs_top_srcdir=$srcdir ;;
32746  *) # Relative name.
32747    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32748    ac_top_srcdir=$ac_top_build_prefix$srcdir
32749    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32750esac
32751ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32752
32753
32754  case $ac_mode in
32755  :F)
32756  #
32757  # CONFIG_FILE
32758  #
32759
32760_ACEOF
32761
32762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32763# If the template does not know about datarootdir, expand it.
32764# FIXME: This hack should be removed a few years after 2.60.
32765ac_datarootdir_hack=; ac_datarootdir_seen=
32766ac_sed_dataroot='
32767/datarootdir/ {
32768  p
32769  q
32770}
32771/@datadir@/p
32772/@docdir@/p
32773/@infodir@/p
32774/@localedir@/p
32775/@mandir@/p'
32776case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32777*datarootdir*) ac_datarootdir_seen=yes;;
32778*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32779  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32780$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32781_ACEOF
32782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32783  ac_datarootdir_hack='
32784  s&@datadir@&$datadir&g
32785  s&@docdir@&$docdir&g
32786  s&@infodir@&$infodir&g
32787  s&@localedir@&$localedir&g
32788  s&@mandir@&$mandir&g
32789  s&\\\${datarootdir}&$datarootdir&g' ;;
32790esac
32791_ACEOF
32792
32793# Neutralize VPATH when `$srcdir' = `.'.
32794# Shell code in configure.ac might set extrasub.
32795# FIXME: do we really want to maintain this feature?
32796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32797ac_sed_extra="$ac_vpsub
32798$extrasub
32799_ACEOF
32800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32801:t
32802/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32803s|@configure_input@|$ac_sed_conf_input|;t t
32804s&@top_builddir@&$ac_top_builddir_sub&;t t
32805s&@top_build_prefix@&$ac_top_build_prefix&;t t
32806s&@srcdir@&$ac_srcdir&;t t
32807s&@abs_srcdir@&$ac_abs_srcdir&;t t
32808s&@top_srcdir@&$ac_top_srcdir&;t t
32809s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32810s&@builddir@&$ac_builddir&;t t
32811s&@abs_builddir@&$ac_abs_builddir&;t t
32812s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32813$ac_datarootdir_hack
32814"
32815eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32816  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32817
32818test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32819  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32820  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
32821      "$ac_tmp/out"`; test -z "$ac_out"; } &&
32822  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32823which seems to be undefined.  Please make sure it is defined" >&5
32824$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32825which seems to be undefined.  Please make sure it is defined" >&2;}
32826
32827  rm -f "$ac_tmp/stdin"
32828  case $ac_file in
32829  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32830  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32831  esac \
32832  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32833 ;;
32834  :H)
32835  #
32836  # CONFIG_HEADER
32837  #
32838  if test x"$ac_file" != x-; then
32839    {
32840      $as_echo "/* $configure_input  */" \
32841      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32842    } >"$ac_tmp/config.h" \
32843      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32844    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32845      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32846$as_echo "$as_me: $ac_file is unchanged" >&6;}
32847    else
32848      rm -f "$ac_file"
32849      mv "$ac_tmp/config.h" "$ac_file" \
32850	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32851    fi
32852  else
32853    $as_echo "/* $configure_input  */" \
32854      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32855      || as_fn_error $? "could not create -" "$LINENO" 5
32856  fi
32857 ;;
32858
32859
32860  esac
32861
32862done # for ac_tag
32863
32864
32865as_fn_exit 0
32866_ACEOF
32867ac_clean_files=$ac_clean_files_save
32868
32869test $ac_write_fail = 0 ||
32870  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32871
32872
32873# configure is writing to config.log, and then calls config.status.
32874# config.status does its own redirection, appending to config.log.
32875# Unfortunately, on DOS this fails, as config.log is still kept open
32876# by configure, so config.status won't be able to write to it; its
32877# output is simply discarded.  So we exec the FD to /dev/null,
32878# effectively closing config.log, so it can be properly (re)opened and
32879# appended to by config.status.  When coming back to configure, we
32880# need to make the FD available again.
32881if test "$no_create" != yes; then
32882  ac_cs_success=:
32883  ac_config_status_args=
32884  test "$silent" = yes &&
32885    ac_config_status_args="$ac_config_status_args --quiet"
32886  exec 5>/dev/null
32887  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32888  exec 5>>config.log
32889  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32890  # would make configure fail if this is the last instruction.
32891  $ac_cs_success || as_fn_exit 1
32892fi
32893if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32894  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32895$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32896fi
32897
32898
32899# Make the compare script executable
32900$CHMOD +x $OUTPUT_ROOT/compare.sh
32901
32902# Finally output some useful information to the user
32903
32904# Finally output some useful information to the user
32905
32906if test "x$CCACHE_FOUND" != x; then
32907	if  test "x$HAS_GOOD_CCACHE" = x; then
32908		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32909		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32910	else
32911		CCACHE_STATUS="installed and in use"
32912	fi
32913else
32914	if test "x$GCC" = xyes; then
32915		CCACHE_STATUS="not installed (consider installing)"
32916		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32917	else
32918		CCACHE_STATUS="not available for your system"
32919	fi
32920fi
32921
32922printf "\n"
32923printf "====================================================\n"
32924printf "A new configuration has been successfully created in\n"
32925printf "$OUTPUT_ROOT\n"
32926if test "x$CONFIGURE_COMMAND_LINE" != x; then
32927	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32928else
32929	printf "using default settings.\n"
32930fi
32931
32932printf "\n"
32933printf "Configuration summary:\n"
32934printf "* Debug level:    $DEBUG_LEVEL\n"
32935printf "* JDK variant:    $JDK_VARIANT\n"
32936printf "* JVM variants:   $with_jvm_variants\n"
32937printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32938
32939printf "\n"
32940printf "Tools summary:\n"
32941if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32942  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32943fi
32944printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32945printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32946printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32947
32948printf "\n"
32949printf "Build performance summary:\n"
32950printf "* Cores to use:   $NUM_CORES\n"
32951printf "* Memory limit:   $MEMORY_SIZE MB\n"
32952printf "* ccache status:  $CCACHE_STATUS\n"
32953printf "\n"
32954
32955if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32956	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32957	printf "$CCACHE_HELP_MSG\n"
32958
32959    # Print a helpful message on how to acquire the necessary build dependency.
32960    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32961    MISSING_DEPENDENCY=ccache
32962    PKGHANDLER_COMMAND=
32963
32964    case $PKGHANDLER in
32965	apt-get)
32966                apt_help     $MISSING_DEPENDENCY ;;
32967    yum)
32968                yum_help     $MISSING_DEPENDENCY ;;
32969	port)
32970                port_help    $MISSING_DEPENDENCY ;;
32971	pkgutil)
32972                pkgutil_help $MISSING_DEPENDENCY ;;
32973	pkgadd)
32974                pkgadd_help  $MISSING_DEPENDENCY ;;
32975    * )
32976      break ;;
32977    esac
32978
32979    if test "x$PKGHANDLER_COMMAND" != x; then
32980        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32981    fi
32982
32983	printf "$HELP_MSG\n"
32984	printf "\n"
32985fi
32986
32987if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32988	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32989	printf "will result in longer build times.\n"
32990	printf "\n"
32991fi
32992
32993if test "x$FOUND_ALT_VARIABLES" != "x"; then
32994	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32995	printf "These are not respected, and will be ignored. It is recommended\n"
32996	printf "that you clean your environment. The following variables are set:\n"
32997	printf "$FOUND_ALT_VARIABLES\n"
32998	printf "\n"
32999fi
33000
33001if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33002	printf "WARNING: Your build output directory is not on a local disk.\n"
33003	printf "This will severely degrade build performance!\n"
33004	printf "It is recommended that you create an output directory on a local disk,\n"
33005	printf "and run the configure script again from that directory.\n"
33006	printf "\n"
33007fi
33008
33009if test "x$IS_RECONFIGURE" = "xyes"; then
33010	printf "WARNING: The result of this configuration has overridden an older\n"
33011	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33012	printf "proper build. Failure to do so might result in strange build problems.\n"
33013	printf "\n"
33014fi
33015
33016