generated-configure.sh revision 571:b284980b7d9a
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
763JDK_VERSION
764COPYRIGHT_YEAR
765MACOSX_BUNDLE_ID_BASE
766MACOSX_BUNDLE_NAME_BASE
767COMPANY_NAME
768JDK_RC_PLATFORM_NAME
769PRODUCT_SUFFIX
770PRODUCT_NAME
771LAUNCHER_NAME
772MILESTONE
773JDK_BUILD_NUMBER
774JDK_UPDATE_VERSION
775JDK_MICRO_VERSION
776JDK_MINOR_VERSION
777JDK_MAJOR_VERSION
778USER_RELEASE_SUFFIX
779COMPRESS_JARS
780UNLIMITED_CRYPTO
781CACERTS_FILE
782TEST_IN_BUILD
783BUILD_HEADLESS
784SUPPORT_HEADFUL
785SUPPORT_HEADLESS
786SET_OPENJDK
787BDEPS_FTP
788BDEPS_UNZIP
789OS_VERSION_MICRO
790OS_VERSION_MINOR
791OS_VERSION_MAJOR
792PKG_CONFIG
793TIME
794STAT
795HG
796READELF
797OTOOL
798LDD
799ZIP
800UNZIP
801FIND_DELETE
802MAKE
803CHECK_TOOLSDIR_MAKE
804CHECK_TOOLSDIR_GMAKE
805CHECK_MAKE
806CHECK_GMAKE
807PKGHANDLER
808OUTPUT_ROOT
809CONF_NAME
810SPEC
811BUILD_VARIANT_RELEASE
812DEBUG_CLASSFILES
813FASTDEBUG
814VARIANT
815DEBUG_LEVEL
816MACOSX_UNIVERSAL
817JVM_VARIANT_ZEROSHARK
818JVM_VARIANT_ZERO
819JVM_VARIANT_KERNEL
820JVM_VARIANT_MINIMAL1
821JVM_VARIANT_CLIENT
822JVM_VARIANT_SERVER
823JVM_VARIANTS
824JDK_VARIANT
825BUILD_LOG_WRAPPER
826BUILD_LOG_PREVIOUS
827BUILD_LOG
828SYS_ROOT
829PATH_SEP
830SRC_ROOT
831DEFINE_CROSS_COMPILE_ARCH
832LP64
833OPENJDK_TARGET_OS_API_DIR
834OPENJDK_TARGET_CPU_JLI_CFLAGS
835OPENJDK_TARGET_CPU_OSARCH
836OPENJDK_TARGET_CPU_ISADIR
837OPENJDK_TARGET_CPU_LIBDIR
838OPENJDK_TARGET_CPU_LEGACY_LIB
839OPENJDK_TARGET_CPU_LEGACY
840REQUIRED_OS_VERSION
841REQUIRED_OS_NAME
842COMPILE_TYPE
843OPENJDK_TARGET_CPU_ENDIAN
844OPENJDK_TARGET_CPU_BITS
845OPENJDK_TARGET_CPU_ARCH
846OPENJDK_TARGET_CPU
847OPENJDK_TARGET_OS_API
848OPENJDK_TARGET_OS
849OPENJDK_BUILD_CPU_ENDIAN
850OPENJDK_BUILD_CPU_BITS
851OPENJDK_BUILD_CPU_ARCH
852OPENJDK_BUILD_CPU
853OPENJDK_BUILD_OS_API
854OPENJDK_BUILD_OS
855OPENJDK_BUILD_AUTOCONF_NAME
856OPENJDK_TARGET_AUTOCONF_NAME
857target_os
858target_vendor
859target_cpu
860target
861host_os
862host_vendor
863host_cpu
864host
865build_os
866build_vendor
867build_cpu
868build
869SETFILE
870DF
871READLINK
872CYGPATH
873NAWK
874SED
875FGREP
876EGREP
877GREP
878AWK
879XARGS
880WHICH
881WC
882UNIQ
883UNAME
884TR
885TOUCH
886TEE
887TAR
888TAIL
889SORT
890SH
891RM
892THEPWDCMD
893PRINTF
894MV
895MKTEMP
896MKDIR
897LS
898LN
899HEAD
900FIND
901FILE
902EXPR
903ECHO
904DIRNAME
905DIFF
906DATE
907CUT
908CPIO
909CP
910COMM
911CMP
912CHMOD
913CAT
914BASH
915BASENAME
916DATE_WHEN_CONFIGURED
917CONFIGURE_COMMAND_LINE
918CUSTOM_MAKE_DIR
919target_alias
920host_alias
921build_alias
922LIBS
923ECHO_T
924ECHO_N
925ECHO_C
926DEFS
927mandir
928localedir
929libdir
930psdir
931pdfdir
932dvidir
933htmldir
934infodir
935docdir
936oldincludedir
937includedir
938localstatedir
939sharedstatedir
940sysconfdir
941datadir
942datarootdir
943libexecdir
944sbindir
945bindir
946program_transform_name
947prefix
948exec_prefix
949PACKAGE_URL
950PACKAGE_BUGREPORT
951PACKAGE_STRING
952PACKAGE_VERSION
953PACKAGE_TARNAME
954PACKAGE_NAME
955PATH_SEPARATOR
956SHELL'
957ac_subst_files=''
958ac_user_opts='
959enable_option_checking
960with_custom_make_dir
961with_target_bits
962with_sys_root
963with_tools_dir
964with_devkit
965with_jdk_variant
966with_jvm_variants
967enable_debug
968with_debug_level
969with_conf_name
970with_builddeps_conf
971with_builddeps_server
972with_builddeps_dir
973with_builddeps_group
974enable_openjdk_only
975enable_headful
976enable_hotspot_test_in_build
977with_cacerts_file
978enable_unlimited_crypto
979with_milestone
980with_build_number
981with_user_release_suffix
982with_boot_jdk
983with_boot_jdk_jvmargs
984with_add_source_root
985with_override_source_root
986with_adds_and_overrides
987with_override_langtools
988with_override_corba
989with_override_jaxp
990with_override_jaxws
991with_override_hotspot
992with_override_jdk
993with_import_hotspot
994with_msvcr_dll
995with_extra_cflags
996with_extra_cxxflags
997with_extra_ldflags
998enable_debug_symbols
999enable_zip_debug_info
1000enable_macosx_runtime_support
1001with_x
1002with_cups
1003with_cups_include
1004with_freetype
1005with_alsa
1006with_alsa_include
1007with_alsa_lib
1008with_zlib
1009with_stdc__lib
1010with_num_cores
1011with_memory_size
1012with_sjavac_server_java
1013with_sjavac_server_cores
1014enable_sjavac
1015enable_precompiled_headers
1016enable_ccache
1017with_ccache_dir
1018'
1019      ac_precious_vars='build_alias
1020host_alias
1021target_alias
1022PKG_CONFIG
1023CC
1024CFLAGS
1025LDFLAGS
1026LIBS
1027CPPFLAGS
1028CXX
1029CXXFLAGS
1030CCC
1031OBJC
1032OBJCFLAGS
1033CPP
1034CXXCPP
1035XMKMF
1036FREETYPE2_CFLAGS
1037FREETYPE2_LIBS
1038ALSA_CFLAGS
1039ALSA_LIBS'
1040
1041
1042# Initialize some variables set by options.
1043ac_init_help=
1044ac_init_version=false
1045ac_unrecognized_opts=
1046ac_unrecognized_sep=
1047# The variables have the same names as the options, with
1048# dashes changed to underlines.
1049cache_file=/dev/null
1050exec_prefix=NONE
1051no_create=
1052no_recursion=
1053prefix=NONE
1054program_prefix=NONE
1055program_suffix=NONE
1056program_transform_name=s,x,x,
1057silent=
1058site=
1059srcdir=
1060verbose=
1061x_includes=NONE
1062x_libraries=NONE
1063
1064# Installation directory options.
1065# These are left unexpanded so users can "make install exec_prefix=/foo"
1066# and all the variables that are supposed to be based on exec_prefix
1067# by default will actually change.
1068# Use braces instead of parens because sh, perl, etc. also accept them.
1069# (The list follows the same order as the GNU Coding Standards.)
1070bindir='${exec_prefix}/bin'
1071sbindir='${exec_prefix}/sbin'
1072libexecdir='${exec_prefix}/libexec'
1073datarootdir='${prefix}/share'
1074datadir='${datarootdir}'
1075sysconfdir='${prefix}/etc'
1076sharedstatedir='${prefix}/com'
1077localstatedir='${prefix}/var'
1078includedir='${prefix}/include'
1079oldincludedir='/usr/include'
1080docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1081infodir='${datarootdir}/info'
1082htmldir='${docdir}'
1083dvidir='${docdir}'
1084pdfdir='${docdir}'
1085psdir='${docdir}'
1086libdir='${exec_prefix}/lib'
1087localedir='${datarootdir}/locale'
1088mandir='${datarootdir}/man'
1089
1090ac_prev=
1091ac_dashdash=
1092for ac_option
1093do
1094  # If the previous option needs an argument, assign it.
1095  if test -n "$ac_prev"; then
1096    eval $ac_prev=\$ac_option
1097    ac_prev=
1098    continue
1099  fi
1100
1101  case $ac_option in
1102  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1103  *=)   ac_optarg= ;;
1104  *)    ac_optarg=yes ;;
1105  esac
1106
1107  # Accept the important Cygnus configure options, so we can diagnose typos.
1108
1109  case $ac_dashdash$ac_option in
1110  --)
1111    ac_dashdash=yes ;;
1112
1113  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1114    ac_prev=bindir ;;
1115  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1116    bindir=$ac_optarg ;;
1117
1118  -build | --build | --buil | --bui | --bu)
1119    ac_prev=build_alias ;;
1120  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1121    build_alias=$ac_optarg ;;
1122
1123  -cache-file | --cache-file | --cache-fil | --cache-fi \
1124  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1125    ac_prev=cache_file ;;
1126  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1127  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1128    cache_file=$ac_optarg ;;
1129
1130  --config-cache | -C)
1131    cache_file=config.cache ;;
1132
1133  -datadir | --datadir | --datadi | --datad)
1134    ac_prev=datadir ;;
1135  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1136    datadir=$ac_optarg ;;
1137
1138  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1139  | --dataroo | --dataro | --datar)
1140    ac_prev=datarootdir ;;
1141  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1142  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1143    datarootdir=$ac_optarg ;;
1144
1145  -disable-* | --disable-*)
1146    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1147    # Reject names that are not valid shell variable names.
1148    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1149      as_fn_error $? "invalid feature name: $ac_useropt"
1150    ac_useropt_orig=$ac_useropt
1151    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1152    case $ac_user_opts in
1153      *"
1154"enable_$ac_useropt"
1155"*) ;;
1156      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1157	 ac_unrecognized_sep=', ';;
1158    esac
1159    eval enable_$ac_useropt=no ;;
1160
1161  -docdir | --docdir | --docdi | --doc | --do)
1162    ac_prev=docdir ;;
1163  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1164    docdir=$ac_optarg ;;
1165
1166  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1167    ac_prev=dvidir ;;
1168  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1169    dvidir=$ac_optarg ;;
1170
1171  -enable-* | --enable-*)
1172    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1173    # Reject names that are not valid shell variable names.
1174    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1175      as_fn_error $? "invalid feature name: $ac_useropt"
1176    ac_useropt_orig=$ac_useropt
1177    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178    case $ac_user_opts in
1179      *"
1180"enable_$ac_useropt"
1181"*) ;;
1182      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1183	 ac_unrecognized_sep=', ';;
1184    esac
1185    eval enable_$ac_useropt=\$ac_optarg ;;
1186
1187  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1188  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1189  | --exec | --exe | --ex)
1190    ac_prev=exec_prefix ;;
1191  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1192  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1193  | --exec=* | --exe=* | --ex=*)
1194    exec_prefix=$ac_optarg ;;
1195
1196  -gas | --gas | --ga | --g)
1197    # Obsolete; use --with-gas.
1198    with_gas=yes ;;
1199
1200  -help | --help | --hel | --he | -h)
1201    ac_init_help=long ;;
1202  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1203    ac_init_help=recursive ;;
1204  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1205    ac_init_help=short ;;
1206
1207  -host | --host | --hos | --ho)
1208    ac_prev=host_alias ;;
1209  -host=* | --host=* | --hos=* | --ho=*)
1210    host_alias=$ac_optarg ;;
1211
1212  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1213    ac_prev=htmldir ;;
1214  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1215  | --ht=*)
1216    htmldir=$ac_optarg ;;
1217
1218  -includedir | --includedir | --includedi | --included | --include \
1219  | --includ | --inclu | --incl | --inc)
1220    ac_prev=includedir ;;
1221  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1222  | --includ=* | --inclu=* | --incl=* | --inc=*)
1223    includedir=$ac_optarg ;;
1224
1225  -infodir | --infodir | --infodi | --infod | --info | --inf)
1226    ac_prev=infodir ;;
1227  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1228    infodir=$ac_optarg ;;
1229
1230  -libdir | --libdir | --libdi | --libd)
1231    ac_prev=libdir ;;
1232  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1233    libdir=$ac_optarg ;;
1234
1235  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1236  | --libexe | --libex | --libe)
1237    ac_prev=libexecdir ;;
1238  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1239  | --libexe=* | --libex=* | --libe=*)
1240    libexecdir=$ac_optarg ;;
1241
1242  -localedir | --localedir | --localedi | --localed | --locale)
1243    ac_prev=localedir ;;
1244  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1245    localedir=$ac_optarg ;;
1246
1247  -localstatedir | --localstatedir | --localstatedi | --localstated \
1248  | --localstate | --localstat | --localsta | --localst | --locals)
1249    ac_prev=localstatedir ;;
1250  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1251  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1252    localstatedir=$ac_optarg ;;
1253
1254  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1255    ac_prev=mandir ;;
1256  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1257    mandir=$ac_optarg ;;
1258
1259  -nfp | --nfp | --nf)
1260    # Obsolete; use --without-fp.
1261    with_fp=no ;;
1262
1263  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1264  | --no-cr | --no-c | -n)
1265    no_create=yes ;;
1266
1267  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1268  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1269    no_recursion=yes ;;
1270
1271  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1272  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1273  | --oldin | --oldi | --old | --ol | --o)
1274    ac_prev=oldincludedir ;;
1275  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1276  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1277  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1278    oldincludedir=$ac_optarg ;;
1279
1280  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1281    ac_prev=prefix ;;
1282  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1283    prefix=$ac_optarg ;;
1284
1285  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1286  | --program-pre | --program-pr | --program-p)
1287    ac_prev=program_prefix ;;
1288  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1289  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1290    program_prefix=$ac_optarg ;;
1291
1292  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1293  | --program-suf | --program-su | --program-s)
1294    ac_prev=program_suffix ;;
1295  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1296  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1297    program_suffix=$ac_optarg ;;
1298
1299  -program-transform-name | --program-transform-name \
1300  | --program-transform-nam | --program-transform-na \
1301  | --program-transform-n | --program-transform- \
1302  | --program-transform | --program-transfor \
1303  | --program-transfo | --program-transf \
1304  | --program-trans | --program-tran \
1305  | --progr-tra | --program-tr | --program-t)
1306    ac_prev=program_transform_name ;;
1307  -program-transform-name=* | --program-transform-name=* \
1308  | --program-transform-nam=* | --program-transform-na=* \
1309  | --program-transform-n=* | --program-transform-=* \
1310  | --program-transform=* | --program-transfor=* \
1311  | --program-transfo=* | --program-transf=* \
1312  | --program-trans=* | --program-tran=* \
1313  | --progr-tra=* | --program-tr=* | --program-t=*)
1314    program_transform_name=$ac_optarg ;;
1315
1316  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1317    ac_prev=pdfdir ;;
1318  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1319    pdfdir=$ac_optarg ;;
1320
1321  -psdir | --psdir | --psdi | --psd | --ps)
1322    ac_prev=psdir ;;
1323  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1324    psdir=$ac_optarg ;;
1325
1326  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1327  | -silent | --silent | --silen | --sile | --sil)
1328    silent=yes ;;
1329
1330  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1331    ac_prev=sbindir ;;
1332  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1333  | --sbi=* | --sb=*)
1334    sbindir=$ac_optarg ;;
1335
1336  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1337  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1338  | --sharedst | --shareds | --shared | --share | --shar \
1339  | --sha | --sh)
1340    ac_prev=sharedstatedir ;;
1341  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1342  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1343  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1344  | --sha=* | --sh=*)
1345    sharedstatedir=$ac_optarg ;;
1346
1347  -site | --site | --sit)
1348    ac_prev=site ;;
1349  -site=* | --site=* | --sit=*)
1350    site=$ac_optarg ;;
1351
1352  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1353    ac_prev=srcdir ;;
1354  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1355    srcdir=$ac_optarg ;;
1356
1357  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1358  | --syscon | --sysco | --sysc | --sys | --sy)
1359    ac_prev=sysconfdir ;;
1360  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1361  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1362    sysconfdir=$ac_optarg ;;
1363
1364  -target | --target | --targe | --targ | --tar | --ta | --t)
1365    ac_prev=target_alias ;;
1366  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1367    target_alias=$ac_optarg ;;
1368
1369  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1370    verbose=yes ;;
1371
1372  -version | --version | --versio | --versi | --vers | -V)
1373    ac_init_version=: ;;
1374
1375  -with-* | --with-*)
1376    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1377    # Reject names that are not valid shell variable names.
1378    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1379      as_fn_error $? "invalid package name: $ac_useropt"
1380    ac_useropt_orig=$ac_useropt
1381    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1382    case $ac_user_opts in
1383      *"
1384"with_$ac_useropt"
1385"*) ;;
1386      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1387	 ac_unrecognized_sep=', ';;
1388    esac
1389    eval with_$ac_useropt=\$ac_optarg ;;
1390
1391  -without-* | --without-*)
1392    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1393    # Reject names that are not valid shell variable names.
1394    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1395      as_fn_error $? "invalid package name: $ac_useropt"
1396    ac_useropt_orig=$ac_useropt
1397    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1398    case $ac_user_opts in
1399      *"
1400"with_$ac_useropt"
1401"*) ;;
1402      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1403	 ac_unrecognized_sep=', ';;
1404    esac
1405    eval with_$ac_useropt=no ;;
1406
1407  --x)
1408    # Obsolete; use --with-x.
1409    with_x=yes ;;
1410
1411  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1412  | --x-incl | --x-inc | --x-in | --x-i)
1413    ac_prev=x_includes ;;
1414  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1415  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1416    x_includes=$ac_optarg ;;
1417
1418  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1419  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1420    ac_prev=x_libraries ;;
1421  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1422  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1423    x_libraries=$ac_optarg ;;
1424
1425  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1426Try \`$0 --help' for more information"
1427    ;;
1428
1429  *=*)
1430    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1431    # Reject names that are not valid shell variable names.
1432    case $ac_envvar in #(
1433      '' | [0-9]* | *[!_$as_cr_alnum]* )
1434      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1435    esac
1436    eval $ac_envvar=\$ac_optarg
1437    export $ac_envvar ;;
1438
1439  *)
1440    # FIXME: should be removed in autoconf 3.0.
1441    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1442    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1443      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1444    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1445    ;;
1446
1447  esac
1448done
1449
1450if test -n "$ac_prev"; then
1451  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1452  as_fn_error $? "missing argument to $ac_option"
1453fi
1454
1455if test -n "$ac_unrecognized_opts"; then
1456  case $enable_option_checking in
1457    no) ;;
1458    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1459    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1460  esac
1461fi
1462
1463# Check all directory arguments for consistency.
1464for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1465		datadir sysconfdir sharedstatedir localstatedir includedir \
1466		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1467		libdir localedir mandir
1468do
1469  eval ac_val=\$$ac_var
1470  # Remove trailing slashes.
1471  case $ac_val in
1472    */ )
1473      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1474      eval $ac_var=\$ac_val;;
1475  esac
1476  # Be sure to have absolute directory names.
1477  case $ac_val in
1478    [\\/$]* | ?:[\\/]* )  continue;;
1479    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1480  esac
1481  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1482done
1483
1484# There might be people who depend on the old broken behavior: `$host'
1485# used to hold the argument of --host etc.
1486# FIXME: To remove some day.
1487build=$build_alias
1488host=$host_alias
1489target=$target_alias
1490
1491# FIXME: To remove some day.
1492if test "x$host_alias" != x; then
1493  if test "x$build_alias" = x; then
1494    cross_compiling=maybe
1495    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1496    If a cross compiler is detected then cross compile mode will be used" >&2
1497  elif test "x$build_alias" != "x$host_alias"; then
1498    cross_compiling=yes
1499  fi
1500fi
1501
1502ac_tool_prefix=
1503test -n "$host_alias" && ac_tool_prefix=$host_alias-
1504
1505test "$silent" = yes && exec 6>/dev/null
1506
1507
1508ac_pwd=`pwd` && test -n "$ac_pwd" &&
1509ac_ls_di=`ls -di .` &&
1510ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1511  as_fn_error $? "working directory cannot be determined"
1512test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1513  as_fn_error $? "pwd does not report name of working directory"
1514
1515
1516# Find the source files, if location was not specified.
1517if test -z "$srcdir"; then
1518  ac_srcdir_defaulted=yes
1519  # Try the directory containing this script, then the parent directory.
1520  ac_confdir=`$as_dirname -- "$as_myself" ||
1521$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1522	 X"$as_myself" : 'X\(//\)[^/]' \| \
1523	 X"$as_myself" : 'X\(//\)$' \| \
1524	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1525$as_echo X"$as_myself" |
1526    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1527	    s//\1/
1528	    q
1529	  }
1530	  /^X\(\/\/\)[^/].*/{
1531	    s//\1/
1532	    q
1533	  }
1534	  /^X\(\/\/\)$/{
1535	    s//\1/
1536	    q
1537	  }
1538	  /^X\(\/\).*/{
1539	    s//\1/
1540	    q
1541	  }
1542	  s/.*/./; q'`
1543  srcdir=$ac_confdir
1544  if test ! -r "$srcdir/$ac_unique_file"; then
1545    srcdir=..
1546  fi
1547else
1548  ac_srcdir_defaulted=no
1549fi
1550if test ! -r "$srcdir/$ac_unique_file"; then
1551  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1552  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1553fi
1554ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1555ac_abs_confdir=`(
1556	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1557	pwd)`
1558# When building in place, set srcdir=.
1559if test "$ac_abs_confdir" = "$ac_pwd"; then
1560  srcdir=.
1561fi
1562# Remove unnecessary trailing slashes from srcdir.
1563# Double slashes in file names in object file debugging info
1564# mess up M-x gdb in Emacs.
1565case $srcdir in
1566*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1567esac
1568for ac_var in $ac_precious_vars; do
1569  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1570  eval ac_env_${ac_var}_value=\$${ac_var}
1571  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1572  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1573done
1574
1575#
1576# Report the --help message.
1577#
1578if test "$ac_init_help" = "long"; then
1579  # Omit some internal or obsolete options to make the list less imposing.
1580  # This message is too long to be a string in the A/UX 3.1 sh.
1581  cat <<_ACEOF
1582\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1583
1584Usage: $0 [OPTION]... [VAR=VALUE]...
1585
1586To assign environment variables (e.g., CC, CFLAGS...), specify them as
1587VAR=VALUE.  See below for descriptions of some of the useful variables.
1588
1589Defaults for the options are specified in brackets.
1590
1591Configuration:
1592  -h, --help              display this help and exit
1593      --help=short        display options specific to this package
1594      --help=recursive    display the short help of all the included packages
1595  -V, --version           display version information and exit
1596  -q, --quiet, --silent   do not print \`checking ...' messages
1597      --cache-file=FILE   cache test results in FILE [disabled]
1598  -C, --config-cache      alias for \`--cache-file=config.cache'
1599  -n, --no-create         do not create output files
1600      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1601
1602Installation directories:
1603  --prefix=PREFIX         install architecture-independent files in PREFIX
1604                          [$ac_default_prefix]
1605  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1606                          [PREFIX]
1607
1608By default, \`make install' will install all the files in
1609\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1610an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1611for instance \`--prefix=\$HOME'.
1612
1613For better control, use the options below.
1614
1615Fine tuning of the installation directories:
1616  --bindir=DIR            user executables [EPREFIX/bin]
1617  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1618  --libexecdir=DIR        program executables [EPREFIX/libexec]
1619  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1620  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1621  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1622  --libdir=DIR            object code libraries [EPREFIX/lib]
1623  --includedir=DIR        C header files [PREFIX/include]
1624  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1625  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1626  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1627  --infodir=DIR           info documentation [DATAROOTDIR/info]
1628  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1629  --mandir=DIR            man documentation [DATAROOTDIR/man]
1630  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1631  --htmldir=DIR           html documentation [DOCDIR]
1632  --dvidir=DIR            dvi documentation [DOCDIR]
1633  --pdfdir=DIR            pdf documentation [DOCDIR]
1634  --psdir=DIR             ps documentation [DOCDIR]
1635_ACEOF
1636
1637  cat <<\_ACEOF
1638
1639X features:
1640  --x-includes=DIR    X include files are in DIR
1641  --x-libraries=DIR   X library files are in DIR
1642
1643System types:
1644  --build=BUILD     configure for building on BUILD [guessed]
1645  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1646  --target=TARGET   configure for building compilers for TARGET [HOST]
1647_ACEOF
1648fi
1649
1650if test -n "$ac_init_help"; then
1651  case $ac_init_help in
1652     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1653   esac
1654  cat <<\_ACEOF
1655
1656Optional Features:
1657  --disable-option-checking  ignore unrecognized --enable/--with options
1658  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1659  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1660  --enable-debug          set the debug level to fastdebug (shorthand for
1661                          --with-debug-level=fastdebug) [disabled]
1662  --enable-openjdk-only   supress building closed source even if present
1663                          [disabled]
1664  --disable-headful       disable building headful support (graphical UI
1665                          support) [enabled]
1666  --enable-hotspot-test-in-build
1667                          run the Queens test after Hotspot build [disabled]
1668  --enable-unlimited-crypto
1669                          Enable unlimited crypto policy [disabled]
1670  --disable-debug-symbols disable generation of debug symbols [enabled]
1671  --disable-zip-debug-info
1672                          disable zipping of debug-info files [enabled]
1673  --disable-macosx-runtime-support
1674                          disable the use of MacOSX Java runtime support
1675                          framework [enabled]
1676  --enable-sjavac         use sjavac to do fast incremental compiles
1677                          [disabled]
1678  --disable-precompiled-headers
1679                          disable using precompiled headers when compiling C++
1680                          [enabled]
1681  --disable-ccache        disable using ccache to speed up recompilations
1682                          [enabled]
1683
1684Optional Packages:
1685  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1686  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1687  --with-custom-make-dir  use this directory for custom build/make files
1688  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1689                          support it), e.g. --with-target-bits=32 [guessed]
1690  --with-sys-root         pass this sys-root to the compilers and tools (for
1691                          cross-compiling)
1692  --with-tools-dir        search this directory for compilers and tools (for
1693                          cross-compiling)
1694  --with-devkit           use this directory as base for tools-dir and
1695                          sys-root (for cross-compiling)
1696  --with-jdk-variant      JDK variant to build (normal) [normal]
1697  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1698                          client, minimal1, kernel, zero, zeroshark) [server]
1699  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1700                          [release]
1701  --with-conf-name        use this as the name of the configuration [generated
1702                          from important configuration options]
1703  --with-builddeps-conf   use this configuration file for the builddeps
1704  --with-builddeps-server download and use build dependencies from this server
1705                          url
1706  --with-builddeps-dir    store downloaded build dependencies here
1707                          [/localhome/builddeps]
1708  --with-builddeps-group  chgrp the downloaded build dependencies to this
1709                          group
1710  --with-cacerts-file     specify alternative cacerts file
1711  --with-milestone        Set milestone value for build [internal]
1712  --with-build-number     Set build number value for build [b00]
1713  --with-user-release-suffix
1714                          Add a custom string to the version string if build
1715                          number isn't set.[username_builddateb00]
1716  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1717  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1718                          invocations of the Boot JDK, overriding the default
1719                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1720                          -enableassertions"
1721  --with-add-source-root  for each and every source directory, look in this
1722                          additional source root for the same directory; if it
1723                          exists and have files in it, include it in the build
1724  --with-override-source-root
1725                          for each and every source directory, look in this
1726                          override source root for the same directory; if it
1727                          exists, use that directory instead and ignore the
1728                          directory in the original source root
1729  --with-adds-and-overrides
1730                          use the subdirs 'adds' and 'overrides' in the
1731                          specified directory as add-source-root and
1732                          override-source-root
1733  --with-override-langtools
1734                          use this langtools dir for the build
1735  --with-override-corba   use this corba dir for the build
1736  --with-override-jaxp    use this jaxp dir for the build
1737  --with-override-jaxws   use this jaxws dir for the build
1738  --with-override-hotspot use this hotspot dir for the build
1739  --with-override-jdk     use this jdk dir for the build
1740  --with-import-hotspot   import hotspot binaries from this jdk image or
1741                          hotspot build dist dir instead of building from
1742                          source
1743  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1744                          only) [probed]
1745  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1746  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1747  --with-extra-ldflags    extra flags to be used when linking jdk
1748  --with-x                use the X Window System
1749  --with-cups             specify prefix directory for the cups package
1750                          (expecting the headers under PATH/include)
1751  --with-cups-include     specify directory for the cups include files
1752  --with-freetype         specify prefix directory for the freetype2 package
1753                          (expecting the libraries under PATH/lib and the
1754                          headers under PATH/include)
1755  --with-alsa             specify prefix directory for the alsa package
1756                          (expecting the libraries under PATH/lib and the
1757                          headers under PATH/include)
1758  --with-alsa-include     specify directory for the alsa include files
1759  --with-alsa-lib         specify directory for the alsa library
1760  --with-zlib             use zlib from build system or OpenJDK source
1761                          (system, bundled) [bundled]
1762  --with-stdc++lib=<static>,<dynamic>,<default>
1763                          force linking of the C++ runtime on Linux to either
1764                          static or dynamic, default is static with dynamic as
1765                          fallback
1766  --with-num-cores        number of cores in the build system, e.g.
1767                          --with-num-cores=8 [probed]
1768  --with-memory-size      memory (in MB) available in the build system, e.g.
1769                          --with-memory-size=1024 [probed]
1770  --with-sjavac-server-java
1771                          use this java binary for running the sjavac
1772                          background server [Boot JDK java]
1773  --with-sjavac-server-cores
1774                          use at most this number of concurrent threads on the
1775                          sjavac server [probed]
1776  --with-ccache-dir       where to store ccache files [~/.ccache]
1777
1778Some influential environment variables:
1779  PKG_CONFIG  path to pkg-config utility
1780  CC          C compiler command
1781  CFLAGS      C compiler flags
1782  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1783              nonstandard directory <lib dir>
1784  LIBS        libraries to pass to the linker, e.g. -l<library>
1785  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1786              you have headers in a nonstandard directory <include dir>
1787  CXX         C++ compiler command
1788  CXXFLAGS    C++ compiler flags
1789  OBJC        Objective C compiler command
1790  OBJCFLAGS   Objective C compiler flags
1791  CPP         C preprocessor
1792  CXXCPP      C++ preprocessor
1793  XMKMF       Path to xmkmf, Makefile generator for X Window System
1794  FREETYPE2_CFLAGS
1795              C compiler flags for FREETYPE2, overriding pkg-config
1796  FREETYPE2_LIBS
1797              linker flags for FREETYPE2, overriding pkg-config
1798  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1799  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1800
1801Use these variables to override the choices made by `configure' or to help
1802it to find libraries and programs with nonstandard names/locations.
1803
1804Report bugs to <build-dev@openjdk.java.net>.
1805OpenJDK home page: <http://openjdk.java.net>.
1806_ACEOF
1807ac_status=$?
1808fi
1809
1810if test "$ac_init_help" = "recursive"; then
1811  # If there are subdirs, report their specific --help.
1812  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1813    test -d "$ac_dir" ||
1814      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1815      continue
1816    ac_builddir=.
1817
1818case "$ac_dir" in
1819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1820*)
1821  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1822  # A ".." for each directory in $ac_dir_suffix.
1823  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1824  case $ac_top_builddir_sub in
1825  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1826  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1827  esac ;;
1828esac
1829ac_abs_top_builddir=$ac_pwd
1830ac_abs_builddir=$ac_pwd$ac_dir_suffix
1831# for backward compatibility:
1832ac_top_builddir=$ac_top_build_prefix
1833
1834case $srcdir in
1835  .)  # We are building in place.
1836    ac_srcdir=.
1837    ac_top_srcdir=$ac_top_builddir_sub
1838    ac_abs_top_srcdir=$ac_pwd ;;
1839  [\\/]* | ?:[\\/]* )  # Absolute name.
1840    ac_srcdir=$srcdir$ac_dir_suffix;
1841    ac_top_srcdir=$srcdir
1842    ac_abs_top_srcdir=$srcdir ;;
1843  *) # Relative name.
1844    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1845    ac_top_srcdir=$ac_top_build_prefix$srcdir
1846    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1847esac
1848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1849
1850    cd "$ac_dir" || { ac_status=$?; continue; }
1851    # Check for guested configure.
1852    if test -f "$ac_srcdir/configure.gnu"; then
1853      echo &&
1854      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1855    elif test -f "$ac_srcdir/configure"; then
1856      echo &&
1857      $SHELL "$ac_srcdir/configure" --help=recursive
1858    else
1859      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1860    fi || ac_status=$?
1861    cd "$ac_pwd" || { ac_status=$?; break; }
1862  done
1863fi
1864
1865test -n "$ac_init_help" && exit $ac_status
1866if $ac_init_version; then
1867  cat <<\_ACEOF
1868OpenJDK configure jdk8
1869generated by GNU Autoconf 2.68
1870
1871Copyright (C) 2010 Free Software Foundation, Inc.
1872This configure script is free software; the Free Software Foundation
1873gives unlimited permission to copy, distribute and modify it.
1874_ACEOF
1875  exit
1876fi
1877
1878## ------------------------ ##
1879## Autoconf initialization. ##
1880## ------------------------ ##
1881
1882# ac_fn_c_try_compile LINENO
1883# --------------------------
1884# Try to compile conftest.$ac_ext, and return whether this succeeded.
1885ac_fn_c_try_compile ()
1886{
1887  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888  rm -f conftest.$ac_objext
1889  if { { ac_try="$ac_compile"
1890case "(($ac_try" in
1891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892  *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896  (eval "$ac_compile") 2>conftest.err
1897  ac_status=$?
1898  if test -s conftest.err; then
1899    grep -v '^ *+' conftest.err >conftest.er1
1900    cat conftest.er1 >&5
1901    mv -f conftest.er1 conftest.err
1902  fi
1903  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1904  test $ac_status = 0; } && {
1905	 test -z "$ac_c_werror_flag" ||
1906	 test ! -s conftest.err
1907       } && test -s conftest.$ac_objext; then :
1908  ac_retval=0
1909else
1910  $as_echo "$as_me: failed program was:" >&5
1911sed 's/^/| /' conftest.$ac_ext >&5
1912
1913	ac_retval=1
1914fi
1915  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1916  as_fn_set_status $ac_retval
1917
1918} # ac_fn_c_try_compile
1919
1920# ac_fn_cxx_try_compile LINENO
1921# ----------------------------
1922# Try to compile conftest.$ac_ext, and return whether this succeeded.
1923ac_fn_cxx_try_compile ()
1924{
1925  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926  rm -f conftest.$ac_objext
1927  if { { ac_try="$ac_compile"
1928case "(($ac_try" in
1929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1930  *) ac_try_echo=$ac_try;;
1931esac
1932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1933$as_echo "$ac_try_echo"; } >&5
1934  (eval "$ac_compile") 2>conftest.err
1935  ac_status=$?
1936  if test -s conftest.err; then
1937    grep -v '^ *+' conftest.err >conftest.er1
1938    cat conftest.er1 >&5
1939    mv -f conftest.er1 conftest.err
1940  fi
1941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1942  test $ac_status = 0; } && {
1943	 test -z "$ac_cxx_werror_flag" ||
1944	 test ! -s conftest.err
1945       } && test -s conftest.$ac_objext; then :
1946  ac_retval=0
1947else
1948  $as_echo "$as_me: failed program was:" >&5
1949sed 's/^/| /' conftest.$ac_ext >&5
1950
1951	ac_retval=1
1952fi
1953  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954  as_fn_set_status $ac_retval
1955
1956} # ac_fn_cxx_try_compile
1957
1958# ac_fn_objc_try_compile LINENO
1959# -----------------------------
1960# Try to compile conftest.$ac_ext, and return whether this succeeded.
1961ac_fn_objc_try_compile ()
1962{
1963  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964  rm -f conftest.$ac_objext
1965  if { { ac_try="$ac_compile"
1966case "(($ac_try" in
1967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968  *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972  (eval "$ac_compile") 2>conftest.err
1973  ac_status=$?
1974  if test -s conftest.err; then
1975    grep -v '^ *+' conftest.err >conftest.er1
1976    cat conftest.er1 >&5
1977    mv -f conftest.er1 conftest.err
1978  fi
1979  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980  test $ac_status = 0; } && {
1981	 test -z "$ac_objc_werror_flag" ||
1982	 test ! -s conftest.err
1983       } && test -s conftest.$ac_objext; then :
1984  ac_retval=0
1985else
1986  $as_echo "$as_me: failed program was:" >&5
1987sed 's/^/| /' conftest.$ac_ext >&5
1988
1989	ac_retval=1
1990fi
1991  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1992  as_fn_set_status $ac_retval
1993
1994} # ac_fn_objc_try_compile
1995
1996# ac_fn_c_try_cpp LINENO
1997# ----------------------
1998# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1999ac_fn_c_try_cpp ()
2000{
2001  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002  if { { ac_try="$ac_cpp conftest.$ac_ext"
2003case "(($ac_try" in
2004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2005  *) ac_try_echo=$ac_try;;
2006esac
2007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2008$as_echo "$ac_try_echo"; } >&5
2009  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2010  ac_status=$?
2011  if test -s conftest.err; then
2012    grep -v '^ *+' conftest.err >conftest.er1
2013    cat conftest.er1 >&5
2014    mv -f conftest.er1 conftest.err
2015  fi
2016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017  test $ac_status = 0; } > conftest.i && {
2018	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2019	 test ! -s conftest.err
2020       }; then :
2021  ac_retval=0
2022else
2023  $as_echo "$as_me: failed program was:" >&5
2024sed 's/^/| /' conftest.$ac_ext >&5
2025
2026    ac_retval=1
2027fi
2028  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029  as_fn_set_status $ac_retval
2030
2031} # ac_fn_c_try_cpp
2032
2033# ac_fn_cxx_try_cpp LINENO
2034# ------------------------
2035# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2036ac_fn_cxx_try_cpp ()
2037{
2038  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039  if { { ac_try="$ac_cpp conftest.$ac_ext"
2040case "(($ac_try" in
2041  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2042  *) ac_try_echo=$ac_try;;
2043esac
2044eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2045$as_echo "$ac_try_echo"; } >&5
2046  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2047  ac_status=$?
2048  if test -s conftest.err; then
2049    grep -v '^ *+' conftest.err >conftest.er1
2050    cat conftest.er1 >&5
2051    mv -f conftest.er1 conftest.err
2052  fi
2053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2054  test $ac_status = 0; } > conftest.i && {
2055	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2056	 test ! -s conftest.err
2057       }; then :
2058  ac_retval=0
2059else
2060  $as_echo "$as_me: failed program was:" >&5
2061sed 's/^/| /' conftest.$ac_ext >&5
2062
2063    ac_retval=1
2064fi
2065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2066  as_fn_set_status $ac_retval
2067
2068} # ac_fn_cxx_try_cpp
2069
2070# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2071# ---------------------------------------------------------
2072# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2073# the include files in INCLUDES and setting the cache variable VAR
2074# accordingly.
2075ac_fn_cxx_check_header_mongrel ()
2076{
2077  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078  if eval \${$3+:} false; then :
2079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2080$as_echo_n "checking for $2... " >&6; }
2081if eval \${$3+:} false; then :
2082  $as_echo_n "(cached) " >&6
2083fi
2084eval ac_res=\$$3
2085	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
2087else
2088  # Is the header compilable?
2089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2090$as_echo_n "checking $2 usability... " >&6; }
2091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h.  */
2093$4
2094#include <$2>
2095_ACEOF
2096if ac_fn_cxx_try_compile "$LINENO"; then :
2097  ac_header_compiler=yes
2098else
2099  ac_header_compiler=no
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2103$as_echo "$ac_header_compiler" >&6; }
2104
2105# Is the header present?
2106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2107$as_echo_n "checking $2 presence... " >&6; }
2108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h.  */
2110#include <$2>
2111_ACEOF
2112if ac_fn_cxx_try_cpp "$LINENO"; then :
2113  ac_header_preproc=yes
2114else
2115  ac_header_preproc=no
2116fi
2117rm -f conftest.err conftest.i conftest.$ac_ext
2118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2119$as_echo "$ac_header_preproc" >&6; }
2120
2121# So?  What about this header?
2122case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2123  yes:no: )
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2125$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2127$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2128    ;;
2129  no:yes:* )
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2131$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2133$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2135$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2136    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2137$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2138    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2139$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2140( $as_echo "## ----------------------------------------- ##
2141## Report this to build-dev@openjdk.java.net ##
2142## ----------------------------------------- ##"
2143     ) | sed "s/^/$as_me: WARNING:     /" >&2
2144    ;;
2145esac
2146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2147$as_echo_n "checking for $2... " >&6; }
2148if eval \${$3+:} false; then :
2149  $as_echo_n "(cached) " >&6
2150else
2151  eval "$3=\$ac_header_compiler"
2152fi
2153eval ac_res=\$$3
2154	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2155$as_echo "$ac_res" >&6; }
2156fi
2157  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2158
2159} # ac_fn_cxx_check_header_mongrel
2160
2161# ac_fn_cxx_try_run LINENO
2162# ------------------------
2163# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2164# that executables *can* be run.
2165ac_fn_cxx_try_run ()
2166{
2167  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2168  if { { ac_try="$ac_link"
2169case "(($ac_try" in
2170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2171  *) ac_try_echo=$ac_try;;
2172esac
2173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2174$as_echo "$ac_try_echo"; } >&5
2175  (eval "$ac_link") 2>&5
2176  ac_status=$?
2177  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2178  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2179  { { case "(($ac_try" in
2180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2181  *) ac_try_echo=$ac_try;;
2182esac
2183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2184$as_echo "$ac_try_echo"; } >&5
2185  (eval "$ac_try") 2>&5
2186  ac_status=$?
2187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2188  test $ac_status = 0; }; }; then :
2189  ac_retval=0
2190else
2191  $as_echo "$as_me: program exited with status $ac_status" >&5
2192       $as_echo "$as_me: failed program was:" >&5
2193sed 's/^/| /' conftest.$ac_ext >&5
2194
2195       ac_retval=$ac_status
2196fi
2197  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2198  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199  as_fn_set_status $ac_retval
2200
2201} # ac_fn_cxx_try_run
2202
2203# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2204# ---------------------------------------------------------
2205# Tests whether HEADER exists and can be compiled using the include files in
2206# INCLUDES, setting the cache variable VAR accordingly.
2207ac_fn_cxx_check_header_compile ()
2208{
2209  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2211$as_echo_n "checking for $2... " >&6; }
2212if eval \${$3+:} false; then :
2213  $as_echo_n "(cached) " >&6
2214else
2215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h.  */
2217$4
2218#include <$2>
2219_ACEOF
2220if ac_fn_cxx_try_compile "$LINENO"; then :
2221  eval "$3=yes"
2222else
2223  eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
2230  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2231
2232} # ac_fn_cxx_check_header_compile
2233
2234# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2235# ----------------------------------------------
2236# Tries to find the compile-time value of EXPR in a program that includes
2237# INCLUDES, setting VAR accordingly. Returns whether the value could be
2238# computed
2239ac_fn_cxx_compute_int ()
2240{
2241  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242  if test "$cross_compiling" = yes; then
2243    # Depending upon the size, compute the lo and hi bounds.
2244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h.  */
2246$4
2247int
2248main ()
2249{
2250static int test_array [1 - 2 * !(($2) >= 0)];
2251test_array [0] = 0
2252
2253  ;
2254  return 0;
2255}
2256_ACEOF
2257if ac_fn_cxx_try_compile "$LINENO"; then :
2258  ac_lo=0 ac_mid=0
2259  while :; do
2260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h.  */
2262$4
2263int
2264main ()
2265{
2266static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2267test_array [0] = 0
2268
2269  ;
2270  return 0;
2271}
2272_ACEOF
2273if ac_fn_cxx_try_compile "$LINENO"; then :
2274  ac_hi=$ac_mid; break
2275else
2276  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2277			if test $ac_lo -le $ac_mid; then
2278			  ac_lo= ac_hi=
2279			  break
2280			fi
2281			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284  done
2285else
2286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h.  */
2288$4
2289int
2290main ()
2291{
2292static int test_array [1 - 2 * !(($2) < 0)];
2293test_array [0] = 0
2294
2295  ;
2296  return 0;
2297}
2298_ACEOF
2299if ac_fn_cxx_try_compile "$LINENO"; then :
2300  ac_hi=-1 ac_mid=-1
2301  while :; do
2302    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2309test_array [0] = 0
2310
2311  ;
2312  return 0;
2313}
2314_ACEOF
2315if ac_fn_cxx_try_compile "$LINENO"; then :
2316  ac_lo=$ac_mid; break
2317else
2318  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2319			if test $ac_mid -le $ac_hi; then
2320			  ac_lo= ac_hi=
2321			  break
2322			fi
2323			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326  done
2327else
2328  ac_lo= ac_hi=
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333# Binary search between lo and hi bounds.
2334while test "x$ac_lo" != "x$ac_hi"; do
2335  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339int
2340main ()
2341{
2342static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2343test_array [0] = 0
2344
2345  ;
2346  return 0;
2347}
2348_ACEOF
2349if ac_fn_cxx_try_compile "$LINENO"; then :
2350  ac_hi=$ac_mid
2351else
2352  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355done
2356case $ac_lo in #((
2357?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2358'') ac_retval=1 ;;
2359esac
2360  else
2361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h.  */
2363$4
2364static long int longval () { return $2; }
2365static unsigned long int ulongval () { return $2; }
2366#include <stdio.h>
2367#include <stdlib.h>
2368int
2369main ()
2370{
2371
2372  FILE *f = fopen ("conftest.val", "w");
2373  if (! f)
2374    return 1;
2375  if (($2) < 0)
2376    {
2377      long int i = longval ();
2378      if (i != ($2))
2379	return 1;
2380      fprintf (f, "%ld", i);
2381    }
2382  else
2383    {
2384      unsigned long int i = ulongval ();
2385      if (i != ($2))
2386	return 1;
2387      fprintf (f, "%lu", i);
2388    }
2389  /* Do not output a trailing newline, as this causes \r\n confusion
2390     on some platforms.  */
2391  return ferror (f) || fclose (f) != 0;
2392
2393  ;
2394  return 0;
2395}
2396_ACEOF
2397if ac_fn_cxx_try_run "$LINENO"; then :
2398  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2399else
2400  ac_retval=1
2401fi
2402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2403  conftest.$ac_objext conftest.beam conftest.$ac_ext
2404rm -f conftest.val
2405
2406  fi
2407  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408  as_fn_set_status $ac_retval
2409
2410} # ac_fn_cxx_compute_int
2411
2412# ac_fn_cxx_try_link LINENO
2413# -------------------------
2414# Try to link conftest.$ac_ext, and return whether this succeeded.
2415ac_fn_cxx_try_link ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  rm -f conftest.$ac_objext conftest$ac_exeext
2419  if { { ac_try="$ac_link"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_link") 2>conftest.err
2427  ac_status=$?
2428  if test -s conftest.err; then
2429    grep -v '^ *+' conftest.err >conftest.er1
2430    cat conftest.er1 >&5
2431    mv -f conftest.er1 conftest.err
2432  fi
2433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434  test $ac_status = 0; } && {
2435	 test -z "$ac_cxx_werror_flag" ||
2436	 test ! -s conftest.err
2437       } && test -s conftest$ac_exeext && {
2438	 test "$cross_compiling" = yes ||
2439	 $as_test_x conftest$ac_exeext
2440       }; then :
2441  ac_retval=0
2442else
2443  $as_echo "$as_me: failed program was:" >&5
2444sed 's/^/| /' conftest.$ac_ext >&5
2445
2446	ac_retval=1
2447fi
2448  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2449  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2450  # interfere with the next link command; also delete a directory that is
2451  # left behind by Apple's compiler.  We do this before executing the actions.
2452  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2453  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454  as_fn_set_status $ac_retval
2455
2456} # ac_fn_cxx_try_link
2457
2458# ac_fn_cxx_check_func LINENO FUNC VAR
2459# ------------------------------------
2460# Tests whether FUNC exists, setting the cache variable VAR accordingly
2461ac_fn_cxx_check_func ()
2462{
2463  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465$as_echo_n "checking for $2... " >&6; }
2466if eval \${$3+:} false; then :
2467  $as_echo_n "(cached) " >&6
2468else
2469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470/* end confdefs.h.  */
2471/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2472   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2473#define $2 innocuous_$2
2474
2475/* System header to define __stub macros and hopefully few prototypes,
2476    which can conflict with char $2 (); below.
2477    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2478    <limits.h> exists even on freestanding compilers.  */
2479
2480#ifdef __STDC__
2481# include <limits.h>
2482#else
2483# include <assert.h>
2484#endif
2485
2486#undef $2
2487
2488/* Override any GCC internal prototype to avoid an error.
2489   Use char because int might match the return type of a GCC
2490   builtin and then its argument prototype would still apply.  */
2491#ifdef __cplusplus
2492extern "C"
2493#endif
2494char $2 ();
2495/* The GNU C library defines this for functions which it implements
2496    to always fail with ENOSYS.  Some functions are actually named
2497    something starting with __ and the normal name is an alias.  */
2498#if defined __stub_$2 || defined __stub___$2
2499choke me
2500#endif
2501
2502int
2503main ()
2504{
2505return $2 ();
2506  ;
2507  return 0;
2508}
2509_ACEOF
2510if ac_fn_cxx_try_link "$LINENO"; then :
2511  eval "$3=yes"
2512else
2513  eval "$3=no"
2514fi
2515rm -f core conftest.err conftest.$ac_objext \
2516    conftest$ac_exeext conftest.$ac_ext
2517fi
2518eval ac_res=\$$3
2519	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2520$as_echo "$ac_res" >&6; }
2521  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2522
2523} # ac_fn_cxx_check_func
2524
2525# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2526# -------------------------------------------------------
2527# Tests whether HEADER exists and can be compiled using the include files in
2528# INCLUDES, setting the cache variable VAR accordingly.
2529ac_fn_c_check_header_compile ()
2530{
2531  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2533$as_echo_n "checking for $2... " >&6; }
2534if eval \${$3+:} false; then :
2535  $as_echo_n "(cached) " >&6
2536else
2537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2538/* end confdefs.h.  */
2539$4
2540#include <$2>
2541_ACEOF
2542if ac_fn_c_try_compile "$LINENO"; then :
2543  eval "$3=yes"
2544else
2545  eval "$3=no"
2546fi
2547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2548fi
2549eval ac_res=\$$3
2550	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2551$as_echo "$ac_res" >&6; }
2552  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553
2554} # ac_fn_c_check_header_compile
2555cat >config.log <<_ACEOF
2556This file contains any messages produced by compilers while
2557running configure, to aid debugging if configure makes a mistake.
2558
2559It was created by OpenJDK $as_me jdk8, which was
2560generated by GNU Autoconf 2.68.  Invocation command line was
2561
2562  $ $0 $@
2563
2564_ACEOF
2565exec 5>>config.log
2566{
2567cat <<_ASUNAME
2568## --------- ##
2569## Platform. ##
2570## --------- ##
2571
2572hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2573uname -m = `(uname -m) 2>/dev/null || echo unknown`
2574uname -r = `(uname -r) 2>/dev/null || echo unknown`
2575uname -s = `(uname -s) 2>/dev/null || echo unknown`
2576uname -v = `(uname -v) 2>/dev/null || echo unknown`
2577
2578/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2579/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2580
2581/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2582/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2583/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2584/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2585/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2586/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2587/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2588
2589_ASUNAME
2590
2591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2592for as_dir in $PATH
2593do
2594  IFS=$as_save_IFS
2595  test -z "$as_dir" && as_dir=.
2596    $as_echo "PATH: $as_dir"
2597  done
2598IFS=$as_save_IFS
2599
2600} >&5
2601
2602cat >&5 <<_ACEOF
2603
2604
2605## ----------- ##
2606## Core tests. ##
2607## ----------- ##
2608
2609_ACEOF
2610
2611
2612# Keep a trace of the command line.
2613# Strip out --no-create and --no-recursion so they do not pile up.
2614# Strip out --silent because we don't want to record it for future runs.
2615# Also quote any args containing shell meta-characters.
2616# Make two passes to allow for proper duplicate-argument suppression.
2617ac_configure_args=
2618ac_configure_args0=
2619ac_configure_args1=
2620ac_must_keep_next=false
2621for ac_pass in 1 2
2622do
2623  for ac_arg
2624  do
2625    case $ac_arg in
2626    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2627    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2628    | -silent | --silent | --silen | --sile | --sil)
2629      continue ;;
2630    *\'*)
2631      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2632    esac
2633    case $ac_pass in
2634    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2635    2)
2636      as_fn_append ac_configure_args1 " '$ac_arg'"
2637      if test $ac_must_keep_next = true; then
2638	ac_must_keep_next=false # Got value, back to normal.
2639      else
2640	case $ac_arg in
2641	  *=* | --config-cache | -C | -disable-* | --disable-* \
2642	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2643	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2644	  | -with-* | --with-* | -without-* | --without-* | --x)
2645	    case "$ac_configure_args0 " in
2646	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2647	    esac
2648	    ;;
2649	  -* ) ac_must_keep_next=true ;;
2650	esac
2651      fi
2652      as_fn_append ac_configure_args " '$ac_arg'"
2653      ;;
2654    esac
2655  done
2656done
2657{ ac_configure_args0=; unset ac_configure_args0;}
2658{ ac_configure_args1=; unset ac_configure_args1;}
2659
2660# When interrupted or exit'd, cleanup temporary files, and complete
2661# config.log.  We remove comments because anyway the quotes in there
2662# would cause problems or look ugly.
2663# WARNING: Use '\'' to represent an apostrophe within the trap.
2664# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2665trap 'exit_status=$?
2666  # Save into config.log some information that might help in debugging.
2667  {
2668    echo
2669
2670    $as_echo "## ---------------- ##
2671## Cache variables. ##
2672## ---------------- ##"
2673    echo
2674    # The following way of writing the cache mishandles newlines in values,
2675(
2676  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2677    eval ac_val=\$$ac_var
2678    case $ac_val in #(
2679    *${as_nl}*)
2680      case $ac_var in #(
2681      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2682$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2683      esac
2684      case $ac_var in #(
2685      _ | IFS | as_nl) ;; #(
2686      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2687      *) { eval $ac_var=; unset $ac_var;} ;;
2688      esac ;;
2689    esac
2690  done
2691  (set) 2>&1 |
2692    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2693    *${as_nl}ac_space=\ *)
2694      sed -n \
2695	"s/'\''/'\''\\\\'\'''\''/g;
2696	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2697      ;; #(
2698    *)
2699      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2700      ;;
2701    esac |
2702    sort
2703)
2704    echo
2705
2706    $as_echo "## ----------------- ##
2707## Output variables. ##
2708## ----------------- ##"
2709    echo
2710    for ac_var in $ac_subst_vars
2711    do
2712      eval ac_val=\$$ac_var
2713      case $ac_val in
2714      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2715      esac
2716      $as_echo "$ac_var='\''$ac_val'\''"
2717    done | sort
2718    echo
2719
2720    if test -n "$ac_subst_files"; then
2721      $as_echo "## ------------------- ##
2722## File substitutions. ##
2723## ------------------- ##"
2724      echo
2725      for ac_var in $ac_subst_files
2726      do
2727	eval ac_val=\$$ac_var
2728	case $ac_val in
2729	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2730	esac
2731	$as_echo "$ac_var='\''$ac_val'\''"
2732      done | sort
2733      echo
2734    fi
2735
2736    if test -s confdefs.h; then
2737      $as_echo "## ----------- ##
2738## confdefs.h. ##
2739## ----------- ##"
2740      echo
2741      cat confdefs.h
2742      echo
2743    fi
2744    test "$ac_signal" != 0 &&
2745      $as_echo "$as_me: caught signal $ac_signal"
2746    $as_echo "$as_me: exit $exit_status"
2747  } >&5
2748  rm -f core *.core core.conftest.* &&
2749    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2750    exit $exit_status
2751' 0
2752for ac_signal in 1 2 13 15; do
2753  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2754done
2755ac_signal=0
2756
2757# confdefs.h avoids OS command line length limits that DEFS can exceed.
2758rm -f -r conftest* confdefs.h
2759
2760$as_echo "/* confdefs.h */" > confdefs.h
2761
2762# Predefined preprocessor variables.
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_NAME "$PACKAGE_NAME"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_VERSION "$PACKAGE_VERSION"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_STRING "$PACKAGE_STRING"
2778_ACEOF
2779
2780cat >>confdefs.h <<_ACEOF
2781#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2782_ACEOF
2783
2784cat >>confdefs.h <<_ACEOF
2785#define PACKAGE_URL "$PACKAGE_URL"
2786_ACEOF
2787
2788
2789# Let the site file select an alternate cache file if it wants to.
2790# Prefer an explicitly selected file to automatically selected ones.
2791ac_site_file1=NONE
2792ac_site_file2=NONE
2793if test -n "$CONFIG_SITE"; then
2794  # We do not want a PATH search for config.site.
2795  case $CONFIG_SITE in #((
2796    -*)  ac_site_file1=./$CONFIG_SITE;;
2797    */*) ac_site_file1=$CONFIG_SITE;;
2798    *)   ac_site_file1=./$CONFIG_SITE;;
2799  esac
2800elif test "x$prefix" != xNONE; then
2801  ac_site_file1=$prefix/share/config.site
2802  ac_site_file2=$prefix/etc/config.site
2803else
2804  ac_site_file1=$ac_default_prefix/share/config.site
2805  ac_site_file2=$ac_default_prefix/etc/config.site
2806fi
2807for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2808do
2809  test "x$ac_site_file" = xNONE && continue
2810  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2811    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2812$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2813    sed 's/^/| /' "$ac_site_file" >&5
2814    . "$ac_site_file" \
2815      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2817as_fn_error $? "failed to load site script $ac_site_file
2818See \`config.log' for more details" "$LINENO" 5; }
2819  fi
2820done
2821
2822if test -r "$cache_file"; then
2823  # Some versions of bash will fail to source /dev/null (special files
2824  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2825  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2826    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2827$as_echo "$as_me: loading cache $cache_file" >&6;}
2828    case $cache_file in
2829      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2830      *)                      . "./$cache_file";;
2831    esac
2832  fi
2833else
2834  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2835$as_echo "$as_me: creating cache $cache_file" >&6;}
2836  >$cache_file
2837fi
2838
2839# Check that the precious variables saved in the cache have kept the same
2840# value.
2841ac_cache_corrupted=false
2842for ac_var in $ac_precious_vars; do
2843  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2844  eval ac_new_set=\$ac_env_${ac_var}_set
2845  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2846  eval ac_new_val=\$ac_env_${ac_var}_value
2847  case $ac_old_set,$ac_new_set in
2848    set,)
2849      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2850$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2851      ac_cache_corrupted=: ;;
2852    ,set)
2853      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2854$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2855      ac_cache_corrupted=: ;;
2856    ,);;
2857    *)
2858      if test "x$ac_old_val" != "x$ac_new_val"; then
2859	# differences in whitespace do not lead to failure.
2860	ac_old_val_w=`echo x $ac_old_val`
2861	ac_new_val_w=`echo x $ac_new_val`
2862	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2863	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2864$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2865	  ac_cache_corrupted=:
2866	else
2867	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2868$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2869	  eval $ac_var=\$ac_old_val
2870	fi
2871	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2872$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2873	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2874$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2875      fi;;
2876  esac
2877  # Pass precious variables to config.status.
2878  if test "$ac_new_set" = set; then
2879    case $ac_new_val in
2880    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2881    *) ac_arg=$ac_var=$ac_new_val ;;
2882    esac
2883    case " $ac_configure_args " in
2884      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2885      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2886    esac
2887  fi
2888done
2889if $ac_cache_corrupted; then
2890  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2892  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2893$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2894  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2895fi
2896## -------------------- ##
2897## Main body of script. ##
2898## -------------------- ##
2899
2900ac_ext=c
2901ac_cpp='$CPP $CPPFLAGS'
2902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2904ac_compiler_gnu=$ac_cv_c_compiler_gnu
2905
2906
2907
2908ac_aux_dir=
2909for ac_dir in build-aux "$srcdir"/build-aux; do
2910  if test -f "$ac_dir/install-sh"; then
2911    ac_aux_dir=$ac_dir
2912    ac_install_sh="$ac_aux_dir/install-sh -c"
2913    break
2914  elif test -f "$ac_dir/install.sh"; then
2915    ac_aux_dir=$ac_dir
2916    ac_install_sh="$ac_aux_dir/install.sh -c"
2917    break
2918  elif test -f "$ac_dir/shtool"; then
2919    ac_aux_dir=$ac_dir
2920    ac_install_sh="$ac_aux_dir/shtool install -c"
2921    break
2922  fi
2923done
2924if test -z "$ac_aux_dir"; then
2925  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2926fi
2927
2928# These three variables are undocumented and unsupported,
2929# and are intended to be withdrawn in a future Autoconf release.
2930# They can cause serious problems if a builder's source tree is in a directory
2931# whose full name contains unusual characters.
2932ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2933ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2934ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2935
2936
2937# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2938#
2939# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2940#
2941# This program is free software; you can redistribute it and/or modify
2942# it under the terms of the GNU General Public License as published by
2943# the Free Software Foundation; either version 2 of the License, or
2944# (at your option) any later version.
2945#
2946# This program is distributed in the hope that it will be useful, but
2947# WITHOUT ANY WARRANTY; without even the implied warranty of
2948# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2949# General Public License for more details.
2950#
2951# You should have received a copy of the GNU General Public License
2952# along with this program; if not, write to the Free Software
2953# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2954#
2955# As a special exception to the GNU General Public License, if you
2956# distribute this file as part of a program that contains a
2957# configuration script generated by Autoconf, you may include it under
2958# the same distribution terms that you use for the rest of that program.
2959
2960# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2961# ----------------------------------
2962# PKG_PROG_PKG_CONFIG
2963
2964# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2965#
2966# Check to see whether a particular set of modules exists.  Similar
2967# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2968#
2969#
2970# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2971# this or PKG_CHECK_MODULES is called, or make sure to call
2972# PKG_CHECK_EXISTS manually
2973# --------------------------------------------------------------
2974
2975
2976
2977# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2978# ---------------------------------------------
2979# _PKG_CONFIG
2980
2981# _PKG_SHORT_ERRORS_SUPPORTED
2982# -----------------------------
2983# _PKG_SHORT_ERRORS_SUPPORTED
2984
2985
2986# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2987# [ACTION-IF-NOT-FOUND])
2988#
2989#
2990# Note that if there is a possibility the first call to
2991# PKG_CHECK_MODULES might not happen, you should be sure to include an
2992# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2993#
2994#
2995# --------------------------------------------------------------
2996# PKG_CHECK_MODULES
2997
2998
2999# Include these first...
3000#
3001# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3003#
3004# This code is free software; you can redistribute it and/or modify it
3005# under the terms of the GNU General Public License version 2 only, as
3006# published by the Free Software Foundation.  Oracle designates this
3007# particular file as subject to the "Classpath" exception as provided
3008# by Oracle in the LICENSE file that accompanied this code.
3009#
3010# This code is distributed in the hope that it will be useful, but WITHOUT
3011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3013# version 2 for more details (a copy is included in the LICENSE file that
3014# accompanied this code).
3015#
3016# You should have received a copy of the GNU General Public License version
3017# 2 along with this work; if not, write to the Free Software Foundation,
3018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3019#
3020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3021# or visit www.oracle.com if you need additional information or have any
3022# questions.
3023#
3024
3025
3026
3027# This will make sure the given variable points to a full and proper
3028# path. This means:
3029# 1) There will be no spaces in the path. On posix platforms,
3030#    spaces in the path will result in an error. On Windows,
3031#    the path will be rewritten using short-style to be space-free.
3032# 2) The path will be absolute, and it will be in unix-style (on
3033#     cygwin).
3034# $1: The name of the variable to fix
3035
3036
3037# This will make sure the given variable points to a executable
3038# with a full and proper path. This means:
3039# 1) There will be no spaces in the path. On posix platforms,
3040#    spaces in the path will result in an error. On Windows,
3041#    the path will be rewritten using short-style to be space-free.
3042# 2) The path will be absolute, and it will be in unix-style (on
3043#     cygwin).
3044# Any arguments given to the executable is preserved.
3045# If the input variable does not have a directory specification, then
3046# it need to be in the PATH.
3047# $1: The name of the variable to fix
3048
3049
3050
3051
3052
3053
3054# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3055# $1: variable to check
3056# $2: executable name to print in warning (optional)
3057
3058
3059# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3060# Arguments as AC_PATH_PROG:
3061# $1: variable to set
3062# $2: executable name to look for
3063
3064
3065# Setup the most fundamental tools that relies on not much else to set up,
3066# but is used by much of the early bootstrap code.
3067
3068
3069# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3070
3071
3072
3073
3074
3075
3076
3077#%%% Simple tools %%%
3078
3079# Check if we have found a usable version of make
3080# $1: the path to a potential make binary (or empty)
3081# $2: the description on how we found this
3082
3083
3084# Goes looking for a usable version of GNU make.
3085
3086
3087
3088
3089
3090
3091# Check if build directory is on local disk. If not possible to determine,
3092# we prefer to claim it's local.
3093# Argument 1: directory to test
3094# Argument 2: what to do if it is on local disk
3095# Argument 3: what to do otherwise (remote disk or failure)
3096
3097
3098# Check that source files have basic read permissions set. This might
3099# not be the case in cygwin in certain conditions.
3100
3101
3102
3103
3104#
3105# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3106# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3107#
3108# This code is free software; you can redistribute it and/or modify it
3109# under the terms of the GNU General Public License version 2 only, as
3110# published by the Free Software Foundation.  Oracle designates this
3111# particular file as subject to the "Classpath" exception as provided
3112# by Oracle in the LICENSE file that accompanied this code.
3113#
3114# This code is distributed in the hope that it will be useful, but WITHOUT
3115# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3116# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3117# version 2 for more details (a copy is included in the LICENSE file that
3118# accompanied this code).
3119#
3120# You should have received a copy of the GNU General Public License version
3121# 2 along with this work; if not, write to the Free Software Foundation,
3122# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3123#
3124# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3125# or visit www.oracle.com if you need additional information or have any
3126# questions.
3127#
3128
3129
3130
3131
3132
3133# Helper function which possibly converts a path using DOS-style short mode.
3134# If so, the updated path is stored in $new_path.
3135# $1: The path to check
3136
3137
3138# Helper function which possibly converts a path using DOS-style short mode.
3139# If so, the updated path is stored in $new_path.
3140# $1: The path to check
3141
3142
3143# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3144# and could probably be heavily simplified. However, all changes in this
3145# area tend to need lot of testing in different scenarios, and in lack of
3146# proper unit testing, cleaning this up has not been deemed worth the effort
3147# at the moment.
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3158
3159
3160
3161
3162#
3163# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3164# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3165#
3166# This code is free software; you can redistribute it and/or modify it
3167# under the terms of the GNU General Public License version 2 only, as
3168# published by the Free Software Foundation.  Oracle designates this
3169# particular file as subject to the "Classpath" exception as provided
3170# by Oracle in the LICENSE file that accompanied this code.
3171#
3172# This code is distributed in the hope that it will be useful, but WITHOUT
3173# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3174# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3175# version 2 for more details (a copy is included in the LICENSE file that
3176# accompanied this code).
3177#
3178# You should have received a copy of the GNU General Public License version
3179# 2 along with this work; if not, write to the Free Software Foundation,
3180# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3181#
3182# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3183# or visit www.oracle.com if you need additional information or have any
3184# questions.
3185#
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197# ... then the rest
3198#
3199# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3200# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3201#
3202# This code is free software; you can redistribute it and/or modify it
3203# under the terms of the GNU General Public License version 2 only, as
3204# published by the Free Software Foundation.  Oracle designates this
3205# particular file as subject to the "Classpath" exception as provided
3206# by Oracle in the LICENSE file that accompanied this code.
3207#
3208# This code is distributed in the hope that it will be useful, but WITHOUT
3209# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3210# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3211# version 2 for more details (a copy is included in the LICENSE file that
3212# accompanied this code).
3213#
3214# You should have received a copy of the GNU General Public License version
3215# 2 along with this work; if not, write to the Free Software Foundation,
3216# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3217#
3218# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3219# or visit www.oracle.com if you need additional information or have any
3220# questions.
3221#
3222
3223# Execute the check given as argument, and verify the result
3224# If the Boot JDK was previously found, do nothing
3225# $1 A command line (typically autoconf macro) to execute
3226
3227
3228# Test: Is bootjdk explicitely set by command line arguments?
3229
3230
3231# Test: Is bootjdk available from builddeps?
3232
3233
3234# Test: Is $JAVA_HOME set?
3235
3236
3237# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3238
3239
3240# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3241
3242
3243# Look for a jdk in the given path. If there are multiple, try to select the newest.
3244# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3245# $1 = Path to directory containing jdk installations.
3246# $2 = String to append to the found JDK directory to get the proper JDK home
3247
3248
3249# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3250# environmental variable as base for where to look.
3251# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3252
3253
3254# Test: Is there a JDK installed in default, well-known locations?
3255
3256
3257# Check that a command-line tool in the Boot JDK is correct
3258# $1 = name of variable to assign
3259# $2 = name of binary
3260
3261
3262###############################################################################
3263#
3264# We need a Boot JDK to bootstrap the build.
3265#
3266
3267
3268
3269
3270
3271#
3272# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3273# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3274#
3275# This code is free software; you can redistribute it and/or modify it
3276# under the terms of the GNU General Public License version 2 only, as
3277# published by the Free Software Foundation.  Oracle designates this
3278# particular file as subject to the "Classpath" exception as provided
3279# by Oracle in the LICENSE file that accompanied this code.
3280#
3281# This code is distributed in the hope that it will be useful, but WITHOUT
3282# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3283# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3284# version 2 for more details (a copy is included in the LICENSE file that
3285# accompanied this code).
3286#
3287# You should have received a copy of the GNU General Public License version
3288# 2 along with this work; if not, write to the Free Software Foundation,
3289# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3290#
3291# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3292# or visit www.oracle.com if you need additional information or have any
3293# questions.
3294#
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313#
3314# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3315# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3316#
3317# This code is free software; you can redistribute it and/or modify it
3318# under the terms of the GNU General Public License version 2 only, as
3319# published by the Free Software Foundation.  Oracle designates this
3320# particular file as subject to the "Classpath" exception as provided
3321# by Oracle in the LICENSE file that accompanied this code.
3322#
3323# This code is distributed in the hope that it will be useful, but WITHOUT
3324# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3325# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3326# version 2 for more details (a copy is included in the LICENSE file that
3327# accompanied this code).
3328#
3329# You should have received a copy of the GNU General Public License version
3330# 2 along with this work; if not, write to the Free Software Foundation,
3331# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3332#
3333# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3334# or visit www.oracle.com if you need additional information or have any
3335# questions.
3336#
3337
3338
3339
3340
3341
3342cygwin_help() {
3343    case $1 in
3344    unzip)
3345        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3346    zip)
3347        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3348    make)
3349        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3350    * )
3351       break ;;
3352    esac
3353}
3354
3355apt_help() {
3356    case $1 in
3357    devkit)
3358        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3359    openjdk)
3360        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3361    alsa)
3362        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3363    cups)
3364        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3365    freetype2)
3366        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3367    pulse)
3368        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3369    x11)
3370        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3371    ccache)
3372        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3373    * )
3374       break ;;
3375    esac
3376}
3377
3378yum_help() {
3379    case $1 in
3380    devkit)
3381        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3382    openjdk)
3383        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3384    alsa)
3385        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3386    cups)
3387        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3388    freetype2)
3389        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3390    pulse)
3391        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3392    x11)
3393        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3394    ccache)
3395        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3396    * )
3397       break ;;
3398    esac
3399}
3400
3401port_help() {
3402    PKGHANDLER_COMMAND=""
3403}
3404
3405pkgutil_help() {
3406    PKGHANDLER_COMMAND=""
3407}
3408
3409pkgadd_help() {
3410    PKGHANDLER_COMMAND=""
3411}
3412
3413
3414
3415#
3416# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3417# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3418#
3419# This code is free software; you can redistribute it and/or modify it
3420# under the terms of the GNU General Public License version 2 only, as
3421# published by the Free Software Foundation.  Oracle designates this
3422# particular file as subject to the "Classpath" exception as provided
3423# by Oracle in the LICENSE file that accompanied this code.
3424#
3425# This code is distributed in the hope that it will be useful, but WITHOUT
3426# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3427# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3428# version 2 for more details (a copy is included in the LICENSE file that
3429# accompanied this code).
3430#
3431# You should have received a copy of the GNU General Public License version
3432# 2 along with this work; if not, write to the Free Software Foundation,
3433# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3434#
3435# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3436# or visit www.oracle.com if you need additional information or have any
3437# questions.
3438#
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448###############################################################################
3449#
3450# Setup version numbers
3451#
3452
3453
3454
3455
3456
3457
3458# Support for customization of the build process. Some build files
3459# will include counterparts from this location, if they exist. This allows
3460# for a degree of customization of the build targets and the rules/recipes
3461# to create them
3462
3463# Check whether --with-custom-make-dir was given.
3464if test "${with_custom_make_dir+set}" = set; then :
3465  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3466fi
3467
3468
3469
3470#
3471# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473#
3474# This code is free software; you can redistribute it and/or modify it
3475# under the terms of the GNU General Public License version 2 only, as
3476# published by the Free Software Foundation.  Oracle designates this
3477# particular file as subject to the "Classpath" exception as provided
3478# by Oracle in the LICENSE file that accompanied this code.
3479#
3480# This code is distributed in the hope that it will be useful, but WITHOUT
3481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483# version 2 for more details (a copy is included in the LICENSE file that
3484# accompanied this code).
3485#
3486# You should have received a copy of the GNU General Public License version
3487# 2 along with this work; if not, write to the Free Software Foundation,
3488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489#
3490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491# or visit www.oracle.com if you need additional information or have any
3492# questions.
3493#
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509#
3510# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3511# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3512#
3513# This code is free software; you can redistribute it and/or modify it
3514# under the terms of the GNU General Public License version 2 only, as
3515# published by the Free Software Foundation.  Oracle designates this
3516# particular file as subject to the "Classpath" exception as provided
3517# by Oracle in the LICENSE file that accompanied this code.
3518#
3519# This code is distributed in the hope that it will be useful, but WITHOUT
3520# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3521# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3522# version 2 for more details (a copy is included in the LICENSE file that
3523# accompanied this code).
3524#
3525# You should have received a copy of the GNU General Public License version
3526# 2 along with this work; if not, write to the Free Software Foundation,
3527# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3528#
3529# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3530# or visit www.oracle.com if you need additional information or have any
3531# questions.
3532#
3533
3534# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3535# Converts autoconf style CPU name to OpenJDK style, into
3536# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3537
3538
3539# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3540# Converts autoconf style OS name to OpenJDK style, into
3541# VAR_OS and VAR_OS_API.
3542
3543
3544# Expects $host_os $host_cpu $build_os and $build_cpu
3545# and $with_target_bits to have been setup!
3546#
3547# Translate the standard triplet(quadruplet) definition
3548# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3549# OPENJDK_BUILD_OS, etc.
3550
3551
3552# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3553# accordingly. Must be done after setting up build and target system, but before
3554# doing anything else with these values.
3555
3556
3557    # Setup the legacy variables, for controlling the old makefiles.
3558    #
3559
3560
3561
3562
3563#%%% Build and target systems %%%
3564
3565
3566
3567
3568# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3569# Add -mX to various FLAGS variables.
3570
3571
3572
3573
3574
3575
3576#
3577# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3578# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3579#
3580# This code is free software; you can redistribute it and/or modify it
3581# under the terms of the GNU General Public License version 2 only, as
3582# published by the Free Software Foundation.  Oracle designates this
3583# particular file as subject to the "Classpath" exception as provided
3584# by Oracle in the LICENSE file that accompanied this code.
3585#
3586# This code is distributed in the hope that it will be useful, but WITHOUT
3587# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3588# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3589# version 2 for more details (a copy is included in the LICENSE file that
3590# accompanied this code).
3591#
3592# You should have received a copy of the GNU General Public License version
3593# 2 along with this work; if not, write to the Free Software Foundation,
3594# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3595#
3596# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3597# or visit www.oracle.com if you need additional information or have any
3598# questions.
3599#
3600
3601
3602
3603
3604
3605
3606
3607
3608#
3609# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3611#
3612# This code is free software; you can redistribute it and/or modify it
3613# under the terms of the GNU General Public License version 2 only, as
3614# published by the Free Software Foundation.  Oracle designates this
3615# particular file as subject to the "Classpath" exception as provided
3616# by Oracle in the LICENSE file that accompanied this code.
3617#
3618# This code is distributed in the hope that it will be useful, but WITHOUT
3619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3621# version 2 for more details (a copy is included in the LICENSE file that
3622# accompanied this code).
3623#
3624# You should have received a copy of the GNU General Public License version
3625# 2 along with this work; if not, write to the Free Software Foundation,
3626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3627#
3628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3629# or visit www.oracle.com if you need additional information or have any
3630# questions.
3631#
3632
3633# $1 = compiler to test (CC or CXX)
3634# $2 = human readable name of compiler (C or C++)
3635
3636
3637
3638
3639
3640# $1 = compiler to test (CC or CXX)
3641# $2 = human readable name of compiler (C or C++)
3642# $3 = list of compiler names to search for
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655#
3656# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3657# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3658#
3659# This code is free software; you can redistribute it and/or modify it
3660# under the terms of the GNU General Public License version 2 only, as
3661# published by the Free Software Foundation.  Oracle designates this
3662# particular file as subject to the "Classpath" exception as provided
3663# by Oracle in the LICENSE file that accompanied this code.
3664#
3665# This code is distributed in the hope that it will be useful, but WITHOUT
3666# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3667# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3668# version 2 for more details (a copy is included in the LICENSE file that
3669# accompanied this code).
3670#
3671# You should have received a copy of the GNU General Public License version
3672# 2 along with this work; if not, write to the Free Software Foundation,
3673# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3674#
3675# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3676# or visit www.oracle.com if you need additional information or have any
3677# questions.
3678#
3679
3680
3681
3682
3683
3684
3685
3686# Check if the VS env variables were setup prior to running configure.
3687# If not, then find vcvarsall.bat and run it automatically, and integrate
3688# the set env variables into the spec file.
3689
3690
3691
3692
3693
3694
3695# This line needs to be here, verbatim, after all includes and the dummy hook
3696# definitions. It is replaced with custom functionality when building
3697# custom sources.
3698#CUSTOM_AUTOCONF_INCLUDE
3699
3700# Do not change or remove the following line, it is needed for consistency checks:
3701DATE_WHEN_GENERATED=1357690920
3702
3703###############################################################################
3704#
3705# Initialization / Boot-strapping
3706#
3707# The bootstrapping process needs to solve the "chicken or the egg" problem,
3708# thus it jumps back and forth, each time gaining something needed later on.
3709#
3710###############################################################################
3711
3712# Basic initialization that must happen first of all
3713
3714# Save the original command line. This is passed to us by the wrapper configure script.
3715
3716DATE_WHEN_CONFIGURED=`LANG=C date`
3717
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3719$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3721$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3722
3723
3724
3725# Start with tools that do not need have cross compilation support
3726# and can be expected to be found in the default PATH. These tools are
3727# used by configure. Nor are these tools expected to be found in the
3728# devkit from the builddeps server either, since they are
3729# needed to download the devkit.
3730
3731# First are all the simple required tools.
3732
3733    for ac_prog in basename
3734do
3735  # Extract the first word of "$ac_prog", so it can be a program name with args.
3736set dummy $ac_prog; ac_word=$2
3737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738$as_echo_n "checking for $ac_word... " >&6; }
3739if ${ac_cv_path_BASENAME+:} false; then :
3740  $as_echo_n "(cached) " >&6
3741else
3742  case $BASENAME in
3743  [\\/]* | ?:[\\/]*)
3744  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3745  ;;
3746  *)
3747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748for as_dir in $PATH
3749do
3750  IFS=$as_save_IFS
3751  test -z "$as_dir" && as_dir=.
3752    for ac_exec_ext in '' $ac_executable_extensions; do
3753  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3754    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3756    break 2
3757  fi
3758done
3759  done
3760IFS=$as_save_IFS
3761
3762  ;;
3763esac
3764fi
3765BASENAME=$ac_cv_path_BASENAME
3766if test -n "$BASENAME"; then
3767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3768$as_echo "$BASENAME" >&6; }
3769else
3770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
3772fi
3773
3774
3775  test -n "$BASENAME" && break
3776done
3777
3778
3779    if test "x$BASENAME" = x; then
3780        if test "xbasename" = x; then
3781          PROG_NAME=basename
3782        else
3783          PROG_NAME=basename
3784        fi
3785        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3786$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3787        as_fn_error $? "Cannot continue" "$LINENO" 5
3788    fi
3789
3790
3791
3792    for ac_prog in bash
3793do
3794  # Extract the first word of "$ac_prog", so it can be a program name with args.
3795set dummy $ac_prog; ac_word=$2
3796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3797$as_echo_n "checking for $ac_word... " >&6; }
3798if ${ac_cv_path_BASH+:} false; then :
3799  $as_echo_n "(cached) " >&6
3800else
3801  case $BASH in
3802  [\\/]* | ?:[\\/]*)
3803  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3804  ;;
3805  *)
3806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809  IFS=$as_save_IFS
3810  test -z "$as_dir" && as_dir=.
3811    for ac_exec_ext in '' $ac_executable_extensions; do
3812  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3813    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3815    break 2
3816  fi
3817done
3818  done
3819IFS=$as_save_IFS
3820
3821  ;;
3822esac
3823fi
3824BASH=$ac_cv_path_BASH
3825if test -n "$BASH"; then
3826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3827$as_echo "$BASH" >&6; }
3828else
3829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830$as_echo "no" >&6; }
3831fi
3832
3833
3834  test -n "$BASH" && break
3835done
3836
3837
3838    if test "x$BASH" = x; then
3839        if test "xbash" = x; then
3840          PROG_NAME=bash
3841        else
3842          PROG_NAME=bash
3843        fi
3844        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3845$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3846        as_fn_error $? "Cannot continue" "$LINENO" 5
3847    fi
3848
3849
3850
3851    for ac_prog in cat
3852do
3853  # Extract the first word of "$ac_prog", so it can be a program name with args.
3854set dummy $ac_prog; ac_word=$2
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856$as_echo_n "checking for $ac_word... " >&6; }
3857if ${ac_cv_path_CAT+:} false; then :
3858  $as_echo_n "(cached) " >&6
3859else
3860  case $CAT in
3861  [\\/]* | ?:[\\/]*)
3862  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3863  ;;
3864  *)
3865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3866for as_dir in $PATH
3867do
3868  IFS=$as_save_IFS
3869  test -z "$as_dir" && as_dir=.
3870    for ac_exec_ext in '' $ac_executable_extensions; do
3871  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3872    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3874    break 2
3875  fi
3876done
3877  done
3878IFS=$as_save_IFS
3879
3880  ;;
3881esac
3882fi
3883CAT=$ac_cv_path_CAT
3884if test -n "$CAT"; then
3885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3886$as_echo "$CAT" >&6; }
3887else
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3889$as_echo "no" >&6; }
3890fi
3891
3892
3893  test -n "$CAT" && break
3894done
3895
3896
3897    if test "x$CAT" = x; then
3898        if test "xcat" = x; then
3899          PROG_NAME=cat
3900        else
3901          PROG_NAME=cat
3902        fi
3903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3904$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3905        as_fn_error $? "Cannot continue" "$LINENO" 5
3906    fi
3907
3908
3909
3910    for ac_prog in chmod
3911do
3912  # Extract the first word of "$ac_prog", so it can be a program name with args.
3913set dummy $ac_prog; ac_word=$2
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915$as_echo_n "checking for $ac_word... " >&6; }
3916if ${ac_cv_path_CHMOD+:} false; then :
3917  $as_echo_n "(cached) " >&6
3918else
3919  case $CHMOD in
3920  [\\/]* | ?:[\\/]*)
3921  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3922  ;;
3923  *)
3924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3925for as_dir in $PATH
3926do
3927  IFS=$as_save_IFS
3928  test -z "$as_dir" && as_dir=.
3929    for ac_exec_ext in '' $ac_executable_extensions; do
3930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3931    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3933    break 2
3934  fi
3935done
3936  done
3937IFS=$as_save_IFS
3938
3939  ;;
3940esac
3941fi
3942CHMOD=$ac_cv_path_CHMOD
3943if test -n "$CHMOD"; then
3944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3945$as_echo "$CHMOD" >&6; }
3946else
3947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948$as_echo "no" >&6; }
3949fi
3950
3951
3952  test -n "$CHMOD" && break
3953done
3954
3955
3956    if test "x$CHMOD" = x; then
3957        if test "xchmod" = x; then
3958          PROG_NAME=chmod
3959        else
3960          PROG_NAME=chmod
3961        fi
3962        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3963$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3964        as_fn_error $? "Cannot continue" "$LINENO" 5
3965    fi
3966
3967
3968
3969    for ac_prog in cmp
3970do
3971  # Extract the first word of "$ac_prog", so it can be a program name with args.
3972set dummy $ac_prog; ac_word=$2
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3974$as_echo_n "checking for $ac_word... " >&6; }
3975if ${ac_cv_path_CMP+:} false; then :
3976  $as_echo_n "(cached) " >&6
3977else
3978  case $CMP in
3979  [\\/]* | ?:[\\/]*)
3980  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3981  ;;
3982  *)
3983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3984for as_dir in $PATH
3985do
3986  IFS=$as_save_IFS
3987  test -z "$as_dir" && as_dir=.
3988    for ac_exec_ext in '' $ac_executable_extensions; do
3989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3990    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3992    break 2
3993  fi
3994done
3995  done
3996IFS=$as_save_IFS
3997
3998  ;;
3999esac
4000fi
4001CMP=$ac_cv_path_CMP
4002if test -n "$CMP"; then
4003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4004$as_echo "$CMP" >&6; }
4005else
4006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4007$as_echo "no" >&6; }
4008fi
4009
4010
4011  test -n "$CMP" && break
4012done
4013
4014
4015    if test "x$CMP" = x; then
4016        if test "xcmp" = x; then
4017          PROG_NAME=cmp
4018        else
4019          PROG_NAME=cmp
4020        fi
4021        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4022$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4023        as_fn_error $? "Cannot continue" "$LINENO" 5
4024    fi
4025
4026
4027
4028    for ac_prog in comm
4029do
4030  # Extract the first word of "$ac_prog", so it can be a program name with args.
4031set dummy $ac_prog; ac_word=$2
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4033$as_echo_n "checking for $ac_word... " >&6; }
4034if ${ac_cv_path_COMM+:} false; then :
4035  $as_echo_n "(cached) " >&6
4036else
4037  case $COMM in
4038  [\\/]* | ?:[\\/]*)
4039  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4040  ;;
4041  *)
4042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4043for as_dir in $PATH
4044do
4045  IFS=$as_save_IFS
4046  test -z "$as_dir" && as_dir=.
4047    for ac_exec_ext in '' $ac_executable_extensions; do
4048  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4049    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4051    break 2
4052  fi
4053done
4054  done
4055IFS=$as_save_IFS
4056
4057  ;;
4058esac
4059fi
4060COMM=$ac_cv_path_COMM
4061if test -n "$COMM"; then
4062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4063$as_echo "$COMM" >&6; }
4064else
4065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4066$as_echo "no" >&6; }
4067fi
4068
4069
4070  test -n "$COMM" && break
4071done
4072
4073
4074    if test "x$COMM" = x; then
4075        if test "xcomm" = x; then
4076          PROG_NAME=comm
4077        else
4078          PROG_NAME=comm
4079        fi
4080        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4081$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4082        as_fn_error $? "Cannot continue" "$LINENO" 5
4083    fi
4084
4085
4086
4087    for ac_prog in cp
4088do
4089  # Extract the first word of "$ac_prog", so it can be a program name with args.
4090set dummy $ac_prog; ac_word=$2
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4092$as_echo_n "checking for $ac_word... " >&6; }
4093if ${ac_cv_path_CP+:} false; then :
4094  $as_echo_n "(cached) " >&6
4095else
4096  case $CP in
4097  [\\/]* | ?:[\\/]*)
4098  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4099  ;;
4100  *)
4101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4102for as_dir in $PATH
4103do
4104  IFS=$as_save_IFS
4105  test -z "$as_dir" && as_dir=.
4106    for ac_exec_ext in '' $ac_executable_extensions; do
4107  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4108    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4110    break 2
4111  fi
4112done
4113  done
4114IFS=$as_save_IFS
4115
4116  ;;
4117esac
4118fi
4119CP=$ac_cv_path_CP
4120if test -n "$CP"; then
4121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4122$as_echo "$CP" >&6; }
4123else
4124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4125$as_echo "no" >&6; }
4126fi
4127
4128
4129  test -n "$CP" && break
4130done
4131
4132
4133    if test "x$CP" = x; then
4134        if test "xcp" = x; then
4135          PROG_NAME=cp
4136        else
4137          PROG_NAME=cp
4138        fi
4139        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4140$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4141        as_fn_error $? "Cannot continue" "$LINENO" 5
4142    fi
4143
4144
4145
4146    for ac_prog in cpio
4147do
4148  # Extract the first word of "$ac_prog", so it can be a program name with args.
4149set dummy $ac_prog; ac_word=$2
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4151$as_echo_n "checking for $ac_word... " >&6; }
4152if ${ac_cv_path_CPIO+:} false; then :
4153  $as_echo_n "(cached) " >&6
4154else
4155  case $CPIO in
4156  [\\/]* | ?:[\\/]*)
4157  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4158  ;;
4159  *)
4160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4161for as_dir in $PATH
4162do
4163  IFS=$as_save_IFS
4164  test -z "$as_dir" && as_dir=.
4165    for ac_exec_ext in '' $ac_executable_extensions; do
4166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4167    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4169    break 2
4170  fi
4171done
4172  done
4173IFS=$as_save_IFS
4174
4175  ;;
4176esac
4177fi
4178CPIO=$ac_cv_path_CPIO
4179if test -n "$CPIO"; then
4180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4181$as_echo "$CPIO" >&6; }
4182else
4183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4184$as_echo "no" >&6; }
4185fi
4186
4187
4188  test -n "$CPIO" && break
4189done
4190
4191
4192    if test "x$CPIO" = x; then
4193        if test "xcpio" = x; then
4194          PROG_NAME=cpio
4195        else
4196          PROG_NAME=cpio
4197        fi
4198        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4199$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4200        as_fn_error $? "Cannot continue" "$LINENO" 5
4201    fi
4202
4203
4204
4205    for ac_prog in cut
4206do
4207  # Extract the first word of "$ac_prog", so it can be a program name with args.
4208set dummy $ac_prog; ac_word=$2
4209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4210$as_echo_n "checking for $ac_word... " >&6; }
4211if ${ac_cv_path_CUT+:} false; then :
4212  $as_echo_n "(cached) " >&6
4213else
4214  case $CUT in
4215  [\\/]* | ?:[\\/]*)
4216  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4217  ;;
4218  *)
4219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222  IFS=$as_save_IFS
4223  test -z "$as_dir" && as_dir=.
4224    for ac_exec_ext in '' $ac_executable_extensions; do
4225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4226    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4228    break 2
4229  fi
4230done
4231  done
4232IFS=$as_save_IFS
4233
4234  ;;
4235esac
4236fi
4237CUT=$ac_cv_path_CUT
4238if test -n "$CUT"; then
4239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4240$as_echo "$CUT" >&6; }
4241else
4242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4243$as_echo "no" >&6; }
4244fi
4245
4246
4247  test -n "$CUT" && break
4248done
4249
4250
4251    if test "x$CUT" = x; then
4252        if test "xcut" = x; then
4253          PROG_NAME=cut
4254        else
4255          PROG_NAME=cut
4256        fi
4257        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4258$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4259        as_fn_error $? "Cannot continue" "$LINENO" 5
4260    fi
4261
4262
4263
4264    for ac_prog in date
4265do
4266  # Extract the first word of "$ac_prog", so it can be a program name with args.
4267set dummy $ac_prog; ac_word=$2
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4269$as_echo_n "checking for $ac_word... " >&6; }
4270if ${ac_cv_path_DATE+:} false; then :
4271  $as_echo_n "(cached) " >&6
4272else
4273  case $DATE in
4274  [\\/]* | ?:[\\/]*)
4275  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4276  ;;
4277  *)
4278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4279for as_dir in $PATH
4280do
4281  IFS=$as_save_IFS
4282  test -z "$as_dir" && as_dir=.
4283    for ac_exec_ext in '' $ac_executable_extensions; do
4284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4285    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4287    break 2
4288  fi
4289done
4290  done
4291IFS=$as_save_IFS
4292
4293  ;;
4294esac
4295fi
4296DATE=$ac_cv_path_DATE
4297if test -n "$DATE"; then
4298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4299$as_echo "$DATE" >&6; }
4300else
4301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4302$as_echo "no" >&6; }
4303fi
4304
4305
4306  test -n "$DATE" && break
4307done
4308
4309
4310    if test "x$DATE" = x; then
4311        if test "xdate" = x; then
4312          PROG_NAME=date
4313        else
4314          PROG_NAME=date
4315        fi
4316        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4317$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4318        as_fn_error $? "Cannot continue" "$LINENO" 5
4319    fi
4320
4321
4322
4323    for ac_prog in gdiff diff
4324do
4325  # Extract the first word of "$ac_prog", so it can be a program name with args.
4326set dummy $ac_prog; ac_word=$2
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4328$as_echo_n "checking for $ac_word... " >&6; }
4329if ${ac_cv_path_DIFF+:} false; then :
4330  $as_echo_n "(cached) " >&6
4331else
4332  case $DIFF in
4333  [\\/]* | ?:[\\/]*)
4334  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4335  ;;
4336  *)
4337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4338for as_dir in $PATH
4339do
4340  IFS=$as_save_IFS
4341  test -z "$as_dir" && as_dir=.
4342    for ac_exec_ext in '' $ac_executable_extensions; do
4343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4344    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4346    break 2
4347  fi
4348done
4349  done
4350IFS=$as_save_IFS
4351
4352  ;;
4353esac
4354fi
4355DIFF=$ac_cv_path_DIFF
4356if test -n "$DIFF"; then
4357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4358$as_echo "$DIFF" >&6; }
4359else
4360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4361$as_echo "no" >&6; }
4362fi
4363
4364
4365  test -n "$DIFF" && break
4366done
4367
4368
4369    if test "x$DIFF" = x; then
4370        if test "xgdiff diff" = x; then
4371          PROG_NAME=diff
4372        else
4373          PROG_NAME=gdiff diff
4374        fi
4375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4376$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4377        as_fn_error $? "Cannot continue" "$LINENO" 5
4378    fi
4379
4380
4381
4382    for ac_prog in dirname
4383do
4384  # Extract the first word of "$ac_prog", so it can be a program name with args.
4385set dummy $ac_prog; ac_word=$2
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4387$as_echo_n "checking for $ac_word... " >&6; }
4388if ${ac_cv_path_DIRNAME+:} false; then :
4389  $as_echo_n "(cached) " >&6
4390else
4391  case $DIRNAME in
4392  [\\/]* | ?:[\\/]*)
4393  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4394  ;;
4395  *)
4396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399  IFS=$as_save_IFS
4400  test -z "$as_dir" && as_dir=.
4401    for ac_exec_ext in '' $ac_executable_extensions; do
4402  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4403    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4405    break 2
4406  fi
4407done
4408  done
4409IFS=$as_save_IFS
4410
4411  ;;
4412esac
4413fi
4414DIRNAME=$ac_cv_path_DIRNAME
4415if test -n "$DIRNAME"; then
4416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4417$as_echo "$DIRNAME" >&6; }
4418else
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4420$as_echo "no" >&6; }
4421fi
4422
4423
4424  test -n "$DIRNAME" && break
4425done
4426
4427
4428    if test "x$DIRNAME" = x; then
4429        if test "xdirname" = x; then
4430          PROG_NAME=dirname
4431        else
4432          PROG_NAME=dirname
4433        fi
4434        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4435$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4436        as_fn_error $? "Cannot continue" "$LINENO" 5
4437    fi
4438
4439
4440
4441    for ac_prog in echo
4442do
4443  # Extract the first word of "$ac_prog", so it can be a program name with args.
4444set dummy $ac_prog; ac_word=$2
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
4447if ${ac_cv_path_ECHO+:} false; then :
4448  $as_echo_n "(cached) " >&6
4449else
4450  case $ECHO in
4451  [\\/]* | ?:[\\/]*)
4452  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4453  ;;
4454  *)
4455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in $PATH
4457do
4458  IFS=$as_save_IFS
4459  test -z "$as_dir" && as_dir=.
4460    for ac_exec_ext in '' $ac_executable_extensions; do
4461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4462    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464    break 2
4465  fi
4466done
4467  done
4468IFS=$as_save_IFS
4469
4470  ;;
4471esac
4472fi
4473ECHO=$ac_cv_path_ECHO
4474if test -n "$ECHO"; then
4475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4476$as_echo "$ECHO" >&6; }
4477else
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482
4483  test -n "$ECHO" && break
4484done
4485
4486
4487    if test "x$ECHO" = x; then
4488        if test "xecho" = x; then
4489          PROG_NAME=echo
4490        else
4491          PROG_NAME=echo
4492        fi
4493        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4494$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4495        as_fn_error $? "Cannot continue" "$LINENO" 5
4496    fi
4497
4498
4499
4500    for ac_prog in expr
4501do
4502  # Extract the first word of "$ac_prog", so it can be a program name with args.
4503set dummy $ac_prog; ac_word=$2
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505$as_echo_n "checking for $ac_word... " >&6; }
4506if ${ac_cv_path_EXPR+:} false; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  case $EXPR in
4510  [\\/]* | ?:[\\/]*)
4511  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4512  ;;
4513  *)
4514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4521    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529  ;;
4530esac
4531fi
4532EXPR=$ac_cv_path_EXPR
4533if test -n "$EXPR"; then
4534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4535$as_echo "$EXPR" >&6; }
4536else
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538$as_echo "no" >&6; }
4539fi
4540
4541
4542  test -n "$EXPR" && break
4543done
4544
4545
4546    if test "x$EXPR" = x; then
4547        if test "xexpr" = x; then
4548          PROG_NAME=expr
4549        else
4550          PROG_NAME=expr
4551        fi
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4553$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4554        as_fn_error $? "Cannot continue" "$LINENO" 5
4555    fi
4556
4557
4558
4559    for ac_prog in file
4560do
4561  # Extract the first word of "$ac_prog", so it can be a program name with args.
4562set dummy $ac_prog; ac_word=$2
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4564$as_echo_n "checking for $ac_word... " >&6; }
4565if ${ac_cv_path_FILE+:} false; then :
4566  $as_echo_n "(cached) " >&6
4567else
4568  case $FILE in
4569  [\\/]* | ?:[\\/]*)
4570  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4571  ;;
4572  *)
4573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574for as_dir in $PATH
4575do
4576  IFS=$as_save_IFS
4577  test -z "$as_dir" && as_dir=.
4578    for ac_exec_ext in '' $ac_executable_extensions; do
4579  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4580    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4582    break 2
4583  fi
4584done
4585  done
4586IFS=$as_save_IFS
4587
4588  ;;
4589esac
4590fi
4591FILE=$ac_cv_path_FILE
4592if test -n "$FILE"; then
4593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4594$as_echo "$FILE" >&6; }
4595else
4596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597$as_echo "no" >&6; }
4598fi
4599
4600
4601  test -n "$FILE" && break
4602done
4603
4604
4605    if test "x$FILE" = x; then
4606        if test "xfile" = x; then
4607          PROG_NAME=file
4608        else
4609          PROG_NAME=file
4610        fi
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4612$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4613        as_fn_error $? "Cannot continue" "$LINENO" 5
4614    fi
4615
4616
4617
4618    for ac_prog in find
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_FIND+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $FIND in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4639    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650FIND=$ac_cv_path_FIND
4651if test -n "$FIND"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4653$as_echo "$FIND" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$FIND" && break
4661done
4662
4663
4664    if test "x$FIND" = x; then
4665        if test "xfind" = x; then
4666          PROG_NAME=find
4667        else
4668          PROG_NAME=find
4669        fi
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4671$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4672        as_fn_error $? "Cannot continue" "$LINENO" 5
4673    fi
4674
4675
4676
4677    for ac_prog in head
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_HEAD+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $HEAD in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4698    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709HEAD=$ac_cv_path_HEAD
4710if test -n "$HEAD"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4712$as_echo "$HEAD" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$HEAD" && break
4720done
4721
4722
4723    if test "x$HEAD" = x; then
4724        if test "xhead" = x; then
4725          PROG_NAME=head
4726        else
4727          PROG_NAME=head
4728        fi
4729        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4730$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4731        as_fn_error $? "Cannot continue" "$LINENO" 5
4732    fi
4733
4734
4735
4736    for ac_prog in ln
4737do
4738  # Extract the first word of "$ac_prog", so it can be a program name with args.
4739set dummy $ac_prog; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_LN+:} false; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  case $LN in
4746  [\\/]* | ?:[\\/]*)
4747  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4748  ;;
4749  *)
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753  IFS=$as_save_IFS
4754  test -z "$as_dir" && as_dir=.
4755    for ac_exec_ext in '' $ac_executable_extensions; do
4756  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4757    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759    break 2
4760  fi
4761done
4762  done
4763IFS=$as_save_IFS
4764
4765  ;;
4766esac
4767fi
4768LN=$ac_cv_path_LN
4769if test -n "$LN"; then
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4771$as_echo "$LN" >&6; }
4772else
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778  test -n "$LN" && break
4779done
4780
4781
4782    if test "x$LN" = x; then
4783        if test "xln" = x; then
4784          PROG_NAME=ln
4785        else
4786          PROG_NAME=ln
4787        fi
4788        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4789$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4790        as_fn_error $? "Cannot continue" "$LINENO" 5
4791    fi
4792
4793
4794
4795    for ac_prog in ls
4796do
4797  # Extract the first word of "$ac_prog", so it can be a program name with args.
4798set dummy $ac_prog; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
4801if ${ac_cv_path_LS+:} false; then :
4802  $as_echo_n "(cached) " >&6
4803else
4804  case $LS in
4805  [\\/]* | ?:[\\/]*)
4806  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4807  ;;
4808  *)
4809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in $PATH
4811do
4812  IFS=$as_save_IFS
4813  test -z "$as_dir" && as_dir=.
4814    for ac_exec_ext in '' $ac_executable_extensions; do
4815  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4816    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4818    break 2
4819  fi
4820done
4821  done
4822IFS=$as_save_IFS
4823
4824  ;;
4825esac
4826fi
4827LS=$ac_cv_path_LS
4828if test -n "$LS"; then
4829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4830$as_echo "$LS" >&6; }
4831else
4832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
4834fi
4835
4836
4837  test -n "$LS" && break
4838done
4839
4840
4841    if test "x$LS" = x; then
4842        if test "xls" = x; then
4843          PROG_NAME=ls
4844        else
4845          PROG_NAME=ls
4846        fi
4847        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4848$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4849        as_fn_error $? "Cannot continue" "$LINENO" 5
4850    fi
4851
4852
4853
4854    for ac_prog in mkdir
4855do
4856  # Extract the first word of "$ac_prog", so it can be a program name with args.
4857set dummy $ac_prog; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_MKDIR+:} false; then :
4861  $as_echo_n "(cached) " >&6
4862else
4863  case $MKDIR in
4864  [\\/]* | ?:[\\/]*)
4865  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4866  ;;
4867  *)
4868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in $PATH
4870do
4871  IFS=$as_save_IFS
4872  test -z "$as_dir" && as_dir=.
4873    for ac_exec_ext in '' $ac_executable_extensions; do
4874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4875    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877    break 2
4878  fi
4879done
4880  done
4881IFS=$as_save_IFS
4882
4883  ;;
4884esac
4885fi
4886MKDIR=$ac_cv_path_MKDIR
4887if test -n "$MKDIR"; then
4888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4889$as_echo "$MKDIR" >&6; }
4890else
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895
4896  test -n "$MKDIR" && break
4897done
4898
4899
4900    if test "x$MKDIR" = x; then
4901        if test "xmkdir" = x; then
4902          PROG_NAME=mkdir
4903        else
4904          PROG_NAME=mkdir
4905        fi
4906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4907$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4908        as_fn_error $? "Cannot continue" "$LINENO" 5
4909    fi
4910
4911
4912
4913    for ac_prog in mktemp
4914do
4915  # Extract the first word of "$ac_prog", so it can be a program name with args.
4916set dummy $ac_prog; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_MKTEMP+:} false; then :
4920  $as_echo_n "(cached) " >&6
4921else
4922  case $MKTEMP in
4923  [\\/]* | ?:[\\/]*)
4924  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4925  ;;
4926  *)
4927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in $PATH
4929do
4930  IFS=$as_save_IFS
4931  test -z "$as_dir" && as_dir=.
4932    for ac_exec_ext in '' $ac_executable_extensions; do
4933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4934    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936    break 2
4937  fi
4938done
4939  done
4940IFS=$as_save_IFS
4941
4942  ;;
4943esac
4944fi
4945MKTEMP=$ac_cv_path_MKTEMP
4946if test -n "$MKTEMP"; then
4947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4948$as_echo "$MKTEMP" >&6; }
4949else
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955  test -n "$MKTEMP" && break
4956done
4957
4958
4959    if test "x$MKTEMP" = x; then
4960        if test "xmktemp" = x; then
4961          PROG_NAME=mktemp
4962        else
4963          PROG_NAME=mktemp
4964        fi
4965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4967        as_fn_error $? "Cannot continue" "$LINENO" 5
4968    fi
4969
4970
4971
4972    for ac_prog in mv
4973do
4974  # Extract the first word of "$ac_prog", so it can be a program name with args.
4975set dummy $ac_prog; ac_word=$2
4976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4977$as_echo_n "checking for $ac_word... " >&6; }
4978if ${ac_cv_path_MV+:} false; then :
4979  $as_echo_n "(cached) " >&6
4980else
4981  case $MV in
4982  [\\/]* | ?:[\\/]*)
4983  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4984  ;;
4985  *)
4986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in $PATH
4988do
4989  IFS=$as_save_IFS
4990  test -z "$as_dir" && as_dir=.
4991    for ac_exec_ext in '' $ac_executable_extensions; do
4992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4993    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4995    break 2
4996  fi
4997done
4998  done
4999IFS=$as_save_IFS
5000
5001  ;;
5002esac
5003fi
5004MV=$ac_cv_path_MV
5005if test -n "$MV"; then
5006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5007$as_echo "$MV" >&6; }
5008else
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013
5014  test -n "$MV" && break
5015done
5016
5017
5018    if test "x$MV" = x; then
5019        if test "xmv" = x; then
5020          PROG_NAME=mv
5021        else
5022          PROG_NAME=mv
5023        fi
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5026        as_fn_error $? "Cannot continue" "$LINENO" 5
5027    fi
5028
5029
5030
5031    for ac_prog in printf
5032do
5033  # Extract the first word of "$ac_prog", so it can be a program name with args.
5034set dummy $ac_prog; ac_word=$2
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036$as_echo_n "checking for $ac_word... " >&6; }
5037if ${ac_cv_path_PRINTF+:} false; then :
5038  $as_echo_n "(cached) " >&6
5039else
5040  case $PRINTF in
5041  [\\/]* | ?:[\\/]*)
5042  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5043  ;;
5044  *)
5045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046for as_dir in $PATH
5047do
5048  IFS=$as_save_IFS
5049  test -z "$as_dir" && as_dir=.
5050    for ac_exec_ext in '' $ac_executable_extensions; do
5051  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5052    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054    break 2
5055  fi
5056done
5057  done
5058IFS=$as_save_IFS
5059
5060  ;;
5061esac
5062fi
5063PRINTF=$ac_cv_path_PRINTF
5064if test -n "$PRINTF"; then
5065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5066$as_echo "$PRINTF" >&6; }
5067else
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
5070fi
5071
5072
5073  test -n "$PRINTF" && break
5074done
5075
5076
5077    if test "x$PRINTF" = x; then
5078        if test "xprintf" = x; then
5079          PROG_NAME=printf
5080        else
5081          PROG_NAME=printf
5082        fi
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5084$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5085        as_fn_error $? "Cannot continue" "$LINENO" 5
5086    fi
5087
5088
5089
5090    for ac_prog in pwd
5091do
5092  # Extract the first word of "$ac_prog", so it can be a program name with args.
5093set dummy $ac_prog; ac_word=$2
5094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095$as_echo_n "checking for $ac_word... " >&6; }
5096if ${ac_cv_path_THEPWDCMD+:} false; then :
5097  $as_echo_n "(cached) " >&6
5098else
5099  case $THEPWDCMD in
5100  [\\/]* | ?:[\\/]*)
5101  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5102  ;;
5103  *)
5104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5105for as_dir in $PATH
5106do
5107  IFS=$as_save_IFS
5108  test -z "$as_dir" && as_dir=.
5109    for ac_exec_ext in '' $ac_executable_extensions; do
5110  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5111    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5113    break 2
5114  fi
5115done
5116  done
5117IFS=$as_save_IFS
5118
5119  ;;
5120esac
5121fi
5122THEPWDCMD=$ac_cv_path_THEPWDCMD
5123if test -n "$THEPWDCMD"; then
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5125$as_echo "$THEPWDCMD" >&6; }
5126else
5127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5128$as_echo "no" >&6; }
5129fi
5130
5131
5132  test -n "$THEPWDCMD" && break
5133done
5134
5135
5136    if test "x$THEPWDCMD" = x; then
5137        if test "xpwd" = x; then
5138          PROG_NAME=thepwdcmd
5139        else
5140          PROG_NAME=pwd
5141        fi
5142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5143$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5144        as_fn_error $? "Cannot continue" "$LINENO" 5
5145    fi
5146
5147
5148
5149    for ac_prog in rm
5150do
5151  # Extract the first word of "$ac_prog", so it can be a program name with args.
5152set dummy $ac_prog; ac_word=$2
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5154$as_echo_n "checking for $ac_word... " >&6; }
5155if ${ac_cv_path_RM+:} false; then :
5156  $as_echo_n "(cached) " >&6
5157else
5158  case $RM in
5159  [\\/]* | ?:[\\/]*)
5160  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5161  ;;
5162  *)
5163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166  IFS=$as_save_IFS
5167  test -z "$as_dir" && as_dir=.
5168    for ac_exec_ext in '' $ac_executable_extensions; do
5169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5172    break 2
5173  fi
5174done
5175  done
5176IFS=$as_save_IFS
5177
5178  ;;
5179esac
5180fi
5181RM=$ac_cv_path_RM
5182if test -n "$RM"; then
5183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5184$as_echo "$RM" >&6; }
5185else
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191  test -n "$RM" && break
5192done
5193
5194
5195    if test "x$RM" = x; then
5196        if test "xrm" = x; then
5197          PROG_NAME=rm
5198        else
5199          PROG_NAME=rm
5200        fi
5201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5202$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5203        as_fn_error $? "Cannot continue" "$LINENO" 5
5204    fi
5205
5206
5207
5208    for ac_prog in sh
5209do
5210  # Extract the first word of "$ac_prog", so it can be a program name with args.
5211set dummy $ac_prog; ac_word=$2
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213$as_echo_n "checking for $ac_word... " >&6; }
5214if ${ac_cv_path_SH+:} false; then :
5215  $as_echo_n "(cached) " >&6
5216else
5217  case $SH in
5218  [\\/]* | ?:[\\/]*)
5219  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5220  ;;
5221  *)
5222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225  IFS=$as_save_IFS
5226  test -z "$as_dir" && as_dir=.
5227    for ac_exec_ext in '' $ac_executable_extensions; do
5228  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231    break 2
5232  fi
5233done
5234  done
5235IFS=$as_save_IFS
5236
5237  ;;
5238esac
5239fi
5240SH=$ac_cv_path_SH
5241if test -n "$SH"; then
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5243$as_echo "$SH" >&6; }
5244else
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250  test -n "$SH" && break
5251done
5252
5253
5254    if test "x$SH" = x; then
5255        if test "xsh" = x; then
5256          PROG_NAME=sh
5257        else
5258          PROG_NAME=sh
5259        fi
5260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5262        as_fn_error $? "Cannot continue" "$LINENO" 5
5263    fi
5264
5265
5266
5267    for ac_prog in sort
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if ${ac_cv_path_SORT+:} false; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $SORT in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5288    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299SORT=$ac_cv_path_SORT
5300if test -n "$SORT"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5302$as_echo "$SORT" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$SORT" && break
5310done
5311
5312
5313    if test "x$SORT" = x; then
5314        if test "xsort" = x; then
5315          PROG_NAME=sort
5316        else
5317          PROG_NAME=sort
5318        fi
5319        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5320$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5321        as_fn_error $? "Cannot continue" "$LINENO" 5
5322    fi
5323
5324
5325
5326    for ac_prog in tail
5327do
5328  # Extract the first word of "$ac_prog", so it can be a program name with args.
5329set dummy $ac_prog; ac_word=$2
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5331$as_echo_n "checking for $ac_word... " >&6; }
5332if ${ac_cv_path_TAIL+:} false; then :
5333  $as_echo_n "(cached) " >&6
5334else
5335  case $TAIL in
5336  [\\/]* | ?:[\\/]*)
5337  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5338  ;;
5339  *)
5340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5341for as_dir in $PATH
5342do
5343  IFS=$as_save_IFS
5344  test -z "$as_dir" && as_dir=.
5345    for ac_exec_ext in '' $ac_executable_extensions; do
5346  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5347    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5349    break 2
5350  fi
5351done
5352  done
5353IFS=$as_save_IFS
5354
5355  ;;
5356esac
5357fi
5358TAIL=$ac_cv_path_TAIL
5359if test -n "$TAIL"; then
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5361$as_echo "$TAIL" >&6; }
5362else
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5364$as_echo "no" >&6; }
5365fi
5366
5367
5368  test -n "$TAIL" && break
5369done
5370
5371
5372    if test "x$TAIL" = x; then
5373        if test "xtail" = x; then
5374          PROG_NAME=tail
5375        else
5376          PROG_NAME=tail
5377        fi
5378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5379$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5380        as_fn_error $? "Cannot continue" "$LINENO" 5
5381    fi
5382
5383
5384
5385    for ac_prog in tar
5386do
5387  # Extract the first word of "$ac_prog", so it can be a program name with args.
5388set dummy $ac_prog; ac_word=$2
5389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5390$as_echo_n "checking for $ac_word... " >&6; }
5391if ${ac_cv_path_TAR+:} false; then :
5392  $as_echo_n "(cached) " >&6
5393else
5394  case $TAR in
5395  [\\/]* | ?:[\\/]*)
5396  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5397  ;;
5398  *)
5399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5400for as_dir in $PATH
5401do
5402  IFS=$as_save_IFS
5403  test -z "$as_dir" && as_dir=.
5404    for ac_exec_ext in '' $ac_executable_extensions; do
5405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5406    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5408    break 2
5409  fi
5410done
5411  done
5412IFS=$as_save_IFS
5413
5414  ;;
5415esac
5416fi
5417TAR=$ac_cv_path_TAR
5418if test -n "$TAR"; then
5419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5420$as_echo "$TAR" >&6; }
5421else
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5423$as_echo "no" >&6; }
5424fi
5425
5426
5427  test -n "$TAR" && break
5428done
5429
5430
5431    if test "x$TAR" = x; then
5432        if test "xtar" = x; then
5433          PROG_NAME=tar
5434        else
5435          PROG_NAME=tar
5436        fi
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5438$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5439        as_fn_error $? "Cannot continue" "$LINENO" 5
5440    fi
5441
5442
5443
5444    for ac_prog in tee
5445do
5446  # Extract the first word of "$ac_prog", so it can be a program name with args.
5447set dummy $ac_prog; ac_word=$2
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
5450if ${ac_cv_path_TEE+:} false; then :
5451  $as_echo_n "(cached) " >&6
5452else
5453  case $TEE in
5454  [\\/]* | ?:[\\/]*)
5455  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5456  ;;
5457  *)
5458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5459for as_dir in $PATH
5460do
5461  IFS=$as_save_IFS
5462  test -z "$as_dir" && as_dir=.
5463    for ac_exec_ext in '' $ac_executable_extensions; do
5464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5465    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5467    break 2
5468  fi
5469done
5470  done
5471IFS=$as_save_IFS
5472
5473  ;;
5474esac
5475fi
5476TEE=$ac_cv_path_TEE
5477if test -n "$TEE"; then
5478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5479$as_echo "$TEE" >&6; }
5480else
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5482$as_echo "no" >&6; }
5483fi
5484
5485
5486  test -n "$TEE" && break
5487done
5488
5489
5490    if test "x$TEE" = x; then
5491        if test "xtee" = x; then
5492          PROG_NAME=tee
5493        else
5494          PROG_NAME=tee
5495        fi
5496        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5497$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5498        as_fn_error $? "Cannot continue" "$LINENO" 5
5499    fi
5500
5501
5502
5503    for ac_prog in touch
5504do
5505  # Extract the first word of "$ac_prog", so it can be a program name with args.
5506set dummy $ac_prog; ac_word=$2
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5508$as_echo_n "checking for $ac_word... " >&6; }
5509if ${ac_cv_path_TOUCH+:} false; then :
5510  $as_echo_n "(cached) " >&6
5511else
5512  case $TOUCH in
5513  [\\/]* | ?:[\\/]*)
5514  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5515  ;;
5516  *)
5517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5518for as_dir in $PATH
5519do
5520  IFS=$as_save_IFS
5521  test -z "$as_dir" && as_dir=.
5522    for ac_exec_ext in '' $ac_executable_extensions; do
5523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5524    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5526    break 2
5527  fi
5528done
5529  done
5530IFS=$as_save_IFS
5531
5532  ;;
5533esac
5534fi
5535TOUCH=$ac_cv_path_TOUCH
5536if test -n "$TOUCH"; then
5537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5538$as_echo "$TOUCH" >&6; }
5539else
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5541$as_echo "no" >&6; }
5542fi
5543
5544
5545  test -n "$TOUCH" && break
5546done
5547
5548
5549    if test "x$TOUCH" = x; then
5550        if test "xtouch" = x; then
5551          PROG_NAME=touch
5552        else
5553          PROG_NAME=touch
5554        fi
5555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5556$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5557        as_fn_error $? "Cannot continue" "$LINENO" 5
5558    fi
5559
5560
5561
5562    for ac_prog in tr
5563do
5564  # Extract the first word of "$ac_prog", so it can be a program name with args.
5565set dummy $ac_prog; ac_word=$2
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5567$as_echo_n "checking for $ac_word... " >&6; }
5568if ${ac_cv_path_TR+:} false; then :
5569  $as_echo_n "(cached) " >&6
5570else
5571  case $TR in
5572  [\\/]* | ?:[\\/]*)
5573  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5574  ;;
5575  *)
5576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5577for as_dir in $PATH
5578do
5579  IFS=$as_save_IFS
5580  test -z "$as_dir" && as_dir=.
5581    for ac_exec_ext in '' $ac_executable_extensions; do
5582  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5583    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5585    break 2
5586  fi
5587done
5588  done
5589IFS=$as_save_IFS
5590
5591  ;;
5592esac
5593fi
5594TR=$ac_cv_path_TR
5595if test -n "$TR"; then
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5597$as_echo "$TR" >&6; }
5598else
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600$as_echo "no" >&6; }
5601fi
5602
5603
5604  test -n "$TR" && break
5605done
5606
5607
5608    if test "x$TR" = x; then
5609        if test "xtr" = x; then
5610          PROG_NAME=tr
5611        else
5612          PROG_NAME=tr
5613        fi
5614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5615$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5616        as_fn_error $? "Cannot continue" "$LINENO" 5
5617    fi
5618
5619
5620
5621    for ac_prog in uname
5622do
5623  # Extract the first word of "$ac_prog", so it can be a program name with args.
5624set dummy $ac_prog; ac_word=$2
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5626$as_echo_n "checking for $ac_word... " >&6; }
5627if ${ac_cv_path_UNAME+:} false; then :
5628  $as_echo_n "(cached) " >&6
5629else
5630  case $UNAME in
5631  [\\/]* | ?:[\\/]*)
5632  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5633  ;;
5634  *)
5635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638  IFS=$as_save_IFS
5639  test -z "$as_dir" && as_dir=.
5640    for ac_exec_ext in '' $ac_executable_extensions; do
5641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5642    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644    break 2
5645  fi
5646done
5647  done
5648IFS=$as_save_IFS
5649
5650  ;;
5651esac
5652fi
5653UNAME=$ac_cv_path_UNAME
5654if test -n "$UNAME"; then
5655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5656$as_echo "$UNAME" >&6; }
5657else
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663  test -n "$UNAME" && break
5664done
5665
5666
5667    if test "x$UNAME" = x; then
5668        if test "xuname" = x; then
5669          PROG_NAME=uname
5670        else
5671          PROG_NAME=uname
5672        fi
5673        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5674$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5675        as_fn_error $? "Cannot continue" "$LINENO" 5
5676    fi
5677
5678
5679
5680    for ac_prog in uniq
5681do
5682  # Extract the first word of "$ac_prog", so it can be a program name with args.
5683set dummy $ac_prog; ac_word=$2
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5685$as_echo_n "checking for $ac_word... " >&6; }
5686if ${ac_cv_path_UNIQ+:} false; then :
5687  $as_echo_n "(cached) " >&6
5688else
5689  case $UNIQ in
5690  [\\/]* | ?:[\\/]*)
5691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5692  ;;
5693  *)
5694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697  IFS=$as_save_IFS
5698  test -z "$as_dir" && as_dir=.
5699    for ac_exec_ext in '' $ac_executable_extensions; do
5700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703    break 2
5704  fi
5705done
5706  done
5707IFS=$as_save_IFS
5708
5709  ;;
5710esac
5711fi
5712UNIQ=$ac_cv_path_UNIQ
5713if test -n "$UNIQ"; then
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5715$as_echo "$UNIQ" >&6; }
5716else
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
5719fi
5720
5721
5722  test -n "$UNIQ" && break
5723done
5724
5725
5726    if test "x$UNIQ" = x; then
5727        if test "xuniq" = x; then
5728          PROG_NAME=uniq
5729        else
5730          PROG_NAME=uniq
5731        fi
5732        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5733$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5734        as_fn_error $? "Cannot continue" "$LINENO" 5
5735    fi
5736
5737
5738
5739    for ac_prog in wc
5740do
5741  # Extract the first word of "$ac_prog", so it can be a program name with args.
5742set dummy $ac_prog; ac_word=$2
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744$as_echo_n "checking for $ac_word... " >&6; }
5745if ${ac_cv_path_WC+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  case $WC in
5749  [\\/]* | ?:[\\/]*)
5750  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5751  ;;
5752  *)
5753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754for as_dir in $PATH
5755do
5756  IFS=$as_save_IFS
5757  test -z "$as_dir" && as_dir=.
5758    for ac_exec_ext in '' $ac_executable_extensions; do
5759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5760    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762    break 2
5763  fi
5764done
5765  done
5766IFS=$as_save_IFS
5767
5768  ;;
5769esac
5770fi
5771WC=$ac_cv_path_WC
5772if test -n "$WC"; then
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5774$as_echo "$WC" >&6; }
5775else
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778fi
5779
5780
5781  test -n "$WC" && break
5782done
5783
5784
5785    if test "x$WC" = x; then
5786        if test "xwc" = x; then
5787          PROG_NAME=wc
5788        else
5789          PROG_NAME=wc
5790        fi
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5792$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5793        as_fn_error $? "Cannot continue" "$LINENO" 5
5794    fi
5795
5796
5797
5798    for ac_prog in which
5799do
5800  # Extract the first word of "$ac_prog", so it can be a program name with args.
5801set dummy $ac_prog; ac_word=$2
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
5804if ${ac_cv_path_WHICH+:} false; then :
5805  $as_echo_n "(cached) " >&6
5806else
5807  case $WHICH in
5808  [\\/]* | ?:[\\/]*)
5809  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5810  ;;
5811  *)
5812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815  IFS=$as_save_IFS
5816  test -z "$as_dir" && as_dir=.
5817    for ac_exec_ext in '' $ac_executable_extensions; do
5818  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5819    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821    break 2
5822  fi
5823done
5824  done
5825IFS=$as_save_IFS
5826
5827  ;;
5828esac
5829fi
5830WHICH=$ac_cv_path_WHICH
5831if test -n "$WHICH"; then
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5833$as_echo "$WHICH" >&6; }
5834else
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840  test -n "$WHICH" && break
5841done
5842
5843
5844    if test "x$WHICH" = x; then
5845        if test "xwhich" = x; then
5846          PROG_NAME=which
5847        else
5848          PROG_NAME=which
5849        fi
5850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5851$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5852        as_fn_error $? "Cannot continue" "$LINENO" 5
5853    fi
5854
5855
5856
5857    for ac_prog in xargs
5858do
5859  # Extract the first word of "$ac_prog", so it can be a program name with args.
5860set dummy $ac_prog; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if ${ac_cv_path_XARGS+:} false; then :
5864  $as_echo_n "(cached) " >&6
5865else
5866  case $XARGS in
5867  [\\/]* | ?:[\\/]*)
5868  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5869  ;;
5870  *)
5871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872for as_dir in $PATH
5873do
5874  IFS=$as_save_IFS
5875  test -z "$as_dir" && as_dir=.
5876    for ac_exec_ext in '' $ac_executable_extensions; do
5877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5878    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880    break 2
5881  fi
5882done
5883  done
5884IFS=$as_save_IFS
5885
5886  ;;
5887esac
5888fi
5889XARGS=$ac_cv_path_XARGS
5890if test -n "$XARGS"; then
5891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5892$as_echo "$XARGS" >&6; }
5893else
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895$as_echo "no" >&6; }
5896fi
5897
5898
5899  test -n "$XARGS" && break
5900done
5901
5902
5903    if test "x$XARGS" = x; then
5904        if test "xxargs" = x; then
5905          PROG_NAME=xargs
5906        else
5907          PROG_NAME=xargs
5908        fi
5909        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5911        as_fn_error $? "Cannot continue" "$LINENO" 5
5912    fi
5913
5914
5915
5916# Then required tools that require some special treatment.
5917for ac_prog in gawk mawk nawk awk
5918do
5919  # Extract the first word of "$ac_prog", so it can be a program name with args.
5920set dummy $ac_prog; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if ${ac_cv_prog_AWK+:} false; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  if test -n "$AWK"; then
5927  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5928else
5929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930for as_dir in $PATH
5931do
5932  IFS=$as_save_IFS
5933  test -z "$as_dir" && as_dir=.
5934    for ac_exec_ext in '' $ac_executable_extensions; do
5935  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5936    ac_cv_prog_AWK="$ac_prog"
5937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938    break 2
5939  fi
5940done
5941  done
5942IFS=$as_save_IFS
5943
5944fi
5945fi
5946AWK=$ac_cv_prog_AWK
5947if test -n "$AWK"; then
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5949$as_echo "$AWK" >&6; }
5950else
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952$as_echo "no" >&6; }
5953fi
5954
5955
5956  test -n "$AWK" && break
5957done
5958
5959
5960    if test "x$AWK" = x; then
5961        if test "x" = x; then
5962          PROG_NAME=awk
5963        else
5964          PROG_NAME=
5965        fi
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5967$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5968        as_fn_error $? "Cannot continue" "$LINENO" 5
5969    fi
5970
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5972$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5973if ${ac_cv_path_GREP+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  if test -z "$GREP"; then
5977  ac_path_GREP_found=false
5978  # Loop through the user's path and test for each of PROGNAME-LIST
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_prog in grep ggrep; do
5985    for ac_exec_ext in '' $ac_executable_extensions; do
5986      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5987      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5988# Check for GNU ac_path_GREP and select it if it is found.
5989  # Check for GNU $ac_path_GREP
5990case `"$ac_path_GREP" --version 2>&1` in
5991*GNU*)
5992  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5993*)
5994  ac_count=0
5995  $as_echo_n 0123456789 >"conftest.in"
5996  while :
5997  do
5998    cat "conftest.in" "conftest.in" >"conftest.tmp"
5999    mv "conftest.tmp" "conftest.in"
6000    cp "conftest.in" "conftest.nl"
6001    $as_echo 'GREP' >> "conftest.nl"
6002    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6003    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6004    as_fn_arith $ac_count + 1 && ac_count=$as_val
6005    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6006      # Best one so far, save it but keep looking for a better one
6007      ac_cv_path_GREP="$ac_path_GREP"
6008      ac_path_GREP_max=$ac_count
6009    fi
6010    # 10*(2^10) chars as input seems more than enough
6011    test $ac_count -gt 10 && break
6012  done
6013  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6014esac
6015
6016      $ac_path_GREP_found && break 3
6017    done
6018  done
6019  done
6020IFS=$as_save_IFS
6021  if test -z "$ac_cv_path_GREP"; then
6022    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6023  fi
6024else
6025  ac_cv_path_GREP=$GREP
6026fi
6027
6028fi
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6030$as_echo "$ac_cv_path_GREP" >&6; }
6031 GREP="$ac_cv_path_GREP"
6032
6033
6034
6035    if test "x$GREP" = x; then
6036        if test "x" = x; then
6037          PROG_NAME=grep
6038        else
6039          PROG_NAME=
6040        fi
6041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6042$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6043        as_fn_error $? "Cannot continue" "$LINENO" 5
6044    fi
6045
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6047$as_echo_n "checking for egrep... " >&6; }
6048if ${ac_cv_path_EGREP+:} false; then :
6049  $as_echo_n "(cached) " >&6
6050else
6051  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6052   then ac_cv_path_EGREP="$GREP -E"
6053   else
6054     if test -z "$EGREP"; then
6055  ac_path_EGREP_found=false
6056  # Loop through the user's path and test for each of PROGNAME-LIST
6057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6059do
6060  IFS=$as_save_IFS
6061  test -z "$as_dir" && as_dir=.
6062    for ac_prog in egrep; do
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6065      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6066# Check for GNU ac_path_EGREP and select it if it is found.
6067  # Check for GNU $ac_path_EGREP
6068case `"$ac_path_EGREP" --version 2>&1` in
6069*GNU*)
6070  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6071*)
6072  ac_count=0
6073  $as_echo_n 0123456789 >"conftest.in"
6074  while :
6075  do
6076    cat "conftest.in" "conftest.in" >"conftest.tmp"
6077    mv "conftest.tmp" "conftest.in"
6078    cp "conftest.in" "conftest.nl"
6079    $as_echo 'EGREP' >> "conftest.nl"
6080    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6081    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6082    as_fn_arith $ac_count + 1 && ac_count=$as_val
6083    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6084      # Best one so far, save it but keep looking for a better one
6085      ac_cv_path_EGREP="$ac_path_EGREP"
6086      ac_path_EGREP_max=$ac_count
6087    fi
6088    # 10*(2^10) chars as input seems more than enough
6089    test $ac_count -gt 10 && break
6090  done
6091  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6092esac
6093
6094      $ac_path_EGREP_found && break 3
6095    done
6096  done
6097  done
6098IFS=$as_save_IFS
6099  if test -z "$ac_cv_path_EGREP"; then
6100    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6101  fi
6102else
6103  ac_cv_path_EGREP=$EGREP
6104fi
6105
6106   fi
6107fi
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6109$as_echo "$ac_cv_path_EGREP" >&6; }
6110 EGREP="$ac_cv_path_EGREP"
6111
6112
6113
6114    if test "x$EGREP" = x; then
6115        if test "x" = x; then
6116          PROG_NAME=egrep
6117        else
6118          PROG_NAME=
6119        fi
6120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6122        as_fn_error $? "Cannot continue" "$LINENO" 5
6123    fi
6124
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6126$as_echo_n "checking for fgrep... " >&6; }
6127if ${ac_cv_path_FGREP+:} false; then :
6128  $as_echo_n "(cached) " >&6
6129else
6130  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6131   then ac_cv_path_FGREP="$GREP -F"
6132   else
6133     if test -z "$FGREP"; then
6134  ac_path_FGREP_found=false
6135  # Loop through the user's path and test for each of PROGNAME-LIST
6136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6138do
6139  IFS=$as_save_IFS
6140  test -z "$as_dir" && as_dir=.
6141    for ac_prog in fgrep; do
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6144      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6145# Check for GNU ac_path_FGREP and select it if it is found.
6146  # Check for GNU $ac_path_FGREP
6147case `"$ac_path_FGREP" --version 2>&1` in
6148*GNU*)
6149  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6150*)
6151  ac_count=0
6152  $as_echo_n 0123456789 >"conftest.in"
6153  while :
6154  do
6155    cat "conftest.in" "conftest.in" >"conftest.tmp"
6156    mv "conftest.tmp" "conftest.in"
6157    cp "conftest.in" "conftest.nl"
6158    $as_echo 'FGREP' >> "conftest.nl"
6159    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6161    as_fn_arith $ac_count + 1 && ac_count=$as_val
6162    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6163      # Best one so far, save it but keep looking for a better one
6164      ac_cv_path_FGREP="$ac_path_FGREP"
6165      ac_path_FGREP_max=$ac_count
6166    fi
6167    # 10*(2^10) chars as input seems more than enough
6168    test $ac_count -gt 10 && break
6169  done
6170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6171esac
6172
6173      $ac_path_FGREP_found && break 3
6174    done
6175  done
6176  done
6177IFS=$as_save_IFS
6178  if test -z "$ac_cv_path_FGREP"; then
6179    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6180  fi
6181else
6182  ac_cv_path_FGREP=$FGREP
6183fi
6184
6185   fi
6186fi
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6188$as_echo "$ac_cv_path_FGREP" >&6; }
6189 FGREP="$ac_cv_path_FGREP"
6190
6191
6192
6193    if test "x$FGREP" = x; then
6194        if test "x" = x; then
6195          PROG_NAME=fgrep
6196        else
6197          PROG_NAME=
6198        fi
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6200$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6201        as_fn_error $? "Cannot continue" "$LINENO" 5
6202    fi
6203
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6206if ${ac_cv_path_SED+:} false; then :
6207  $as_echo_n "(cached) " >&6
6208else
6209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6210     for ac_i in 1 2 3 4 5 6 7; do
6211       ac_script="$ac_script$as_nl$ac_script"
6212     done
6213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6214     { ac_script=; unset ac_script;}
6215     if test -z "$SED"; then
6216  ac_path_SED_found=false
6217  # Loop through the user's path and test for each of PROGNAME-LIST
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_prog in sed gsed; do
6224    for ac_exec_ext in '' $ac_executable_extensions; do
6225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6226      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6227# Check for GNU ac_path_SED and select it if it is found.
6228  # Check for GNU $ac_path_SED
6229case `"$ac_path_SED" --version 2>&1` in
6230*GNU*)
6231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6232*)
6233  ac_count=0
6234  $as_echo_n 0123456789 >"conftest.in"
6235  while :
6236  do
6237    cat "conftest.in" "conftest.in" >"conftest.tmp"
6238    mv "conftest.tmp" "conftest.in"
6239    cp "conftest.in" "conftest.nl"
6240    $as_echo '' >> "conftest.nl"
6241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6243    as_fn_arith $ac_count + 1 && ac_count=$as_val
6244    if test $ac_count -gt ${ac_path_SED_max-0}; then
6245      # Best one so far, save it but keep looking for a better one
6246      ac_cv_path_SED="$ac_path_SED"
6247      ac_path_SED_max=$ac_count
6248    fi
6249    # 10*(2^10) chars as input seems more than enough
6250    test $ac_count -gt 10 && break
6251  done
6252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6253esac
6254
6255      $ac_path_SED_found && break 3
6256    done
6257  done
6258  done
6259IFS=$as_save_IFS
6260  if test -z "$ac_cv_path_SED"; then
6261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6262  fi
6263else
6264  ac_cv_path_SED=$SED
6265fi
6266
6267fi
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6269$as_echo "$ac_cv_path_SED" >&6; }
6270 SED="$ac_cv_path_SED"
6271  rm -f conftest.sed
6272
6273
6274    if test "x$SED" = x; then
6275        if test "x" = x; then
6276          PROG_NAME=sed
6277        else
6278          PROG_NAME=
6279        fi
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6281$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6282        as_fn_error $? "Cannot continue" "$LINENO" 5
6283    fi
6284
6285
6286for ac_prog in nawk gawk awk
6287do
6288  # Extract the first word of "$ac_prog", so it can be a program name with args.
6289set dummy $ac_prog; ac_word=$2
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
6292if ${ac_cv_path_NAWK+:} false; then :
6293  $as_echo_n "(cached) " >&6
6294else
6295  case $NAWK in
6296  [\\/]* | ?:[\\/]*)
6297  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6298  ;;
6299  *)
6300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303  IFS=$as_save_IFS
6304  test -z "$as_dir" && as_dir=.
6305    for ac_exec_ext in '' $ac_executable_extensions; do
6306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6307    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309    break 2
6310  fi
6311done
6312  done
6313IFS=$as_save_IFS
6314
6315  ;;
6316esac
6317fi
6318NAWK=$ac_cv_path_NAWK
6319if test -n "$NAWK"; then
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6321$as_echo "$NAWK" >&6; }
6322else
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6324$as_echo "no" >&6; }
6325fi
6326
6327
6328  test -n "$NAWK" && break
6329done
6330
6331
6332    if test "x$NAWK" = x; then
6333        if test "x" = x; then
6334          PROG_NAME=nawk
6335        else
6336          PROG_NAME=
6337        fi
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6340        as_fn_error $? "Cannot continue" "$LINENO" 5
6341    fi
6342
6343
6344# Always force rm.
6345RM="$RM -f"
6346
6347# These are not required on all platforms
6348# Extract the first word of "cygpath", so it can be a program name with args.
6349set dummy cygpath; ac_word=$2
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6351$as_echo_n "checking for $ac_word... " >&6; }
6352if ${ac_cv_path_CYGPATH+:} false; then :
6353  $as_echo_n "(cached) " >&6
6354else
6355  case $CYGPATH in
6356  [\\/]* | ?:[\\/]*)
6357  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6358  ;;
6359  *)
6360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361for as_dir in $PATH
6362do
6363  IFS=$as_save_IFS
6364  test -z "$as_dir" && as_dir=.
6365    for ac_exec_ext in '' $ac_executable_extensions; do
6366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6367    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369    break 2
6370  fi
6371done
6372  done
6373IFS=$as_save_IFS
6374
6375  ;;
6376esac
6377fi
6378CYGPATH=$ac_cv_path_CYGPATH
6379if test -n "$CYGPATH"; then
6380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6381$as_echo "$CYGPATH" >&6; }
6382else
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387
6388# Extract the first word of "readlink", so it can be a program name with args.
6389set dummy readlink; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_READLINK+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $READLINK in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6407    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418READLINK=$ac_cv_path_READLINK
6419if test -n "$READLINK"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6421$as_echo "$READLINK" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428# Extract the first word of "df", so it can be a program name with args.
6429set dummy df; ac_word=$2
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431$as_echo_n "checking for $ac_word... " >&6; }
6432if ${ac_cv_path_DF+:} false; then :
6433  $as_echo_n "(cached) " >&6
6434else
6435  case $DF in
6436  [\\/]* | ?:[\\/]*)
6437  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6438  ;;
6439  *)
6440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH
6442do
6443  IFS=$as_save_IFS
6444  test -z "$as_dir" && as_dir=.
6445    for ac_exec_ext in '' $ac_executable_extensions; do
6446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6447    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449    break 2
6450  fi
6451done
6452  done
6453IFS=$as_save_IFS
6454
6455  ;;
6456esac
6457fi
6458DF=$ac_cv_path_DF
6459if test -n "$DF"; then
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6461$as_echo "$DF" >&6; }
6462else
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467
6468# Extract the first word of "SetFile", so it can be a program name with args.
6469set dummy SetFile; ac_word=$2
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6471$as_echo_n "checking for $ac_word... " >&6; }
6472if ${ac_cv_path_SETFILE+:} false; then :
6473  $as_echo_n "(cached) " >&6
6474else
6475  case $SETFILE in
6476  [\\/]* | ?:[\\/]*)
6477  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6478  ;;
6479  *)
6480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481for as_dir in $PATH
6482do
6483  IFS=$as_save_IFS
6484  test -z "$as_dir" && as_dir=.
6485    for ac_exec_ext in '' $ac_executable_extensions; do
6486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6487    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6489    break 2
6490  fi
6491done
6492  done
6493IFS=$as_save_IFS
6494
6495  ;;
6496esac
6497fi
6498SETFILE=$ac_cv_path_SETFILE
6499if test -n "$SETFILE"; then
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6501$as_echo "$SETFILE" >&6; }
6502else
6503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6504$as_echo "no" >&6; }
6505fi
6506
6507
6508
6509
6510# Now we can determine OpenJDK build and target platforms. This is required to
6511# have early on.
6512# Make sure we can run config.sub.
6513$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6514  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6517$as_echo_n "checking build system type... " >&6; }
6518if ${ac_cv_build+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  ac_build_alias=$build_alias
6522test "x$ac_build_alias" = x &&
6523  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6524test "x$ac_build_alias" = x &&
6525  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6526ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6527  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6528
6529fi
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6531$as_echo "$ac_cv_build" >&6; }
6532case $ac_cv_build in
6533*-*-*) ;;
6534*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6535esac
6536build=$ac_cv_build
6537ac_save_IFS=$IFS; IFS='-'
6538set x $ac_cv_build
6539shift
6540build_cpu=$1
6541build_vendor=$2
6542shift; shift
6543# Remember, the first character of IFS is used to create $*,
6544# except with old shells:
6545build_os=$*
6546IFS=$ac_save_IFS
6547case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6548
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6551$as_echo_n "checking host system type... " >&6; }
6552if ${ac_cv_host+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  if test "x$host_alias" = x; then
6556  ac_cv_host=$ac_cv_build
6557else
6558  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6559    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6560fi
6561
6562fi
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6564$as_echo "$ac_cv_host" >&6; }
6565case $ac_cv_host in
6566*-*-*) ;;
6567*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6568esac
6569host=$ac_cv_host
6570ac_save_IFS=$IFS; IFS='-'
6571set x $ac_cv_host
6572shift
6573host_cpu=$1
6574host_vendor=$2
6575shift; shift
6576# Remember, the first character of IFS is used to create $*,
6577# except with old shells:
6578host_os=$*
6579IFS=$ac_save_IFS
6580case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6584$as_echo_n "checking target system type... " >&6; }
6585if ${ac_cv_target+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  if test "x$target_alias" = x; then
6589  ac_cv_target=$ac_cv_host
6590else
6591  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6597$as_echo "$ac_cv_target" >&6; }
6598case $ac_cv_target in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6601esac
6602target=$ac_cv_target
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_target
6605shift
6606target_cpu=$1
6607target_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611target_os=$*
6612IFS=$ac_save_IFS
6613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6614
6615
6616# The aliases save the names the user supplied, while $host etc.
6617# will get canonicalized.
6618test -n "$target_alias" &&
6619  test "$program_prefix$program_suffix$program_transform_name" = \
6620    NONENONEs,x,x, &&
6621  program_prefix=${target_alias}-
6622
6623# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6624# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6625# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6626# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6627# to use the configure naming style.
6628
6629
6630
6631
6632
6633    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6634    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6635    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6636    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6637    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6638    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6639
6640
6641
6642    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6643
6644  case "$build_os" in
6645    *linux*)
6646      VAR_OS=linux
6647      VAR_OS_API=posix
6648      VAR_OS_ENV=linux
6649      ;;
6650    *solaris*)
6651      VAR_OS=solaris
6652      VAR_OS_API=posix
6653      VAR_OS_ENV=solaris
6654      ;;
6655    *darwin*)
6656      VAR_OS=macosx
6657      VAR_OS_API=posix
6658      VAR_OS_ENV=macosx
6659      ;;
6660    *bsd*)
6661      VAR_OS=bsd
6662      VAR_OS_API=posix
6663      VAR_OS_ENV=bsd
6664      ;;
6665    *cygwin*)
6666      VAR_OS=windows
6667      VAR_OS_API=winapi
6668      VAR_OS_ENV=windows.cygwin
6669      ;;
6670    *mingw*)
6671      VAR_OS=windows
6672      VAR_OS_API=winapi
6673      VAR_OS_ENV=windows.msys
6674      ;;
6675    *)
6676      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6677      ;;
6678  esac
6679
6680
6681  # First argument is the cpu name from the trip/quad
6682  case "$build_cpu" in
6683    x86_64)
6684      VAR_CPU=x86_64
6685      VAR_CPU_ARCH=x86
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=little
6688      ;;
6689    i?86)
6690      VAR_CPU=x86
6691      VAR_CPU_ARCH=x86
6692      VAR_CPU_BITS=32
6693      VAR_CPU_ENDIAN=little
6694      ;;
6695    arm*)
6696      VAR_CPU=arm
6697      VAR_CPU_ARCH=arm
6698      VAR_CPU_BITS=32
6699      VAR_CPU_ENDIAN=little
6700      ;;
6701    powerpc)
6702      VAR_CPU=ppc
6703      VAR_CPU_ARCH=ppc
6704      VAR_CPU_BITS=32
6705      VAR_CPU_ENDIAN=big
6706       ;;
6707    powerpc64)
6708      VAR_CPU=ppc64
6709      VAR_CPU_ARCH=ppc
6710      VAR_CPU_BITS=64
6711      VAR_CPU_ENDIAN=big
6712       ;;
6713    sparc)
6714      VAR_CPU=sparc
6715      VAR_CPU_ARCH=sparc
6716      VAR_CPU_BITS=32
6717      VAR_CPU_ENDIAN=big
6718       ;;
6719    sparcv9)
6720      VAR_CPU=sparcv9
6721      VAR_CPU_ARCH=sparc
6722      VAR_CPU_BITS=64
6723      VAR_CPU_ENDIAN=big
6724       ;;
6725    *)
6726      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6727      ;;
6728  esac
6729
6730    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6731    OPENJDK_BUILD_OS="$VAR_OS"
6732    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6733    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6734    OPENJDK_BUILD_CPU="$VAR_CPU"
6735    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6736    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6737    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6738
6739
6740
6741
6742
6743
6744
6745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6746$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6748$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6749
6750    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6751
6752  case "$host_os" in
6753    *linux*)
6754      VAR_OS=linux
6755      VAR_OS_API=posix
6756      VAR_OS_ENV=linux
6757      ;;
6758    *solaris*)
6759      VAR_OS=solaris
6760      VAR_OS_API=posix
6761      VAR_OS_ENV=solaris
6762      ;;
6763    *darwin*)
6764      VAR_OS=macosx
6765      VAR_OS_API=posix
6766      VAR_OS_ENV=macosx
6767      ;;
6768    *bsd*)
6769      VAR_OS=bsd
6770      VAR_OS_API=posix
6771      VAR_OS_ENV=bsd
6772      ;;
6773    *cygwin*)
6774      VAR_OS=windows
6775      VAR_OS_API=winapi
6776      VAR_OS_ENV=windows.cygwin
6777      ;;
6778    *mingw*)
6779      VAR_OS=windows
6780      VAR_OS_API=winapi
6781      VAR_OS_ENV=windows.msys
6782      ;;
6783    *)
6784      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6785      ;;
6786  esac
6787
6788
6789  # First argument is the cpu name from the trip/quad
6790  case "$host_cpu" in
6791    x86_64)
6792      VAR_CPU=x86_64
6793      VAR_CPU_ARCH=x86
6794      VAR_CPU_BITS=64
6795      VAR_CPU_ENDIAN=little
6796      ;;
6797    i?86)
6798      VAR_CPU=x86
6799      VAR_CPU_ARCH=x86
6800      VAR_CPU_BITS=32
6801      VAR_CPU_ENDIAN=little
6802      ;;
6803    arm*)
6804      VAR_CPU=arm
6805      VAR_CPU_ARCH=arm
6806      VAR_CPU_BITS=32
6807      VAR_CPU_ENDIAN=little
6808      ;;
6809    powerpc)
6810      VAR_CPU=ppc
6811      VAR_CPU_ARCH=ppc
6812      VAR_CPU_BITS=32
6813      VAR_CPU_ENDIAN=big
6814       ;;
6815    powerpc64)
6816      VAR_CPU=ppc64
6817      VAR_CPU_ARCH=ppc
6818      VAR_CPU_BITS=64
6819      VAR_CPU_ENDIAN=big
6820       ;;
6821    sparc)
6822      VAR_CPU=sparc
6823      VAR_CPU_ARCH=sparc
6824      VAR_CPU_BITS=32
6825      VAR_CPU_ENDIAN=big
6826       ;;
6827    sparcv9)
6828      VAR_CPU=sparcv9
6829      VAR_CPU_ARCH=sparc
6830      VAR_CPU_BITS=64
6831      VAR_CPU_ENDIAN=big
6832       ;;
6833    *)
6834      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6835      ;;
6836  esac
6837
6838    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6839    OPENJDK_TARGET_OS="$VAR_OS"
6840    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6841    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6842    OPENJDK_TARGET_CPU="$VAR_CPU"
6843    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6844    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6845    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6846
6847
6848
6849
6850
6851
6852
6853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6854$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6856$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6857
6858
6859
6860# Check whether --with-target-bits was given.
6861if test "${with_target_bits+set}" = set; then :
6862  withval=$with_target_bits;
6863fi
6864
6865
6866  # We have three types of compiles:
6867  # native  == normal compilation, target system == build system
6868  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6869  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6870  #
6871  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6872    # We're doing a proper cross-compilation
6873    COMPILE_TYPE="cross"
6874  else
6875    COMPILE_TYPE="native"
6876  fi
6877
6878  if test "x$with_target_bits" != x; then
6879    if test "x$COMPILE_TYPE" = "xcross"; then
6880      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6881    fi
6882
6883    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6884      # A reduced build is requested
6885      COMPILE_TYPE="reduced"
6886      OPENJDK_TARGET_CPU_BITS=32
6887      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6888        OPENJDK_TARGET_CPU=x86
6889      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6890        OPENJDK_TARGET_CPU=sparc
6891      else
6892        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6893      fi
6894    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6895      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
6896    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6897      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6898$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6899    else
6900      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6901    fi
6902  fi
6903
6904
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6906$as_echo_n "checking compilation type... " >&6; }
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6908$as_echo "$COMPILE_TYPE" >&6; }
6909
6910
6911    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6912       REQUIRED_OS_NAME=SunOS
6913       REQUIRED_OS_VERSION=5.10
6914    fi
6915    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6916       REQUIRED_OS_NAME=Linux
6917       REQUIRED_OS_VERSION=2.6
6918    fi
6919    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6920        REQUIRED_OS_NAME=Windows
6921        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6922            REQUIRED_OS_VERSION=5.2
6923        else
6924            REQUIRED_OS_VERSION=5.1
6925        fi
6926    fi
6927    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6928        REQUIRED_OS_NAME=Darwin
6929        REQUIRED_OS_VERSION=11.2
6930    fi
6931
6932
6933
6934
6935
6936    # Also store the legacy naming of the cpu.
6937    # Ie i586 and amd64 instead of x86 and x86_64
6938    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6939    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6940      OPENJDK_TARGET_CPU_LEGACY="i586"
6941    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6942      # On all platforms except MacOSX replace x86_64 with amd64.
6943      OPENJDK_TARGET_CPU_LEGACY="amd64"
6944    fi
6945
6946
6947    # And the second legacy naming of the cpu.
6948    # Ie i386 and amd64 instead of x86 and x86_64.
6949    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6950    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6951      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6952    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6953      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6954    fi
6955
6956
6957    # This is the name of the cpu (but using i386 and amd64 instead of
6958    # x86 and x86_64, respectively), preceeded by a /, to be used when
6959    # locating libraries. On macosx, it's empty, though.
6960    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6961    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6962        OPENJDK_TARGET_CPU_LIBDIR=""
6963    fi
6964
6965
6966    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6967    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6968    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6969    OPENJDK_TARGET_CPU_ISADIR=""
6970    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6971      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6972          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6973      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6974          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6975      fi
6976    fi
6977
6978
6979    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6980    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6981    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6982      # On linux only, we replace x86 with i386.
6983      OPENJDK_TARGET_CPU_OSARCH="i386"
6984    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6985      # On all platforms except macosx, we replace x86_64 with amd64.
6986      OPENJDK_TARGET_CPU_OSARCH="amd64"
6987    fi
6988
6989
6990    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6991    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6992      OPENJDK_TARGET_CPU_JLI="i386"
6993    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6994      # On all platforms except macosx, we replace x86_64 with amd64.
6995      OPENJDK_TARGET_CPU_JLI="amd64"
6996    fi
6997    # Now setup the -D flags for building libjli.
6998    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6999    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7001        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7002      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7003        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7004      fi
7005    fi
7006
7007
7008    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7009    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7010        OPENJDK_TARGET_OS_API_DIR="solaris"
7011    fi
7012    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7013        OPENJDK_TARGET_OS_API_DIR="windows"
7014    fi
7015
7016
7017    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7018        A_LP64="LP64:="
7019        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7020        # unpack200.exe
7021        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7022            ADD_LP64="-D_LP64=1"
7023        fi
7024    fi
7025    LP64=$A_LP64
7026
7027
7028    if test "x$COMPILE_TYPE" = "xcross"; then
7029      # FIXME: ... or should this include reduced builds..?
7030      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7031    else
7032      DEFINE_CROSS_COMPILE_ARCH=""
7033    fi
7034
7035
7036
7037
7038# Continue setting up basic stuff. Most remaining code require fundamental tools.
7039
7040# Locate the directory of this script.
7041SCRIPT="$0"
7042
7043    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7044        # Follow a chain of symbolic links. Use readlink
7045        # where it exists, else fall back to horribly
7046        # complicated shell code.
7047        if test "x$READLINK_TESTED" != yes; then
7048            # On MacOSX there is a readlink tool with a different
7049            # purpose than the GNU readlink tool. Check the found readlink.
7050            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7051            if test "x$ISGNU" = x; then
7052                 # A readlink that we do not know how to use.
7053                 # Are there other non-GNU readlinks out there?
7054                 READLINK_TESTED=yes
7055                 READLINK=
7056            fi
7057        fi
7058
7059        if test "x$READLINK" != x; then
7060            SCRIPT=`$READLINK -f $SCRIPT`
7061        else
7062            # Save the current directory for restoring afterwards
7063            STARTDIR=$PWD
7064            COUNTER=0
7065            sym_link_dir=`$DIRNAME $SCRIPT`
7066            sym_link_file=`$BASENAME $SCRIPT`
7067            # Use the system pwd and not the shell builtin to resolve directory symlinks
7068            cd $sym_link_dir
7069            cd `$THEPWDCMD`
7070            sym_link_dir=`$THEPWDCMD`
7071            # Resolve file symlinks
7072            while test $COUNTER -lt 20; do
7073                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7074                if test "x$ISLINK" == x; then
7075                    # This is not a symbolic link! We are done!
7076                    break
7077                fi
7078                # Again resolve directory symlinks since the target of the just found
7079                # link could be in a different directory
7080                cd `$DIRNAME $ISLINK`
7081                sym_link_dir=`$THEPWDCMD`
7082                sym_link_file=`$BASENAME $ISLINK`
7083                let COUNTER=COUNTER+1
7084            done
7085            cd $STARTDIR
7086            SCRIPT=$sym_link_dir/$sym_link_file
7087        fi
7088    fi
7089
7090AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7091
7092# Where is the source? It is located two levels above the configure script.
7093CURDIR="$PWD"
7094cd "$AUTOCONF_DIR/../.."
7095SRC_ROOT="`$THEPWDCMD`"
7096
7097if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7098  PATH_SEP=";"
7099
7100  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7101  if test $SRC_ROOT_LENGTH -gt 100; then
7102      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7103  fi
7104
7105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7107$as_echo_n "checking cygwin release... " >&6; }
7108    CYGWIN_VERSION=`$UNAME -r`
7109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7110$as_echo "$CYGWIN_VERSION" >&6; }
7111    WINDOWS_ENV_VENDOR='cygwin'
7112    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7113
7114    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7115    if test "x$CYGWIN_VERSION_OK" = x; then
7116      { $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
7117$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;}
7118      as_fn_error $? "Cannot continue" "$LINENO" 5
7119    fi
7120    if test "x$CYGPATH" = x; then
7121        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7122    fi
7123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7124$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7125    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7126    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7127    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7128    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7130$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7131    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7132    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7133    if test "x$test_cygdrive_prefix" = x; then
7134        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7135    fi
7136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7138$as_echo_n "checking msys release... " >&6; }
7139    MSYS_VERSION=`$UNAME -r`
7140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7141$as_echo "$MSYS_VERSION" >&6; }
7142
7143    WINDOWS_ENV_VENDOR='msys'
7144    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7145
7146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7147$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7148    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7149    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7150
7151  windows_path="$MSYS_ROOT_PATH"
7152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7153    unix_path=`$CYGPATH -u "$windows_path"`
7154    MSYS_ROOT_PATH="$unix_path"
7155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7157    MSYS_ROOT_PATH="$unix_path"
7158  fi
7159
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7161$as_echo "$MSYS_ROOT_PATH" >&6; }
7162    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7163  else
7164    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7165  fi
7166
7167  # Test if windows or unix (cygwin/msys) find is first in path.
7168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7169$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7170  FIND_BINARY_OUTPUT=`find --version 2>&1`
7171  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7173$as_echo "unix style" >&6; }
7174  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7176$as_echo "Windows" >&6; }
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7178$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7179    { $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
7180$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7181    as_fn_error $? "Cannot continue" "$LINENO" 5
7182  else
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7184$as_echo "unknown" >&6; }
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7186$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7187  fi
7188
7189else
7190  PATH_SEP=":"
7191fi
7192
7193
7194
7195cd "$CURDIR"
7196
7197
7198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7199
7200  # Input might be given as Windows format, start by converting to
7201  # unix format.
7202  path="$SRC_ROOT"
7203  new_path=`$CYGPATH -u "$path"`
7204
7205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7208  # "foo.exe" is OK but "foo" is an error.
7209  #
7210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7211  # It is also a way to make sure we got the proper file name for the real test later on.
7212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7213  if test "x$test_shortpath" = x; then
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7215$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7216    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7217  fi
7218
7219  # Call helper function which possibly converts this using DOS-style short mode.
7220  # If so, the updated path is stored in $new_path.
7221
7222  input_path="$new_path"
7223  # Check if we need to convert this using DOS-style short mode. If the path
7224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7225  # take no chances and rewrite it.
7226  # Note: m4 eats our [], so we need to use [ and ] instead.
7227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7228  if test "x$has_forbidden_chars" != x; then
7229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7233      # Going to short mode and back again did indeed matter. Since short mode is
7234      # case insensitive, let's make it lowercase to improve readability.
7235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7236      # Now convert it back to Unix-stile (cygpath)
7237      input_path=`$CYGPATH -u "$shortmode_path"`
7238      new_path="$input_path"
7239    fi
7240  fi
7241
7242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7243  if test "x$test_cygdrive_prefix" = x; then
7244    # As a simple fix, exclude /usr/bin since it's not a real path.
7245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7247      # a path prefixed by /cygdrive for fixpath to work.
7248      new_path="$CYGWIN_ROOT_PATH$input_path"
7249    fi
7250  fi
7251
7252
7253  if test "x$path" != "x$new_path"; then
7254    SRC_ROOT="$new_path"
7255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7256$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7257  fi
7258
7259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7260
7261  path="$SRC_ROOT"
7262  has_colon=`$ECHO $path | $GREP ^.:`
7263  new_path="$path"
7264  if test "x$has_colon" = x; then
7265    # Not in mixed or Windows style, start by that.
7266    new_path=`cmd //c echo $path`
7267  fi
7268
7269
7270  input_path="$new_path"
7271  # Check if we need to convert this using DOS-style short mode. If the path
7272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7273  # take no chances and rewrite it.
7274  # Note: m4 eats our [], so we need to use [ and ] instead.
7275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7276  if test "x$has_forbidden_chars" != x; then
7277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7279  fi
7280
7281
7282  windows_path="$new_path"
7283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7284    unix_path=`$CYGPATH -u "$windows_path"`
7285    new_path="$unix_path"
7286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7288    new_path="$unix_path"
7289  fi
7290
7291  if test "x$path" != "x$new_path"; then
7292    SRC_ROOT="$new_path"
7293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7294$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7295  fi
7296
7297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7299
7300  else
7301    # We're on a posix platform. Hooray! :)
7302    path="$SRC_ROOT"
7303
7304    if test ! -f "$path" && test ! -d "$path"; then
7305      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7306    fi
7307
7308    has_space=`$ECHO "$path" | $GREP " "`
7309    if test "x$has_space" != x; then
7310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7311$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7313    fi
7314  fi
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$CURDIR"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    CURDIR="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$CURDIR"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    CURDIR="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$CURDIR"
7422
7423    if test ! -f "$path" && test ! -d "$path"; then
7424      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7425    fi
7426
7427    has_space=`$ECHO "$path" | $GREP " "`
7428    if test "x$has_space" != x; then
7429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7430$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7431      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7432    fi
7433  fi
7434
7435
7436if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7437    # Add extra search paths on solaris for utilities like ar and as etc...
7438    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7439fi
7440
7441# You can force the sys-root if the sys-root encoded into the cross compiler tools
7442# is not correct.
7443
7444# Check whether --with-sys-root was given.
7445if test "${with_sys_root+set}" = set; then :
7446  withval=$with_sys_root;
7447fi
7448
7449
7450if test "x$with_sys_root" != x; then
7451  SYS_ROOT=$with_sys_root
7452else
7453  SYS_ROOT=/
7454fi
7455
7456
7457
7458# Check whether --with-tools-dir was given.
7459if test "${with_tools_dir+set}" = set; then :
7460  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7461fi
7462
7463
7464
7465# Check whether --with-devkit was given.
7466if test "${with_devkit+set}" = set; then :
7467  withval=$with_devkit;
7468    if test "x$with_sys_root" != x; then
7469      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7470    fi
7471    if test "x$with_tools_dir" != x; then
7472      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7473    fi
7474    TOOLS_DIR=$with_devkit/bin
7475    SYS_ROOT=$with_devkit/$host_alias/libc
7476
7477fi
7478
7479
7480
7481
7482# Setup default logging of stdout and stderr to build.log in the output root.
7483BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7484BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7485BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7486
7487
7488
7489
7490
7491# These are needed to be able to create a configuration name (and thus the output directory)
7492
7493###############################################################################
7494#
7495# Check which variant of the JDK that we want to build.
7496# Currently we have:
7497#    normal:   standard edition
7498# but the custom make system may add other variants
7499#
7500# Effectively the JDK variant gives a name to a specific set of
7501# modules to compile into the JDK. In the future, these modules
7502# might even be Jigsaw modules.
7503#
7504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7505$as_echo_n "checking which variant of the JDK to build... " >&6; }
7506
7507# Check whether --with-jdk-variant was given.
7508if test "${with_jdk_variant+set}" = set; then :
7509  withval=$with_jdk_variant;
7510fi
7511
7512
7513if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7514    JDK_VARIANT="normal"
7515else
7516    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7517fi
7518
7519
7520
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7522$as_echo "$JDK_VARIANT" >&6; }
7523
7524
7525
7526###############################################################################
7527#
7528# Check which variants of the JVM that we want to build.
7529# Currently we have:
7530#    server: normal interpreter and a tiered C1/C2 compiler
7531#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7532#    minimal1: reduced form of client with optional VM services and features stripped out
7533#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7534#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7535#    zero: no machine code interpreter, no compiler
7536#    zeroshark: zero interpreter and shark/llvm compiler backend
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7538$as_echo_n "checking which variants of the JVM to build... " >&6; }
7539
7540# Check whether --with-jvm-variants was given.
7541if test "${with_jvm_variants+set}" = set; then :
7542  withval=$with_jvm_variants;
7543fi
7544
7545
7546if test "x$with_jvm_variants" = x; then
7547     with_jvm_variants="server"
7548fi
7549
7550JVM_VARIANTS=",$with_jvm_variants,"
7551TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7552
7553if test "x$TEST_VARIANTS" != "x,"; then
7554   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7555fi
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7557$as_echo "$with_jvm_variants" >&6; }
7558
7559JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7560JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7561JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7562JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7563JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7564JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7565
7566if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7567    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7568        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7569    fi
7570fi
7571if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7572    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7573        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7574    fi
7575fi
7576if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7577    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7578        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7579    fi
7580fi
7581
7582# Replace the commas with AND for use in the build directory name.
7583ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7584COUNT_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/'`
7585if test "x$COUNT_VARIANTS" != "x,1"; then
7586    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7587else
7588    BUILDING_MULTIPLE_JVM_VARIANTS=no
7589fi
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7600   MACOSX_UNIVERSAL="true"
7601fi
7602
7603
7604
7605
7606
7607###############################################################################
7608#
7609# Set the debug level
7610#    release: no debug information, all optimizations, no asserts.
7611#    fastdebug: debug information (-g), all optimizations, all asserts
7612#    slowdebug: debug information (-g), no optimizations, all asserts
7613#
7614DEBUG_LEVEL="release"
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7616$as_echo_n "checking which debug level to use... " >&6; }
7617# Check whether --enable-debug was given.
7618if test "${enable_debug+set}" = set; then :
7619  enableval=$enable_debug;
7620        ENABLE_DEBUG="${enableval}"
7621        DEBUG_LEVEL="fastdebug"
7622
7623else
7624  ENABLE_DEBUG="no"
7625fi
7626
7627
7628
7629# Check whether --with-debug-level was given.
7630if test "${with_debug_level+set}" = set; then :
7631  withval=$with_debug_level;
7632        DEBUG_LEVEL="${withval}"
7633        if test "x$ENABLE_DEBUG" = xyes; then
7634			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7635        fi
7636
7637fi
7638
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7640$as_echo "$DEBUG_LEVEL" >&6; }
7641
7642if test "x$DEBUG_LEVEL" != xrelease && \
7643   test "x$DEBUG_LEVEL" != xfastdebug && \
7644   test "x$DEBUG_LEVEL" != xslowdebug; then
7645   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7646fi
7647
7648
7649###############################################################################
7650#
7651# Setup legacy vars/targets and new vars to deal with different debug levels.
7652#
7653
7654case $DEBUG_LEVEL in
7655      release )
7656          VARIANT="OPT"
7657          FASTDEBUG="false"
7658          DEBUG_CLASSFILES="false"
7659          BUILD_VARIANT_RELEASE=""
7660          HOTSPOT_DEBUG_LEVEL="product"
7661          HOTSPOT_EXPORT="product"
7662           ;;
7663      fastdebug )
7664          VARIANT="DBG"
7665          FASTDEBUG="true"
7666          DEBUG_CLASSFILES="true"
7667          BUILD_VARIANT_RELEASE="-fastdebug"
7668          HOTSPOT_DEBUG_LEVEL="fastdebug"
7669          HOTSPOT_EXPORT="fastdebug"
7670           ;;
7671      slowdebug )
7672          VARIANT="DBG"
7673          FASTDEBUG="false"
7674          DEBUG_CLASSFILES="true"
7675          BUILD_VARIANT_RELEASE="-debug"
7676          HOTSPOT_DEBUG_LEVEL="jvmg"
7677          HOTSPOT_EXPORT="debug"
7678           ;;
7679esac
7680
7681#####
7682# Generate the legacy makefile targets for hotspot.
7683# The hotspot api for selecting the build artifacts, really, needs to be improved.
7684# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7685# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7686# But until then ...
7687HOTSPOT_TARGET=""
7688
7689if test "x$JVM_VARIANT_SERVER" = xtrue; then
7690    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7691fi
7692
7693if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7694    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7695fi
7696
7697if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7698    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7699fi
7700
7701if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7702    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7703fi
7704
7705if test "x$JVM_VARIANT_ZERO" = xtrue; then
7706    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7707fi
7708
7709if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7710    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7711fi
7712
7713HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7714
7715# On Macosx universal binaries are produced, but they only contain
7716# 64 bit intel. This invalidates control of which jvms are built
7717# from configure, but only server is valid anyway. Fix this
7718# when hotspot makefiles are rewritten.
7719if test "x$MACOSX_UNIVERSAL" = xtrue; then
7720    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7721fi
7722
7723#####
7724
7725
7726
7727
7728
7729
7730
7731
7732# With basic setup done, call the custom early hook.
7733
7734
7735# To properly create a configuration name, we need to have the OpenJDK target
7736# and options (variants and debug level) parsed.
7737
7738
7739
7740# Check whether --with-conf-name was given.
7741if test "${with_conf_name+set}" = set; then :
7742  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7743fi
7744
7745
7746# Test from where we are running configure, in or outside of src root.
7747# To enable comparison of directories, CURDIR needs to be symlink free
7748# just like SRC_ROOT already is
7749NOSYM_CURDIR="$CURDIR"
7750
7751    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7752        # Follow a chain of symbolic links. Use readlink
7753        # where it exists, else fall back to horribly
7754        # complicated shell code.
7755        if test "x$READLINK_TESTED" != yes; then
7756            # On MacOSX there is a readlink tool with a different
7757            # purpose than the GNU readlink tool. Check the found readlink.
7758            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7759            if test "x$ISGNU" = x; then
7760                 # A readlink that we do not know how to use.
7761                 # Are there other non-GNU readlinks out there?
7762                 READLINK_TESTED=yes
7763                 READLINK=
7764            fi
7765        fi
7766
7767        if test "x$READLINK" != x; then
7768            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7769        else
7770            # Save the current directory for restoring afterwards
7771            STARTDIR=$PWD
7772            COUNTER=0
7773            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7774            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7775            # Use the system pwd and not the shell builtin to resolve directory symlinks
7776            cd $sym_link_dir
7777            cd `$THEPWDCMD`
7778            sym_link_dir=`$THEPWDCMD`
7779            # Resolve file symlinks
7780            while test $COUNTER -lt 20; do
7781                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7782                if test "x$ISLINK" == x; then
7783                    # This is not a symbolic link! We are done!
7784                    break
7785                fi
7786                # Again resolve directory symlinks since the target of the just found
7787                # link could be in a different directory
7788                cd `$DIRNAME $ISLINK`
7789                sym_link_dir=`$THEPWDCMD`
7790                sym_link_file=`$BASENAME $ISLINK`
7791                let COUNTER=COUNTER+1
7792            done
7793            cd $STARTDIR
7794            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7795        fi
7796    fi
7797
7798if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7799        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7800        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7801    # We are running configure from the src root.
7802    # Create a default ./build/target-variant-debuglevel output root.
7803    if test "x${CONF_NAME}" = x; then
7804        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7805    fi
7806    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7807    $MKDIR -p "$OUTPUT_ROOT"
7808    if test ! -d "$OUTPUT_ROOT"; then
7809        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7810    fi
7811else
7812    # We are running configure from outside of the src dir.
7813    # Then use the current directory as output dir!
7814    # If configuration is situated in normal build directory, just use the build
7815    # directory name as configuration name, otherwise use the complete path.
7816    if test "x${CONF_NAME}" = x; then
7817        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7818    fi
7819    OUTPUT_ROOT="$CURDIR"
7820
7821    # WARNING: This might be a bad thing to do. You need to be sure you want to
7822    # have a configuration in this directory. Do some sanity checks!
7823
7824    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7825      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7826      # other files
7827      files_present=`$LS $OUTPUT_ROOT`
7828      # Configure has already touched config.log and confdefs.h in the current dir when this check
7829      # is performed.
7830      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7831                                             | $TR -d '\n'`
7832      if test "x$filtered_files" != x; then
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7834$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7836$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7837        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7838$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7839        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7840$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7842$as_echo "$as_me: seriously mess up just about everything." >&6;}
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7844$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7846$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7847        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7848      fi
7849    fi
7850fi
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7852$as_echo_n "checking what configuration name to use... " >&6; }
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7854$as_echo "$CONF_NAME" >&6; }
7855
7856
7857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7858
7859  # Input might be given as Windows format, start by converting to
7860  # unix format.
7861  path="$OUTPUT_ROOT"
7862  new_path=`$CYGPATH -u "$path"`
7863
7864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7867  # "foo.exe" is OK but "foo" is an error.
7868  #
7869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7870  # It is also a way to make sure we got the proper file name for the real test later on.
7871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7872  if test "x$test_shortpath" = x; then
7873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7874$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7875    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7876  fi
7877
7878  # Call helper function which possibly converts this using DOS-style short mode.
7879  # If so, the updated path is stored in $new_path.
7880
7881  input_path="$new_path"
7882  # Check if we need to convert this using DOS-style short mode. If the path
7883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7884  # take no chances and rewrite it.
7885  # Note: m4 eats our [], so we need to use [ and ] instead.
7886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7887  if test "x$has_forbidden_chars" != x; then
7888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7892      # Going to short mode and back again did indeed matter. Since short mode is
7893      # case insensitive, let's make it lowercase to improve readability.
7894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7895      # Now convert it back to Unix-stile (cygpath)
7896      input_path=`$CYGPATH -u "$shortmode_path"`
7897      new_path="$input_path"
7898    fi
7899  fi
7900
7901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7902  if test "x$test_cygdrive_prefix" = x; then
7903    # As a simple fix, exclude /usr/bin since it's not a real path.
7904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7906      # a path prefixed by /cygdrive for fixpath to work.
7907      new_path="$CYGWIN_ROOT_PATH$input_path"
7908    fi
7909  fi
7910
7911
7912  if test "x$path" != "x$new_path"; then
7913    OUTPUT_ROOT="$new_path"
7914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7915$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7916  fi
7917
7918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7919
7920  path="$OUTPUT_ROOT"
7921  has_colon=`$ECHO $path | $GREP ^.:`
7922  new_path="$path"
7923  if test "x$has_colon" = x; then
7924    # Not in mixed or Windows style, start by that.
7925    new_path=`cmd //c echo $path`
7926  fi
7927
7928
7929  input_path="$new_path"
7930  # Check if we need to convert this using DOS-style short mode. If the path
7931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7932  # take no chances and rewrite it.
7933  # Note: m4 eats our [], so we need to use [ and ] instead.
7934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7935  if test "x$has_forbidden_chars" != x; then
7936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7938  fi
7939
7940
7941  windows_path="$new_path"
7942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7943    unix_path=`$CYGPATH -u "$windows_path"`
7944    new_path="$unix_path"
7945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7947    new_path="$unix_path"
7948  fi
7949
7950  if test "x$path" != "x$new_path"; then
7951    OUTPUT_ROOT="$new_path"
7952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7953$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7954  fi
7955
7956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7958
7959  else
7960    # We're on a posix platform. Hooray! :)
7961    path="$OUTPUT_ROOT"
7962
7963    if test ! -f "$path" && test ! -d "$path"; then
7964      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7965    fi
7966
7967    has_space=`$ECHO "$path" | $GREP " "`
7968    if test "x$has_space" != x; then
7969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7970$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7971      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7972    fi
7973  fi
7974
7975
7976SPEC=$OUTPUT_ROOT/spec.gmk
7977
7978CONF_NAME=$CONF_NAME
7979
7980OUTPUT_ROOT=$OUTPUT_ROOT
7981
7982
7983# Most of the probed defines are put into config.h
7984ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7985
7986# The spec.gmk file contains all variables for the make system.
7987ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7988
7989# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7990ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7991
7992# The bootcycle-spec.gmk file contains support for boot cycle builds.
7993ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7994
7995# The compare.sh is used to compare the build output to other builds.
7996ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7997
7998# Spec.sh is currently used by compare-objects.sh
7999ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8000
8001# The generated Makefile knows where the spec.gmk is and where the source is.
8002# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8003# which will look for generated configurations
8004ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8005
8006
8007# Save the arguments given to us
8008echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8009
8010
8011# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8012
8013    for ac_prog in apt-get yum port pkgutil pkgadd
8014do
8015  # Extract the first word of "$ac_prog", so it can be a program name with args.
8016set dummy $ac_prog; ac_word=$2
8017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018$as_echo_n "checking for $ac_word... " >&6; }
8019if ${ac_cv_prog_PKGHANDLER+:} false; then :
8020  $as_echo_n "(cached) " >&6
8021else
8022  if test -n "$PKGHANDLER"; then
8023  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8024else
8025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028  IFS=$as_save_IFS
8029  test -z "$as_dir" && as_dir=.
8030    for ac_exec_ext in '' $ac_executable_extensions; do
8031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8032    ac_cv_prog_PKGHANDLER="$ac_prog"
8033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034    break 2
8035  fi
8036done
8037  done
8038IFS=$as_save_IFS
8039
8040fi
8041fi
8042PKGHANDLER=$ac_cv_prog_PKGHANDLER
8043if test -n "$PKGHANDLER"; then
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8045$as_echo "$PKGHANDLER" >&6; }
8046else
8047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
8049fi
8050
8051
8052  test -n "$PKGHANDLER" && break
8053done
8054
8055
8056
8057# Setup tools that requires more complex handling, or that is not needed by the configure script.
8058
8059
8060  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8061  if test "x$MAKE" != x; then
8062    # User has supplied a make, test it.
8063    if test ! -f "$MAKE"; then
8064      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8065    fi
8066
8067  MAKE_CANDIDATE=""$MAKE""
8068  DESCRIPTION="user supplied MAKE=$MAKE"
8069  if test "x$MAKE_CANDIDATE" != x; then
8070    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8071$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8072    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8073    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8074    if test "x$IS_GNU_MAKE" = x; then
8075      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8076$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8077    else
8078      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8079      if test "x$IS_MODERN_MAKE" = x; then
8080        { $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
8081$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;}
8082      else
8083        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8084          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8085            MAKE_EXPECTED_ENV='cygwin'
8086          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8087            MAKE_EXPECTED_ENV='msys'
8088          else
8089            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8090          fi
8091          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8092          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8093        else
8094          # Not relevant for non-Windows
8095          IS_MAKE_CORRECT_ENV=true
8096        fi
8097        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8098          { $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
8099$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;}
8100        else
8101          FOUND_MAKE=$MAKE_CANDIDATE
8102
8103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8104
8105  # First separate the path from the arguments. This will split at the first
8106  # space.
8107  complete="$FOUND_MAKE"
8108  path="${complete%% *}"
8109  tmp="$complete EOL"
8110  arguments="${tmp#* }"
8111
8112  # Input might be given as Windows format, start by converting to
8113  # unix format.
8114  new_path=`$CYGPATH -u "$path"`
8115
8116  # Now try to locate executable using which
8117  new_path=`$WHICH "$new_path" 2> /dev/null`
8118  # bat and cmd files are not always considered executable in cygwin causing which
8119  # to not find them
8120  if test "x$new_path" = x \
8121           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8122           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8123    new_path=`$CYGPATH -u "$path"`
8124  fi
8125  if test "x$new_path" = x; then
8126    # Oops. Which didn't find the executable.
8127    # The splitting of arguments from the executable at a space might have been incorrect,
8128    # since paths with space are more likely in Windows. Give it another try with the whole
8129    # argument.
8130    path="$complete"
8131    arguments="EOL"
8132    new_path=`$CYGPATH -u "$path"`
8133    new_path=`$WHICH "$new_path" 2> /dev/null`
8134    # bat and cmd files are not always considered executable in cygwin causing which
8135    # to not find them
8136    if test "x$new_path" = x \
8137             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8138             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8139      new_path=`$CYGPATH -u "$path"`
8140    fi
8141    if test "x$new_path" = x; then
8142      # It's still not found. Now this is an unrecoverable error.
8143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8145      has_space=`$ECHO "$complete" | $GREP " "`
8146      if test "x$has_space" != x; then
8147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8149      fi
8150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8151    fi
8152  fi
8153
8154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8157  # "foo.exe" is OK but "foo" is an error.
8158  #
8159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8160  # It is also a way to make sure we got the proper file name for the real test later on.
8161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8162  if test "x$test_shortpath" = x; then
8163    # Short path failed, file does not exist as specified.
8164    # Try adding .exe or .cmd
8165    if test -f "${new_path}.exe"; then
8166       input_to_shortpath="${new_path}.exe"
8167    elif test -f "${new_path}.cmd"; then
8168       input_to_shortpath="${new_path}.cmd"
8169    else
8170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8171$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8174      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8175    fi
8176  else
8177    input_to_shortpath="$new_path"
8178  fi
8179
8180  # Call helper function which possibly converts this using DOS-style short mode.
8181  # If so, the updated path is stored in $new_path.
8182  new_path="$input_to_shortpath"
8183
8184  input_path="$input_to_shortpath"
8185  # Check if we need to convert this using DOS-style short mode. If the path
8186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8187  # take no chances and rewrite it.
8188  # Note: m4 eats our [], so we need to use [ and ] instead.
8189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8190  if test "x$has_forbidden_chars" != x; then
8191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8195      # Going to short mode and back again did indeed matter. Since short mode is
8196      # case insensitive, let's make it lowercase to improve readability.
8197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8198      # Now convert it back to Unix-stile (cygpath)
8199      input_path=`$CYGPATH -u "$shortmode_path"`
8200      new_path="$input_path"
8201    fi
8202  fi
8203
8204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8205  if test "x$test_cygdrive_prefix" = x; then
8206    # As a simple fix, exclude /usr/bin since it's not a real path.
8207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8209      # a path prefixed by /cygdrive for fixpath to work.
8210      new_path="$CYGWIN_ROOT_PATH$input_path"
8211    fi
8212  fi
8213
8214  # remove trailing .exe if any
8215  new_path="${new_path/%.exe/}"
8216
8217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8218
8219  # First separate the path from the arguments. This will split at the first
8220  # space.
8221  complete="$FOUND_MAKE"
8222  path="${complete%% *}"
8223  tmp="$complete EOL"
8224  arguments="${tmp#* }"
8225
8226  # Input might be given as Windows format, start by converting to
8227  # unix format.
8228  new_path="$path"
8229
8230  windows_path="$new_path"
8231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8232    unix_path=`$CYGPATH -u "$windows_path"`
8233    new_path="$unix_path"
8234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8236    new_path="$unix_path"
8237  fi
8238
8239
8240  # Now try to locate executable using which
8241  new_path=`$WHICH "$new_path" 2> /dev/null`
8242
8243  if test "x$new_path" = x; then
8244    # Oops. Which didn't find the executable.
8245    # The splitting of arguments from the executable at a space might have been incorrect,
8246    # since paths with space are more likely in Windows. Give it another try with the whole
8247    # argument.
8248    path="$complete"
8249    arguments="EOL"
8250    new_path="$path"
8251
8252  windows_path="$new_path"
8253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8254    unix_path=`$CYGPATH -u "$windows_path"`
8255    new_path="$unix_path"
8256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8258    new_path="$unix_path"
8259  fi
8260
8261
8262    new_path=`$WHICH "$new_path" 2> /dev/null`
8263
8264    if test "x$new_path" = x; then
8265      # It's still not found. Now this is an unrecoverable error.
8266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8267$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8268      has_space=`$ECHO "$complete" | $GREP " "`
8269      if test "x$has_space" != x; then
8270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8272      fi
8273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8274    fi
8275  fi
8276
8277  # Now new_path has a complete unix path to the binary
8278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8279    # Keep paths in /bin as-is, but remove trailing .exe if any
8280    new_path="${new_path/%.exe/}"
8281    # Do not save /bin paths to all_fixpath_prefixes!
8282  else
8283    # Not in mixed or Windows style, start by that.
8284    new_path=`cmd //c echo $new_path`
8285
8286  input_path="$new_path"
8287  # Check if we need to convert this using DOS-style short mode. If the path
8288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8289  # take no chances and rewrite it.
8290  # Note: m4 eats our [], so we need to use [ and ] instead.
8291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8292  if test "x$has_forbidden_chars" != x; then
8293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8295  fi
8296
8297    # Output is in $new_path
8298
8299  windows_path="$new_path"
8300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8301    unix_path=`$CYGPATH -u "$windows_path"`
8302    new_path="$unix_path"
8303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8305    new_path="$unix_path"
8306  fi
8307
8308    # remove trailing .exe if any
8309    new_path="${new_path/%.exe/}"
8310
8311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8313  fi
8314
8315  else
8316    # We're on a posix platform. Hooray! :)
8317    # First separate the path from the arguments. This will split at the first
8318    # space.
8319    complete="$FOUND_MAKE"
8320    path="${complete%% *}"
8321    tmp="$complete EOL"
8322    arguments="${tmp#* }"
8323
8324    # Cannot rely on the command "which" here since it doesn't always work.
8325    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8326    if test -z "$is_absolute_path"; then
8327      # Path to executable is not absolute. Find it.
8328      IFS_save="$IFS"
8329      IFS=:
8330      for p in $PATH; do
8331        if test -f "$p/$path" && test -x "$p/$path"; then
8332          new_path="$p/$path"
8333          break
8334        fi
8335      done
8336      IFS="$IFS_save"
8337    else
8338      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8339$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8340      new_path="$path"
8341    fi
8342
8343    if test "x$new_path" = x; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8345$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8346        has_space=`$ECHO "$complete" | $GREP " "`
8347        if test "x$has_space" != x; then
8348          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8350        fi
8351        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8352      fi
8353  fi
8354
8355      # Now join together the path and the arguments once again
8356      if test "x$arguments" != xEOL; then
8357        new_complete="$new_path ${arguments% *}"
8358      else
8359        new_complete="$new_path"
8360      fi
8361
8362  if test "x$complete" != "x$new_complete"; then
8363      FOUND_MAKE="$new_complete"
8364      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8365$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8366    fi
8367
8368        fi
8369      fi
8370    fi
8371  fi
8372
8373    if test "x$FOUND_MAKE" = x; then
8374      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8375    fi
8376  else
8377    # Try our hardest to locate a correct version of GNU make
8378    for ac_prog in gmake
8379do
8380  # Extract the first word of "$ac_prog", so it can be a program name with args.
8381set dummy $ac_prog; ac_word=$2
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8383$as_echo_n "checking for $ac_word... " >&6; }
8384if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8385  $as_echo_n "(cached) " >&6
8386else
8387  case $CHECK_GMAKE in
8388  [\\/]* | ?:[\\/]*)
8389  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8390  ;;
8391  *)
8392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8393for as_dir in $PATH
8394do
8395  IFS=$as_save_IFS
8396  test -z "$as_dir" && as_dir=.
8397    for ac_exec_ext in '' $ac_executable_extensions; do
8398  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8399    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8401    break 2
8402  fi
8403done
8404  done
8405IFS=$as_save_IFS
8406
8407  ;;
8408esac
8409fi
8410CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8411if test -n "$CHECK_GMAKE"; then
8412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8413$as_echo "$CHECK_GMAKE" >&6; }
8414else
8415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8416$as_echo "no" >&6; }
8417fi
8418
8419
8420  test -n "$CHECK_GMAKE" && break
8421done
8422
8423
8424  MAKE_CANDIDATE=""$CHECK_GMAKE""
8425  DESCRIPTION="gmake in PATH"
8426  if test "x$MAKE_CANDIDATE" != x; then
8427    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8428$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8429    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8430    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8431    if test "x$IS_GNU_MAKE" = x; then
8432      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8433$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8434    else
8435      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8436      if test "x$IS_MODERN_MAKE" = x; then
8437        { $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
8438$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;}
8439      else
8440        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8441          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8442            MAKE_EXPECTED_ENV='cygwin'
8443          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8444            MAKE_EXPECTED_ENV='msys'
8445          else
8446            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8447          fi
8448          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8449          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8450        else
8451          # Not relevant for non-Windows
8452          IS_MAKE_CORRECT_ENV=true
8453        fi
8454        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8455          { $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
8456$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;}
8457        else
8458          FOUND_MAKE=$MAKE_CANDIDATE
8459
8460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8461
8462  # First separate the path from the arguments. This will split at the first
8463  # space.
8464  complete="$FOUND_MAKE"
8465  path="${complete%% *}"
8466  tmp="$complete EOL"
8467  arguments="${tmp#* }"
8468
8469  # Input might be given as Windows format, start by converting to
8470  # unix format.
8471  new_path=`$CYGPATH -u "$path"`
8472
8473  # Now try to locate executable using which
8474  new_path=`$WHICH "$new_path" 2> /dev/null`
8475  # bat and cmd files are not always considered executable in cygwin causing which
8476  # to not find them
8477  if test "x$new_path" = x \
8478           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8479           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8480    new_path=`$CYGPATH -u "$path"`
8481  fi
8482  if test "x$new_path" = x; then
8483    # Oops. Which didn't find the executable.
8484    # The splitting of arguments from the executable at a space might have been incorrect,
8485    # since paths with space are more likely in Windows. Give it another try with the whole
8486    # argument.
8487    path="$complete"
8488    arguments="EOL"
8489    new_path=`$CYGPATH -u "$path"`
8490    new_path=`$WHICH "$new_path" 2> /dev/null`
8491    # bat and cmd files are not always considered executable in cygwin causing which
8492    # to not find them
8493    if test "x$new_path" = x \
8494             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8495             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8496      new_path=`$CYGPATH -u "$path"`
8497    fi
8498    if test "x$new_path" = x; then
8499      # It's still not found. Now this is an unrecoverable error.
8500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8501$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8502      has_space=`$ECHO "$complete" | $GREP " "`
8503      if test "x$has_space" != x; then
8504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8506      fi
8507      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8508    fi
8509  fi
8510
8511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8514  # "foo.exe" is OK but "foo" is an error.
8515  #
8516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8517  # It is also a way to make sure we got the proper file name for the real test later on.
8518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8519  if test "x$test_shortpath" = x; then
8520    # Short path failed, file does not exist as specified.
8521    # Try adding .exe or .cmd
8522    if test -f "${new_path}.exe"; then
8523       input_to_shortpath="${new_path}.exe"
8524    elif test -f "${new_path}.cmd"; then
8525       input_to_shortpath="${new_path}.cmd"
8526    else
8527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8532    fi
8533  else
8534    input_to_shortpath="$new_path"
8535  fi
8536
8537  # Call helper function which possibly converts this using DOS-style short mode.
8538  # If so, the updated path is stored in $new_path.
8539  new_path="$input_to_shortpath"
8540
8541  input_path="$input_to_shortpath"
8542  # Check if we need to convert this using DOS-style short mode. If the path
8543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8544  # take no chances and rewrite it.
8545  # Note: m4 eats our [], so we need to use [ and ] instead.
8546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8547  if test "x$has_forbidden_chars" != x; then
8548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8552      # Going to short mode and back again did indeed matter. Since short mode is
8553      # case insensitive, let's make it lowercase to improve readability.
8554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8555      # Now convert it back to Unix-stile (cygpath)
8556      input_path=`$CYGPATH -u "$shortmode_path"`
8557      new_path="$input_path"
8558    fi
8559  fi
8560
8561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8562  if test "x$test_cygdrive_prefix" = x; then
8563    # As a simple fix, exclude /usr/bin since it's not a real path.
8564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8566      # a path prefixed by /cygdrive for fixpath to work.
8567      new_path="$CYGWIN_ROOT_PATH$input_path"
8568    fi
8569  fi
8570
8571  # remove trailing .exe if any
8572  new_path="${new_path/%.exe/}"
8573
8574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8575
8576  # First separate the path from the arguments. This will split at the first
8577  # space.
8578  complete="$FOUND_MAKE"
8579  path="${complete%% *}"
8580  tmp="$complete EOL"
8581  arguments="${tmp#* }"
8582
8583  # Input might be given as Windows format, start by converting to
8584  # unix format.
8585  new_path="$path"
8586
8587  windows_path="$new_path"
8588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8589    unix_path=`$CYGPATH -u "$windows_path"`
8590    new_path="$unix_path"
8591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8593    new_path="$unix_path"
8594  fi
8595
8596
8597  # Now try to locate executable using which
8598  new_path=`$WHICH "$new_path" 2> /dev/null`
8599
8600  if test "x$new_path" = x; then
8601    # Oops. Which didn't find the executable.
8602    # The splitting of arguments from the executable at a space might have been incorrect,
8603    # since paths with space are more likely in Windows. Give it another try with the whole
8604    # argument.
8605    path="$complete"
8606    arguments="EOL"
8607    new_path="$path"
8608
8609  windows_path="$new_path"
8610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8611    unix_path=`$CYGPATH -u "$windows_path"`
8612    new_path="$unix_path"
8613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8615    new_path="$unix_path"
8616  fi
8617
8618
8619    new_path=`$WHICH "$new_path" 2> /dev/null`
8620
8621    if test "x$new_path" = x; then
8622      # It's still not found. Now this is an unrecoverable error.
8623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8625      has_space=`$ECHO "$complete" | $GREP " "`
8626      if test "x$has_space" != x; then
8627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8629      fi
8630      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8631    fi
8632  fi
8633
8634  # Now new_path has a complete unix path to the binary
8635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8636    # Keep paths in /bin as-is, but remove trailing .exe if any
8637    new_path="${new_path/%.exe/}"
8638    # Do not save /bin paths to all_fixpath_prefixes!
8639  else
8640    # Not in mixed or Windows style, start by that.
8641    new_path=`cmd //c echo $new_path`
8642
8643  input_path="$new_path"
8644  # Check if we need to convert this using DOS-style short mode. If the path
8645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8646  # take no chances and rewrite it.
8647  # Note: m4 eats our [], so we need to use [ and ] instead.
8648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8649  if test "x$has_forbidden_chars" != x; then
8650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8652  fi
8653
8654    # Output is in $new_path
8655
8656  windows_path="$new_path"
8657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8658    unix_path=`$CYGPATH -u "$windows_path"`
8659    new_path="$unix_path"
8660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8662    new_path="$unix_path"
8663  fi
8664
8665    # remove trailing .exe if any
8666    new_path="${new_path/%.exe/}"
8667
8668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8670  fi
8671
8672  else
8673    # We're on a posix platform. Hooray! :)
8674    # First separate the path from the arguments. This will split at the first
8675    # space.
8676    complete="$FOUND_MAKE"
8677    path="${complete%% *}"
8678    tmp="$complete EOL"
8679    arguments="${tmp#* }"
8680
8681    # Cannot rely on the command "which" here since it doesn't always work.
8682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8683    if test -z "$is_absolute_path"; then
8684      # Path to executable is not absolute. Find it.
8685      IFS_save="$IFS"
8686      IFS=:
8687      for p in $PATH; do
8688        if test -f "$p/$path" && test -x "$p/$path"; then
8689          new_path="$p/$path"
8690          break
8691        fi
8692      done
8693      IFS="$IFS_save"
8694    else
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8696$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8697      new_path="$path"
8698    fi
8699
8700    if test "x$new_path" = x; then
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8703        has_space=`$ECHO "$complete" | $GREP " "`
8704        if test "x$has_space" != x; then
8705          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8706$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8707        fi
8708        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8709      fi
8710  fi
8711
8712      # Now join together the path and the arguments once again
8713      if test "x$arguments" != xEOL; then
8714        new_complete="$new_path ${arguments% *}"
8715      else
8716        new_complete="$new_path"
8717      fi
8718
8719  if test "x$complete" != "x$new_complete"; then
8720      FOUND_MAKE="$new_complete"
8721      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8722$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8723    fi
8724
8725        fi
8726      fi
8727    fi
8728  fi
8729
8730
8731    if test "x$FOUND_MAKE" = x; then
8732      for ac_prog in make
8733do
8734  # Extract the first word of "$ac_prog", so it can be a program name with args.
8735set dummy $ac_prog; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if ${ac_cv_path_CHECK_MAKE+:} false; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  case $CHECK_MAKE in
8742  [\\/]* | ?:[\\/]*)
8743  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8744  ;;
8745  *)
8746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749  IFS=$as_save_IFS
8750  test -z "$as_dir" && as_dir=.
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8753    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761  ;;
8762esac
8763fi
8764CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8765if test -n "$CHECK_MAKE"; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8767$as_echo "$CHECK_MAKE" >&6; }
8768else
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
8771fi
8772
8773
8774  test -n "$CHECK_MAKE" && break
8775done
8776
8777
8778  MAKE_CANDIDATE=""$CHECK_MAKE""
8779  DESCRIPTION="make in PATH"
8780  if test "x$MAKE_CANDIDATE" != x; then
8781    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8782$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8783    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8784    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8785    if test "x$IS_GNU_MAKE" = x; then
8786      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8787$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8788    else
8789      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8790      if test "x$IS_MODERN_MAKE" = x; then
8791        { $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
8792$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;}
8793      else
8794        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8795          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8796            MAKE_EXPECTED_ENV='cygwin'
8797          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8798            MAKE_EXPECTED_ENV='msys'
8799          else
8800            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8801          fi
8802          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8803          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8804        else
8805          # Not relevant for non-Windows
8806          IS_MAKE_CORRECT_ENV=true
8807        fi
8808        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8809          { $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
8810$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;}
8811        else
8812          FOUND_MAKE=$MAKE_CANDIDATE
8813
8814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8815
8816  # First separate the path from the arguments. This will split at the first
8817  # space.
8818  complete="$FOUND_MAKE"
8819  path="${complete%% *}"
8820  tmp="$complete EOL"
8821  arguments="${tmp#* }"
8822
8823  # Input might be given as Windows format, start by converting to
8824  # unix format.
8825  new_path=`$CYGPATH -u "$path"`
8826
8827  # Now try to locate executable using which
8828  new_path=`$WHICH "$new_path" 2> /dev/null`
8829  # bat and cmd files are not always considered executable in cygwin causing which
8830  # to not find them
8831  if test "x$new_path" = x \
8832           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8833           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8834    new_path=`$CYGPATH -u "$path"`
8835  fi
8836  if test "x$new_path" = x; then
8837    # Oops. Which didn't find the executable.
8838    # The splitting of arguments from the executable at a space might have been incorrect,
8839    # since paths with space are more likely in Windows. Give it another try with the whole
8840    # argument.
8841    path="$complete"
8842    arguments="EOL"
8843    new_path=`$CYGPATH -u "$path"`
8844    new_path=`$WHICH "$new_path" 2> /dev/null`
8845    # bat and cmd files are not always considered executable in cygwin causing which
8846    # to not find them
8847    if test "x$new_path" = x \
8848             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8849             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8850      new_path=`$CYGPATH -u "$path"`
8851    fi
8852    if test "x$new_path" = x; then
8853      # It's still not found. Now this is an unrecoverable error.
8854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8856      has_space=`$ECHO "$complete" | $GREP " "`
8857      if test "x$has_space" != x; then
8858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8860      fi
8861      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8862    fi
8863  fi
8864
8865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8868  # "foo.exe" is OK but "foo" is an error.
8869  #
8870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8871  # It is also a way to make sure we got the proper file name for the real test later on.
8872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8873  if test "x$test_shortpath" = x; then
8874    # Short path failed, file does not exist as specified.
8875    # Try adding .exe or .cmd
8876    if test -f "${new_path}.exe"; then
8877       input_to_shortpath="${new_path}.exe"
8878    elif test -f "${new_path}.cmd"; then
8879       input_to_shortpath="${new_path}.cmd"
8880    else
8881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8882$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8885      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8886    fi
8887  else
8888    input_to_shortpath="$new_path"
8889  fi
8890
8891  # Call helper function which possibly converts this using DOS-style short mode.
8892  # If so, the updated path is stored in $new_path.
8893  new_path="$input_to_shortpath"
8894
8895  input_path="$input_to_shortpath"
8896  # Check if we need to convert this using DOS-style short mode. If the path
8897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8898  # take no chances and rewrite it.
8899  # Note: m4 eats our [], so we need to use [ and ] instead.
8900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8901  if test "x$has_forbidden_chars" != x; then
8902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8906      # Going to short mode and back again did indeed matter. Since short mode is
8907      # case insensitive, let's make it lowercase to improve readability.
8908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8909      # Now convert it back to Unix-stile (cygpath)
8910      input_path=`$CYGPATH -u "$shortmode_path"`
8911      new_path="$input_path"
8912    fi
8913  fi
8914
8915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8916  if test "x$test_cygdrive_prefix" = x; then
8917    # As a simple fix, exclude /usr/bin since it's not a real path.
8918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8920      # a path prefixed by /cygdrive for fixpath to work.
8921      new_path="$CYGWIN_ROOT_PATH$input_path"
8922    fi
8923  fi
8924
8925  # remove trailing .exe if any
8926  new_path="${new_path/%.exe/}"
8927
8928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8929
8930  # First separate the path from the arguments. This will split at the first
8931  # space.
8932  complete="$FOUND_MAKE"
8933  path="${complete%% *}"
8934  tmp="$complete EOL"
8935  arguments="${tmp#* }"
8936
8937  # Input might be given as Windows format, start by converting to
8938  # unix format.
8939  new_path="$path"
8940
8941  windows_path="$new_path"
8942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8943    unix_path=`$CYGPATH -u "$windows_path"`
8944    new_path="$unix_path"
8945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8947    new_path="$unix_path"
8948  fi
8949
8950
8951  # Now try to locate executable using which
8952  new_path=`$WHICH "$new_path" 2> /dev/null`
8953
8954  if test "x$new_path" = x; then
8955    # Oops. Which didn't find the executable.
8956    # The splitting of arguments from the executable at a space might have been incorrect,
8957    # since paths with space are more likely in Windows. Give it another try with the whole
8958    # argument.
8959    path="$complete"
8960    arguments="EOL"
8961    new_path="$path"
8962
8963  windows_path="$new_path"
8964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8965    unix_path=`$CYGPATH -u "$windows_path"`
8966    new_path="$unix_path"
8967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8969    new_path="$unix_path"
8970  fi
8971
8972
8973    new_path=`$WHICH "$new_path" 2> /dev/null`
8974
8975    if test "x$new_path" = x; then
8976      # It's still not found. Now this is an unrecoverable error.
8977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8979      has_space=`$ECHO "$complete" | $GREP " "`
8980      if test "x$has_space" != x; then
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8983      fi
8984      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8985    fi
8986  fi
8987
8988  # Now new_path has a complete unix path to the binary
8989  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8990    # Keep paths in /bin as-is, but remove trailing .exe if any
8991    new_path="${new_path/%.exe/}"
8992    # Do not save /bin paths to all_fixpath_prefixes!
8993  else
8994    # Not in mixed or Windows style, start by that.
8995    new_path=`cmd //c echo $new_path`
8996
8997  input_path="$new_path"
8998  # Check if we need to convert this using DOS-style short mode. If the path
8999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9000  # take no chances and rewrite it.
9001  # Note: m4 eats our [], so we need to use [ and ] instead.
9002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9003  if test "x$has_forbidden_chars" != x; then
9004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9006  fi
9007
9008    # Output is in $new_path
9009
9010  windows_path="$new_path"
9011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9012    unix_path=`$CYGPATH -u "$windows_path"`
9013    new_path="$unix_path"
9014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9016    new_path="$unix_path"
9017  fi
9018
9019    # remove trailing .exe if any
9020    new_path="${new_path/%.exe/}"
9021
9022    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9023    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9024  fi
9025
9026  else
9027    # We're on a posix platform. Hooray! :)
9028    # First separate the path from the arguments. This will split at the first
9029    # space.
9030    complete="$FOUND_MAKE"
9031    path="${complete%% *}"
9032    tmp="$complete EOL"
9033    arguments="${tmp#* }"
9034
9035    # Cannot rely on the command "which" here since it doesn't always work.
9036    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9037    if test -z "$is_absolute_path"; then
9038      # Path to executable is not absolute. Find it.
9039      IFS_save="$IFS"
9040      IFS=:
9041      for p in $PATH; do
9042        if test -f "$p/$path" && test -x "$p/$path"; then
9043          new_path="$p/$path"
9044          break
9045        fi
9046      done
9047      IFS="$IFS_save"
9048    else
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9050$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9051      new_path="$path"
9052    fi
9053
9054    if test "x$new_path" = x; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9057        has_space=`$ECHO "$complete" | $GREP " "`
9058        if test "x$has_space" != x; then
9059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9061        fi
9062        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9063      fi
9064  fi
9065
9066      # Now join together the path and the arguments once again
9067      if test "x$arguments" != xEOL; then
9068        new_complete="$new_path ${arguments% *}"
9069      else
9070        new_complete="$new_path"
9071      fi
9072
9073  if test "x$complete" != "x$new_complete"; then
9074      FOUND_MAKE="$new_complete"
9075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9076$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9077    fi
9078
9079        fi
9080      fi
9081    fi
9082  fi
9083
9084    fi
9085
9086    if test "x$FOUND_MAKE" = x; then
9087      if test "x$TOOLS_DIR" != x; then
9088        # We have a tools-dir, check that as well before giving up.
9089        OLD_PATH=$PATH
9090        PATH=$TOOLS_DIR:$PATH
9091        for ac_prog in gmake
9092do
9093  # Extract the first word of "$ac_prog", so it can be a program name with args.
9094set dummy $ac_prog; ac_word=$2
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9096$as_echo_n "checking for $ac_word... " >&6; }
9097if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9098  $as_echo_n "(cached) " >&6
9099else
9100  case $CHECK_TOOLSDIR_GMAKE in
9101  [\\/]* | ?:[\\/]*)
9102  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9103  ;;
9104  *)
9105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9106for as_dir in $PATH
9107do
9108  IFS=$as_save_IFS
9109  test -z "$as_dir" && as_dir=.
9110    for ac_exec_ext in '' $ac_executable_extensions; do
9111  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9112    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9114    break 2
9115  fi
9116done
9117  done
9118IFS=$as_save_IFS
9119
9120  ;;
9121esac
9122fi
9123CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9124if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9126$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9127else
9128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9129$as_echo "no" >&6; }
9130fi
9131
9132
9133  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9134done
9135
9136
9137  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9138  DESCRIPTION="gmake in tools-dir"
9139  if test "x$MAKE_CANDIDATE" != x; then
9140    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9141$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9142    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9143    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9144    if test "x$IS_GNU_MAKE" = x; then
9145      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9146$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9147    else
9148      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9149      if test "x$IS_MODERN_MAKE" = x; then
9150        { $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
9151$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;}
9152      else
9153        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9154          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9155            MAKE_EXPECTED_ENV='cygwin'
9156          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9157            MAKE_EXPECTED_ENV='msys'
9158          else
9159            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9160          fi
9161          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9162          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9163        else
9164          # Not relevant for non-Windows
9165          IS_MAKE_CORRECT_ENV=true
9166        fi
9167        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9168          { $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
9169$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;}
9170        else
9171          FOUND_MAKE=$MAKE_CANDIDATE
9172
9173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9174
9175  # First separate the path from the arguments. This will split at the first
9176  # space.
9177  complete="$FOUND_MAKE"
9178  path="${complete%% *}"
9179  tmp="$complete EOL"
9180  arguments="${tmp#* }"
9181
9182  # Input might be given as Windows format, start by converting to
9183  # unix format.
9184  new_path=`$CYGPATH -u "$path"`
9185
9186  # Now try to locate executable using which
9187  new_path=`$WHICH "$new_path" 2> /dev/null`
9188  # bat and cmd files are not always considered executable in cygwin causing which
9189  # to not find them
9190  if test "x$new_path" = x \
9191           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9192           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9193    new_path=`$CYGPATH -u "$path"`
9194  fi
9195  if test "x$new_path" = x; then
9196    # Oops. Which didn't find the executable.
9197    # The splitting of arguments from the executable at a space might have been incorrect,
9198    # since paths with space are more likely in Windows. Give it another try with the whole
9199    # argument.
9200    path="$complete"
9201    arguments="EOL"
9202    new_path=`$CYGPATH -u "$path"`
9203    new_path=`$WHICH "$new_path" 2> /dev/null`
9204    # bat and cmd files are not always considered executable in cygwin causing which
9205    # to not find them
9206    if test "x$new_path" = x \
9207             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9208             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9209      new_path=`$CYGPATH -u "$path"`
9210    fi
9211    if test "x$new_path" = x; then
9212      # It's still not found. Now this is an unrecoverable error.
9213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9214$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9215      has_space=`$ECHO "$complete" | $GREP " "`
9216      if test "x$has_space" != x; then
9217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9219      fi
9220      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9221    fi
9222  fi
9223
9224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9227  # "foo.exe" is OK but "foo" is an error.
9228  #
9229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9230  # It is also a way to make sure we got the proper file name for the real test later on.
9231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9232  if test "x$test_shortpath" = x; then
9233    # Short path failed, file does not exist as specified.
9234    # Try adding .exe or .cmd
9235    if test -f "${new_path}.exe"; then
9236       input_to_shortpath="${new_path}.exe"
9237    elif test -f "${new_path}.cmd"; then
9238       input_to_shortpath="${new_path}.cmd"
9239    else
9240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9241$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9242      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9243$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9244      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9245    fi
9246  else
9247    input_to_shortpath="$new_path"
9248  fi
9249
9250  # Call helper function which possibly converts this using DOS-style short mode.
9251  # If so, the updated path is stored in $new_path.
9252  new_path="$input_to_shortpath"
9253
9254  input_path="$input_to_shortpath"
9255  # Check if we need to convert this using DOS-style short mode. If the path
9256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9257  # take no chances and rewrite it.
9258  # Note: m4 eats our [], so we need to use [ and ] instead.
9259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9260  if test "x$has_forbidden_chars" != x; then
9261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9265      # Going to short mode and back again did indeed matter. Since short mode is
9266      # case insensitive, let's make it lowercase to improve readability.
9267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9268      # Now convert it back to Unix-stile (cygpath)
9269      input_path=`$CYGPATH -u "$shortmode_path"`
9270      new_path="$input_path"
9271    fi
9272  fi
9273
9274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9275  if test "x$test_cygdrive_prefix" = x; then
9276    # As a simple fix, exclude /usr/bin since it's not a real path.
9277    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9279      # a path prefixed by /cygdrive for fixpath to work.
9280      new_path="$CYGWIN_ROOT_PATH$input_path"
9281    fi
9282  fi
9283
9284  # remove trailing .exe if any
9285  new_path="${new_path/%.exe/}"
9286
9287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9288
9289  # First separate the path from the arguments. This will split at the first
9290  # space.
9291  complete="$FOUND_MAKE"
9292  path="${complete%% *}"
9293  tmp="$complete EOL"
9294  arguments="${tmp#* }"
9295
9296  # Input might be given as Windows format, start by converting to
9297  # unix format.
9298  new_path="$path"
9299
9300  windows_path="$new_path"
9301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9302    unix_path=`$CYGPATH -u "$windows_path"`
9303    new_path="$unix_path"
9304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9306    new_path="$unix_path"
9307  fi
9308
9309
9310  # Now try to locate executable using which
9311  new_path=`$WHICH "$new_path" 2> /dev/null`
9312
9313  if test "x$new_path" = x; then
9314    # Oops. Which didn't find the executable.
9315    # The splitting of arguments from the executable at a space might have been incorrect,
9316    # since paths with space are more likely in Windows. Give it another try with the whole
9317    # argument.
9318    path="$complete"
9319    arguments="EOL"
9320    new_path="$path"
9321
9322  windows_path="$new_path"
9323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9324    unix_path=`$CYGPATH -u "$windows_path"`
9325    new_path="$unix_path"
9326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9328    new_path="$unix_path"
9329  fi
9330
9331
9332    new_path=`$WHICH "$new_path" 2> /dev/null`
9333
9334    if test "x$new_path" = x; then
9335      # It's still not found. Now this is an unrecoverable error.
9336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9337$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9338      has_space=`$ECHO "$complete" | $GREP " "`
9339      if test "x$has_space" != x; then
9340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9342      fi
9343      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9344    fi
9345  fi
9346
9347  # Now new_path has a complete unix path to the binary
9348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9349    # Keep paths in /bin as-is, but remove trailing .exe if any
9350    new_path="${new_path/%.exe/}"
9351    # Do not save /bin paths to all_fixpath_prefixes!
9352  else
9353    # Not in mixed or Windows style, start by that.
9354    new_path=`cmd //c echo $new_path`
9355
9356  input_path="$new_path"
9357  # Check if we need to convert this using DOS-style short mode. If the path
9358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9359  # take no chances and rewrite it.
9360  # Note: m4 eats our [], so we need to use [ and ] instead.
9361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9362  if test "x$has_forbidden_chars" != x; then
9363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9365  fi
9366
9367    # Output is in $new_path
9368
9369  windows_path="$new_path"
9370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9371    unix_path=`$CYGPATH -u "$windows_path"`
9372    new_path="$unix_path"
9373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9375    new_path="$unix_path"
9376  fi
9377
9378    # remove trailing .exe if any
9379    new_path="${new_path/%.exe/}"
9380
9381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9383  fi
9384
9385  else
9386    # We're on a posix platform. Hooray! :)
9387    # First separate the path from the arguments. This will split at the first
9388    # space.
9389    complete="$FOUND_MAKE"
9390    path="${complete%% *}"
9391    tmp="$complete EOL"
9392    arguments="${tmp#* }"
9393
9394    # Cannot rely on the command "which" here since it doesn't always work.
9395    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9396    if test -z "$is_absolute_path"; then
9397      # Path to executable is not absolute. Find it.
9398      IFS_save="$IFS"
9399      IFS=:
9400      for p in $PATH; do
9401        if test -f "$p/$path" && test -x "$p/$path"; then
9402          new_path="$p/$path"
9403          break
9404        fi
9405      done
9406      IFS="$IFS_save"
9407    else
9408      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9409$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9410      new_path="$path"
9411    fi
9412
9413    if test "x$new_path" = x; then
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9416        has_space=`$ECHO "$complete" | $GREP " "`
9417        if test "x$has_space" != x; then
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9419$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9420        fi
9421        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9422      fi
9423  fi
9424
9425      # Now join together the path and the arguments once again
9426      if test "x$arguments" != xEOL; then
9427        new_complete="$new_path ${arguments% *}"
9428      else
9429        new_complete="$new_path"
9430      fi
9431
9432  if test "x$complete" != "x$new_complete"; then
9433      FOUND_MAKE="$new_complete"
9434      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9435$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9436    fi
9437
9438        fi
9439      fi
9440    fi
9441  fi
9442
9443        if test "x$FOUND_MAKE" = x; then
9444          for ac_prog in make
9445do
9446  # Extract the first word of "$ac_prog", so it can be a program name with args.
9447set dummy $ac_prog; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $CHECK_TOOLSDIR_MAKE in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9465    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9477if test -n "$CHECK_TOOLSDIR_MAKE"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9479$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486  test -n "$CHECK_TOOLSDIR_MAKE" && break
9487done
9488
9489
9490  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9491  DESCRIPTION="make in tools-dir"
9492  if test "x$MAKE_CANDIDATE" != x; then
9493    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9494$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9495    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9496    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9497    if test "x$IS_GNU_MAKE" = x; then
9498      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9499$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9500    else
9501      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9502      if test "x$IS_MODERN_MAKE" = x; then
9503        { $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
9504$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;}
9505      else
9506        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9507          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9508            MAKE_EXPECTED_ENV='cygwin'
9509          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9510            MAKE_EXPECTED_ENV='msys'
9511          else
9512            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9513          fi
9514          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9515          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9516        else
9517          # Not relevant for non-Windows
9518          IS_MAKE_CORRECT_ENV=true
9519        fi
9520        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9521          { $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
9522$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;}
9523        else
9524          FOUND_MAKE=$MAKE_CANDIDATE
9525
9526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9527
9528  # First separate the path from the arguments. This will split at the first
9529  # space.
9530  complete="$FOUND_MAKE"
9531  path="${complete%% *}"
9532  tmp="$complete EOL"
9533  arguments="${tmp#* }"
9534
9535  # Input might be given as Windows format, start by converting to
9536  # unix format.
9537  new_path=`$CYGPATH -u "$path"`
9538
9539  # Now try to locate executable using which
9540  new_path=`$WHICH "$new_path" 2> /dev/null`
9541  # bat and cmd files are not always considered executable in cygwin causing which
9542  # to not find them
9543  if test "x$new_path" = x \
9544           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9545           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9546    new_path=`$CYGPATH -u "$path"`
9547  fi
9548  if test "x$new_path" = x; then
9549    # Oops. Which didn't find the executable.
9550    # The splitting of arguments from the executable at a space might have been incorrect,
9551    # since paths with space are more likely in Windows. Give it another try with the whole
9552    # argument.
9553    path="$complete"
9554    arguments="EOL"
9555    new_path=`$CYGPATH -u "$path"`
9556    new_path=`$WHICH "$new_path" 2> /dev/null`
9557    # bat and cmd files are not always considered executable in cygwin causing which
9558    # to not find them
9559    if test "x$new_path" = x \
9560             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9561             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9562      new_path=`$CYGPATH -u "$path"`
9563    fi
9564    if test "x$new_path" = x; then
9565      # It's still not found. Now this is an unrecoverable error.
9566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9567$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9568      has_space=`$ECHO "$complete" | $GREP " "`
9569      if test "x$has_space" != x; then
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9572      fi
9573      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9574    fi
9575  fi
9576
9577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9580  # "foo.exe" is OK but "foo" is an error.
9581  #
9582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9583  # It is also a way to make sure we got the proper file name for the real test later on.
9584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9585  if test "x$test_shortpath" = x; then
9586    # Short path failed, file does not exist as specified.
9587    # Try adding .exe or .cmd
9588    if test -f "${new_path}.exe"; then
9589       input_to_shortpath="${new_path}.exe"
9590    elif test -f "${new_path}.cmd"; then
9591       input_to_shortpath="${new_path}.cmd"
9592    else
9593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9594$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9595      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9596$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9597      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9598    fi
9599  else
9600    input_to_shortpath="$new_path"
9601  fi
9602
9603  # Call helper function which possibly converts this using DOS-style short mode.
9604  # If so, the updated path is stored in $new_path.
9605  new_path="$input_to_shortpath"
9606
9607  input_path="$input_to_shortpath"
9608  # Check if we need to convert this using DOS-style short mode. If the path
9609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9610  # take no chances and rewrite it.
9611  # Note: m4 eats our [], so we need to use [ and ] instead.
9612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9613  if test "x$has_forbidden_chars" != x; then
9614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9618      # Going to short mode and back again did indeed matter. Since short mode is
9619      # case insensitive, let's make it lowercase to improve readability.
9620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9621      # Now convert it back to Unix-stile (cygpath)
9622      input_path=`$CYGPATH -u "$shortmode_path"`
9623      new_path="$input_path"
9624    fi
9625  fi
9626
9627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9628  if test "x$test_cygdrive_prefix" = x; then
9629    # As a simple fix, exclude /usr/bin since it's not a real path.
9630    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9632      # a path prefixed by /cygdrive for fixpath to work.
9633      new_path="$CYGWIN_ROOT_PATH$input_path"
9634    fi
9635  fi
9636
9637  # remove trailing .exe if any
9638  new_path="${new_path/%.exe/}"
9639
9640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9641
9642  # First separate the path from the arguments. This will split at the first
9643  # space.
9644  complete="$FOUND_MAKE"
9645  path="${complete%% *}"
9646  tmp="$complete EOL"
9647  arguments="${tmp#* }"
9648
9649  # Input might be given as Windows format, start by converting to
9650  # unix format.
9651  new_path="$path"
9652
9653  windows_path="$new_path"
9654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9655    unix_path=`$CYGPATH -u "$windows_path"`
9656    new_path="$unix_path"
9657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9659    new_path="$unix_path"
9660  fi
9661
9662
9663  # Now try to locate executable using which
9664  new_path=`$WHICH "$new_path" 2> /dev/null`
9665
9666  if test "x$new_path" = x; then
9667    # Oops. Which didn't find the executable.
9668    # The splitting of arguments from the executable at a space might have been incorrect,
9669    # since paths with space are more likely in Windows. Give it another try with the whole
9670    # argument.
9671    path="$complete"
9672    arguments="EOL"
9673    new_path="$path"
9674
9675  windows_path="$new_path"
9676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9677    unix_path=`$CYGPATH -u "$windows_path"`
9678    new_path="$unix_path"
9679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9681    new_path="$unix_path"
9682  fi
9683
9684
9685    new_path=`$WHICH "$new_path" 2> /dev/null`
9686
9687    if test "x$new_path" = x; then
9688      # It's still not found. Now this is an unrecoverable error.
9689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9691      has_space=`$ECHO "$complete" | $GREP " "`
9692      if test "x$has_space" != x; then
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9695      fi
9696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9697    fi
9698  fi
9699
9700  # Now new_path has a complete unix path to the binary
9701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9702    # Keep paths in /bin as-is, but remove trailing .exe if any
9703    new_path="${new_path/%.exe/}"
9704    # Do not save /bin paths to all_fixpath_prefixes!
9705  else
9706    # Not in mixed or Windows style, start by that.
9707    new_path=`cmd //c echo $new_path`
9708
9709  input_path="$new_path"
9710  # Check if we need to convert this using DOS-style short mode. If the path
9711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9712  # take no chances and rewrite it.
9713  # Note: m4 eats our [], so we need to use [ and ] instead.
9714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9715  if test "x$has_forbidden_chars" != x; then
9716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9718  fi
9719
9720    # Output is in $new_path
9721
9722  windows_path="$new_path"
9723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9724    unix_path=`$CYGPATH -u "$windows_path"`
9725    new_path="$unix_path"
9726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9728    new_path="$unix_path"
9729  fi
9730
9731    # remove trailing .exe if any
9732    new_path="${new_path/%.exe/}"
9733
9734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9736  fi
9737
9738  else
9739    # We're on a posix platform. Hooray! :)
9740    # First separate the path from the arguments. This will split at the first
9741    # space.
9742    complete="$FOUND_MAKE"
9743    path="${complete%% *}"
9744    tmp="$complete EOL"
9745    arguments="${tmp#* }"
9746
9747    # Cannot rely on the command "which" here since it doesn't always work.
9748    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9749    if test -z "$is_absolute_path"; then
9750      # Path to executable is not absolute. Find it.
9751      IFS_save="$IFS"
9752      IFS=:
9753      for p in $PATH; do
9754        if test -f "$p/$path" && test -x "$p/$path"; then
9755          new_path="$p/$path"
9756          break
9757        fi
9758      done
9759      IFS="$IFS_save"
9760    else
9761      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9762$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9763      new_path="$path"
9764    fi
9765
9766    if test "x$new_path" = x; then
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9769        has_space=`$ECHO "$complete" | $GREP " "`
9770        if test "x$has_space" != x; then
9771          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9772$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9773        fi
9774        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9775      fi
9776  fi
9777
9778      # Now join together the path and the arguments once again
9779      if test "x$arguments" != xEOL; then
9780        new_complete="$new_path ${arguments% *}"
9781      else
9782        new_complete="$new_path"
9783      fi
9784
9785  if test "x$complete" != "x$new_complete"; then
9786      FOUND_MAKE="$new_complete"
9787      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9788$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9789    fi
9790
9791        fi
9792      fi
9793    fi
9794  fi
9795
9796        fi
9797        PATH=$OLD_PATH
9798      fi
9799    fi
9800
9801    if test "x$FOUND_MAKE" = x; then
9802      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
9803    fi
9804  fi
9805
9806  MAKE=$FOUND_MAKE
9807
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9809$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9810
9811
9812
9813    # Test if find supports -delete
9814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9815$as_echo_n "checking if find supports -delete... " >&6; }
9816    FIND_DELETE="-delete"
9817
9818    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9819
9820    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9821
9822    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9823    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9824        # No, it does not.
9825        rm $DELETEDIR/TestIfFindSupportsDelete
9826        FIND_DELETE="-exec rm \{\} \+"
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
9829    else
9830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9831$as_echo "yes" >&6; }
9832    fi
9833    rmdir $DELETEDIR
9834
9835
9836
9837# These tools might not be installed by default,
9838# need hint on how to install them.
9839
9840    for ac_prog in unzip
9841do
9842  # Extract the first word of "$ac_prog", so it can be a program name with args.
9843set dummy $ac_prog; ac_word=$2
9844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9845$as_echo_n "checking for $ac_word... " >&6; }
9846if ${ac_cv_path_UNZIP+:} false; then :
9847  $as_echo_n "(cached) " >&6
9848else
9849  case $UNZIP in
9850  [\\/]* | ?:[\\/]*)
9851  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9852  ;;
9853  *)
9854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9855for as_dir in $PATH
9856do
9857  IFS=$as_save_IFS
9858  test -z "$as_dir" && as_dir=.
9859    for ac_exec_ext in '' $ac_executable_extensions; do
9860  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9861    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9863    break 2
9864  fi
9865done
9866  done
9867IFS=$as_save_IFS
9868
9869  ;;
9870esac
9871fi
9872UNZIP=$ac_cv_path_UNZIP
9873if test -n "$UNZIP"; then
9874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9875$as_echo "$UNZIP" >&6; }
9876else
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
9879fi
9880
9881
9882  test -n "$UNZIP" && break
9883done
9884
9885
9886    if test "x$UNZIP" = x; then
9887        if test "xunzip" = x; then
9888          PROG_NAME=unzip
9889        else
9890          PROG_NAME=unzip
9891        fi
9892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9893$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9894        as_fn_error $? "Cannot continue" "$LINENO" 5
9895    fi
9896
9897
9898
9899    for ac_prog in zip
9900do
9901  # Extract the first word of "$ac_prog", so it can be a program name with args.
9902set dummy $ac_prog; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_ZIP+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  case $ZIP in
9909  [\\/]* | ?:[\\/]*)
9910  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9911  ;;
9912  *)
9913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916  IFS=$as_save_IFS
9917  test -z "$as_dir" && as_dir=.
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9920    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928  ;;
9929esac
9930fi
9931ZIP=$ac_cv_path_ZIP
9932if test -n "$ZIP"; then
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9934$as_echo "$ZIP" >&6; }
9935else
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941  test -n "$ZIP" && break
9942done
9943
9944
9945    if test "x$ZIP" = x; then
9946        if test "xzip" = x; then
9947          PROG_NAME=zip
9948        else
9949          PROG_NAME=zip
9950        fi
9951        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9952$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9953        as_fn_error $? "Cannot continue" "$LINENO" 5
9954    fi
9955
9956
9957
9958# Non-required basic tools
9959
9960# Extract the first word of "ldd", so it can be a program name with args.
9961set dummy ldd; ac_word=$2
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9963$as_echo_n "checking for $ac_word... " >&6; }
9964if ${ac_cv_path_LDD+:} false; then :
9965  $as_echo_n "(cached) " >&6
9966else
9967  case $LDD in
9968  [\\/]* | ?:[\\/]*)
9969  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9970  ;;
9971  *)
9972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975  IFS=$as_save_IFS
9976  test -z "$as_dir" && as_dir=.
9977    for ac_exec_ext in '' $ac_executable_extensions; do
9978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9979    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9981    break 2
9982  fi
9983done
9984  done
9985IFS=$as_save_IFS
9986
9987  ;;
9988esac
9989fi
9990LDD=$ac_cv_path_LDD
9991if test -n "$LDD"; then
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9993$as_echo "$LDD" >&6; }
9994else
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998
9999
10000if test "x$LDD" = "x"; then
10001    # List shared lib dependencies is used for
10002    # debug output and checking for forbidden dependencies.
10003    # We can build without it.
10004    LDD="true"
10005fi
10006# Extract the first word of "otool", so it can be a program name with args.
10007set dummy otool; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if ${ac_cv_path_OTOOL+:} false; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $OTOOL in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036OTOOL=$ac_cv_path_OTOOL
10037if test -n "$OTOOL"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10039$as_echo "$OTOOL" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046if test "x$OTOOL" = "x"; then
10047   OTOOL="true"
10048fi
10049for ac_prog in readelf greadelf
10050do
10051  # Extract the first word of "$ac_prog", so it can be a program name with args.
10052set dummy $ac_prog; ac_word=$2
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10054$as_echo_n "checking for $ac_word... " >&6; }
10055if ${ac_cv_path_READELF+:} false; then :
10056  $as_echo_n "(cached) " >&6
10057else
10058  case $READELF in
10059  [\\/]* | ?:[\\/]*)
10060  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10061  ;;
10062  *)
10063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10064for as_dir in $PATH
10065do
10066  IFS=$as_save_IFS
10067  test -z "$as_dir" && as_dir=.
10068    for ac_exec_ext in '' $ac_executable_extensions; do
10069  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10070    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10072    break 2
10073  fi
10074done
10075  done
10076IFS=$as_save_IFS
10077
10078  ;;
10079esac
10080fi
10081READELF=$ac_cv_path_READELF
10082if test -n "$READELF"; then
10083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10084$as_echo "$READELF" >&6; }
10085else
10086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
10088fi
10089
10090
10091  test -n "$READELF" && break
10092done
10093
10094# Extract the first word of "hg", so it can be a program name with args.
10095set dummy hg; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_HG+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $HG in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10113    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124HG=$ac_cv_path_HG
10125if test -n "$HG"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10127$as_echo "$HG" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134# Extract the first word of "stat", so it can be a program name with args.
10135set dummy stat; ac_word=$2
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10137$as_echo_n "checking for $ac_word... " >&6; }
10138if ${ac_cv_path_STAT+:} false; then :
10139  $as_echo_n "(cached) " >&6
10140else
10141  case $STAT in
10142  [\\/]* | ?:[\\/]*)
10143  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10144  ;;
10145  *)
10146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10147for as_dir in $PATH
10148do
10149  IFS=$as_save_IFS
10150  test -z "$as_dir" && as_dir=.
10151    for ac_exec_ext in '' $ac_executable_extensions; do
10152  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10153    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10155    break 2
10156  fi
10157done
10158  done
10159IFS=$as_save_IFS
10160
10161  ;;
10162esac
10163fi
10164STAT=$ac_cv_path_STAT
10165if test -n "$STAT"; then
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10167$as_echo "$STAT" >&6; }
10168else
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10170$as_echo "no" >&6; }
10171fi
10172
10173
10174# Extract the first word of "time", so it can be a program name with args.
10175set dummy time; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path_TIME+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $TIME in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10193    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204TIME=$ac_cv_path_TIME
10205if test -n "$TIME"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10207$as_echo "$TIME" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214
10215if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10216
10217    for ac_prog in comm
10218do
10219  # Extract the first word of "$ac_prog", so it can be a program name with args.
10220set dummy $ac_prog; ac_word=$2
10221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222$as_echo_n "checking for $ac_word... " >&6; }
10223if ${ac_cv_path_COMM+:} false; then :
10224  $as_echo_n "(cached) " >&6
10225else
10226  case $COMM in
10227  [\\/]* | ?:[\\/]*)
10228  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10229  ;;
10230  *)
10231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10232for as_dir in $PATH
10233do
10234  IFS=$as_save_IFS
10235  test -z "$as_dir" && as_dir=.
10236    for ac_exec_ext in '' $ac_executable_extensions; do
10237  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10238    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10240    break 2
10241  fi
10242done
10243  done
10244IFS=$as_save_IFS
10245
10246  ;;
10247esac
10248fi
10249COMM=$ac_cv_path_COMM
10250if test -n "$COMM"; then
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10252$as_echo "$COMM" >&6; }
10253else
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
10256fi
10257
10258
10259  test -n "$COMM" && break
10260done
10261
10262
10263    if test "x$COMM" = x; then
10264        if test "xcomm" = x; then
10265          PROG_NAME=comm
10266        else
10267          PROG_NAME=comm
10268        fi
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10270$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10271        as_fn_error $? "Cannot continue" "$LINENO" 5
10272    fi
10273
10274
10275fi
10276
10277
10278# Check if pkg-config is available.
10279
10280
10281if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10282	if test -n "$ac_tool_prefix"; then
10283  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10284set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10286$as_echo_n "checking for $ac_word... " >&6; }
10287if ${ac_cv_path_PKG_CONFIG+:} false; then :
10288  $as_echo_n "(cached) " >&6
10289else
10290  case $PKG_CONFIG in
10291  [\\/]* | ?:[\\/]*)
10292  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10293  ;;
10294  *)
10295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10296for as_dir in $PATH
10297do
10298  IFS=$as_save_IFS
10299  test -z "$as_dir" && as_dir=.
10300    for ac_exec_ext in '' $ac_executable_extensions; do
10301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10302    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10304    break 2
10305  fi
10306done
10307  done
10308IFS=$as_save_IFS
10309
10310  ;;
10311esac
10312fi
10313PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10314if test -n "$PKG_CONFIG"; then
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10316$as_echo "$PKG_CONFIG" >&6; }
10317else
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
10320fi
10321
10322
10323fi
10324if test -z "$ac_cv_path_PKG_CONFIG"; then
10325  ac_pt_PKG_CONFIG=$PKG_CONFIG
10326  # Extract the first word of "pkg-config", so it can be a program name with args.
10327set dummy pkg-config; ac_word=$2
10328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10329$as_echo_n "checking for $ac_word... " >&6; }
10330if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10331  $as_echo_n "(cached) " >&6
10332else
10333  case $ac_pt_PKG_CONFIG in
10334  [\\/]* | ?:[\\/]*)
10335  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10336  ;;
10337  *)
10338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10339for as_dir in $PATH
10340do
10341  IFS=$as_save_IFS
10342  test -z "$as_dir" && as_dir=.
10343    for ac_exec_ext in '' $ac_executable_extensions; do
10344  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10345    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10347    break 2
10348  fi
10349done
10350  done
10351IFS=$as_save_IFS
10352
10353  ;;
10354esac
10355fi
10356ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10357if test -n "$ac_pt_PKG_CONFIG"; then
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10359$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10360else
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
10363fi
10364
10365  if test "x$ac_pt_PKG_CONFIG" = x; then
10366    PKG_CONFIG=""
10367  else
10368    case $cross_compiling:$ac_tool_warned in
10369yes:)
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10371$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10372ac_tool_warned=yes ;;
10373esac
10374    PKG_CONFIG=$ac_pt_PKG_CONFIG
10375  fi
10376else
10377  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10378fi
10379
10380fi
10381if test -n "$PKG_CONFIG"; then
10382	_pkg_min_version=0.9.0
10383	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10384$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10385	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10386		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10387$as_echo "yes" >&6; }
10388	else
10389		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391		PKG_CONFIG=""
10392	fi
10393
10394fi
10395
10396# After basic tools have been setup, we can check build os specific details.
10397
10398###############################################################################
10399
10400# Note that this is the build platform OS version!
10401
10402OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10403OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10404OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10405OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10406
10407
10408
10409
10410
10411# Setup builddeps, for automatic downloading of tools we need.
10412# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10413# boot-jdk setup, but we need to have basic tools setup first.
10414
10415
10416# Check whether --with-builddeps-conf was given.
10417if test "${with_builddeps_conf+set}" = set; then :
10418  withval=$with_builddeps_conf;
10419fi
10420
10421
10422
10423# Check whether --with-builddeps-server was given.
10424if test "${with_builddeps_server+set}" = set; then :
10425  withval=$with_builddeps_server;
10426fi
10427
10428
10429
10430# Check whether --with-builddeps-dir was given.
10431if test "${with_builddeps_dir+set}" = set; then :
10432  withval=$with_builddeps_dir;
10433else
10434  with_builddeps_dir=/localhome/builddeps
10435fi
10436
10437
10438
10439# Check whether --with-builddeps-group was given.
10440if test "${with_builddeps_group+set}" = set; then :
10441  withval=$with_builddeps_group;
10442fi
10443
10444
10445
10446
10447    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10448        if test "x$with_builddeps_conf" != x; then
10449            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10450$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10451            builddepsfile=$with_builddeps_conf
10452            if test -s $builddepsfile; then
10453                . $builddepsfile
10454                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10455$as_echo "loaded!" >&6; }
10456            else
10457               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10458           fi
10459        else
10460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10461$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10462            builddepsfile=`mktemp`
10463            touch $builddepsfile
10464            # Put all found confs into a single file.
10465            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10466            # Source the file to acquire the variables
10467            if test -s $builddepsfile; then
10468                . $builddepsfile
10469                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10470$as_echo "found at least one!" >&6; }
10471            else
10472               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10473           fi
10474        fi
10475        # Create build and target names that use _ instead of "-" and ".".
10476        # This is necessary to use them in variable names.
10477        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10478        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10479        # Extract rewrite information for build and target
10480        eval rewritten_build=\${REWRITE_${build_var}}
10481        if test "x$rewritten_build" = x; then
10482            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10483            echo Build stays the same $rewritten_build
10484        else
10485            echo Rewriting build for builddeps into $rewritten_build
10486        fi
10487        eval rewritten_target=\${REWRITE_${target_var}}
10488        if test "x$rewritten_target" = x; then
10489            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10490            echo Target stays the same $rewritten_target
10491        else
10492            echo Rewriting target for builddeps into $rewritten_target
10493        fi
10494        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10495        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10496    fi
10497    for ac_prog in 7z unzip
10498do
10499  # Extract the first word of "$ac_prog", so it can be a program name with args.
10500set dummy $ac_prog; ac_word=$2
10501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10502$as_echo_n "checking for $ac_word... " >&6; }
10503if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10504  $as_echo_n "(cached) " >&6
10505else
10506  if test -n "$BDEPS_UNZIP"; then
10507  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10508else
10509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10510for as_dir in $PATH
10511do
10512  IFS=$as_save_IFS
10513  test -z "$as_dir" && as_dir=.
10514    for ac_exec_ext in '' $ac_executable_extensions; do
10515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10516    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10518    break 2
10519  fi
10520done
10521  done
10522IFS=$as_save_IFS
10523
10524fi
10525fi
10526BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10527if test -n "$BDEPS_UNZIP"; then
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10529$as_echo "$BDEPS_UNZIP" >&6; }
10530else
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
10533fi
10534
10535
10536  test -n "$BDEPS_UNZIP" && break
10537done
10538
10539    if test "x$BDEPS_UNZIP" = x7z; then
10540        BDEPS_UNZIP="7z x"
10541    fi
10542
10543    for ac_prog in wget lftp ftp
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  if test -n "$BDEPS_FTP"; then
10553  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10554else
10555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10562    ac_cv_prog_BDEPS_FTP="$ac_prog"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570fi
10571fi
10572BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10573if test -n "$BDEPS_FTP"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10575$as_echo "$BDEPS_FTP" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  test -n "$BDEPS_FTP" && break
10583done
10584
10585
10586
10587###############################################################################
10588#
10589# Determine OpenJDK variants, options and version numbers.
10590#
10591###############################################################################
10592
10593# We need build & target for this.
10594
10595
10596###############################################################################
10597#
10598# Should we build only OpenJDK even if closed sources are present?
10599#
10600# Check whether --enable-openjdk-only was given.
10601if test "${enable_openjdk_only+set}" = set; then :
10602  enableval=$enable_openjdk_only;
10603else
10604  enable_openjdk_only="no"
10605fi
10606
10607
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10609$as_echo_n "checking for presence of closed sources... " >&6; }
10610if test -d "$SRC_ROOT/jdk/src/closed"; then
10611    CLOSED_SOURCE_PRESENT=yes
10612else
10613    CLOSED_SOURCE_PRESENT=no
10614fi
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10616$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10617
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10619$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10620SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10622$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10623
10624if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10625  OPENJDK=true
10626  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10627    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10628$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10629  fi
10630else
10631  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10632    OPENJDK=true
10633  else
10634    OPENJDK=false
10635  fi
10636fi
10637
10638if test "x$OPENJDK" = "xtrue"; then
10639    SET_OPENJDK="OPENJDK=true"
10640fi
10641
10642
10643
10644###############################################################################
10645#
10646# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10647# We always build headless support.
10648#
10649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10650$as_echo_n "checking headful support... " >&6; }
10651# Check whether --enable-headful was given.
10652if test "${enable_headful+set}" = set; then :
10653  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10654else
10655  SUPPORT_HEADFUL=yes
10656fi
10657
10658
10659SUPPORT_HEADLESS=yes
10660BUILD_HEADLESS="BUILD_HEADLESS:=true"
10661
10662if test "x$SUPPORT_HEADFUL" = xyes; then
10663    # We are building both headful and headless.
10664    headful_msg="inlude support for both headful and headless"
10665fi
10666
10667if test "x$SUPPORT_HEADFUL" = xno; then
10668    # Thus we are building headless only.
10669    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10670    headful_msg="headless only"
10671fi
10672
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10674$as_echo "$headful_msg" >&6; }
10675
10676
10677
10678
10679
10680# Control wether Hotspot runs Queens test after build.
10681# Check whether --enable-hotspot-test-in-build was given.
10682if test "${enable_hotspot_test_in_build+set}" = set; then :
10683  enableval=$enable_hotspot_test_in_build;
10684else
10685  enable_hotspot_test_in_build=no
10686fi
10687
10688if test "x$enable_hotspot_test_in_build" = "xyes"; then
10689    TEST_IN_BUILD=true
10690else
10691    TEST_IN_BUILD=false
10692fi
10693
10694
10695###############################################################################
10696#
10697# Choose cacerts source file
10698#
10699
10700# Check whether --with-cacerts-file was given.
10701if test "${with_cacerts_file+set}" = set; then :
10702  withval=$with_cacerts_file;
10703fi
10704
10705if test "x$with_cacerts_file" != x; then
10706    CACERTS_FILE=$with_cacerts_file
10707else
10708    if test "x$OPENJDK" = "xtrue"; then
10709        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10710    else
10711        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10712    fi
10713fi
10714
10715
10716###############################################################################
10717#
10718# Enable or disable unlimited crypto
10719#
10720# Check whether --enable-unlimited-crypto was given.
10721if test "${enable_unlimited_crypto+set}" = set; then :
10722  enableval=$enable_unlimited_crypto;
10723else
10724  enable_unlimited_crypto=no
10725fi
10726
10727if test "x$enable_unlimited_crypto" = "xyes"; then
10728    UNLIMITED_CRYPTO=true
10729else
10730    UNLIMITED_CRYPTO=false
10731fi
10732
10733
10734###############################################################################
10735#
10736# Compress jars
10737#
10738COMPRESS_JARS=false
10739
10740
10741
10742
10743# Source the version numbers
10744. $AUTOCONF_DIR/version-numbers
10745
10746# Get the settings from parameters
10747
10748# Check whether --with-milestone was given.
10749if test "${with_milestone+set}" = set; then :
10750  withval=$with_milestone;
10751fi
10752
10753if test "x$with_milestone" = xyes; then
10754  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10755elif test "x$with_milestone" != x; then
10756    MILESTONE="$with_milestone"
10757else
10758  MILESTONE=internal
10759fi
10760
10761
10762# Check whether --with-build-number was given.
10763if test "${with_build_number+set}" = set; then :
10764  withval=$with_build_number;
10765fi
10766
10767if test "x$with_build_number" = xyes; then
10768  as_fn_error $? "Build number must have a value" "$LINENO" 5
10769elif test "x$with_build_number" != x; then
10770  JDK_BUILD_NUMBER="$with_build_number"
10771fi
10772if test "x$JDK_BUILD_NUMBER" = x; then
10773  JDK_BUILD_NUMBER=b00
10774fi
10775
10776
10777# Check whether --with-user-release-suffix was given.
10778if test "${with_user_release_suffix+set}" = set; then :
10779  withval=$with_user_release_suffix;
10780fi
10781
10782if test "x$with_user_release_suffix" = xyes; then
10783  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10784elif test "x$with_user_release_suffix" != x; then
10785  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10786else
10787  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10788  # Avoid [:alnum:] since it depends on the locale.
10789  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10790  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10791fi
10792
10793
10794# Now set the JDK version, milestone, build number etc.
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809COPYRIGHT_YEAR=`date +'%Y'`
10810
10811
10812if test "x$JDK_UPDATE_VERSION" != x; then
10813  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10814else
10815  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10816fi
10817
10818
10819COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10820
10821
10822
10823###############################################################################
10824#
10825# Setup BootJDK, used to bootstrap the build.
10826#
10827###############################################################################
10828
10829
10830BOOT_JDK_FOUND=no
10831
10832# Check whether --with-boot-jdk was given.
10833if test "${with_boot_jdk+set}" = set; then :
10834  withval=$with_boot_jdk;
10835fi
10836
10837
10838# We look for the Boot JDK through various means, going from more certain to
10839# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10840# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10841# must check if this is indeed valid; otherwise we'll continue looking.
10842
10843# Test: Is bootjdk explicitely set by command line arguments?
10844
10845  if test "x$BOOT_JDK_FOUND" = xno; then
10846    # Now execute the test
10847
10848if test "x$with_boot_jdk" != x; then
10849    BOOT_JDK=$with_boot_jdk
10850    BOOT_JDK_FOUND=maybe
10851    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10852$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10853fi
10854
10855
10856    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10857    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10858      # Do we have a bin/java?
10859      if test ! -x "$BOOT_JDK/bin/java"; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10862        BOOT_JDK_FOUND=no
10863      else
10864        # Do we have a bin/javac?
10865        if test ! -x "$BOOT_JDK/bin/javac"; then
10866          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10868          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10869$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10870          BOOT_JDK_FOUND=no
10871        else
10872          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10873          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10874            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10876            BOOT_JDK_FOUND=no
10877          else
10878            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10880
10881            # Extra M4 quote needed to protect [] in grep expression.
10882            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10883            if test "x$FOUND_VERSION_78" = x; then
10884              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10886              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10887$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10888              BOOT_JDK_FOUND=no
10889            else
10890              # We're done! :-)
10891              BOOT_JDK_FOUND=yes
10892
10893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10894
10895  # Input might be given as Windows format, start by converting to
10896  # unix format.
10897  path="$BOOT_JDK"
10898  new_path=`$CYGPATH -u "$path"`
10899
10900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10903  # "foo.exe" is OK but "foo" is an error.
10904  #
10905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10906  # It is also a way to make sure we got the proper file name for the real test later on.
10907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10908  if test "x$test_shortpath" = x; then
10909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10911    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10912  fi
10913
10914  # Call helper function which possibly converts this using DOS-style short mode.
10915  # If so, the updated path is stored in $new_path.
10916
10917  input_path="$new_path"
10918  # Check if we need to convert this using DOS-style short mode. If the path
10919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10920  # take no chances and rewrite it.
10921  # Note: m4 eats our [], so we need to use [ and ] instead.
10922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10923  if test "x$has_forbidden_chars" != x; then
10924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10928      # Going to short mode and back again did indeed matter. Since short mode is
10929      # case insensitive, let's make it lowercase to improve readability.
10930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10931      # Now convert it back to Unix-stile (cygpath)
10932      input_path=`$CYGPATH -u "$shortmode_path"`
10933      new_path="$input_path"
10934    fi
10935  fi
10936
10937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10938  if test "x$test_cygdrive_prefix" = x; then
10939    # As a simple fix, exclude /usr/bin since it's not a real path.
10940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10942      # a path prefixed by /cygdrive for fixpath to work.
10943      new_path="$CYGWIN_ROOT_PATH$input_path"
10944    fi
10945  fi
10946
10947
10948  if test "x$path" != "x$new_path"; then
10949    BOOT_JDK="$new_path"
10950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10951$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10952  fi
10953
10954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10955
10956  path="$BOOT_JDK"
10957  has_colon=`$ECHO $path | $GREP ^.:`
10958  new_path="$path"
10959  if test "x$has_colon" = x; then
10960    # Not in mixed or Windows style, start by that.
10961    new_path=`cmd //c echo $path`
10962  fi
10963
10964
10965  input_path="$new_path"
10966  # Check if we need to convert this using DOS-style short mode. If the path
10967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10968  # take no chances and rewrite it.
10969  # Note: m4 eats our [], so we need to use [ and ] instead.
10970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10971  if test "x$has_forbidden_chars" != x; then
10972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10974  fi
10975
10976
10977  windows_path="$new_path"
10978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10979    unix_path=`$CYGPATH -u "$windows_path"`
10980    new_path="$unix_path"
10981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10983    new_path="$unix_path"
10984  fi
10985
10986  if test "x$path" != "x$new_path"; then
10987    BOOT_JDK="$new_path"
10988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10989$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10990  fi
10991
10992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10994
10995  else
10996    # We're on a posix platform. Hooray! :)
10997    path="$BOOT_JDK"
10998
10999    if test ! -f "$path" && test ! -d "$path"; then
11000      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11001    fi
11002
11003    has_space=`$ECHO "$path" | $GREP " "`
11004    if test "x$has_space" != x; then
11005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11008    fi
11009  fi
11010
11011              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11012$as_echo_n "checking for Boot JDK... " >&6; }
11013              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11014$as_echo "$BOOT_JDK" >&6; }
11015              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11016$as_echo_n "checking Boot JDK version... " >&6; }
11017              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11019$as_echo "$BOOT_JDK_VERSION" >&6; }
11020            fi # end check jdk version
11021          fi # end check rt.jar
11022        fi # end check javac
11023      fi # end check java
11024    fi # end check boot jdk found
11025  fi
11026
11027if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11028  # Having specified an argument which is incorrect will produce an instant failure;
11029  # we should not go on looking
11030  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11031fi
11032
11033# Test: Is bootjdk available from builddeps?
11034
11035  if test "x$BOOT_JDK_FOUND" = xno; then
11036    # Now execute the test
11037
11038
11039
11040    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11041        # Source the builddeps file again, to make sure it uses the latest variables!
11042        . $builddepsfile
11043        # Look for a target and build machine specific resource!
11044        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11045        if test "x$resource" = x; then
11046            # Ok, lets instead look for a target specific resource
11047            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11048        fi
11049        if test "x$resource" = x; then
11050            # Ok, lets instead look for a build specific resource
11051            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11052        fi
11053        if test "x$resource" = x; then
11054            # Ok, lets instead look for a generic resource
11055            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11056            resource=${builddep_bootjdk}
11057        fi
11058        if test "x$resource" != x; then
11059            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11060$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11061	    # If the resource in the builddeps.conf file is an existing directory,
11062	    # for example /java/linux/cups
11063	    if test -d ${resource}; then
11064	       depdir=${resource}
11065	    else
11066
11067# bootjdk is for example mymodule
11068# $resource is for example libs/general/libmymod_1_2_3.zip
11069# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11070# $with_builddeps_dir is for example /localhome/builddeps
11071# depdir is the name of the variable into which we store the depdir, eg MYMOD
11072# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11073# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11074    filename=`basename $resource`
11075    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11076    filebase=${filename%%.*}
11077    extension=${filename#*.}
11078    installdir=$with_builddeps_dir/$filebase
11079    if test ! -f $installdir/$filename.unpacked; then
11080        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11081$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11082        if test ! -d $installdir; then
11083            mkdir -p $installdir
11084        fi
11085        if test ! -d $installdir; then
11086            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11087        fi
11088        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11089        touch $tmpfile
11090        if test ! -f $tmpfile; then
11091            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11092        fi
11093
11094    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11095    # $tmpfile is the local file name for the downloaded file.
11096    VALID_TOOL=no
11097    if test "x$BDEPS_FTP" = xwget; then
11098       VALID_TOOL=yes
11099       wget -O $tmpfile $with_builddeps_server/$resource
11100    fi
11101    if test "x$BDEPS_FTP" = xlftp; then
11102       VALID_TOOL=yes
11103       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11104    fi
11105    if test "x$BDEPS_FTP" = xftp; then
11106        VALID_TOOL=yes
11107        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11108        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11109        FTPUSERPWD=${FTPSERVER%%@*}
11110        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11111            FTPUSER=${userpwd%%:*}
11112            FTPPWD=${userpwd#*@}
11113            FTPSERVER=${FTPSERVER#*@}
11114        else
11115            FTPUSER=ftp
11116            FTPPWD=ftp
11117        fi
11118        # the "pass" command does not work on some
11119        # ftp clients (read ftp.exe) but if it works,
11120        # passive mode is better!
11121        (\
11122            echo "user $FTPUSER $FTPPWD"        ;\
11123            echo "pass"                         ;\
11124            echo "bin"                          ;\
11125            echo "get $FTPPATH $tmpfile"              ;\
11126        ) | ftp -in $FTPSERVER
11127    fi
11128    if test "x$VALID_TOOL" != xyes; then
11129       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11130    fi
11131
11132        mv $tmpfile $installdir/$filename
11133        if test ! -s $installdir/$filename; then
11134            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11135        fi
11136        case "$extension" in
11137            zip)  echo "Unzipping $installdir/$filename..."
11138               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11139            ;;
11140            tar.gz) echo "Untaring $installdir/$filename..."
11141               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11142            ;;
11143            tgz) echo "Untaring $installdir/$filename..."
11144               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11145            ;;
11146            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11147            ;;
11148        esac
11149    fi
11150    if test -f $installdir/$filename.unpacked; then
11151        depdir=$installdir
11152    fi
11153
11154	    fi
11155            # Source the builddeps file again, because in the previous command, the depdir
11156            # was updated to point at the current build dependency install directory.
11157            . $builddepsfile
11158            # Now extract variables from the builddeps.conf files.
11159            theroot=${builddep_bootjdk_ROOT}
11160            thecflags=${builddep_bootjdk_CFLAGS}
11161            thelibs=${builddep_bootjdk_LIBS}
11162            if test "x$depdir" = x; then
11163                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11164            fi
11165            BOOT_JDK=$depdir
11166            if test "x$theroot" != x; then
11167               BOOT_JDK="$theroot"
11168            fi
11169            if test "x$thecflags" != x; then
11170               BOOT_JDK_CFLAGS="$thecflags"
11171            fi
11172            if test "x$thelibs" != x; then
11173               BOOT_JDK_LIBS="$thelibs"
11174            fi
11175            BOOT_JDK_FOUND=maybe
11176            else BOOT_JDK_FOUND=no
11177
11178        fi
11179        else BOOT_JDK_FOUND=no
11180
11181    fi
11182
11183
11184
11185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11187      # Do we have a bin/java?
11188      if test ! -x "$BOOT_JDK/bin/java"; then
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11191        BOOT_JDK_FOUND=no
11192      else
11193        # Do we have a bin/javac?
11194        if test ! -x "$BOOT_JDK/bin/javac"; then
11195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11199          BOOT_JDK_FOUND=no
11200        else
11201          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11202          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11205            BOOT_JDK_FOUND=no
11206          else
11207            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11209
11210            # Extra M4 quote needed to protect [] in grep expression.
11211            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11212            if test "x$FOUND_VERSION_78" = x; then
11213              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11215              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11216$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11217              BOOT_JDK_FOUND=no
11218            else
11219              # We're done! :-)
11220              BOOT_JDK_FOUND=yes
11221
11222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11223
11224  # Input might be given as Windows format, start by converting to
11225  # unix format.
11226  path="$BOOT_JDK"
11227  new_path=`$CYGPATH -u "$path"`
11228
11229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11232  # "foo.exe" is OK but "foo" is an error.
11233  #
11234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11235  # It is also a way to make sure we got the proper file name for the real test later on.
11236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11237  if test "x$test_shortpath" = x; then
11238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11241  fi
11242
11243  # Call helper function which possibly converts this using DOS-style short mode.
11244  # If so, the updated path is stored in $new_path.
11245
11246  input_path="$new_path"
11247  # Check if we need to convert this using DOS-style short mode. If the path
11248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11249  # take no chances and rewrite it.
11250  # Note: m4 eats our [], so we need to use [ and ] instead.
11251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11252  if test "x$has_forbidden_chars" != x; then
11253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11257      # Going to short mode and back again did indeed matter. Since short mode is
11258      # case insensitive, let's make it lowercase to improve readability.
11259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11260      # Now convert it back to Unix-stile (cygpath)
11261      input_path=`$CYGPATH -u "$shortmode_path"`
11262      new_path="$input_path"
11263    fi
11264  fi
11265
11266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11267  if test "x$test_cygdrive_prefix" = x; then
11268    # As a simple fix, exclude /usr/bin since it's not a real path.
11269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11271      # a path prefixed by /cygdrive for fixpath to work.
11272      new_path="$CYGWIN_ROOT_PATH$input_path"
11273    fi
11274  fi
11275
11276
11277  if test "x$path" != "x$new_path"; then
11278    BOOT_JDK="$new_path"
11279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11281  fi
11282
11283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11284
11285  path="$BOOT_JDK"
11286  has_colon=`$ECHO $path | $GREP ^.:`
11287  new_path="$path"
11288  if test "x$has_colon" = x; then
11289    # Not in mixed or Windows style, start by that.
11290    new_path=`cmd //c echo $path`
11291  fi
11292
11293
11294  input_path="$new_path"
11295  # Check if we need to convert this using DOS-style short mode. If the path
11296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11297  # take no chances and rewrite it.
11298  # Note: m4 eats our [], so we need to use [ and ] instead.
11299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11300  if test "x$has_forbidden_chars" != x; then
11301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11303  fi
11304
11305
11306  windows_path="$new_path"
11307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11308    unix_path=`$CYGPATH -u "$windows_path"`
11309    new_path="$unix_path"
11310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11312    new_path="$unix_path"
11313  fi
11314
11315  if test "x$path" != "x$new_path"; then
11316    BOOT_JDK="$new_path"
11317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11319  fi
11320
11321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11323
11324  else
11325    # We're on a posix platform. Hooray! :)
11326    path="$BOOT_JDK"
11327
11328    if test ! -f "$path" && test ! -d "$path"; then
11329      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11330    fi
11331
11332    has_space=`$ECHO "$path" | $GREP " "`
11333    if test "x$has_space" != x; then
11334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11337    fi
11338  fi
11339
11340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11341$as_echo_n "checking for Boot JDK... " >&6; }
11342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11343$as_echo "$BOOT_JDK" >&6; }
11344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11345$as_echo_n "checking Boot JDK version... " >&6; }
11346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11348$as_echo "$BOOT_JDK_VERSION" >&6; }
11349            fi # end check jdk version
11350          fi # end check rt.jar
11351        fi # end check javac
11352      fi # end check java
11353    fi # end check boot jdk found
11354  fi
11355
11356
11357# Test: Is $JAVA_HOME set?
11358
11359  if test "x$BOOT_JDK_FOUND" = xno; then
11360    # Now execute the test
11361
11362    if test "x$JAVA_HOME" != x; then
11363        JAVA_HOME_PROCESSED="$JAVA_HOME"
11364
11365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11366
11367  # Input might be given as Windows format, start by converting to
11368  # unix format.
11369  path="$JAVA_HOME_PROCESSED"
11370  new_path=`$CYGPATH -u "$path"`
11371
11372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11375  # "foo.exe" is OK but "foo" is an error.
11376  #
11377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11378  # It is also a way to make sure we got the proper file name for the real test later on.
11379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11380  if test "x$test_shortpath" = x; then
11381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11382$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11383    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11384  fi
11385
11386  # Call helper function which possibly converts this using DOS-style short mode.
11387  # If so, the updated path is stored in $new_path.
11388
11389  input_path="$new_path"
11390  # Check if we need to convert this using DOS-style short mode. If the path
11391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11392  # take no chances and rewrite it.
11393  # Note: m4 eats our [], so we need to use [ and ] instead.
11394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11395  if test "x$has_forbidden_chars" != x; then
11396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11400      # Going to short mode and back again did indeed matter. Since short mode is
11401      # case insensitive, let's make it lowercase to improve readability.
11402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11403      # Now convert it back to Unix-stile (cygpath)
11404      input_path=`$CYGPATH -u "$shortmode_path"`
11405      new_path="$input_path"
11406    fi
11407  fi
11408
11409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11410  if test "x$test_cygdrive_prefix" = x; then
11411    # As a simple fix, exclude /usr/bin since it's not a real path.
11412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11414      # a path prefixed by /cygdrive for fixpath to work.
11415      new_path="$CYGWIN_ROOT_PATH$input_path"
11416    fi
11417  fi
11418
11419
11420  if test "x$path" != "x$new_path"; then
11421    JAVA_HOME_PROCESSED="$new_path"
11422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11423$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11424  fi
11425
11426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11427
11428  path="$JAVA_HOME_PROCESSED"
11429  has_colon=`$ECHO $path | $GREP ^.:`
11430  new_path="$path"
11431  if test "x$has_colon" = x; then
11432    # Not in mixed or Windows style, start by that.
11433    new_path=`cmd //c echo $path`
11434  fi
11435
11436
11437  input_path="$new_path"
11438  # Check if we need to convert this using DOS-style short mode. If the path
11439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11440  # take no chances and rewrite it.
11441  # Note: m4 eats our [], so we need to use [ and ] instead.
11442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11443  if test "x$has_forbidden_chars" != x; then
11444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11446  fi
11447
11448
11449  windows_path="$new_path"
11450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11451    unix_path=`$CYGPATH -u "$windows_path"`
11452    new_path="$unix_path"
11453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11455    new_path="$unix_path"
11456  fi
11457
11458  if test "x$path" != "x$new_path"; then
11459    JAVA_HOME_PROCESSED="$new_path"
11460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11461$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11462  fi
11463
11464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11466
11467  else
11468    # We're on a posix platform. Hooray! :)
11469    path="$JAVA_HOME_PROCESSED"
11470
11471    if test ! -f "$path" && test ! -d "$path"; then
11472      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11473    fi
11474
11475    has_space=`$ECHO "$path" | $GREP " "`
11476    if test "x$has_space" != x; then
11477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11478$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11480    fi
11481  fi
11482
11483        if test ! -d "$JAVA_HOME_PROCESSED"; then
11484            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11485$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11486        else
11487          # Aha, the user has set a JAVA_HOME
11488          # let us use that as the Boot JDK.
11489          BOOT_JDK="$JAVA_HOME_PROCESSED"
11490          BOOT_JDK_FOUND=maybe
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11492$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11493        fi
11494    fi
11495
11496
11497    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11498    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11499      # Do we have a bin/java?
11500      if test ! -x "$BOOT_JDK/bin/java"; then
11501        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11503        BOOT_JDK_FOUND=no
11504      else
11505        # Do we have a bin/javac?
11506        if test ! -x "$BOOT_JDK/bin/javac"; then
11507          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11509          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11510$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11511          BOOT_JDK_FOUND=no
11512        else
11513          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11514          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11517            BOOT_JDK_FOUND=no
11518          else
11519            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11521
11522            # Extra M4 quote needed to protect [] in grep expression.
11523            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11524            if test "x$FOUND_VERSION_78" = x; then
11525              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11527              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11528$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11529              BOOT_JDK_FOUND=no
11530            else
11531              # We're done! :-)
11532              BOOT_JDK_FOUND=yes
11533
11534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11535
11536  # Input might be given as Windows format, start by converting to
11537  # unix format.
11538  path="$BOOT_JDK"
11539  new_path=`$CYGPATH -u "$path"`
11540
11541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11544  # "foo.exe" is OK but "foo" is an error.
11545  #
11546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11547  # It is also a way to make sure we got the proper file name for the real test later on.
11548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11549  if test "x$test_shortpath" = x; then
11550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11553  fi
11554
11555  # Call helper function which possibly converts this using DOS-style short mode.
11556  # If so, the updated path is stored in $new_path.
11557
11558  input_path="$new_path"
11559  # Check if we need to convert this using DOS-style short mode. If the path
11560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11561  # take no chances and rewrite it.
11562  # Note: m4 eats our [], so we need to use [ and ] instead.
11563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11564  if test "x$has_forbidden_chars" != x; then
11565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11569      # Going to short mode and back again did indeed matter. Since short mode is
11570      # case insensitive, let's make it lowercase to improve readability.
11571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11572      # Now convert it back to Unix-stile (cygpath)
11573      input_path=`$CYGPATH -u "$shortmode_path"`
11574      new_path="$input_path"
11575    fi
11576  fi
11577
11578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11579  if test "x$test_cygdrive_prefix" = x; then
11580    # As a simple fix, exclude /usr/bin since it's not a real path.
11581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11583      # a path prefixed by /cygdrive for fixpath to work.
11584      new_path="$CYGWIN_ROOT_PATH$input_path"
11585    fi
11586  fi
11587
11588
11589  if test "x$path" != "x$new_path"; then
11590    BOOT_JDK="$new_path"
11591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11593  fi
11594
11595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11596
11597  path="$BOOT_JDK"
11598  has_colon=`$ECHO $path | $GREP ^.:`
11599  new_path="$path"
11600  if test "x$has_colon" = x; then
11601    # Not in mixed or Windows style, start by that.
11602    new_path=`cmd //c echo $path`
11603  fi
11604
11605
11606  input_path="$new_path"
11607  # Check if we need to convert this using DOS-style short mode. If the path
11608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11609  # take no chances and rewrite it.
11610  # Note: m4 eats our [], so we need to use [ and ] instead.
11611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11612  if test "x$has_forbidden_chars" != x; then
11613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11615  fi
11616
11617
11618  windows_path="$new_path"
11619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11620    unix_path=`$CYGPATH -u "$windows_path"`
11621    new_path="$unix_path"
11622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11624    new_path="$unix_path"
11625  fi
11626
11627  if test "x$path" != "x$new_path"; then
11628    BOOT_JDK="$new_path"
11629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11631  fi
11632
11633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11635
11636  else
11637    # We're on a posix platform. Hooray! :)
11638    path="$BOOT_JDK"
11639
11640    if test ! -f "$path" && test ! -d "$path"; then
11641      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11642    fi
11643
11644    has_space=`$ECHO "$path" | $GREP " "`
11645    if test "x$has_space" != x; then
11646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11648      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11649    fi
11650  fi
11651
11652              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11653$as_echo_n "checking for Boot JDK... " >&6; }
11654              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11655$as_echo "$BOOT_JDK" >&6; }
11656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11657$as_echo_n "checking Boot JDK version... " >&6; }
11658              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11659              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11660$as_echo "$BOOT_JDK_VERSION" >&6; }
11661            fi # end check jdk version
11662          fi # end check rt.jar
11663        fi # end check javac
11664      fi # end check java
11665    fi # end check boot jdk found
11666  fi
11667
11668
11669# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11670
11671  if test "x$BOOT_JDK_FOUND" = xno; then
11672    # Now execute the test
11673
11674    if test -x /usr/libexec/java_home; then
11675        BOOT_JDK=`/usr/libexec/java_home`
11676        BOOT_JDK_FOUND=maybe
11677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11678$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11679    fi
11680
11681
11682    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11683    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11684      # Do we have a bin/java?
11685      if test ! -x "$BOOT_JDK/bin/java"; then
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11688        BOOT_JDK_FOUND=no
11689      else
11690        # Do we have a bin/javac?
11691        if test ! -x "$BOOT_JDK/bin/javac"; then
11692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11694          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11695$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11696          BOOT_JDK_FOUND=no
11697        else
11698          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11699          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11700            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11702            BOOT_JDK_FOUND=no
11703          else
11704            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11705            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11706
11707            # Extra M4 quote needed to protect [] in grep expression.
11708            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11709            if test "x$FOUND_VERSION_78" = x; then
11710              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11712              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11713$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11714              BOOT_JDK_FOUND=no
11715            else
11716              # We're done! :-)
11717              BOOT_JDK_FOUND=yes
11718
11719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11720
11721  # Input might be given as Windows format, start by converting to
11722  # unix format.
11723  path="$BOOT_JDK"
11724  new_path=`$CYGPATH -u "$path"`
11725
11726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11729  # "foo.exe" is OK but "foo" is an error.
11730  #
11731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11732  # It is also a way to make sure we got the proper file name for the real test later on.
11733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11734  if test "x$test_shortpath" = x; then
11735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11738  fi
11739
11740  # Call helper function which possibly converts this using DOS-style short mode.
11741  # If so, the updated path is stored in $new_path.
11742
11743  input_path="$new_path"
11744  # Check if we need to convert this using DOS-style short mode. If the path
11745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11746  # take no chances and rewrite it.
11747  # Note: m4 eats our [], so we need to use [ and ] instead.
11748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11749  if test "x$has_forbidden_chars" != x; then
11750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11754      # Going to short mode and back again did indeed matter. Since short mode is
11755      # case insensitive, let's make it lowercase to improve readability.
11756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11757      # Now convert it back to Unix-stile (cygpath)
11758      input_path=`$CYGPATH -u "$shortmode_path"`
11759      new_path="$input_path"
11760    fi
11761  fi
11762
11763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11764  if test "x$test_cygdrive_prefix" = x; then
11765    # As a simple fix, exclude /usr/bin since it's not a real path.
11766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11768      # a path prefixed by /cygdrive for fixpath to work.
11769      new_path="$CYGWIN_ROOT_PATH$input_path"
11770    fi
11771  fi
11772
11773
11774  if test "x$path" != "x$new_path"; then
11775    BOOT_JDK="$new_path"
11776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11778  fi
11779
11780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11781
11782  path="$BOOT_JDK"
11783  has_colon=`$ECHO $path | $GREP ^.:`
11784  new_path="$path"
11785  if test "x$has_colon" = x; then
11786    # Not in mixed or Windows style, start by that.
11787    new_path=`cmd //c echo $path`
11788  fi
11789
11790
11791  input_path="$new_path"
11792  # Check if we need to convert this using DOS-style short mode. If the path
11793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11794  # take no chances and rewrite it.
11795  # Note: m4 eats our [], so we need to use [ and ] instead.
11796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11797  if test "x$has_forbidden_chars" != x; then
11798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11800  fi
11801
11802
11803  windows_path="$new_path"
11804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11805    unix_path=`$CYGPATH -u "$windows_path"`
11806    new_path="$unix_path"
11807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11809    new_path="$unix_path"
11810  fi
11811
11812  if test "x$path" != "x$new_path"; then
11813    BOOT_JDK="$new_path"
11814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11816  fi
11817
11818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11820
11821  else
11822    # We're on a posix platform. Hooray! :)
11823    path="$BOOT_JDK"
11824
11825    if test ! -f "$path" && test ! -d "$path"; then
11826      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11827    fi
11828
11829    has_space=`$ECHO "$path" | $GREP " "`
11830    if test "x$has_space" != x; then
11831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11832$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11833      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11834    fi
11835  fi
11836
11837              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11838$as_echo_n "checking for Boot JDK... " >&6; }
11839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11840$as_echo "$BOOT_JDK" >&6; }
11841              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11842$as_echo_n "checking Boot JDK version... " >&6; }
11843              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11844              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11845$as_echo "$BOOT_JDK_VERSION" >&6; }
11846            fi # end check jdk version
11847          fi # end check rt.jar
11848        fi # end check javac
11849      fi # end check java
11850    fi # end check boot jdk found
11851  fi
11852
11853
11854# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11855
11856  if test "x$BOOT_JDK_FOUND" = xno; then
11857    # Now execute the test
11858
11859    # Extract the first word of "javac", so it can be a program name with args.
11860set dummy javac; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $JAVAC_CHECK in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11878    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11890if test -n "$JAVAC_CHECK"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11892$as_echo "$JAVAC_CHECK" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899    # Extract the first word of "java", so it can be a program name with args.
11900set dummy java; ac_word=$2
11901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11902$as_echo_n "checking for $ac_word... " >&6; }
11903if ${ac_cv_path_JAVA_CHECK+:} false; then :
11904  $as_echo_n "(cached) " >&6
11905else
11906  case $JAVA_CHECK in
11907  [\\/]* | ?:[\\/]*)
11908  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11909  ;;
11910  *)
11911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11912for as_dir in $PATH
11913do
11914  IFS=$as_save_IFS
11915  test -z "$as_dir" && as_dir=.
11916    for ac_exec_ext in '' $ac_executable_extensions; do
11917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11918    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11920    break 2
11921  fi
11922done
11923  done
11924IFS=$as_save_IFS
11925
11926  ;;
11927esac
11928fi
11929JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11930if test -n "$JAVA_CHECK"; then
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11932$as_echo "$JAVA_CHECK" >&6; }
11933else
11934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11935$as_echo "no" >&6; }
11936fi
11937
11938
11939    BINARY="$JAVAC_CHECK"
11940    if test "x$JAVAC_CHECK" = x; then
11941        BINARY="$JAVA_CHECK"
11942    fi
11943    if test "x$BINARY" != x; then
11944        # So there is a java(c) binary, it might be part of a JDK.
11945        # Lets find the JDK/JRE directory by following symbolic links.
11946        # Linux/GNU systems often have links from /usr/bin/java to
11947        # /etc/alternatives/java to the real JDK binary.
11948
11949    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11950        # Follow a chain of symbolic links. Use readlink
11951        # where it exists, else fall back to horribly
11952        # complicated shell code.
11953        if test "x$READLINK_TESTED" != yes; then
11954            # On MacOSX there is a readlink tool with a different
11955            # purpose than the GNU readlink tool. Check the found readlink.
11956            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11957            if test "x$ISGNU" = x; then
11958                 # A readlink that we do not know how to use.
11959                 # Are there other non-GNU readlinks out there?
11960                 READLINK_TESTED=yes
11961                 READLINK=
11962            fi
11963        fi
11964
11965        if test "x$READLINK" != x; then
11966            BINARY=`$READLINK -f $BINARY`
11967        else
11968            # Save the current directory for restoring afterwards
11969            STARTDIR=$PWD
11970            COUNTER=0
11971            sym_link_dir=`$DIRNAME $BINARY`
11972            sym_link_file=`$BASENAME $BINARY`
11973            # Use the system pwd and not the shell builtin to resolve directory symlinks
11974            cd $sym_link_dir
11975            cd `$THEPWDCMD`
11976            sym_link_dir=`$THEPWDCMD`
11977            # Resolve file symlinks
11978            while test $COUNTER -lt 20; do
11979                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11980                if test "x$ISLINK" == x; then
11981                    # This is not a symbolic link! We are done!
11982                    break
11983                fi
11984                # Again resolve directory symlinks since the target of the just found
11985                # link could be in a different directory
11986                cd `$DIRNAME $ISLINK`
11987                sym_link_dir=`$THEPWDCMD`
11988                sym_link_file=`$BASENAME $ISLINK`
11989                let COUNTER=COUNTER+1
11990            done
11991            cd $STARTDIR
11992            BINARY=$sym_link_dir/$sym_link_file
11993        fi
11994    fi
11995
11996        BOOT_JDK=`dirname "$BINARY"`
11997        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11998        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11999            # Looks like we found ourselves an JDK
12000            BOOT_JDK_FOUND=maybe
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12002$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12003        fi
12004    fi
12005
12006
12007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12009      # Do we have a bin/java?
12010      if test ! -x "$BOOT_JDK/bin/java"; then
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12013        BOOT_JDK_FOUND=no
12014      else
12015        # Do we have a bin/javac?
12016        if test ! -x "$BOOT_JDK/bin/javac"; then
12017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12021          BOOT_JDK_FOUND=no
12022        else
12023          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12024          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12027            BOOT_JDK_FOUND=no
12028          else
12029            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12031
12032            # Extra M4 quote needed to protect [] in grep expression.
12033            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12034            if test "x$FOUND_VERSION_78" = x; then
12035              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12037              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12038$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12039              BOOT_JDK_FOUND=no
12040            else
12041              # We're done! :-)
12042              BOOT_JDK_FOUND=yes
12043
12044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12045
12046  # Input might be given as Windows format, start by converting to
12047  # unix format.
12048  path="$BOOT_JDK"
12049  new_path=`$CYGPATH -u "$path"`
12050
12051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12054  # "foo.exe" is OK but "foo" is an error.
12055  #
12056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12057  # It is also a way to make sure we got the proper file name for the real test later on.
12058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12059  if test "x$test_shortpath" = x; then
12060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12063  fi
12064
12065  # Call helper function which possibly converts this using DOS-style short mode.
12066  # If so, the updated path is stored in $new_path.
12067
12068  input_path="$new_path"
12069  # Check if we need to convert this using DOS-style short mode. If the path
12070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12071  # take no chances and rewrite it.
12072  # Note: m4 eats our [], so we need to use [ and ] instead.
12073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12074  if test "x$has_forbidden_chars" != x; then
12075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12079      # Going to short mode and back again did indeed matter. Since short mode is
12080      # case insensitive, let's make it lowercase to improve readability.
12081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12082      # Now convert it back to Unix-stile (cygpath)
12083      input_path=`$CYGPATH -u "$shortmode_path"`
12084      new_path="$input_path"
12085    fi
12086  fi
12087
12088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12089  if test "x$test_cygdrive_prefix" = x; then
12090    # As a simple fix, exclude /usr/bin since it's not a real path.
12091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12093      # a path prefixed by /cygdrive for fixpath to work.
12094      new_path="$CYGWIN_ROOT_PATH$input_path"
12095    fi
12096  fi
12097
12098
12099  if test "x$path" != "x$new_path"; then
12100    BOOT_JDK="$new_path"
12101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12103  fi
12104
12105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12106
12107  path="$BOOT_JDK"
12108  has_colon=`$ECHO $path | $GREP ^.:`
12109  new_path="$path"
12110  if test "x$has_colon" = x; then
12111    # Not in mixed or Windows style, start by that.
12112    new_path=`cmd //c echo $path`
12113  fi
12114
12115
12116  input_path="$new_path"
12117  # Check if we need to convert this using DOS-style short mode. If the path
12118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12119  # take no chances and rewrite it.
12120  # Note: m4 eats our [], so we need to use [ and ] instead.
12121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12122  if test "x$has_forbidden_chars" != x; then
12123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12125  fi
12126
12127
12128  windows_path="$new_path"
12129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12130    unix_path=`$CYGPATH -u "$windows_path"`
12131    new_path="$unix_path"
12132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12134    new_path="$unix_path"
12135  fi
12136
12137  if test "x$path" != "x$new_path"; then
12138    BOOT_JDK="$new_path"
12139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12141  fi
12142
12143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12145
12146  else
12147    # We're on a posix platform. Hooray! :)
12148    path="$BOOT_JDK"
12149
12150    if test ! -f "$path" && test ! -d "$path"; then
12151      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12152    fi
12153
12154    has_space=`$ECHO "$path" | $GREP " "`
12155    if test "x$has_space" != x; then
12156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12158      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12159    fi
12160  fi
12161
12162              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12163$as_echo_n "checking for Boot JDK... " >&6; }
12164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12165$as_echo "$BOOT_JDK" >&6; }
12166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12167$as_echo_n "checking Boot JDK version... " >&6; }
12168              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12170$as_echo "$BOOT_JDK_VERSION" >&6; }
12171            fi # end check jdk version
12172          fi # end check rt.jar
12173        fi # end check javac
12174      fi # end check java
12175    fi # end check boot jdk found
12176  fi
12177
12178
12179# Test: Is there a JDK installed in default, well-known locations?
12180
12181  if test "x$BOOT_JDK_FOUND" = xno; then
12182    # Now execute the test
12183
12184  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12185
12186  if test "x$BOOT_JDK_FOUND" = xno; then
12187    # Now execute the test
12188
12189  if test "x$ProgramW6432" != x; then
12190    VIRTUAL_DIR="$ProgramW6432/Java"
12191
12192  windows_path="$VIRTUAL_DIR"
12193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12194    unix_path=`$CYGPATH -u "$windows_path"`
12195    VIRTUAL_DIR="$unix_path"
12196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12198    VIRTUAL_DIR="$unix_path"
12199  fi
12200
12201
12202  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12203  BOOT_JDK_SUFFIX=""
12204  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12205  if test "x$ALL_JDKS_FOUND" != x; then
12206    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12207
12208  if test "x$BOOT_JDK_FOUND" = xno; then
12209    # Now execute the test
12210
12211        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12212        if test -d "$BOOT_JDK"; then
12213          BOOT_JDK_FOUND=maybe
12214          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12215$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12216        fi
12217
12218
12219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12221      # Do we have a bin/java?
12222      if test ! -x "$BOOT_JDK/bin/java"; then
12223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12225        BOOT_JDK_FOUND=no
12226      else
12227        # Do we have a bin/javac?
12228        if test ! -x "$BOOT_JDK/bin/javac"; then
12229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12233          BOOT_JDK_FOUND=no
12234        else
12235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12239            BOOT_JDK_FOUND=no
12240          else
12241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12243
12244            # Extra M4 quote needed to protect [] in grep expression.
12245            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12246            if test "x$FOUND_VERSION_78" = x; then
12247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12250$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12251              BOOT_JDK_FOUND=no
12252            else
12253              # We're done! :-)
12254              BOOT_JDK_FOUND=yes
12255
12256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12257
12258  # Input might be given as Windows format, start by converting to
12259  # unix format.
12260  path="$BOOT_JDK"
12261  new_path=`$CYGPATH -u "$path"`
12262
12263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12266  # "foo.exe" is OK but "foo" is an error.
12267  #
12268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12269  # It is also a way to make sure we got the proper file name for the real test later on.
12270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12271  if test "x$test_shortpath" = x; then
12272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12275  fi
12276
12277  # Call helper function which possibly converts this using DOS-style short mode.
12278  # If so, the updated path is stored in $new_path.
12279
12280  input_path="$new_path"
12281  # Check if we need to convert this using DOS-style short mode. If the path
12282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12283  # take no chances and rewrite it.
12284  # Note: m4 eats our [], so we need to use [ and ] instead.
12285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12286  if test "x$has_forbidden_chars" != x; then
12287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12291      # Going to short mode and back again did indeed matter. Since short mode is
12292      # case insensitive, let's make it lowercase to improve readability.
12293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12294      # Now convert it back to Unix-stile (cygpath)
12295      input_path=`$CYGPATH -u "$shortmode_path"`
12296      new_path="$input_path"
12297    fi
12298  fi
12299
12300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12301  if test "x$test_cygdrive_prefix" = x; then
12302    # As a simple fix, exclude /usr/bin since it's not a real path.
12303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12305      # a path prefixed by /cygdrive for fixpath to work.
12306      new_path="$CYGWIN_ROOT_PATH$input_path"
12307    fi
12308  fi
12309
12310
12311  if test "x$path" != "x$new_path"; then
12312    BOOT_JDK="$new_path"
12313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12315  fi
12316
12317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12318
12319  path="$BOOT_JDK"
12320  has_colon=`$ECHO $path | $GREP ^.:`
12321  new_path="$path"
12322  if test "x$has_colon" = x; then
12323    # Not in mixed or Windows style, start by that.
12324    new_path=`cmd //c echo $path`
12325  fi
12326
12327
12328  input_path="$new_path"
12329  # Check if we need to convert this using DOS-style short mode. If the path
12330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12331  # take no chances and rewrite it.
12332  # Note: m4 eats our [], so we need to use [ and ] instead.
12333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12334  if test "x$has_forbidden_chars" != x; then
12335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12337  fi
12338
12339
12340  windows_path="$new_path"
12341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12342    unix_path=`$CYGPATH -u "$windows_path"`
12343    new_path="$unix_path"
12344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12346    new_path="$unix_path"
12347  fi
12348
12349  if test "x$path" != "x$new_path"; then
12350    BOOT_JDK="$new_path"
12351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12353  fi
12354
12355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12357
12358  else
12359    # We're on a posix platform. Hooray! :)
12360    path="$BOOT_JDK"
12361
12362    if test ! -f "$path" && test ! -d "$path"; then
12363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12364    fi
12365
12366    has_space=`$ECHO "$path" | $GREP " "`
12367    if test "x$has_space" != x; then
12368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12371    fi
12372  fi
12373
12374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12375$as_echo_n "checking for Boot JDK... " >&6; }
12376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12377$as_echo "$BOOT_JDK" >&6; }
12378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12379$as_echo_n "checking Boot JDK version... " >&6; }
12380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12382$as_echo "$BOOT_JDK_VERSION" >&6; }
12383            fi # end check jdk version
12384          fi # end check rt.jar
12385        fi # end check javac
12386      fi # end check java
12387    fi # end check boot jdk found
12388  fi
12389
12390    done
12391  fi
12392
12393  fi
12394
12395
12396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12398      # Do we have a bin/java?
12399      if test ! -x "$BOOT_JDK/bin/java"; then
12400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12402        BOOT_JDK_FOUND=no
12403      else
12404        # Do we have a bin/javac?
12405        if test ! -x "$BOOT_JDK/bin/javac"; then
12406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12410          BOOT_JDK_FOUND=no
12411        else
12412          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12413          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12416            BOOT_JDK_FOUND=no
12417          else
12418            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12420
12421            # Extra M4 quote needed to protect [] in grep expression.
12422            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12423            if test "x$FOUND_VERSION_78" = x; then
12424              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12426              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12427$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12428              BOOT_JDK_FOUND=no
12429            else
12430              # We're done! :-)
12431              BOOT_JDK_FOUND=yes
12432
12433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12434
12435  # Input might be given as Windows format, start by converting to
12436  # unix format.
12437  path="$BOOT_JDK"
12438  new_path=`$CYGPATH -u "$path"`
12439
12440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12443  # "foo.exe" is OK but "foo" is an error.
12444  #
12445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12446  # It is also a way to make sure we got the proper file name for the real test later on.
12447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12448  if test "x$test_shortpath" = x; then
12449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12452  fi
12453
12454  # Call helper function which possibly converts this using DOS-style short mode.
12455  # If so, the updated path is stored in $new_path.
12456
12457  input_path="$new_path"
12458  # Check if we need to convert this using DOS-style short mode. If the path
12459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12460  # take no chances and rewrite it.
12461  # Note: m4 eats our [], so we need to use [ and ] instead.
12462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12463  if test "x$has_forbidden_chars" != x; then
12464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12468      # Going to short mode and back again did indeed matter. Since short mode is
12469      # case insensitive, let's make it lowercase to improve readability.
12470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12471      # Now convert it back to Unix-stile (cygpath)
12472      input_path=`$CYGPATH -u "$shortmode_path"`
12473      new_path="$input_path"
12474    fi
12475  fi
12476
12477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12478  if test "x$test_cygdrive_prefix" = x; then
12479    # As a simple fix, exclude /usr/bin since it's not a real path.
12480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12482      # a path prefixed by /cygdrive for fixpath to work.
12483      new_path="$CYGWIN_ROOT_PATH$input_path"
12484    fi
12485  fi
12486
12487
12488  if test "x$path" != "x$new_path"; then
12489    BOOT_JDK="$new_path"
12490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12492  fi
12493
12494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12495
12496  path="$BOOT_JDK"
12497  has_colon=`$ECHO $path | $GREP ^.:`
12498  new_path="$path"
12499  if test "x$has_colon" = x; then
12500    # Not in mixed or Windows style, start by that.
12501    new_path=`cmd //c echo $path`
12502  fi
12503
12504
12505  input_path="$new_path"
12506  # Check if we need to convert this using DOS-style short mode. If the path
12507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12508  # take no chances and rewrite it.
12509  # Note: m4 eats our [], so we need to use [ and ] instead.
12510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12511  if test "x$has_forbidden_chars" != x; then
12512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12514  fi
12515
12516
12517  windows_path="$new_path"
12518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12519    unix_path=`$CYGPATH -u "$windows_path"`
12520    new_path="$unix_path"
12521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12523    new_path="$unix_path"
12524  fi
12525
12526  if test "x$path" != "x$new_path"; then
12527    BOOT_JDK="$new_path"
12528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12530  fi
12531
12532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12534
12535  else
12536    # We're on a posix platform. Hooray! :)
12537    path="$BOOT_JDK"
12538
12539    if test ! -f "$path" && test ! -d "$path"; then
12540      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12541    fi
12542
12543    has_space=`$ECHO "$path" | $GREP " "`
12544    if test "x$has_space" != x; then
12545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12547      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12548    fi
12549  fi
12550
12551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12552$as_echo_n "checking for Boot JDK... " >&6; }
12553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12554$as_echo "$BOOT_JDK" >&6; }
12555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12556$as_echo_n "checking Boot JDK version... " >&6; }
12557              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12559$as_echo "$BOOT_JDK_VERSION" >&6; }
12560            fi # end check jdk version
12561          fi # end check rt.jar
12562        fi # end check javac
12563      fi # end check java
12564    fi # end check boot jdk found
12565  fi
12566
12567
12568  if test "x$BOOT_JDK_FOUND" = xno; then
12569    # Now execute the test
12570
12571  if test "x$PROGRAMW6432" != x; then
12572    VIRTUAL_DIR="$PROGRAMW6432/Java"
12573
12574  windows_path="$VIRTUAL_DIR"
12575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12576    unix_path=`$CYGPATH -u "$windows_path"`
12577    VIRTUAL_DIR="$unix_path"
12578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12580    VIRTUAL_DIR="$unix_path"
12581  fi
12582
12583
12584  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12585  BOOT_JDK_SUFFIX=""
12586  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12587  if test "x$ALL_JDKS_FOUND" != x; then
12588    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12589
12590  if test "x$BOOT_JDK_FOUND" = xno; then
12591    # Now execute the test
12592
12593        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12594        if test -d "$BOOT_JDK"; then
12595          BOOT_JDK_FOUND=maybe
12596          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12597$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12598        fi
12599
12600
12601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12603      # Do we have a bin/java?
12604      if test ! -x "$BOOT_JDK/bin/java"; then
12605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12607        BOOT_JDK_FOUND=no
12608      else
12609        # Do we have a bin/javac?
12610        if test ! -x "$BOOT_JDK/bin/javac"; then
12611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12615          BOOT_JDK_FOUND=no
12616        else
12617          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12618          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12619            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12621            BOOT_JDK_FOUND=no
12622          else
12623            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12624            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12625
12626            # Extra M4 quote needed to protect [] in grep expression.
12627            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12628            if test "x$FOUND_VERSION_78" = x; then
12629              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12631              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12632$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12633              BOOT_JDK_FOUND=no
12634            else
12635              # We're done! :-)
12636              BOOT_JDK_FOUND=yes
12637
12638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12639
12640  # Input might be given as Windows format, start by converting to
12641  # unix format.
12642  path="$BOOT_JDK"
12643  new_path=`$CYGPATH -u "$path"`
12644
12645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12648  # "foo.exe" is OK but "foo" is an error.
12649  #
12650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12651  # It is also a way to make sure we got the proper file name for the real test later on.
12652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12653  if test "x$test_shortpath" = x; then
12654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12656    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12657  fi
12658
12659  # Call helper function which possibly converts this using DOS-style short mode.
12660  # If so, the updated path is stored in $new_path.
12661
12662  input_path="$new_path"
12663  # Check if we need to convert this using DOS-style short mode. If the path
12664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12665  # take no chances and rewrite it.
12666  # Note: m4 eats our [], so we need to use [ and ] instead.
12667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12668  if test "x$has_forbidden_chars" != x; then
12669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12673      # Going to short mode and back again did indeed matter. Since short mode is
12674      # case insensitive, let's make it lowercase to improve readability.
12675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12676      # Now convert it back to Unix-stile (cygpath)
12677      input_path=`$CYGPATH -u "$shortmode_path"`
12678      new_path="$input_path"
12679    fi
12680  fi
12681
12682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12683  if test "x$test_cygdrive_prefix" = x; then
12684    # As a simple fix, exclude /usr/bin since it's not a real path.
12685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12687      # a path prefixed by /cygdrive for fixpath to work.
12688      new_path="$CYGWIN_ROOT_PATH$input_path"
12689    fi
12690  fi
12691
12692
12693  if test "x$path" != "x$new_path"; then
12694    BOOT_JDK="$new_path"
12695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12697  fi
12698
12699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12700
12701  path="$BOOT_JDK"
12702  has_colon=`$ECHO $path | $GREP ^.:`
12703  new_path="$path"
12704  if test "x$has_colon" = x; then
12705    # Not in mixed or Windows style, start by that.
12706    new_path=`cmd //c echo $path`
12707  fi
12708
12709
12710  input_path="$new_path"
12711  # Check if we need to convert this using DOS-style short mode. If the path
12712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12713  # take no chances and rewrite it.
12714  # Note: m4 eats our [], so we need to use [ and ] instead.
12715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12716  if test "x$has_forbidden_chars" != x; then
12717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12719  fi
12720
12721
12722  windows_path="$new_path"
12723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12724    unix_path=`$CYGPATH -u "$windows_path"`
12725    new_path="$unix_path"
12726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12728    new_path="$unix_path"
12729  fi
12730
12731  if test "x$path" != "x$new_path"; then
12732    BOOT_JDK="$new_path"
12733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12735  fi
12736
12737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12739
12740  else
12741    # We're on a posix platform. Hooray! :)
12742    path="$BOOT_JDK"
12743
12744    if test ! -f "$path" && test ! -d "$path"; then
12745      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12746    fi
12747
12748    has_space=`$ECHO "$path" | $GREP " "`
12749    if test "x$has_space" != x; then
12750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12752      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12753    fi
12754  fi
12755
12756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12757$as_echo_n "checking for Boot JDK... " >&6; }
12758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12759$as_echo "$BOOT_JDK" >&6; }
12760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12761$as_echo_n "checking Boot JDK version... " >&6; }
12762              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12764$as_echo "$BOOT_JDK_VERSION" >&6; }
12765            fi # end check jdk version
12766          fi # end check rt.jar
12767        fi # end check javac
12768      fi # end check java
12769    fi # end check boot jdk found
12770  fi
12771
12772    done
12773  fi
12774
12775  fi
12776
12777
12778    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12779    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12780      # Do we have a bin/java?
12781      if test ! -x "$BOOT_JDK/bin/java"; then
12782        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12784        BOOT_JDK_FOUND=no
12785      else
12786        # Do we have a bin/javac?
12787        if test ! -x "$BOOT_JDK/bin/javac"; then
12788          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12790          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12791$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12792          BOOT_JDK_FOUND=no
12793        else
12794          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12795          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12798            BOOT_JDK_FOUND=no
12799          else
12800            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12801            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12802
12803            # Extra M4 quote needed to protect [] in grep expression.
12804            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12805            if test "x$FOUND_VERSION_78" = x; then
12806              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12808              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12809$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12810              BOOT_JDK_FOUND=no
12811            else
12812              # We're done! :-)
12813              BOOT_JDK_FOUND=yes
12814
12815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12816
12817  # Input might be given as Windows format, start by converting to
12818  # unix format.
12819  path="$BOOT_JDK"
12820  new_path=`$CYGPATH -u "$path"`
12821
12822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12825  # "foo.exe" is OK but "foo" is an error.
12826  #
12827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12828  # It is also a way to make sure we got the proper file name for the real test later on.
12829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12830  if test "x$test_shortpath" = x; then
12831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12832$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12833    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12834  fi
12835
12836  # Call helper function which possibly converts this using DOS-style short mode.
12837  # If so, the updated path is stored in $new_path.
12838
12839  input_path="$new_path"
12840  # Check if we need to convert this using DOS-style short mode. If the path
12841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12842  # take no chances and rewrite it.
12843  # Note: m4 eats our [], so we need to use [ and ] instead.
12844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12845  if test "x$has_forbidden_chars" != x; then
12846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12850      # Going to short mode and back again did indeed matter. Since short mode is
12851      # case insensitive, let's make it lowercase to improve readability.
12852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12853      # Now convert it back to Unix-stile (cygpath)
12854      input_path=`$CYGPATH -u "$shortmode_path"`
12855      new_path="$input_path"
12856    fi
12857  fi
12858
12859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12860  if test "x$test_cygdrive_prefix" = x; then
12861    # As a simple fix, exclude /usr/bin since it's not a real path.
12862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12864      # a path prefixed by /cygdrive for fixpath to work.
12865      new_path="$CYGWIN_ROOT_PATH$input_path"
12866    fi
12867  fi
12868
12869
12870  if test "x$path" != "x$new_path"; then
12871    BOOT_JDK="$new_path"
12872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12874  fi
12875
12876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12877
12878  path="$BOOT_JDK"
12879  has_colon=`$ECHO $path | $GREP ^.:`
12880  new_path="$path"
12881  if test "x$has_colon" = x; then
12882    # Not in mixed or Windows style, start by that.
12883    new_path=`cmd //c echo $path`
12884  fi
12885
12886
12887  input_path="$new_path"
12888  # Check if we need to convert this using DOS-style short mode. If the path
12889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12890  # take no chances and rewrite it.
12891  # Note: m4 eats our [], so we need to use [ and ] instead.
12892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12893  if test "x$has_forbidden_chars" != x; then
12894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12896  fi
12897
12898
12899  windows_path="$new_path"
12900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12901    unix_path=`$CYGPATH -u "$windows_path"`
12902    new_path="$unix_path"
12903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12905    new_path="$unix_path"
12906  fi
12907
12908  if test "x$path" != "x$new_path"; then
12909    BOOT_JDK="$new_path"
12910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12912  fi
12913
12914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12916
12917  else
12918    # We're on a posix platform. Hooray! :)
12919    path="$BOOT_JDK"
12920
12921    if test ! -f "$path" && test ! -d "$path"; then
12922      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12923    fi
12924
12925    has_space=`$ECHO "$path" | $GREP " "`
12926    if test "x$has_space" != x; then
12927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12929      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12930    fi
12931  fi
12932
12933              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12934$as_echo_n "checking for Boot JDK... " >&6; }
12935              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12936$as_echo "$BOOT_JDK" >&6; }
12937              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12938$as_echo_n "checking Boot JDK version... " >&6; }
12939              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12940              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12941$as_echo "$BOOT_JDK_VERSION" >&6; }
12942            fi # end check jdk version
12943          fi # end check rt.jar
12944        fi # end check javac
12945      fi # end check java
12946    fi # end check boot jdk found
12947  fi
12948
12949
12950  if test "x$BOOT_JDK_FOUND" = xno; then
12951    # Now execute the test
12952
12953  if test "x$PROGRAMFILES" != x; then
12954    VIRTUAL_DIR="$PROGRAMFILES/Java"
12955
12956  windows_path="$VIRTUAL_DIR"
12957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12958    unix_path=`$CYGPATH -u "$windows_path"`
12959    VIRTUAL_DIR="$unix_path"
12960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12962    VIRTUAL_DIR="$unix_path"
12963  fi
12964
12965
12966  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12967  BOOT_JDK_SUFFIX=""
12968  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12969  if test "x$ALL_JDKS_FOUND" != x; then
12970    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12971
12972  if test "x$BOOT_JDK_FOUND" = xno; then
12973    # Now execute the test
12974
12975        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12976        if test -d "$BOOT_JDK"; then
12977          BOOT_JDK_FOUND=maybe
12978          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12979$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12980        fi
12981
12982
12983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12985      # Do we have a bin/java?
12986      if test ! -x "$BOOT_JDK/bin/java"; then
12987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12989        BOOT_JDK_FOUND=no
12990      else
12991        # Do we have a bin/javac?
12992        if test ! -x "$BOOT_JDK/bin/javac"; then
12993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12997          BOOT_JDK_FOUND=no
12998        else
12999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13003            BOOT_JDK_FOUND=no
13004          else
13005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13007
13008            # Extra M4 quote needed to protect [] in grep expression.
13009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13010            if test "x$FOUND_VERSION_78" = x; then
13011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13015              BOOT_JDK_FOUND=no
13016            else
13017              # We're done! :-)
13018              BOOT_JDK_FOUND=yes
13019
13020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13021
13022  # Input might be given as Windows format, start by converting to
13023  # unix format.
13024  path="$BOOT_JDK"
13025  new_path=`$CYGPATH -u "$path"`
13026
13027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13030  # "foo.exe" is OK but "foo" is an error.
13031  #
13032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13033  # It is also a way to make sure we got the proper file name for the real test later on.
13034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13035  if test "x$test_shortpath" = x; then
13036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13039  fi
13040
13041  # Call helper function which possibly converts this using DOS-style short mode.
13042  # If so, the updated path is stored in $new_path.
13043
13044  input_path="$new_path"
13045  # Check if we need to convert this using DOS-style short mode. If the path
13046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13047  # take no chances and rewrite it.
13048  # Note: m4 eats our [], so we need to use [ and ] instead.
13049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13050  if test "x$has_forbidden_chars" != x; then
13051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13055      # Going to short mode and back again did indeed matter. Since short mode is
13056      # case insensitive, let's make it lowercase to improve readability.
13057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13058      # Now convert it back to Unix-stile (cygpath)
13059      input_path=`$CYGPATH -u "$shortmode_path"`
13060      new_path="$input_path"
13061    fi
13062  fi
13063
13064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13065  if test "x$test_cygdrive_prefix" = x; then
13066    # As a simple fix, exclude /usr/bin since it's not a real path.
13067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13069      # a path prefixed by /cygdrive for fixpath to work.
13070      new_path="$CYGWIN_ROOT_PATH$input_path"
13071    fi
13072  fi
13073
13074
13075  if test "x$path" != "x$new_path"; then
13076    BOOT_JDK="$new_path"
13077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13079  fi
13080
13081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13082
13083  path="$BOOT_JDK"
13084  has_colon=`$ECHO $path | $GREP ^.:`
13085  new_path="$path"
13086  if test "x$has_colon" = x; then
13087    # Not in mixed or Windows style, start by that.
13088    new_path=`cmd //c echo $path`
13089  fi
13090
13091
13092  input_path="$new_path"
13093  # Check if we need to convert this using DOS-style short mode. If the path
13094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13095  # take no chances and rewrite it.
13096  # Note: m4 eats our [], so we need to use [ and ] instead.
13097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13098  if test "x$has_forbidden_chars" != x; then
13099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13101  fi
13102
13103
13104  windows_path="$new_path"
13105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13106    unix_path=`$CYGPATH -u "$windows_path"`
13107    new_path="$unix_path"
13108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13110    new_path="$unix_path"
13111  fi
13112
13113  if test "x$path" != "x$new_path"; then
13114    BOOT_JDK="$new_path"
13115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13117  fi
13118
13119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13121
13122  else
13123    # We're on a posix platform. Hooray! :)
13124    path="$BOOT_JDK"
13125
13126    if test ! -f "$path" && test ! -d "$path"; then
13127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13128    fi
13129
13130    has_space=`$ECHO "$path" | $GREP " "`
13131    if test "x$has_space" != x; then
13132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13134      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13135    fi
13136  fi
13137
13138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13139$as_echo_n "checking for Boot JDK... " >&6; }
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13141$as_echo "$BOOT_JDK" >&6; }
13142              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13143$as_echo_n "checking Boot JDK version... " >&6; }
13144              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13146$as_echo "$BOOT_JDK_VERSION" >&6; }
13147            fi # end check jdk version
13148          fi # end check rt.jar
13149        fi # end check javac
13150      fi # end check java
13151    fi # end check boot jdk found
13152  fi
13153
13154    done
13155  fi
13156
13157  fi
13158
13159
13160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13162      # Do we have a bin/java?
13163      if test ! -x "$BOOT_JDK/bin/java"; then
13164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13166        BOOT_JDK_FOUND=no
13167      else
13168        # Do we have a bin/javac?
13169        if test ! -x "$BOOT_JDK/bin/javac"; then
13170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13174          BOOT_JDK_FOUND=no
13175        else
13176          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13177          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13180            BOOT_JDK_FOUND=no
13181          else
13182            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13183            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13184
13185            # Extra M4 quote needed to protect [] in grep expression.
13186            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13187            if test "x$FOUND_VERSION_78" = x; then
13188              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13190              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13191$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13192              BOOT_JDK_FOUND=no
13193            else
13194              # We're done! :-)
13195              BOOT_JDK_FOUND=yes
13196
13197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13198
13199  # Input might be given as Windows format, start by converting to
13200  # unix format.
13201  path="$BOOT_JDK"
13202  new_path=`$CYGPATH -u "$path"`
13203
13204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13207  # "foo.exe" is OK but "foo" is an error.
13208  #
13209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13210  # It is also a way to make sure we got the proper file name for the real test later on.
13211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13212  if test "x$test_shortpath" = x; then
13213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13216  fi
13217
13218  # Call helper function which possibly converts this using DOS-style short mode.
13219  # If so, the updated path is stored in $new_path.
13220
13221  input_path="$new_path"
13222  # Check if we need to convert this using DOS-style short mode. If the path
13223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13224  # take no chances and rewrite it.
13225  # Note: m4 eats our [], so we need to use [ and ] instead.
13226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13227  if test "x$has_forbidden_chars" != x; then
13228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13232      # Going to short mode and back again did indeed matter. Since short mode is
13233      # case insensitive, let's make it lowercase to improve readability.
13234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13235      # Now convert it back to Unix-stile (cygpath)
13236      input_path=`$CYGPATH -u "$shortmode_path"`
13237      new_path="$input_path"
13238    fi
13239  fi
13240
13241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13242  if test "x$test_cygdrive_prefix" = x; then
13243    # As a simple fix, exclude /usr/bin since it's not a real path.
13244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13246      # a path prefixed by /cygdrive for fixpath to work.
13247      new_path="$CYGWIN_ROOT_PATH$input_path"
13248    fi
13249  fi
13250
13251
13252  if test "x$path" != "x$new_path"; then
13253    BOOT_JDK="$new_path"
13254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13256  fi
13257
13258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13259
13260  path="$BOOT_JDK"
13261  has_colon=`$ECHO $path | $GREP ^.:`
13262  new_path="$path"
13263  if test "x$has_colon" = x; then
13264    # Not in mixed or Windows style, start by that.
13265    new_path=`cmd //c echo $path`
13266  fi
13267
13268
13269  input_path="$new_path"
13270  # Check if we need to convert this using DOS-style short mode. If the path
13271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13272  # take no chances and rewrite it.
13273  # Note: m4 eats our [], so we need to use [ and ] instead.
13274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13275  if test "x$has_forbidden_chars" != x; then
13276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13278  fi
13279
13280
13281  windows_path="$new_path"
13282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13283    unix_path=`$CYGPATH -u "$windows_path"`
13284    new_path="$unix_path"
13285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13287    new_path="$unix_path"
13288  fi
13289
13290  if test "x$path" != "x$new_path"; then
13291    BOOT_JDK="$new_path"
13292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13294  fi
13295
13296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13298
13299  else
13300    # We're on a posix platform. Hooray! :)
13301    path="$BOOT_JDK"
13302
13303    if test ! -f "$path" && test ! -d "$path"; then
13304      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13305    fi
13306
13307    has_space=`$ECHO "$path" | $GREP " "`
13308    if test "x$has_space" != x; then
13309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13311      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13312    fi
13313  fi
13314
13315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13316$as_echo_n "checking for Boot JDK... " >&6; }
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13318$as_echo "$BOOT_JDK" >&6; }
13319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13320$as_echo_n "checking Boot JDK version... " >&6; }
13321              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13322              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13323$as_echo "$BOOT_JDK_VERSION" >&6; }
13324            fi # end check jdk version
13325          fi # end check rt.jar
13326        fi # end check javac
13327      fi # end check java
13328    fi # end check boot jdk found
13329  fi
13330
13331
13332  if test "x$BOOT_JDK_FOUND" = xno; then
13333    # Now execute the test
13334
13335  if test "x$ProgramFiles" != x; then
13336    VIRTUAL_DIR="$ProgramFiles/Java"
13337
13338  windows_path="$VIRTUAL_DIR"
13339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13340    unix_path=`$CYGPATH -u "$windows_path"`
13341    VIRTUAL_DIR="$unix_path"
13342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13344    VIRTUAL_DIR="$unix_path"
13345  fi
13346
13347
13348  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13349  BOOT_JDK_SUFFIX=""
13350  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13351  if test "x$ALL_JDKS_FOUND" != x; then
13352    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13353
13354  if test "x$BOOT_JDK_FOUND" = xno; then
13355    # Now execute the test
13356
13357        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13358        if test -d "$BOOT_JDK"; then
13359          BOOT_JDK_FOUND=maybe
13360          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13361$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13362        fi
13363
13364
13365    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13366    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13367      # Do we have a bin/java?
13368      if test ! -x "$BOOT_JDK/bin/java"; then
13369        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13371        BOOT_JDK_FOUND=no
13372      else
13373        # Do we have a bin/javac?
13374        if test ! -x "$BOOT_JDK/bin/javac"; then
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13377          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13378$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13379          BOOT_JDK_FOUND=no
13380        else
13381          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13382          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13385            BOOT_JDK_FOUND=no
13386          else
13387            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13389
13390            # Extra M4 quote needed to protect [] in grep expression.
13391            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13392            if test "x$FOUND_VERSION_78" = x; then
13393              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13395              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13396$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13397              BOOT_JDK_FOUND=no
13398            else
13399              # We're done! :-)
13400              BOOT_JDK_FOUND=yes
13401
13402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13403
13404  # Input might be given as Windows format, start by converting to
13405  # unix format.
13406  path="$BOOT_JDK"
13407  new_path=`$CYGPATH -u "$path"`
13408
13409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13412  # "foo.exe" is OK but "foo" is an error.
13413  #
13414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13415  # It is also a way to make sure we got the proper file name for the real test later on.
13416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13417  if test "x$test_shortpath" = x; then
13418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13421  fi
13422
13423  # Call helper function which possibly converts this using DOS-style short mode.
13424  # If so, the updated path is stored in $new_path.
13425
13426  input_path="$new_path"
13427  # Check if we need to convert this using DOS-style short mode. If the path
13428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13429  # take no chances and rewrite it.
13430  # Note: m4 eats our [], so we need to use [ and ] instead.
13431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13432  if test "x$has_forbidden_chars" != x; then
13433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13437      # Going to short mode and back again did indeed matter. Since short mode is
13438      # case insensitive, let's make it lowercase to improve readability.
13439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13440      # Now convert it back to Unix-stile (cygpath)
13441      input_path=`$CYGPATH -u "$shortmode_path"`
13442      new_path="$input_path"
13443    fi
13444  fi
13445
13446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13447  if test "x$test_cygdrive_prefix" = x; then
13448    # As a simple fix, exclude /usr/bin since it's not a real path.
13449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13451      # a path prefixed by /cygdrive for fixpath to work.
13452      new_path="$CYGWIN_ROOT_PATH$input_path"
13453    fi
13454  fi
13455
13456
13457  if test "x$path" != "x$new_path"; then
13458    BOOT_JDK="$new_path"
13459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13461  fi
13462
13463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13464
13465  path="$BOOT_JDK"
13466  has_colon=`$ECHO $path | $GREP ^.:`
13467  new_path="$path"
13468  if test "x$has_colon" = x; then
13469    # Not in mixed or Windows style, start by that.
13470    new_path=`cmd //c echo $path`
13471  fi
13472
13473
13474  input_path="$new_path"
13475  # Check if we need to convert this using DOS-style short mode. If the path
13476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13477  # take no chances and rewrite it.
13478  # Note: m4 eats our [], so we need to use [ and ] instead.
13479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13480  if test "x$has_forbidden_chars" != x; then
13481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13483  fi
13484
13485
13486  windows_path="$new_path"
13487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13488    unix_path=`$CYGPATH -u "$windows_path"`
13489    new_path="$unix_path"
13490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13492    new_path="$unix_path"
13493  fi
13494
13495  if test "x$path" != "x$new_path"; then
13496    BOOT_JDK="$new_path"
13497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13499  fi
13500
13501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13503
13504  else
13505    # We're on a posix platform. Hooray! :)
13506    path="$BOOT_JDK"
13507
13508    if test ! -f "$path" && test ! -d "$path"; then
13509      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13510    fi
13511
13512    has_space=`$ECHO "$path" | $GREP " "`
13513    if test "x$has_space" != x; then
13514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13516      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13517    fi
13518  fi
13519
13520              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13521$as_echo_n "checking for Boot JDK... " >&6; }
13522              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13523$as_echo "$BOOT_JDK" >&6; }
13524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13525$as_echo_n "checking Boot JDK version... " >&6; }
13526              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13527              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13528$as_echo "$BOOT_JDK_VERSION" >&6; }
13529            fi # end check jdk version
13530          fi # end check rt.jar
13531        fi # end check javac
13532      fi # end check java
13533    fi # end check boot jdk found
13534  fi
13535
13536    done
13537  fi
13538
13539  fi
13540
13541
13542    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13543    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13544      # Do we have a bin/java?
13545      if test ! -x "$BOOT_JDK/bin/java"; then
13546        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13548        BOOT_JDK_FOUND=no
13549      else
13550        # Do we have a bin/javac?
13551        if test ! -x "$BOOT_JDK/bin/javac"; then
13552          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13554          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13555$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13556          BOOT_JDK_FOUND=no
13557        else
13558          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13559          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13562            BOOT_JDK_FOUND=no
13563          else
13564            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13566
13567            # Extra M4 quote needed to protect [] in grep expression.
13568            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13569            if test "x$FOUND_VERSION_78" = x; then
13570              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13572              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13573$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13574              BOOT_JDK_FOUND=no
13575            else
13576              # We're done! :-)
13577              BOOT_JDK_FOUND=yes
13578
13579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13580
13581  # Input might be given as Windows format, start by converting to
13582  # unix format.
13583  path="$BOOT_JDK"
13584  new_path=`$CYGPATH -u "$path"`
13585
13586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13589  # "foo.exe" is OK but "foo" is an error.
13590  #
13591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13592  # It is also a way to make sure we got the proper file name for the real test later on.
13593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13594  if test "x$test_shortpath" = x; then
13595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13598  fi
13599
13600  # Call helper function which possibly converts this using DOS-style short mode.
13601  # If so, the updated path is stored in $new_path.
13602
13603  input_path="$new_path"
13604  # Check if we need to convert this using DOS-style short mode. If the path
13605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13606  # take no chances and rewrite it.
13607  # Note: m4 eats our [], so we need to use [ and ] instead.
13608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13609  if test "x$has_forbidden_chars" != x; then
13610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13614      # Going to short mode and back again did indeed matter. Since short mode is
13615      # case insensitive, let's make it lowercase to improve readability.
13616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13617      # Now convert it back to Unix-stile (cygpath)
13618      input_path=`$CYGPATH -u "$shortmode_path"`
13619      new_path="$input_path"
13620    fi
13621  fi
13622
13623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13624  if test "x$test_cygdrive_prefix" = x; then
13625    # As a simple fix, exclude /usr/bin since it's not a real path.
13626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13628      # a path prefixed by /cygdrive for fixpath to work.
13629      new_path="$CYGWIN_ROOT_PATH$input_path"
13630    fi
13631  fi
13632
13633
13634  if test "x$path" != "x$new_path"; then
13635    BOOT_JDK="$new_path"
13636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13638  fi
13639
13640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13641
13642  path="$BOOT_JDK"
13643  has_colon=`$ECHO $path | $GREP ^.:`
13644  new_path="$path"
13645  if test "x$has_colon" = x; then
13646    # Not in mixed or Windows style, start by that.
13647    new_path=`cmd //c echo $path`
13648  fi
13649
13650
13651  input_path="$new_path"
13652  # Check if we need to convert this using DOS-style short mode. If the path
13653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13654  # take no chances and rewrite it.
13655  # Note: m4 eats our [], so we need to use [ and ] instead.
13656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13657  if test "x$has_forbidden_chars" != x; then
13658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13660  fi
13661
13662
13663  windows_path="$new_path"
13664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13665    unix_path=`$CYGPATH -u "$windows_path"`
13666    new_path="$unix_path"
13667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13669    new_path="$unix_path"
13670  fi
13671
13672  if test "x$path" != "x$new_path"; then
13673    BOOT_JDK="$new_path"
13674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13676  fi
13677
13678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13680
13681  else
13682    # We're on a posix platform. Hooray! :)
13683    path="$BOOT_JDK"
13684
13685    if test ! -f "$path" && test ! -d "$path"; then
13686      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13687    fi
13688
13689    has_space=`$ECHO "$path" | $GREP " "`
13690    if test "x$has_space" != x; then
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13693      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13694    fi
13695  fi
13696
13697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13698$as_echo_n "checking for Boot JDK... " >&6; }
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13700$as_echo "$BOOT_JDK" >&6; }
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13702$as_echo_n "checking Boot JDK version... " >&6; }
13703              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13705$as_echo "$BOOT_JDK_VERSION" >&6; }
13706            fi # end check jdk version
13707          fi # end check rt.jar
13708        fi # end check javac
13709      fi # end check java
13710    fi # end check boot jdk found
13711  fi
13712
13713
13714  if test "x$BOOT_JDK_FOUND" = xno; then
13715    # Now execute the test
13716
13717  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13718  BOOT_JDK_SUFFIX=""
13719  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13720  if test "x$ALL_JDKS_FOUND" != x; then
13721    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13722
13723  if test "x$BOOT_JDK_FOUND" = xno; then
13724    # Now execute the test
13725
13726        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13727        if test -d "$BOOT_JDK"; then
13728          BOOT_JDK_FOUND=maybe
13729          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13730$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13731        fi
13732
13733
13734    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13735    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13736      # Do we have a bin/java?
13737      if test ! -x "$BOOT_JDK/bin/java"; then
13738        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13740        BOOT_JDK_FOUND=no
13741      else
13742        # Do we have a bin/javac?
13743        if test ! -x "$BOOT_JDK/bin/javac"; then
13744          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13746          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13747$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13748          BOOT_JDK_FOUND=no
13749        else
13750          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13751          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13752            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13754            BOOT_JDK_FOUND=no
13755          else
13756            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13758
13759            # Extra M4 quote needed to protect [] in grep expression.
13760            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13761            if test "x$FOUND_VERSION_78" = x; then
13762              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13764              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13765$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13766              BOOT_JDK_FOUND=no
13767            else
13768              # We're done! :-)
13769              BOOT_JDK_FOUND=yes
13770
13771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13772
13773  # Input might be given as Windows format, start by converting to
13774  # unix format.
13775  path="$BOOT_JDK"
13776  new_path=`$CYGPATH -u "$path"`
13777
13778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13781  # "foo.exe" is OK but "foo" is an error.
13782  #
13783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13784  # It is also a way to make sure we got the proper file name for the real test later on.
13785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13786  if test "x$test_shortpath" = x; then
13787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13790  fi
13791
13792  # Call helper function which possibly converts this using DOS-style short mode.
13793  # If so, the updated path is stored in $new_path.
13794
13795  input_path="$new_path"
13796  # Check if we need to convert this using DOS-style short mode. If the path
13797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13798  # take no chances and rewrite it.
13799  # Note: m4 eats our [], so we need to use [ and ] instead.
13800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13801  if test "x$has_forbidden_chars" != x; then
13802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13806      # Going to short mode and back again did indeed matter. Since short mode is
13807      # case insensitive, let's make it lowercase to improve readability.
13808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13809      # Now convert it back to Unix-stile (cygpath)
13810      input_path=`$CYGPATH -u "$shortmode_path"`
13811      new_path="$input_path"
13812    fi
13813  fi
13814
13815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13816  if test "x$test_cygdrive_prefix" = x; then
13817    # As a simple fix, exclude /usr/bin since it's not a real path.
13818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13820      # a path prefixed by /cygdrive for fixpath to work.
13821      new_path="$CYGWIN_ROOT_PATH$input_path"
13822    fi
13823  fi
13824
13825
13826  if test "x$path" != "x$new_path"; then
13827    BOOT_JDK="$new_path"
13828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13830  fi
13831
13832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13833
13834  path="$BOOT_JDK"
13835  has_colon=`$ECHO $path | $GREP ^.:`
13836  new_path="$path"
13837  if test "x$has_colon" = x; then
13838    # Not in mixed or Windows style, start by that.
13839    new_path=`cmd //c echo $path`
13840  fi
13841
13842
13843  input_path="$new_path"
13844  # Check if we need to convert this using DOS-style short mode. If the path
13845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13846  # take no chances and rewrite it.
13847  # Note: m4 eats our [], so we need to use [ and ] instead.
13848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13849  if test "x$has_forbidden_chars" != x; then
13850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13852  fi
13853
13854
13855  windows_path="$new_path"
13856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13857    unix_path=`$CYGPATH -u "$windows_path"`
13858    new_path="$unix_path"
13859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13861    new_path="$unix_path"
13862  fi
13863
13864  if test "x$path" != "x$new_path"; then
13865    BOOT_JDK="$new_path"
13866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13868  fi
13869
13870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13872
13873  else
13874    # We're on a posix platform. Hooray! :)
13875    path="$BOOT_JDK"
13876
13877    if test ! -f "$path" && test ! -d "$path"; then
13878      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13879    fi
13880
13881    has_space=`$ECHO "$path" | $GREP " "`
13882    if test "x$has_space" != x; then
13883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13886    fi
13887  fi
13888
13889              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13890$as_echo_n "checking for Boot JDK... " >&6; }
13891              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13892$as_echo "$BOOT_JDK" >&6; }
13893              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13894$as_echo_n "checking Boot JDK version... " >&6; }
13895              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13896              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13897$as_echo "$BOOT_JDK_VERSION" >&6; }
13898            fi # end check jdk version
13899          fi # end check rt.jar
13900        fi # end check javac
13901      fi # end check java
13902    fi # end check boot jdk found
13903  fi
13904
13905    done
13906  fi
13907
13908
13909    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13910    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13911      # Do we have a bin/java?
13912      if test ! -x "$BOOT_JDK/bin/java"; then
13913        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13915        BOOT_JDK_FOUND=no
13916      else
13917        # Do we have a bin/javac?
13918        if test ! -x "$BOOT_JDK/bin/javac"; then
13919          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13921          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13922$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13923          BOOT_JDK_FOUND=no
13924        else
13925          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13926          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13929            BOOT_JDK_FOUND=no
13930          else
13931            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13932            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13933
13934            # Extra M4 quote needed to protect [] in grep expression.
13935            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13936            if test "x$FOUND_VERSION_78" = x; then
13937              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13939              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13940$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13941              BOOT_JDK_FOUND=no
13942            else
13943              # We're done! :-)
13944              BOOT_JDK_FOUND=yes
13945
13946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13947
13948  # Input might be given as Windows format, start by converting to
13949  # unix format.
13950  path="$BOOT_JDK"
13951  new_path=`$CYGPATH -u "$path"`
13952
13953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13956  # "foo.exe" is OK but "foo" is an error.
13957  #
13958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13959  # It is also a way to make sure we got the proper file name for the real test later on.
13960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13961  if test "x$test_shortpath" = x; then
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13964    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13965  fi
13966
13967  # Call helper function which possibly converts this using DOS-style short mode.
13968  # If so, the updated path is stored in $new_path.
13969
13970  input_path="$new_path"
13971  # Check if we need to convert this using DOS-style short mode. If the path
13972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13973  # take no chances and rewrite it.
13974  # Note: m4 eats our [], so we need to use [ and ] instead.
13975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13976  if test "x$has_forbidden_chars" != x; then
13977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13981      # Going to short mode and back again did indeed matter. Since short mode is
13982      # case insensitive, let's make it lowercase to improve readability.
13983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13984      # Now convert it back to Unix-stile (cygpath)
13985      input_path=`$CYGPATH -u "$shortmode_path"`
13986      new_path="$input_path"
13987    fi
13988  fi
13989
13990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13991  if test "x$test_cygdrive_prefix" = x; then
13992    # As a simple fix, exclude /usr/bin since it's not a real path.
13993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13995      # a path prefixed by /cygdrive for fixpath to work.
13996      new_path="$CYGWIN_ROOT_PATH$input_path"
13997    fi
13998  fi
13999
14000
14001  if test "x$path" != "x$new_path"; then
14002    BOOT_JDK="$new_path"
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14005  fi
14006
14007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14008
14009  path="$BOOT_JDK"
14010  has_colon=`$ECHO $path | $GREP ^.:`
14011  new_path="$path"
14012  if test "x$has_colon" = x; then
14013    # Not in mixed or Windows style, start by that.
14014    new_path=`cmd //c echo $path`
14015  fi
14016
14017
14018  input_path="$new_path"
14019  # Check if we need to convert this using DOS-style short mode. If the path
14020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14021  # take no chances and rewrite it.
14022  # Note: m4 eats our [], so we need to use [ and ] instead.
14023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14024  if test "x$has_forbidden_chars" != x; then
14025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14027  fi
14028
14029
14030  windows_path="$new_path"
14031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14032    unix_path=`$CYGPATH -u "$windows_path"`
14033    new_path="$unix_path"
14034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14036    new_path="$unix_path"
14037  fi
14038
14039  if test "x$path" != "x$new_path"; then
14040    BOOT_JDK="$new_path"
14041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14043  fi
14044
14045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14047
14048  else
14049    # We're on a posix platform. Hooray! :)
14050    path="$BOOT_JDK"
14051
14052    if test ! -f "$path" && test ! -d "$path"; then
14053      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14054    fi
14055
14056    has_space=`$ECHO "$path" | $GREP " "`
14057    if test "x$has_space" != x; then
14058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14061    fi
14062  fi
14063
14064              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14065$as_echo_n "checking for Boot JDK... " >&6; }
14066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14067$as_echo "$BOOT_JDK" >&6; }
14068              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14069$as_echo_n "checking Boot JDK version... " >&6; }
14070              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14071              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14072$as_echo "$BOOT_JDK_VERSION" >&6; }
14073            fi # end check jdk version
14074          fi # end check rt.jar
14075        fi # end check javac
14076      fi # end check java
14077    fi # end check boot jdk found
14078  fi
14079
14080  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14081
14082  if test "x$BOOT_JDK_FOUND" = xno; then
14083    # Now execute the test
14084
14085  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14086  BOOT_JDK_SUFFIX="/Contents/Home"
14087  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14088  if test "x$ALL_JDKS_FOUND" != x; then
14089    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14090
14091  if test "x$BOOT_JDK_FOUND" = xno; then
14092    # Now execute the test
14093
14094        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14095        if test -d "$BOOT_JDK"; then
14096          BOOT_JDK_FOUND=maybe
14097          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14098$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14099        fi
14100
14101
14102    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14103    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14104      # Do we have a bin/java?
14105      if test ! -x "$BOOT_JDK/bin/java"; then
14106        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14108        BOOT_JDK_FOUND=no
14109      else
14110        # Do we have a bin/javac?
14111        if test ! -x "$BOOT_JDK/bin/javac"; then
14112          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14115$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14116          BOOT_JDK_FOUND=no
14117        else
14118          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14119          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14122            BOOT_JDK_FOUND=no
14123          else
14124            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14126
14127            # Extra M4 quote needed to protect [] in grep expression.
14128            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14129            if test "x$FOUND_VERSION_78" = x; then
14130              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14132              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14133$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14134              BOOT_JDK_FOUND=no
14135            else
14136              # We're done! :-)
14137              BOOT_JDK_FOUND=yes
14138
14139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14140
14141  # Input might be given as Windows format, start by converting to
14142  # unix format.
14143  path="$BOOT_JDK"
14144  new_path=`$CYGPATH -u "$path"`
14145
14146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14149  # "foo.exe" is OK but "foo" is an error.
14150  #
14151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14152  # It is also a way to make sure we got the proper file name for the real test later on.
14153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14154  if test "x$test_shortpath" = x; then
14155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14158  fi
14159
14160  # Call helper function which possibly converts this using DOS-style short mode.
14161  # If so, the updated path is stored in $new_path.
14162
14163  input_path="$new_path"
14164  # Check if we need to convert this using DOS-style short mode. If the path
14165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14166  # take no chances and rewrite it.
14167  # Note: m4 eats our [], so we need to use [ and ] instead.
14168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14169  if test "x$has_forbidden_chars" != x; then
14170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14174      # Going to short mode and back again did indeed matter. Since short mode is
14175      # case insensitive, let's make it lowercase to improve readability.
14176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14177      # Now convert it back to Unix-stile (cygpath)
14178      input_path=`$CYGPATH -u "$shortmode_path"`
14179      new_path="$input_path"
14180    fi
14181  fi
14182
14183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14184  if test "x$test_cygdrive_prefix" = x; then
14185    # As a simple fix, exclude /usr/bin since it's not a real path.
14186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14188      # a path prefixed by /cygdrive for fixpath to work.
14189      new_path="$CYGWIN_ROOT_PATH$input_path"
14190    fi
14191  fi
14192
14193
14194  if test "x$path" != "x$new_path"; then
14195    BOOT_JDK="$new_path"
14196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14198  fi
14199
14200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14201
14202  path="$BOOT_JDK"
14203  has_colon=`$ECHO $path | $GREP ^.:`
14204  new_path="$path"
14205  if test "x$has_colon" = x; then
14206    # Not in mixed or Windows style, start by that.
14207    new_path=`cmd //c echo $path`
14208  fi
14209
14210
14211  input_path="$new_path"
14212  # Check if we need to convert this using DOS-style short mode. If the path
14213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14214  # take no chances and rewrite it.
14215  # Note: m4 eats our [], so we need to use [ and ] instead.
14216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14217  if test "x$has_forbidden_chars" != x; then
14218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14220  fi
14221
14222
14223  windows_path="$new_path"
14224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14225    unix_path=`$CYGPATH -u "$windows_path"`
14226    new_path="$unix_path"
14227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14229    new_path="$unix_path"
14230  fi
14231
14232  if test "x$path" != "x$new_path"; then
14233    BOOT_JDK="$new_path"
14234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14236  fi
14237
14238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14240
14241  else
14242    # We're on a posix platform. Hooray! :)
14243    path="$BOOT_JDK"
14244
14245    if test ! -f "$path" && test ! -d "$path"; then
14246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14247    fi
14248
14249    has_space=`$ECHO "$path" | $GREP " "`
14250    if test "x$has_space" != x; then
14251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14254    fi
14255  fi
14256
14257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14258$as_echo_n "checking for Boot JDK... " >&6; }
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14260$as_echo "$BOOT_JDK" >&6; }
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14262$as_echo_n "checking Boot JDK version... " >&6; }
14263              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14264              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14265$as_echo "$BOOT_JDK_VERSION" >&6; }
14266            fi # end check jdk version
14267          fi # end check rt.jar
14268        fi # end check javac
14269      fi # end check java
14270    fi # end check boot jdk found
14271  fi
14272
14273    done
14274  fi
14275
14276
14277    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14278    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14279      # Do we have a bin/java?
14280      if test ! -x "$BOOT_JDK/bin/java"; then
14281        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14283        BOOT_JDK_FOUND=no
14284      else
14285        # Do we have a bin/javac?
14286        if test ! -x "$BOOT_JDK/bin/javac"; then
14287          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14289          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14290$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14291          BOOT_JDK_FOUND=no
14292        else
14293          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14294          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14297            BOOT_JDK_FOUND=no
14298          else
14299            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14300            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14301
14302            # Extra M4 quote needed to protect [] in grep expression.
14303            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14304            if test "x$FOUND_VERSION_78" = x; then
14305              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14307              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14308$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14309              BOOT_JDK_FOUND=no
14310            else
14311              # We're done! :-)
14312              BOOT_JDK_FOUND=yes
14313
14314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14315
14316  # Input might be given as Windows format, start by converting to
14317  # unix format.
14318  path="$BOOT_JDK"
14319  new_path=`$CYGPATH -u "$path"`
14320
14321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14324  # "foo.exe" is OK but "foo" is an error.
14325  #
14326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14327  # It is also a way to make sure we got the proper file name for the real test later on.
14328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14329  if test "x$test_shortpath" = x; then
14330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14332    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14333  fi
14334
14335  # Call helper function which possibly converts this using DOS-style short mode.
14336  # If so, the updated path is stored in $new_path.
14337
14338  input_path="$new_path"
14339  # Check if we need to convert this using DOS-style short mode. If the path
14340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14341  # take no chances and rewrite it.
14342  # Note: m4 eats our [], so we need to use [ and ] instead.
14343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14344  if test "x$has_forbidden_chars" != x; then
14345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14349      # Going to short mode and back again did indeed matter. Since short mode is
14350      # case insensitive, let's make it lowercase to improve readability.
14351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14352      # Now convert it back to Unix-stile (cygpath)
14353      input_path=`$CYGPATH -u "$shortmode_path"`
14354      new_path="$input_path"
14355    fi
14356  fi
14357
14358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14359  if test "x$test_cygdrive_prefix" = x; then
14360    # As a simple fix, exclude /usr/bin since it's not a real path.
14361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14363      # a path prefixed by /cygdrive for fixpath to work.
14364      new_path="$CYGWIN_ROOT_PATH$input_path"
14365    fi
14366  fi
14367
14368
14369  if test "x$path" != "x$new_path"; then
14370    BOOT_JDK="$new_path"
14371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14373  fi
14374
14375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14376
14377  path="$BOOT_JDK"
14378  has_colon=`$ECHO $path | $GREP ^.:`
14379  new_path="$path"
14380  if test "x$has_colon" = x; then
14381    # Not in mixed or Windows style, start by that.
14382    new_path=`cmd //c echo $path`
14383  fi
14384
14385
14386  input_path="$new_path"
14387  # Check if we need to convert this using DOS-style short mode. If the path
14388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14389  # take no chances and rewrite it.
14390  # Note: m4 eats our [], so we need to use [ and ] instead.
14391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14392  if test "x$has_forbidden_chars" != x; then
14393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14395  fi
14396
14397
14398  windows_path="$new_path"
14399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14400    unix_path=`$CYGPATH -u "$windows_path"`
14401    new_path="$unix_path"
14402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14404    new_path="$unix_path"
14405  fi
14406
14407  if test "x$path" != "x$new_path"; then
14408    BOOT_JDK="$new_path"
14409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14411  fi
14412
14413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14415
14416  else
14417    # We're on a posix platform. Hooray! :)
14418    path="$BOOT_JDK"
14419
14420    if test ! -f "$path" && test ! -d "$path"; then
14421      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14422    fi
14423
14424    has_space=`$ECHO "$path" | $GREP " "`
14425    if test "x$has_space" != x; then
14426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14428      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14429    fi
14430  fi
14431
14432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14433$as_echo_n "checking for Boot JDK... " >&6; }
14434              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14435$as_echo "$BOOT_JDK" >&6; }
14436              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14437$as_echo_n "checking Boot JDK version... " >&6; }
14438              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14439              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14440$as_echo "$BOOT_JDK_VERSION" >&6; }
14441            fi # end check jdk version
14442          fi # end check rt.jar
14443        fi # end check javac
14444      fi # end check java
14445    fi # end check boot jdk found
14446  fi
14447
14448
14449  if test "x$BOOT_JDK_FOUND" = xno; then
14450    # Now execute the test
14451
14452  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14453  BOOT_JDK_SUFFIX="/Contents/Home"
14454  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14455  if test "x$ALL_JDKS_FOUND" != x; then
14456    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14457
14458  if test "x$BOOT_JDK_FOUND" = xno; then
14459    # Now execute the test
14460
14461        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14462        if test -d "$BOOT_JDK"; then
14463          BOOT_JDK_FOUND=maybe
14464          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14465$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14466        fi
14467
14468
14469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14471      # Do we have a bin/java?
14472      if test ! -x "$BOOT_JDK/bin/java"; then
14473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14475        BOOT_JDK_FOUND=no
14476      else
14477        # Do we have a bin/javac?
14478        if test ! -x "$BOOT_JDK/bin/javac"; then
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14483          BOOT_JDK_FOUND=no
14484        else
14485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14489            BOOT_JDK_FOUND=no
14490          else
14491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14493
14494            # Extra M4 quote needed to protect [] in grep expression.
14495            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14496            if test "x$FOUND_VERSION_78" = x; then
14497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14500$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14501              BOOT_JDK_FOUND=no
14502            else
14503              # We're done! :-)
14504              BOOT_JDK_FOUND=yes
14505
14506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14507
14508  # Input might be given as Windows format, start by converting to
14509  # unix format.
14510  path="$BOOT_JDK"
14511  new_path=`$CYGPATH -u "$path"`
14512
14513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14516  # "foo.exe" is OK but "foo" is an error.
14517  #
14518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14519  # It is also a way to make sure we got the proper file name for the real test later on.
14520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14521  if test "x$test_shortpath" = x; then
14522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14525  fi
14526
14527  # Call helper function which possibly converts this using DOS-style short mode.
14528  # If so, the updated path is stored in $new_path.
14529
14530  input_path="$new_path"
14531  # Check if we need to convert this using DOS-style short mode. If the path
14532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14533  # take no chances and rewrite it.
14534  # Note: m4 eats our [], so we need to use [ and ] instead.
14535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14536  if test "x$has_forbidden_chars" != x; then
14537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14541      # Going to short mode and back again did indeed matter. Since short mode is
14542      # case insensitive, let's make it lowercase to improve readability.
14543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14544      # Now convert it back to Unix-stile (cygpath)
14545      input_path=`$CYGPATH -u "$shortmode_path"`
14546      new_path="$input_path"
14547    fi
14548  fi
14549
14550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14551  if test "x$test_cygdrive_prefix" = x; then
14552    # As a simple fix, exclude /usr/bin since it's not a real path.
14553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14555      # a path prefixed by /cygdrive for fixpath to work.
14556      new_path="$CYGWIN_ROOT_PATH$input_path"
14557    fi
14558  fi
14559
14560
14561  if test "x$path" != "x$new_path"; then
14562    BOOT_JDK="$new_path"
14563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14565  fi
14566
14567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14568
14569  path="$BOOT_JDK"
14570  has_colon=`$ECHO $path | $GREP ^.:`
14571  new_path="$path"
14572  if test "x$has_colon" = x; then
14573    # Not in mixed or Windows style, start by that.
14574    new_path=`cmd //c echo $path`
14575  fi
14576
14577
14578  input_path="$new_path"
14579  # Check if we need to convert this using DOS-style short mode. If the path
14580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14581  # take no chances and rewrite it.
14582  # Note: m4 eats our [], so we need to use [ and ] instead.
14583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14584  if test "x$has_forbidden_chars" != x; then
14585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14587  fi
14588
14589
14590  windows_path="$new_path"
14591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14592    unix_path=`$CYGPATH -u "$windows_path"`
14593    new_path="$unix_path"
14594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14596    new_path="$unix_path"
14597  fi
14598
14599  if test "x$path" != "x$new_path"; then
14600    BOOT_JDK="$new_path"
14601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14603  fi
14604
14605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14607
14608  else
14609    # We're on a posix platform. Hooray! :)
14610    path="$BOOT_JDK"
14611
14612    if test ! -f "$path" && test ! -d "$path"; then
14613      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14614    fi
14615
14616    has_space=`$ECHO "$path" | $GREP " "`
14617    if test "x$has_space" != x; then
14618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14620      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14621    fi
14622  fi
14623
14624              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14625$as_echo_n "checking for Boot JDK... " >&6; }
14626              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14627$as_echo "$BOOT_JDK" >&6; }
14628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14629$as_echo_n "checking Boot JDK version... " >&6; }
14630              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14631              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14632$as_echo "$BOOT_JDK_VERSION" >&6; }
14633            fi # end check jdk version
14634          fi # end check rt.jar
14635        fi # end check javac
14636      fi # end check java
14637    fi # end check boot jdk found
14638  fi
14639
14640    done
14641  fi
14642
14643
14644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14646      # Do we have a bin/java?
14647      if test ! -x "$BOOT_JDK/bin/java"; then
14648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14650        BOOT_JDK_FOUND=no
14651      else
14652        # Do we have a bin/javac?
14653        if test ! -x "$BOOT_JDK/bin/javac"; then
14654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14658          BOOT_JDK_FOUND=no
14659        else
14660          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14661          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14664            BOOT_JDK_FOUND=no
14665          else
14666            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14668
14669            # Extra M4 quote needed to protect [] in grep expression.
14670            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14671            if test "x$FOUND_VERSION_78" = x; then
14672              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14674              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14675$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14676              BOOT_JDK_FOUND=no
14677            else
14678              # We're done! :-)
14679              BOOT_JDK_FOUND=yes
14680
14681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14682
14683  # Input might be given as Windows format, start by converting to
14684  # unix format.
14685  path="$BOOT_JDK"
14686  new_path=`$CYGPATH -u "$path"`
14687
14688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14691  # "foo.exe" is OK but "foo" is an error.
14692  #
14693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14694  # It is also a way to make sure we got the proper file name for the real test later on.
14695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14696  if test "x$test_shortpath" = x; then
14697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14700  fi
14701
14702  # Call helper function which possibly converts this using DOS-style short mode.
14703  # If so, the updated path is stored in $new_path.
14704
14705  input_path="$new_path"
14706  # Check if we need to convert this using DOS-style short mode. If the path
14707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14708  # take no chances and rewrite it.
14709  # Note: m4 eats our [], so we need to use [ and ] instead.
14710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14711  if test "x$has_forbidden_chars" != x; then
14712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14716      # Going to short mode and back again did indeed matter. Since short mode is
14717      # case insensitive, let's make it lowercase to improve readability.
14718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14719      # Now convert it back to Unix-stile (cygpath)
14720      input_path=`$CYGPATH -u "$shortmode_path"`
14721      new_path="$input_path"
14722    fi
14723  fi
14724
14725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14726  if test "x$test_cygdrive_prefix" = x; then
14727    # As a simple fix, exclude /usr/bin since it's not a real path.
14728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14730      # a path prefixed by /cygdrive for fixpath to work.
14731      new_path="$CYGWIN_ROOT_PATH$input_path"
14732    fi
14733  fi
14734
14735
14736  if test "x$path" != "x$new_path"; then
14737    BOOT_JDK="$new_path"
14738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14740  fi
14741
14742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14743
14744  path="$BOOT_JDK"
14745  has_colon=`$ECHO $path | $GREP ^.:`
14746  new_path="$path"
14747  if test "x$has_colon" = x; then
14748    # Not in mixed or Windows style, start by that.
14749    new_path=`cmd //c echo $path`
14750  fi
14751
14752
14753  input_path="$new_path"
14754  # Check if we need to convert this using DOS-style short mode. If the path
14755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14756  # take no chances and rewrite it.
14757  # Note: m4 eats our [], so we need to use [ and ] instead.
14758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14759  if test "x$has_forbidden_chars" != x; then
14760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14762  fi
14763
14764
14765  windows_path="$new_path"
14766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14767    unix_path=`$CYGPATH -u "$windows_path"`
14768    new_path="$unix_path"
14769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14771    new_path="$unix_path"
14772  fi
14773
14774  if test "x$path" != "x$new_path"; then
14775    BOOT_JDK="$new_path"
14776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14778  fi
14779
14780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14782
14783  else
14784    # We're on a posix platform. Hooray! :)
14785    path="$BOOT_JDK"
14786
14787    if test ! -f "$path" && test ! -d "$path"; then
14788      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14789    fi
14790
14791    has_space=`$ECHO "$path" | $GREP " "`
14792    if test "x$has_space" != x; then
14793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14795      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14796    fi
14797  fi
14798
14799              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14800$as_echo_n "checking for Boot JDK... " >&6; }
14801              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14802$as_echo "$BOOT_JDK" >&6; }
14803              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14804$as_echo_n "checking Boot JDK version... " >&6; }
14805              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14806              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14807$as_echo "$BOOT_JDK_VERSION" >&6; }
14808            fi # end check jdk version
14809          fi # end check rt.jar
14810        fi # end check javac
14811      fi # end check java
14812    fi # end check boot jdk found
14813  fi
14814
14815  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14816
14817  if test "x$BOOT_JDK_FOUND" = xno; then
14818    # Now execute the test
14819
14820  BOOT_JDK_PREFIX="/usr/lib/jvm"
14821  BOOT_JDK_SUFFIX=""
14822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14823  if test "x$ALL_JDKS_FOUND" != x; then
14824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14825
14826  if test "x$BOOT_JDK_FOUND" = xno; then
14827    # Now execute the test
14828
14829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14830        if test -d "$BOOT_JDK"; then
14831          BOOT_JDK_FOUND=maybe
14832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14834        fi
14835
14836
14837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14839      # Do we have a bin/java?
14840      if test ! -x "$BOOT_JDK/bin/java"; then
14841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14843        BOOT_JDK_FOUND=no
14844      else
14845        # Do we have a bin/javac?
14846        if test ! -x "$BOOT_JDK/bin/javac"; then
14847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14851          BOOT_JDK_FOUND=no
14852        else
14853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14857            BOOT_JDK_FOUND=no
14858          else
14859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14861
14862            # Extra M4 quote needed to protect [] in grep expression.
14863            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14864            if test "x$FOUND_VERSION_78" = x; then
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14868$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14869              BOOT_JDK_FOUND=no
14870            else
14871              # We're done! :-)
14872              BOOT_JDK_FOUND=yes
14873
14874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14875
14876  # Input might be given as Windows format, start by converting to
14877  # unix format.
14878  path="$BOOT_JDK"
14879  new_path=`$CYGPATH -u "$path"`
14880
14881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14884  # "foo.exe" is OK but "foo" is an error.
14885  #
14886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14887  # It is also a way to make sure we got the proper file name for the real test later on.
14888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14889  if test "x$test_shortpath" = x; then
14890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14893  fi
14894
14895  # Call helper function which possibly converts this using DOS-style short mode.
14896  # If so, the updated path is stored in $new_path.
14897
14898  input_path="$new_path"
14899  # Check if we need to convert this using DOS-style short mode. If the path
14900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14901  # take no chances and rewrite it.
14902  # Note: m4 eats our [], so we need to use [ and ] instead.
14903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14904  if test "x$has_forbidden_chars" != x; then
14905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14909      # Going to short mode and back again did indeed matter. Since short mode is
14910      # case insensitive, let's make it lowercase to improve readability.
14911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14912      # Now convert it back to Unix-stile (cygpath)
14913      input_path=`$CYGPATH -u "$shortmode_path"`
14914      new_path="$input_path"
14915    fi
14916  fi
14917
14918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14919  if test "x$test_cygdrive_prefix" = x; then
14920    # As a simple fix, exclude /usr/bin since it's not a real path.
14921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14923      # a path prefixed by /cygdrive for fixpath to work.
14924      new_path="$CYGWIN_ROOT_PATH$input_path"
14925    fi
14926  fi
14927
14928
14929  if test "x$path" != "x$new_path"; then
14930    BOOT_JDK="$new_path"
14931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14933  fi
14934
14935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14936
14937  path="$BOOT_JDK"
14938  has_colon=`$ECHO $path | $GREP ^.:`
14939  new_path="$path"
14940  if test "x$has_colon" = x; then
14941    # Not in mixed or Windows style, start by that.
14942    new_path=`cmd //c echo $path`
14943  fi
14944
14945
14946  input_path="$new_path"
14947  # Check if we need to convert this using DOS-style short mode. If the path
14948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14949  # take no chances and rewrite it.
14950  # Note: m4 eats our [], so we need to use [ and ] instead.
14951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14952  if test "x$has_forbidden_chars" != x; then
14953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14955  fi
14956
14957
14958  windows_path="$new_path"
14959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14960    unix_path=`$CYGPATH -u "$windows_path"`
14961    new_path="$unix_path"
14962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14964    new_path="$unix_path"
14965  fi
14966
14967  if test "x$path" != "x$new_path"; then
14968    BOOT_JDK="$new_path"
14969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14971  fi
14972
14973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14975
14976  else
14977    # We're on a posix platform. Hooray! :)
14978    path="$BOOT_JDK"
14979
14980    if test ! -f "$path" && test ! -d "$path"; then
14981      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14982    fi
14983
14984    has_space=`$ECHO "$path" | $GREP " "`
14985    if test "x$has_space" != x; then
14986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14989    fi
14990  fi
14991
14992              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14993$as_echo_n "checking for Boot JDK... " >&6; }
14994              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14995$as_echo "$BOOT_JDK" >&6; }
14996              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14997$as_echo_n "checking Boot JDK version... " >&6; }
14998              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14999              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15000$as_echo "$BOOT_JDK_VERSION" >&6; }
15001            fi # end check jdk version
15002          fi # end check rt.jar
15003        fi # end check javac
15004      fi # end check java
15005    fi # end check boot jdk found
15006  fi
15007
15008    done
15009  fi
15010
15011
15012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15014      # Do we have a bin/java?
15015      if test ! -x "$BOOT_JDK/bin/java"; then
15016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15018        BOOT_JDK_FOUND=no
15019      else
15020        # Do we have a bin/javac?
15021        if test ! -x "$BOOT_JDK/bin/javac"; then
15022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15026          BOOT_JDK_FOUND=no
15027        else
15028          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15029          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15030            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15032            BOOT_JDK_FOUND=no
15033          else
15034            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15036
15037            # Extra M4 quote needed to protect [] in grep expression.
15038            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15039            if test "x$FOUND_VERSION_78" = x; then
15040              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15042              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15043$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15044              BOOT_JDK_FOUND=no
15045            else
15046              # We're done! :-)
15047              BOOT_JDK_FOUND=yes
15048
15049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15050
15051  # Input might be given as Windows format, start by converting to
15052  # unix format.
15053  path="$BOOT_JDK"
15054  new_path=`$CYGPATH -u "$path"`
15055
15056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15059  # "foo.exe" is OK but "foo" is an error.
15060  #
15061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15062  # It is also a way to make sure we got the proper file name for the real test later on.
15063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15064  if test "x$test_shortpath" = x; then
15065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15067    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15068  fi
15069
15070  # Call helper function which possibly converts this using DOS-style short mode.
15071  # If so, the updated path is stored in $new_path.
15072
15073  input_path="$new_path"
15074  # Check if we need to convert this using DOS-style short mode. If the path
15075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15076  # take no chances and rewrite it.
15077  # Note: m4 eats our [], so we need to use [ and ] instead.
15078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15079  if test "x$has_forbidden_chars" != x; then
15080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15084      # Going to short mode and back again did indeed matter. Since short mode is
15085      # case insensitive, let's make it lowercase to improve readability.
15086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15087      # Now convert it back to Unix-stile (cygpath)
15088      input_path=`$CYGPATH -u "$shortmode_path"`
15089      new_path="$input_path"
15090    fi
15091  fi
15092
15093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15094  if test "x$test_cygdrive_prefix" = x; then
15095    # As a simple fix, exclude /usr/bin since it's not a real path.
15096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15098      # a path prefixed by /cygdrive for fixpath to work.
15099      new_path="$CYGWIN_ROOT_PATH$input_path"
15100    fi
15101  fi
15102
15103
15104  if test "x$path" != "x$new_path"; then
15105    BOOT_JDK="$new_path"
15106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15108  fi
15109
15110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15111
15112  path="$BOOT_JDK"
15113  has_colon=`$ECHO $path | $GREP ^.:`
15114  new_path="$path"
15115  if test "x$has_colon" = x; then
15116    # Not in mixed or Windows style, start by that.
15117    new_path=`cmd //c echo $path`
15118  fi
15119
15120
15121  input_path="$new_path"
15122  # Check if we need to convert this using DOS-style short mode. If the path
15123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15124  # take no chances and rewrite it.
15125  # Note: m4 eats our [], so we need to use [ and ] instead.
15126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15127  if test "x$has_forbidden_chars" != x; then
15128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15130  fi
15131
15132
15133  windows_path="$new_path"
15134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15135    unix_path=`$CYGPATH -u "$windows_path"`
15136    new_path="$unix_path"
15137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15139    new_path="$unix_path"
15140  fi
15141
15142  if test "x$path" != "x$new_path"; then
15143    BOOT_JDK="$new_path"
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15146  fi
15147
15148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15150
15151  else
15152    # We're on a posix platform. Hooray! :)
15153    path="$BOOT_JDK"
15154
15155    if test ! -f "$path" && test ! -d "$path"; then
15156      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15157    fi
15158
15159    has_space=`$ECHO "$path" | $GREP " "`
15160    if test "x$has_space" != x; then
15161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15163      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15164    fi
15165  fi
15166
15167              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15168$as_echo_n "checking for Boot JDK... " >&6; }
15169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15170$as_echo "$BOOT_JDK" >&6; }
15171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15172$as_echo_n "checking Boot JDK version... " >&6; }
15173              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15175$as_echo "$BOOT_JDK_VERSION" >&6; }
15176            fi # end check jdk version
15177          fi # end check rt.jar
15178        fi # end check javac
15179      fi # end check java
15180    fi # end check boot jdk found
15181  fi
15182
15183  fi
15184
15185
15186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15188      # Do we have a bin/java?
15189      if test ! -x "$BOOT_JDK/bin/java"; then
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15192        BOOT_JDK_FOUND=no
15193      else
15194        # Do we have a bin/javac?
15195        if test ! -x "$BOOT_JDK/bin/javac"; then
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15200          BOOT_JDK_FOUND=no
15201        else
15202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15206            BOOT_JDK_FOUND=no
15207          else
15208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15210
15211            # Extra M4 quote needed to protect [] in grep expression.
15212            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15213            if test "x$FOUND_VERSION_78" = x; then
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15217$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15218              BOOT_JDK_FOUND=no
15219            else
15220              # We're done! :-)
15221              BOOT_JDK_FOUND=yes
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  path="$BOOT_JDK"
15228  new_path=`$CYGPATH -u "$path"`
15229
15230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15233  # "foo.exe" is OK but "foo" is an error.
15234  #
15235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15236  # It is also a way to make sure we got the proper file name for the real test later on.
15237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15238  if test "x$test_shortpath" = x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15242  fi
15243
15244  # Call helper function which possibly converts this using DOS-style short mode.
15245  # If so, the updated path is stored in $new_path.
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15258      # Going to short mode and back again did indeed matter. Since short mode is
15259      # case insensitive, let's make it lowercase to improve readability.
15260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15261      # Now convert it back to Unix-stile (cygpath)
15262      input_path=`$CYGPATH -u "$shortmode_path"`
15263      new_path="$input_path"
15264    fi
15265  fi
15266
15267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15268  if test "x$test_cygdrive_prefix" = x; then
15269    # As a simple fix, exclude /usr/bin since it's not a real path.
15270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15272      # a path prefixed by /cygdrive for fixpath to work.
15273      new_path="$CYGWIN_ROOT_PATH$input_path"
15274    fi
15275  fi
15276
15277
15278  if test "x$path" != "x$new_path"; then
15279    BOOT_JDK="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15282  fi
15283
15284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285
15286  path="$BOOT_JDK"
15287  has_colon=`$ECHO $path | $GREP ^.:`
15288  new_path="$path"
15289  if test "x$has_colon" = x; then
15290    # Not in mixed or Windows style, start by that.
15291    new_path=`cmd //c echo $path`
15292  fi
15293
15294
15295  input_path="$new_path"
15296  # Check if we need to convert this using DOS-style short mode. If the path
15297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15298  # take no chances and rewrite it.
15299  # Note: m4 eats our [], so we need to use [ and ] instead.
15300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15301  if test "x$has_forbidden_chars" != x; then
15302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15304  fi
15305
15306
15307  windows_path="$new_path"
15308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309    unix_path=`$CYGPATH -u "$windows_path"`
15310    new_path="$unix_path"
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15313    new_path="$unix_path"
15314  fi
15315
15316  if test "x$path" != "x$new_path"; then
15317    BOOT_JDK="$new_path"
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15320  fi
15321
15322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15324
15325  else
15326    # We're on a posix platform. Hooray! :)
15327    path="$BOOT_JDK"
15328
15329    if test ! -f "$path" && test ! -d "$path"; then
15330      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15331    fi
15332
15333    has_space=`$ECHO "$path" | $GREP " "`
15334    if test "x$has_space" != x; then
15335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15338    fi
15339  fi
15340
15341              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15342$as_echo_n "checking for Boot JDK... " >&6; }
15343              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15344$as_echo "$BOOT_JDK" >&6; }
15345              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15346$as_echo_n "checking Boot JDK version... " >&6; }
15347              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15349$as_echo "$BOOT_JDK_VERSION" >&6; }
15350            fi # end check jdk version
15351          fi # end check rt.jar
15352        fi # end check javac
15353      fi # end check java
15354    fi # end check boot jdk found
15355  fi
15356
15357
15358# If we haven't found anything yet, we've truly lost. Give up.
15359if test "x$BOOT_JDK_FOUND" = xno; then
15360
15361    # Print a helpful message on how to acquire the necessary build dependency.
15362    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15363    MISSING_DEPENDENCY=openjdk
15364    PKGHANDLER_COMMAND=
15365
15366    case $PKGHANDLER in
15367	apt-get)
15368                apt_help     $MISSING_DEPENDENCY ;;
15369    yum)
15370                yum_help     $MISSING_DEPENDENCY ;;
15371	port)
15372                port_help    $MISSING_DEPENDENCY ;;
15373	pkgutil)
15374                pkgutil_help $MISSING_DEPENDENCY ;;
15375	pkgadd)
15376                pkgadd_help  $MISSING_DEPENDENCY ;;
15377    * )
15378      break ;;
15379    esac
15380
15381    if test "x$PKGHANDLER_COMMAND" != x; then
15382        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15383    fi
15384
15385  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15386$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15388$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15389  as_fn_error $? "Cannot continue" "$LINENO" 5
15390fi
15391
15392# Setup proper paths for what we found
15393BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15394if test ! -f "$BOOT_RTJAR"; then
15395    # On MacOSX it is called classes.jar
15396    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15397    if test -f "$BOOT_RTJAR"; then
15398      # Remove the ..
15399      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15400    fi
15401fi
15402BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15403BOOT_JDK="$BOOT_JDK"
15404
15405
15406
15407
15408# Setup tools from the Boot JDK.
15409
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15411$as_echo_n "checking for java in Boot JDK... " >&6; }
15412  JAVA=$BOOT_JDK/bin/java
15413  if test ! -x $JAVA; then
15414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15415$as_echo "not found" >&6; }
15416      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15417$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15418      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15419  fi
15420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15421$as_echo "ok" >&6; }
15422
15423
15424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15425$as_echo_n "checking for javac in Boot JDK... " >&6; }
15426  JAVAC=$BOOT_JDK/bin/javac
15427  if test ! -x $JAVAC; then
15428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15429$as_echo "not found" >&6; }
15430      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15431$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15432      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15433  fi
15434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15435$as_echo "ok" >&6; }
15436
15437
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15439$as_echo_n "checking for javah in Boot JDK... " >&6; }
15440  JAVAH=$BOOT_JDK/bin/javah
15441  if test ! -x $JAVAH; then
15442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15443$as_echo "not found" >&6; }
15444      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15445$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15446      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15447  fi
15448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15449$as_echo "ok" >&6; }
15450
15451
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15453$as_echo_n "checking for javap in Boot JDK... " >&6; }
15454  JAVAP=$BOOT_JDK/bin/javap
15455  if test ! -x $JAVAP; then
15456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15457$as_echo "not found" >&6; }
15458      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15459$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15460      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15461  fi
15462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15463$as_echo "ok" >&6; }
15464
15465
15466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15467$as_echo_n "checking for jar in Boot JDK... " >&6; }
15468  JAR=$BOOT_JDK/bin/jar
15469  if test ! -x $JAR; then
15470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15471$as_echo "not found" >&6; }
15472      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15474      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15475  fi
15476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15477$as_echo "ok" >&6; }
15478
15479
15480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15481$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15482  RMIC=$BOOT_JDK/bin/rmic
15483  if test ! -x $RMIC; then
15484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15485$as_echo "not found" >&6; }
15486      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15487$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15488      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15489  fi
15490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15491$as_echo "ok" >&6; }
15492
15493
15494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15495$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15496  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15497  if test ! -x $NATIVE2ASCII; then
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15499$as_echo "not found" >&6; }
15500      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15501$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15502      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15503  fi
15504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15505$as_echo "ok" >&6; }
15506
15507
15508# Finally, set some other options...
15509
15510# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15511BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15512
15513
15514
15515
15516##############################################################################
15517#
15518# Specify options for anything that is run with the Boot JDK.
15519#
15520
15521# Check whether --with-boot-jdk-jvmargs was given.
15522if test "${with_boot_jdk_jvmargs+set}" = set; then :
15523  withval=$with_boot_jdk_jvmargs;
15524fi
15525
15526
15527if test "x$with_boot_jdk_jvmargs" = x; then
15528    # Not all JVM:s accept the same arguments on the command line.
15529    # OpenJDK specific increase in thread stack for JDK build,
15530    # well more specifically, when running javac.
15531    if test "x$BUILD_NUM_BITS" = x32; then
15532       STACK_SIZE=768
15533    else
15534       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15535       # since 64-bit pointers are pushed on the stach. Apparently, we need
15536       # to increase the stack space when javacing the JDK....
15537       STACK_SIZE=1536
15538    fi
15539
15540    # Minimum amount of heap memory.
15541
15542    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15543    # If so, then append -Xms64M to boot_jdk_jvmargs
15544    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15545    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15546    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15547        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15548    fi
15549
15550    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15551        # Why does macosx need more heap? Its the huge JDK batch.
15552
15553    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15554    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15555    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15556    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15557    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15558        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15559    fi
15560
15561    else
15562
15563    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15564    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15565    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15566    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15567    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15568        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15569    fi
15570
15571    fi
15572    # When is adding -client something that speeds up the JVM?
15573    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15574
15575    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15576    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15577    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15578    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15579    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15580        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15581    fi
15582
15583
15584    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15585    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15586    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15587    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15588    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15589        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15590    fi
15591
15592
15593    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15594    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15595    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15596    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15597    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15598        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15599    fi
15600
15601    # Disable special log output when a debug build is used as Boot JDK...
15602
15603    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15604    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15605    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15606    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15607    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15608        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15609    fi
15610
15611fi
15612
15613BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15614
15615
15616
15617###############################################################################
15618#
15619# Configure the sources to use. We can add or override individual directories.
15620#
15621###############################################################################
15622
15623
15624
15625# Where are the sources. Any of these can be overridden
15626# using --with-override-corba and the likes.
15627LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15628CORBA_TOPDIR="$SRC_ROOT/corba"
15629JAXP_TOPDIR="$SRC_ROOT/jaxp"
15630JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15631HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15632JDK_TOPDIR="$SRC_ROOT/jdk"
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642###############################################################################
15643#
15644# Pickup additional source for a component from outside of the source root
15645# or override source for a component.
15646#
15647
15648# Check whether --with-add-source-root was given.
15649if test "${with_add_source_root+set}" = set; then :
15650  withval=$with_add_source_root;
15651fi
15652
15653
15654
15655# Check whether --with-override-source-root was given.
15656if test "${with_override_source_root+set}" = set; then :
15657  withval=$with_override_source_root;
15658fi
15659
15660
15661
15662# Check whether --with-adds-and-overrides was given.
15663if test "${with_adds_and_overrides+set}" = set; then :
15664  withval=$with_adds_and_overrides;
15665fi
15666
15667
15668if test "x$with_adds_and_overrides" != x; then
15669    with_add_source_root="$with_adds_and_overrides/adds"
15670    with_override_source_root="$with_adds_and_overrides/overrides"
15671fi
15672
15673if test "x$with_add_source_root" != x; then
15674    if ! test -d $with_add_source_root; then
15675       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15676    fi
15677    CURDIR="$PWD"
15678    cd "$with_add_source_root"
15679    ADD_SRC_ROOT="`pwd`"
15680    cd "$CURDIR"
15681    # Verify that the addon source root does not have any root makefiles.
15682    # If it does, then it is usually an error, prevent this.
15683    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15684       test -f $with_add_source_root/langtools/make/Makefile; then
15685        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
15686    fi
15687    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15688       test -f $with_add_source_root/corba/make/Makefile; then
15689        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
15690    fi
15691    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15692       test -f $with_add_source_root/jaxp/make/Makefile; then
15693        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
15694    fi
15695    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15696       test -f $with_add_source_root/jaxws/make/Makefile; then
15697        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
15698    fi
15699    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15700       test -f $with_add_source_root/hotspot/make/Makefile; then
15701        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
15702    fi
15703    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15704       test -f $with_add_source_root/jdk/make/Makefile; then
15705        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
15706    fi
15707fi
15708
15709
15710if test "x$with_override_source_root" != x; then
15711    if ! test -d $with_override_source_root; then
15712       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15713    fi
15714    CURDIR="$PWD"
15715    cd "$with_override_source_root"
15716    OVERRIDE_SRC_ROOT="`pwd`"
15717    cd "$CURDIR"
15718    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15719       test -f $with_override_source_root/langtools/make/Makefile; then
15720        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
15721    fi
15722    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15723       test -f $with_override_source_root/corba/make/Makefile; then
15724        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
15725    fi
15726    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15727       test -f $with_override_source_root/jaxp/make/Makefile; then
15728        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
15729    fi
15730    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15731       test -f $with_override_source_root/jaxws/make/Makefile; then
15732        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
15733    fi
15734    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15735       test -f $with_override_source_root/hotspot/make/Makefile; then
15736        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
15737    fi
15738    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15739       test -f $with_override_source_root/jdk/make/Makefile; then
15740        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
15741    fi
15742fi
15743
15744
15745###############################################################################
15746#
15747# Override a repo completely, this is used for example when you have 3 small
15748# development sandboxes of the langtools sources and want to avoid having 3 full
15749# OpenJDK sources checked out on disk.
15750#
15751# Assuming that the 3 langtools sandboxes are located here:
15752# /home/fredrik/sandbox1/langtools
15753# /home/fredrik/sandbox2/langtools
15754# /home/fredrik/sandbox3/langtools
15755#
15756# From the source root you create build subdirs manually:
15757#     mkdir -p build1 build2 build3
15758# in each build directory run:
15759#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15760#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15761#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15762#
15763
15764
15765# Check whether --with-override-langtools was given.
15766if test "${with_override_langtools+set}" = set; then :
15767  withval=$with_override_langtools;
15768fi
15769
15770
15771
15772# Check whether --with-override-corba was given.
15773if test "${with_override_corba+set}" = set; then :
15774  withval=$with_override_corba;
15775fi
15776
15777
15778
15779# Check whether --with-override-jaxp was given.
15780if test "${with_override_jaxp+set}" = set; then :
15781  withval=$with_override_jaxp;
15782fi
15783
15784
15785
15786# Check whether --with-override-jaxws was given.
15787if test "${with_override_jaxws+set}" = set; then :
15788  withval=$with_override_jaxws;
15789fi
15790
15791
15792
15793# Check whether --with-override-hotspot was given.
15794if test "${with_override_hotspot+set}" = set; then :
15795  withval=$with_override_hotspot;
15796fi
15797
15798
15799
15800# Check whether --with-override-jdk was given.
15801if test "${with_override_jdk+set}" = set; then :
15802  withval=$with_override_jdk;
15803fi
15804
15805
15806if test "x$with_override_langtools" != x; then
15807    CURDIR="$PWD"
15808    cd "$with_override_langtools"
15809    LANGTOOLS_TOPDIR="`pwd`"
15810    cd "$CURDIR"
15811    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15812        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15813    fi
15814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15815$as_echo_n "checking if langtools should be overridden... " >&6; }
15816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15817$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15818fi
15819if test "x$with_override_corba" != x; then
15820    CURDIR="$PWD"
15821    cd "$with_override_corba"
15822    CORBA_TOPDIR="`pwd`"
15823    cd "$CURDIR"
15824    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15825        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15826    fi
15827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15828$as_echo_n "checking if corba should be overridden... " >&6; }
15829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15830$as_echo "yes with $CORBA_TOPDIR" >&6; }
15831fi
15832if test "x$with_override_jaxp" != x; then
15833    CURDIR="$PWD"
15834    cd "$with_override_jaxp"
15835    JAXP_TOPDIR="`pwd`"
15836    cd "$CURDIR"
15837    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15838        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15839    fi
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15841$as_echo_n "checking if jaxp should be overridden... " >&6; }
15842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15843$as_echo "yes with $JAXP_TOPDIR" >&6; }
15844fi
15845if test "x$with_override_jaxws" != x; then
15846    CURDIR="$PWD"
15847    cd "$with_override_jaxws"
15848    JAXWS_TOPDIR="`pwd`"
15849    cd "$CURDIR"
15850    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15851        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15852    fi
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15854$as_echo_n "checking if jaxws should be overridden... " >&6; }
15855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15856$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15857fi
15858if test "x$with_override_hotspot" != x; then
15859    CURDIR="$PWD"
15860    cd "$with_override_hotspot"
15861    HOTSPOT_TOPDIR="`pwd`"
15862    cd "$CURDIR"
15863    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15864       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15865        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15866    fi
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15868$as_echo_n "checking if hotspot should be overridden... " >&6; }
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15870$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15871fi
15872if test "x$with_override_jdk" != x; then
15873    CURDIR="$PWD"
15874    cd "$with_override_jdk"
15875    JDK_TOPDIR="`pwd`"
15876    cd "$CURDIR"
15877    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15878        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15879    fi
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15881$as_echo_n "checking if JDK should be overridden... " >&6; }
15882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15883$as_echo "yes with $JDK_TOPDIR" >&6; }
15884fi
15885
15886
15887
15888BUILD_OUTPUT="$OUTPUT_ROOT"
15889
15890
15891HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15892BUILD_HOTSPOT=true
15893
15894
15895
15896# Check whether --with-import-hotspot was given.
15897if test "${with_import_hotspot+set}" = set; then :
15898  withval=$with_import_hotspot;
15899fi
15900
15901if test "x$with_import_hotspot" != x; then
15902    CURDIR="$PWD"
15903    cd "$with_import_hotspot"
15904    HOTSPOT_DIST="`pwd`"
15905    cd "$CURDIR"
15906    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15907        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15908    fi
15909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15910$as_echo_n "checking if hotspot should be imported... " >&6; }
15911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15912$as_echo "yes from $HOTSPOT_DIST" >&6; }
15913    BUILD_HOTSPOT=false
15914fi
15915
15916JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15917
15918
15919###############################################################################
15920#
15921# Setup the toolchain (compilers etc), i.e. the tools that need to be
15922# cross-compilation aware.
15923#
15924###############################################################################
15925
15926
15927###############################################################################
15928#
15929# Configure the development tool paths and potential sysroot.
15930#
15931ac_ext=cpp
15932ac_cpp='$CXXCPP $CPPFLAGS'
15933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15936
15937
15938# The option used to specify the target .o,.a or .so file.
15939# When compiling, how to specify the to be created object file.
15940CC_OUT_OPTION='-o$(SPACE)'
15941# When linking, how to specify the to be created executable.
15942EXE_OUT_OPTION='-o$(SPACE)'
15943# When linking, how to specify the to be created dynamically linkable library.
15944LD_OUT_OPTION='-o$(SPACE)'
15945# When archiving, how to specify the to be create static archive for object files.
15946AR_OUT_OPTION='rcs$(SPACE)'
15947
15948
15949
15950
15951
15952# Locate the actual tools
15953
15954if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15955
15956  # Store path to cygwin link.exe to help excluding it when searching for
15957  # VS linker. This must be done before changing the PATH when looking for VS.
15958  # Extract the first word of "link", so it can be a program name with args.
15959set dummy link; ac_word=$2
15960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15961$as_echo_n "checking for $ac_word... " >&6; }
15962if ${ac_cv_path_CYGWIN_LINK+:} false; then :
15963  $as_echo_n "(cached) " >&6
15964else
15965  case $CYGWIN_LINK in
15966  [\\/]* | ?:[\\/]*)
15967  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15968  ;;
15969  *)
15970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15971for as_dir in $PATH
15972do
15973  IFS=$as_save_IFS
15974  test -z "$as_dir" && as_dir=.
15975    for ac_exec_ext in '' $ac_executable_extensions; do
15976  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15977    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15979    break 2
15980  fi
15981done
15982  done
15983IFS=$as_save_IFS
15984
15985  ;;
15986esac
15987fi
15988CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15989if test -n "$CYGWIN_LINK"; then
15990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15991$as_echo "$CYGWIN_LINK" >&6; }
15992else
15993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994$as_echo "no" >&6; }
15995fi
15996
15997
15998  if test "x$CYGWIN_LINK" != x; then
15999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16000$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16001    "$CYGWIN_LINK" --version > /dev/null
16002    if test $? -eq 0 ; then
16003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16004$as_echo "yes" >&6; }
16005    else
16006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16007$as_echo "no" >&6; }
16008      # This might be the VS linker. Don't exclude it later on.
16009      CYGWIN_LINK=""
16010    fi
16011  fi
16012
16013  # First-hand choice is to locate and run the vsvars bat file.
16014
16015  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16016    VCVARSFILE="vc/bin/vcvars32.bat"
16017  else
16018    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16019  fi
16020
16021  VS_ENV_CMD=""
16022  VS_ENV_ARGS=""
16023  if test "x$with_toolsdir" != x; then
16024
16025  if test "x$VS_ENV_CMD" = x; then
16026    VS100BASE="$with_toolsdir/../.."
16027    METHOD="--with-tools-dir"
16028
16029  windows_path="$VS100BASE"
16030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16031    unix_path=`$CYGPATH -u "$windows_path"`
16032    VS100BASE="$unix_path"
16033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16035    VS100BASE="$unix_path"
16036  fi
16037
16038    if test -d "$VS100BASE"; then
16039      if test -f "$VS100BASE/$VCVARSFILE"; then
16040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16041$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16042        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16043      else
16044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16045$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16047$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16048      fi
16049    fi
16050  fi
16051
16052  fi
16053
16054  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16055    # Having specified an argument which is incorrect will produce an instant failure;
16056    # we should not go on looking
16057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16058$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16059    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16060$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16061    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16062  fi
16063
16064  if test "x$ProgramW6432" != x; then
16065
16066  if test "x$VS_ENV_CMD" = x; then
16067    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16068    METHOD="well-known name"
16069
16070  windows_path="$WIN_SDK_BASE"
16071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16072    unix_path=`$CYGPATH -u "$windows_path"`
16073    WIN_SDK_BASE="$unix_path"
16074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16076    WIN_SDK_BASE="$unix_path"
16077  fi
16078
16079    if test -d "$WIN_SDK_BASE"; then
16080      # There have been cases of partial or broken SDK installations. A missing
16081      # lib dir is not going to work.
16082      if test ! -d "$WIN_SDK_BASE/../lib"; then
16083        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16084$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16086$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16087      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16089$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16090        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16091        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16092          VS_ENV_ARGS="/x86"
16093        else
16094          VS_ENV_ARGS="/x64"
16095        fi
16096      else
16097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16100$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16101      fi
16102    fi
16103  fi
16104
16105  fi
16106  if test "x$PROGRAMW6432" != x; then
16107
16108  if test "x$VS_ENV_CMD" = x; then
16109    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16110    METHOD="well-known name"
16111
16112  windows_path="$WIN_SDK_BASE"
16113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16114    unix_path=`$CYGPATH -u "$windows_path"`
16115    WIN_SDK_BASE="$unix_path"
16116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16118    WIN_SDK_BASE="$unix_path"
16119  fi
16120
16121    if test -d "$WIN_SDK_BASE"; then
16122      # There have been cases of partial or broken SDK installations. A missing
16123      # lib dir is not going to work.
16124      if test ! -d "$WIN_SDK_BASE/../lib"; then
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16129      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16132        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16134          VS_ENV_ARGS="/x86"
16135        else
16136          VS_ENV_ARGS="/x64"
16137        fi
16138      else
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16143      fi
16144    fi
16145  fi
16146
16147  fi
16148  if test "x$PROGRAMFILES" != x; then
16149
16150  if test "x$VS_ENV_CMD" = x; then
16151    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16152    METHOD="well-known name"
16153
16154  windows_path="$WIN_SDK_BASE"
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    unix_path=`$CYGPATH -u "$windows_path"`
16157    WIN_SDK_BASE="$unix_path"
16158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16160    WIN_SDK_BASE="$unix_path"
16161  fi
16162
16163    if test -d "$WIN_SDK_BASE"; then
16164      # There have been cases of partial or broken SDK installations. A missing
16165      # lib dir is not going to work.
16166      if test ! -d "$WIN_SDK_BASE/../lib"; then
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16170$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16171      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16174        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16175        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16176          VS_ENV_ARGS="/x86"
16177        else
16178          VS_ENV_ARGS="/x64"
16179        fi
16180      else
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16184$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16185      fi
16186    fi
16187  fi
16188
16189  fi
16190
16191  if test "x$VS_ENV_CMD" = x; then
16192    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16193    METHOD="well-known name"
16194
16195  windows_path="$WIN_SDK_BASE"
16196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16197    unix_path=`$CYGPATH -u "$windows_path"`
16198    WIN_SDK_BASE="$unix_path"
16199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16201    WIN_SDK_BASE="$unix_path"
16202  fi
16203
16204    if test -d "$WIN_SDK_BASE"; then
16205      # There have been cases of partial or broken SDK installations. A missing
16206      # lib dir is not going to work.
16207      if test ! -d "$WIN_SDK_BASE/../lib"; then
16208        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16209$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16210        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16211$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16212      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16214$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16215        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16216        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16217          VS_ENV_ARGS="/x86"
16218        else
16219          VS_ENV_ARGS="/x64"
16220        fi
16221      else
16222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16225$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16226      fi
16227    fi
16228  fi
16229
16230
16231  if test "x$VS_ENV_CMD" = x; then
16232    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16233    METHOD="well-known name"
16234
16235  windows_path="$WIN_SDK_BASE"
16236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16237    unix_path=`$CYGPATH -u "$windows_path"`
16238    WIN_SDK_BASE="$unix_path"
16239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16241    WIN_SDK_BASE="$unix_path"
16242  fi
16243
16244    if test -d "$WIN_SDK_BASE"; then
16245      # There have been cases of partial or broken SDK installations. A missing
16246      # lib dir is not going to work.
16247      if test ! -d "$WIN_SDK_BASE/../lib"; then
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16251$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16252      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16255        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16256        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16257          VS_ENV_ARGS="/x86"
16258        else
16259          VS_ENV_ARGS="/x64"
16260        fi
16261      else
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16265$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16266      fi
16267    fi
16268  fi
16269
16270
16271  if test "x$VS100COMNTOOLS" != x; then
16272
16273  if test "x$VS_ENV_CMD" = x; then
16274    VS100BASE="$VS100COMNTOOLS/../.."
16275    METHOD="VS100COMNTOOLS variable"
16276
16277  windows_path="$VS100BASE"
16278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16279    unix_path=`$CYGPATH -u "$windows_path"`
16280    VS100BASE="$unix_path"
16281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16283    VS100BASE="$unix_path"
16284  fi
16285
16286    if test -d "$VS100BASE"; then
16287      if test -f "$VS100BASE/$VCVARSFILE"; then
16288        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16289$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16290        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16291      else
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16293$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16294        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16295$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16296      fi
16297    fi
16298  fi
16299
16300  fi
16301  if test "x$PROGRAMFILES" != x; then
16302
16303  if test "x$VS_ENV_CMD" = x; then
16304    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16305    METHOD="well-known name"
16306
16307  windows_path="$VS100BASE"
16308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16309    unix_path=`$CYGPATH -u "$windows_path"`
16310    VS100BASE="$unix_path"
16311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16313    VS100BASE="$unix_path"
16314  fi
16315
16316    if test -d "$VS100BASE"; then
16317      if test -f "$VS100BASE/$VCVARSFILE"; then
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16319$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16320        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16321      else
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16323$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16324        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16325$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16326      fi
16327    fi
16328  fi
16329
16330  fi
16331
16332  if test "x$VS_ENV_CMD" = x; then
16333    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16334    METHOD="well-known name"
16335
16336  windows_path="$VS100BASE"
16337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338    unix_path=`$CYGPATH -u "$windows_path"`
16339    VS100BASE="$unix_path"
16340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342    VS100BASE="$unix_path"
16343  fi
16344
16345    if test -d "$VS100BASE"; then
16346      if test -f "$VS100BASE/$VCVARSFILE"; then
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16348$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16349        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16350      else
16351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16352$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16353        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16354$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16355      fi
16356    fi
16357  fi
16358
16359
16360  if test "x$VS_ENV_CMD" = x; then
16361    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16362    METHOD="well-known name"
16363
16364  windows_path="$VS100BASE"
16365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16366    unix_path=`$CYGPATH -u "$windows_path"`
16367    VS100BASE="$unix_path"
16368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16370    VS100BASE="$unix_path"
16371  fi
16372
16373    if test -d "$VS100BASE"; then
16374      if test -f "$VS100BASE/$VCVARSFILE"; then
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16376$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16377        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16378      else
16379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16380$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16381        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16382$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16383      fi
16384    fi
16385  fi
16386
16387
16388  if test "x$VS_ENV_CMD" != x; then
16389    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16390
16391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16392
16393  # First separate the path from the arguments. This will split at the first
16394  # space.
16395  complete="$VS_ENV_CMD"
16396  path="${complete%% *}"
16397  tmp="$complete EOL"
16398  arguments="${tmp#* }"
16399
16400  # Input might be given as Windows format, start by converting to
16401  # unix format.
16402  new_path=`$CYGPATH -u "$path"`
16403
16404  # Now try to locate executable using which
16405  new_path=`$WHICH "$new_path" 2> /dev/null`
16406  # bat and cmd files are not always considered executable in cygwin causing which
16407  # to not find them
16408  if test "x$new_path" = x \
16409           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16410           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16411    new_path=`$CYGPATH -u "$path"`
16412  fi
16413  if test "x$new_path" = x; then
16414    # Oops. Which didn't find the executable.
16415    # The splitting of arguments from the executable at a space might have been incorrect,
16416    # since paths with space are more likely in Windows. Give it another try with the whole
16417    # argument.
16418    path="$complete"
16419    arguments="EOL"
16420    new_path=`$CYGPATH -u "$path"`
16421    new_path=`$WHICH "$new_path" 2> /dev/null`
16422    # bat and cmd files are not always considered executable in cygwin causing which
16423    # to not find them
16424    if test "x$new_path" = x \
16425             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16426             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16427      new_path=`$CYGPATH -u "$path"`
16428    fi
16429    if test "x$new_path" = x; then
16430      # It's still not found. Now this is an unrecoverable error.
16431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16432$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16433      has_space=`$ECHO "$complete" | $GREP " "`
16434      if test "x$has_space" != x; then
16435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16437      fi
16438      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16439    fi
16440  fi
16441
16442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16445  # "foo.exe" is OK but "foo" is an error.
16446  #
16447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16448  # It is also a way to make sure we got the proper file name for the real test later on.
16449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16450  if test "x$test_shortpath" = x; then
16451    # Short path failed, file does not exist as specified.
16452    # Try adding .exe or .cmd
16453    if test -f "${new_path}.exe"; then
16454       input_to_shortpath="${new_path}.exe"
16455    elif test -f "${new_path}.cmd"; then
16456       input_to_shortpath="${new_path}.cmd"
16457    else
16458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16459$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16462      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16463    fi
16464  else
16465    input_to_shortpath="$new_path"
16466  fi
16467
16468  # Call helper function which possibly converts this using DOS-style short mode.
16469  # If so, the updated path is stored in $new_path.
16470  new_path="$input_to_shortpath"
16471
16472  input_path="$input_to_shortpath"
16473  # Check if we need to convert this using DOS-style short mode. If the path
16474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16475  # take no chances and rewrite it.
16476  # Note: m4 eats our [], so we need to use [ and ] instead.
16477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16478  if test "x$has_forbidden_chars" != x; then
16479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16483      # Going to short mode and back again did indeed matter. Since short mode is
16484      # case insensitive, let's make it lowercase to improve readability.
16485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16486      # Now convert it back to Unix-stile (cygpath)
16487      input_path=`$CYGPATH -u "$shortmode_path"`
16488      new_path="$input_path"
16489    fi
16490  fi
16491
16492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16493  if test "x$test_cygdrive_prefix" = x; then
16494    # As a simple fix, exclude /usr/bin since it's not a real path.
16495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16497      # a path prefixed by /cygdrive for fixpath to work.
16498      new_path="$CYGWIN_ROOT_PATH$input_path"
16499    fi
16500  fi
16501
16502  # remove trailing .exe if any
16503  new_path="${new_path/%.exe/}"
16504
16505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506
16507  # First separate the path from the arguments. This will split at the first
16508  # space.
16509  complete="$VS_ENV_CMD"
16510  path="${complete%% *}"
16511  tmp="$complete EOL"
16512  arguments="${tmp#* }"
16513
16514  # Input might be given as Windows format, start by converting to
16515  # unix format.
16516  new_path="$path"
16517
16518  windows_path="$new_path"
16519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16520    unix_path=`$CYGPATH -u "$windows_path"`
16521    new_path="$unix_path"
16522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16524    new_path="$unix_path"
16525  fi
16526
16527
16528  # Now try to locate executable using which
16529  new_path=`$WHICH "$new_path" 2> /dev/null`
16530
16531  if test "x$new_path" = x; then
16532    # Oops. Which didn't find the executable.
16533    # The splitting of arguments from the executable at a space might have been incorrect,
16534    # since paths with space are more likely in Windows. Give it another try with the whole
16535    # argument.
16536    path="$complete"
16537    arguments="EOL"
16538    new_path="$path"
16539
16540  windows_path="$new_path"
16541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542    unix_path=`$CYGPATH -u "$windows_path"`
16543    new_path="$unix_path"
16544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16546    new_path="$unix_path"
16547  fi
16548
16549
16550    new_path=`$WHICH "$new_path" 2> /dev/null`
16551
16552    if test "x$new_path" = x; then
16553      # It's still not found. Now this is an unrecoverable error.
16554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16555$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16556      has_space=`$ECHO "$complete" | $GREP " "`
16557      if test "x$has_space" != x; then
16558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16560      fi
16561      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16562    fi
16563  fi
16564
16565  # Now new_path has a complete unix path to the binary
16566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16567    # Keep paths in /bin as-is, but remove trailing .exe if any
16568    new_path="${new_path/%.exe/}"
16569    # Do not save /bin paths to all_fixpath_prefixes!
16570  else
16571    # Not in mixed or Windows style, start by that.
16572    new_path=`cmd //c echo $new_path`
16573
16574  input_path="$new_path"
16575  # Check if we need to convert this using DOS-style short mode. If the path
16576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16577  # take no chances and rewrite it.
16578  # Note: m4 eats our [], so we need to use [ and ] instead.
16579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16580  if test "x$has_forbidden_chars" != x; then
16581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16583  fi
16584
16585    # Output is in $new_path
16586
16587  windows_path="$new_path"
16588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16589    unix_path=`$CYGPATH -u "$windows_path"`
16590    new_path="$unix_path"
16591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16593    new_path="$unix_path"
16594  fi
16595
16596    # remove trailing .exe if any
16597    new_path="${new_path/%.exe/}"
16598
16599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16601  fi
16602
16603  else
16604    # We're on a posix platform. Hooray! :)
16605    # First separate the path from the arguments. This will split at the first
16606    # space.
16607    complete="$VS_ENV_CMD"
16608    path="${complete%% *}"
16609    tmp="$complete EOL"
16610    arguments="${tmp#* }"
16611
16612    # Cannot rely on the command "which" here since it doesn't always work.
16613    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16614    if test -z "$is_absolute_path"; then
16615      # Path to executable is not absolute. Find it.
16616      IFS_save="$IFS"
16617      IFS=:
16618      for p in $PATH; do
16619        if test -f "$p/$path" && test -x "$p/$path"; then
16620          new_path="$p/$path"
16621          break
16622        fi
16623      done
16624      IFS="$IFS_save"
16625    else
16626      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16627$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16628      new_path="$path"
16629    fi
16630
16631    if test "x$new_path" = x; then
16632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16633$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16634        has_space=`$ECHO "$complete" | $GREP " "`
16635        if test "x$has_space" != x; then
16636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16638        fi
16639        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16640      fi
16641  fi
16642
16643      # Now join together the path and the arguments once again
16644      if test "x$arguments" != xEOL; then
16645        new_complete="$new_path ${arguments% *}"
16646      else
16647        new_complete="$new_path"
16648      fi
16649
16650  if test "x$complete" != "x$new_complete"; then
16651      VS_ENV_CMD="$new_complete"
16652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16653$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16654    fi
16655
16656
16657    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16659$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16660    cd $OUTPUT_ROOT
16661    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16662    # to autoconf standards.
16663
16664    #----
16665
16666    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16667    # but calculate the difference in Cygwin environment before/after running it and then
16668    # apply the diff.
16669
16670    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16671      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16672      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16673      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16674    else
16675      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16676      _dosbash=`cmd //c echo \`which bash\``
16677    fi
16678
16679    # generate the set of exported vars before/after the vs10 setup
16680    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16681    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16682    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16683    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16684
16685    # Now execute the newly created bat file.
16686    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16687    cmd /c localdevenvtmp.bat | cat
16688
16689    # apply the diff (less some non-vs10 vars named by "!")
16690    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16691    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16692    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16693
16694    # cleanup
16695    $RM localdevenvtmp*
16696    #----
16697    cd $CURDIR
16698    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16700$as_echo "no" >&6; }
16701      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16702$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16703      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16704$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16705      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16706$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16707      as_fn_error $? "Cannot continue" "$LINENO" 5
16708    fi
16709
16710    # Now set all paths and other env variables. This will allow the rest of
16711    # the configure script to find and run the compiler in the proper way.
16712    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16713$as_echo "$as_me: Setting extracted environment variables" >&6;}
16714    . $OUTPUT_ROOT/localdevenv.sh
16715  else
16716    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16717    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16718$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16719  fi
16720
16721  # At this point, we should have corrent variables in the environment, or we can't continue.
16722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16723$as_echo_n "checking for Visual Studio variables... " >&6; }
16724
16725  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16726    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16728$as_echo "present but broken" >&6; }
16729      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16730    else
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16732$as_echo "ok" >&6; }
16733      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16734      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16735      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16736      VS_PATH="$PATH"
16737
16738
16739
16740    fi
16741  else
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16743$as_echo "not found" >&6; }
16744
16745    if test "x$VS_ENV_CMD" = x; then
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16747$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16749$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16750    else
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16752$as_echo "$as_me: Running the extraction script failed." >&6;}
16753    fi
16754    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16755$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16757$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16758    as_fn_error $? "Cannot continue" "$LINENO" 5
16759  fi
16760
16761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16762$as_echo_n "checking for msvcr100.dll... " >&6; }
16763
16764# Check whether --with-msvcr-dll was given.
16765if test "${with_msvcr_dll+set}" = set; then :
16766  withval=$with_msvcr_dll;
16767fi
16768
16769  if test "x$with_msvcr_dll" != x; then
16770    MSVCR_DLL="$with_msvcr_dll"
16771  else
16772    if test "x$VCINSTALLDIR" != x; then
16773      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16774        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16775      else
16776        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16777        if test "x$MSVCR_DLL" = x; then
16778          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16779        fi
16780      fi
16781      if test "x$MSVCR_DLL" != x; then
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16783$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16784      else
16785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16786$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16787      fi
16788    fi
16789    if test "x$MSVCR_DLL" = x; then
16790      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16791        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16792$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16793        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16794      fi
16795    fi
16796  fi
16797  if test "x$MSVCR_DLL" = x; then
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16799$as_echo "no" >&6; }
16800    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16801  fi
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16803$as_echo "$MSVCR_DLL" >&6; }
16804
16805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16806
16807  # Input might be given as Windows format, start by converting to
16808  # unix format.
16809  path="$MSVCR_DLL"
16810  new_path=`$CYGPATH -u "$path"`
16811
16812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16815  # "foo.exe" is OK but "foo" is an error.
16816  #
16817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16818  # It is also a way to make sure we got the proper file name for the real test later on.
16819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16820  if test "x$test_shortpath" = x; then
16821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16822$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16823    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16824  fi
16825
16826  # Call helper function which possibly converts this using DOS-style short mode.
16827  # If so, the updated path is stored in $new_path.
16828
16829  input_path="$new_path"
16830  # Check if we need to convert this using DOS-style short mode. If the path
16831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16832  # take no chances and rewrite it.
16833  # Note: m4 eats our [], so we need to use [ and ] instead.
16834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16835  if test "x$has_forbidden_chars" != x; then
16836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16840      # Going to short mode and back again did indeed matter. Since short mode is
16841      # case insensitive, let's make it lowercase to improve readability.
16842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16843      # Now convert it back to Unix-stile (cygpath)
16844      input_path=`$CYGPATH -u "$shortmode_path"`
16845      new_path="$input_path"
16846    fi
16847  fi
16848
16849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16850  if test "x$test_cygdrive_prefix" = x; then
16851    # As a simple fix, exclude /usr/bin since it's not a real path.
16852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16854      # a path prefixed by /cygdrive for fixpath to work.
16855      new_path="$CYGWIN_ROOT_PATH$input_path"
16856    fi
16857  fi
16858
16859
16860  if test "x$path" != "x$new_path"; then
16861    MSVCR_DLL="$new_path"
16862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16863$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16864  fi
16865
16866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16867
16868  path="$MSVCR_DLL"
16869  has_colon=`$ECHO $path | $GREP ^.:`
16870  new_path="$path"
16871  if test "x$has_colon" = x; then
16872    # Not in mixed or Windows style, start by that.
16873    new_path=`cmd //c echo $path`
16874  fi
16875
16876
16877  input_path="$new_path"
16878  # Check if we need to convert this using DOS-style short mode. If the path
16879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16880  # take no chances and rewrite it.
16881  # Note: m4 eats our [], so we need to use [ and ] instead.
16882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16883  if test "x$has_forbidden_chars" != x; then
16884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16886  fi
16887
16888
16889  windows_path="$new_path"
16890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16891    unix_path=`$CYGPATH -u "$windows_path"`
16892    new_path="$unix_path"
16893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16895    new_path="$unix_path"
16896  fi
16897
16898  if test "x$path" != "x$new_path"; then
16899    MSVCR_DLL="$new_path"
16900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16901$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16902  fi
16903
16904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16906
16907  else
16908    # We're on a posix platform. Hooray! :)
16909    path="$MSVCR_DLL"
16910
16911    if test ! -f "$path" && test ! -d "$path"; then
16912      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16913    fi
16914
16915    has_space=`$ECHO "$path" | $GREP " "`
16916    if test "x$has_space" != x; then
16917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16918$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16919      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16920    fi
16921  fi
16922
16923
16924fi
16925
16926
16927
16928# If --build AND --host is set, then the configure script will find any
16929# cross compilation tools in the PATH. Cross compilation tools
16930# follows the cross compilation standard where they are prefixed with ${host}.
16931# For example the binary i686-sun-solaris2.10-gcc
16932# will cross compile for i686-sun-solaris2.10
16933# If neither of build and host is not set, then build=host and the
16934# default compiler found in the path will be used.
16935# Setting only --host, does not seem to be really supported.
16936# Please set both --build and --host if you want to cross compile.
16937
16938if test "x$COMPILE_TYPE" = "xcross"; then
16939    # Now we to find a C/C++ compiler that can build executables for the build
16940    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16941    # once. Also, we need to do this before adding a tools dir to the path,
16942    # otherwise we might pick up cross-compilers which don't use standard naming.
16943    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16944    # to wait until they are properly discovered.
16945    for ac_prog in cl cc gcc
16946do
16947  # Extract the first word of "$ac_prog", so it can be a program name with args.
16948set dummy $ac_prog; ac_word=$2
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16950$as_echo_n "checking for $ac_word... " >&6; }
16951if ${ac_cv_path_BUILD_CC+:} false; then :
16952  $as_echo_n "(cached) " >&6
16953else
16954  case $BUILD_CC in
16955  [\\/]* | ?:[\\/]*)
16956  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16957  ;;
16958  *)
16959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16960for as_dir in $PATH
16961do
16962  IFS=$as_save_IFS
16963  test -z "$as_dir" && as_dir=.
16964    for ac_exec_ext in '' $ac_executable_extensions; do
16965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16966    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16968    break 2
16969  fi
16970done
16971  done
16972IFS=$as_save_IFS
16973
16974  ;;
16975esac
16976fi
16977BUILD_CC=$ac_cv_path_BUILD_CC
16978if test -n "$BUILD_CC"; then
16979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16980$as_echo "$BUILD_CC" >&6; }
16981else
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16983$as_echo "no" >&6; }
16984fi
16985
16986
16987  test -n "$BUILD_CC" && break
16988done
16989
16990
16991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16992
16993  # First separate the path from the arguments. This will split at the first
16994  # space.
16995  complete="$BUILD_CC"
16996  path="${complete%% *}"
16997  tmp="$complete EOL"
16998  arguments="${tmp#* }"
16999
17000  # Input might be given as Windows format, start by converting to
17001  # unix format.
17002  new_path=`$CYGPATH -u "$path"`
17003
17004  # Now try to locate executable using which
17005  new_path=`$WHICH "$new_path" 2> /dev/null`
17006  # bat and cmd files are not always considered executable in cygwin causing which
17007  # to not find them
17008  if test "x$new_path" = x \
17009           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17010           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17011    new_path=`$CYGPATH -u "$path"`
17012  fi
17013  if test "x$new_path" = x; then
17014    # Oops. Which didn't find the executable.
17015    # The splitting of arguments from the executable at a space might have been incorrect,
17016    # since paths with space are more likely in Windows. Give it another try with the whole
17017    # argument.
17018    path="$complete"
17019    arguments="EOL"
17020    new_path=`$CYGPATH -u "$path"`
17021    new_path=`$WHICH "$new_path" 2> /dev/null`
17022    # bat and cmd files are not always considered executable in cygwin causing which
17023    # to not find them
17024    if test "x$new_path" = x \
17025             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17026             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17027      new_path=`$CYGPATH -u "$path"`
17028    fi
17029    if test "x$new_path" = x; then
17030      # It's still not found. Now this is an unrecoverable error.
17031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17032$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17033      has_space=`$ECHO "$complete" | $GREP " "`
17034      if test "x$has_space" != x; then
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17037      fi
17038      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17039    fi
17040  fi
17041
17042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045  # "foo.exe" is OK but "foo" is an error.
17046  #
17047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17048  # It is also a way to make sure we got the proper file name for the real test later on.
17049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050  if test "x$test_shortpath" = x; then
17051    # Short path failed, file does not exist as specified.
17052    # Try adding .exe or .cmd
17053    if test -f "${new_path}.exe"; then
17054       input_to_shortpath="${new_path}.exe"
17055    elif test -f "${new_path}.cmd"; then
17056       input_to_shortpath="${new_path}.cmd"
17057    else
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17059$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17062      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17063    fi
17064  else
17065    input_to_shortpath="$new_path"
17066  fi
17067
17068  # Call helper function which possibly converts this using DOS-style short mode.
17069  # If so, the updated path is stored in $new_path.
17070  new_path="$input_to_shortpath"
17071
17072  input_path="$input_to_shortpath"
17073  # Check if we need to convert this using DOS-style short mode. If the path
17074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17075  # take no chances and rewrite it.
17076  # Note: m4 eats our [], so we need to use [ and ] instead.
17077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17078  if test "x$has_forbidden_chars" != x; then
17079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17083      # Going to short mode and back again did indeed matter. Since short mode is
17084      # case insensitive, let's make it lowercase to improve readability.
17085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17086      # Now convert it back to Unix-stile (cygpath)
17087      input_path=`$CYGPATH -u "$shortmode_path"`
17088      new_path="$input_path"
17089    fi
17090  fi
17091
17092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17093  if test "x$test_cygdrive_prefix" = x; then
17094    # As a simple fix, exclude /usr/bin since it's not a real path.
17095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17097      # a path prefixed by /cygdrive for fixpath to work.
17098      new_path="$CYGWIN_ROOT_PATH$input_path"
17099    fi
17100  fi
17101
17102  # remove trailing .exe if any
17103  new_path="${new_path/%.exe/}"
17104
17105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17106
17107  # First separate the path from the arguments. This will split at the first
17108  # space.
17109  complete="$BUILD_CC"
17110  path="${complete%% *}"
17111  tmp="$complete EOL"
17112  arguments="${tmp#* }"
17113
17114  # Input might be given as Windows format, start by converting to
17115  # unix format.
17116  new_path="$path"
17117
17118  windows_path="$new_path"
17119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17120    unix_path=`$CYGPATH -u "$windows_path"`
17121    new_path="$unix_path"
17122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17124    new_path="$unix_path"
17125  fi
17126
17127
17128  # Now try to locate executable using which
17129  new_path=`$WHICH "$new_path" 2> /dev/null`
17130
17131  if test "x$new_path" = x; then
17132    # Oops. Which didn't find the executable.
17133    # The splitting of arguments from the executable at a space might have been incorrect,
17134    # since paths with space are more likely in Windows. Give it another try with the whole
17135    # argument.
17136    path="$complete"
17137    arguments="EOL"
17138    new_path="$path"
17139
17140  windows_path="$new_path"
17141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17142    unix_path=`$CYGPATH -u "$windows_path"`
17143    new_path="$unix_path"
17144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17146    new_path="$unix_path"
17147  fi
17148
17149
17150    new_path=`$WHICH "$new_path" 2> /dev/null`
17151
17152    if test "x$new_path" = x; then
17153      # It's still not found. Now this is an unrecoverable error.
17154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17155$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17156      has_space=`$ECHO "$complete" | $GREP " "`
17157      if test "x$has_space" != x; then
17158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17160      fi
17161      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17162    fi
17163  fi
17164
17165  # Now new_path has a complete unix path to the binary
17166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17167    # Keep paths in /bin as-is, but remove trailing .exe if any
17168    new_path="${new_path/%.exe/}"
17169    # Do not save /bin paths to all_fixpath_prefixes!
17170  else
17171    # Not in mixed or Windows style, start by that.
17172    new_path=`cmd //c echo $new_path`
17173
17174  input_path="$new_path"
17175  # Check if we need to convert this using DOS-style short mode. If the path
17176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17177  # take no chances and rewrite it.
17178  # Note: m4 eats our [], so we need to use [ and ] instead.
17179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17180  if test "x$has_forbidden_chars" != x; then
17181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17183  fi
17184
17185    # Output is in $new_path
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196    # remove trailing .exe if any
17197    new_path="${new_path/%.exe/}"
17198
17199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17201  fi
17202
17203  else
17204    # We're on a posix platform. Hooray! :)
17205    # First separate the path from the arguments. This will split at the first
17206    # space.
17207    complete="$BUILD_CC"
17208    path="${complete%% *}"
17209    tmp="$complete EOL"
17210    arguments="${tmp#* }"
17211
17212    # Cannot rely on the command "which" here since it doesn't always work.
17213    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17214    if test -z "$is_absolute_path"; then
17215      # Path to executable is not absolute. Find it.
17216      IFS_save="$IFS"
17217      IFS=:
17218      for p in $PATH; do
17219        if test -f "$p/$path" && test -x "$p/$path"; then
17220          new_path="$p/$path"
17221          break
17222        fi
17223      done
17224      IFS="$IFS_save"
17225    else
17226      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17227$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17228      new_path="$path"
17229    fi
17230
17231    if test "x$new_path" = x; then
17232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17233$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17234        has_space=`$ECHO "$complete" | $GREP " "`
17235        if test "x$has_space" != x; then
17236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17238        fi
17239        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17240      fi
17241  fi
17242
17243      # Now join together the path and the arguments once again
17244      if test "x$arguments" != xEOL; then
17245        new_complete="$new_path ${arguments% *}"
17246      else
17247        new_complete="$new_path"
17248      fi
17249
17250  if test "x$complete" != "x$new_complete"; then
17251      BUILD_CC="$new_complete"
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17253$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17254    fi
17255
17256    for ac_prog in cl CC g++
17257do
17258  # Extract the first word of "$ac_prog", so it can be a program name with args.
17259set dummy $ac_prog; ac_word=$2
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17261$as_echo_n "checking for $ac_word... " >&6; }
17262if ${ac_cv_path_BUILD_CXX+:} false; then :
17263  $as_echo_n "(cached) " >&6
17264else
17265  case $BUILD_CXX in
17266  [\\/]* | ?:[\\/]*)
17267  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17268  ;;
17269  *)
17270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17271for as_dir in $PATH
17272do
17273  IFS=$as_save_IFS
17274  test -z "$as_dir" && as_dir=.
17275    for ac_exec_ext in '' $ac_executable_extensions; do
17276  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17277    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17279    break 2
17280  fi
17281done
17282  done
17283IFS=$as_save_IFS
17284
17285  ;;
17286esac
17287fi
17288BUILD_CXX=$ac_cv_path_BUILD_CXX
17289if test -n "$BUILD_CXX"; then
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17291$as_echo "$BUILD_CXX" >&6; }
17292else
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17294$as_echo "no" >&6; }
17295fi
17296
17297
17298  test -n "$BUILD_CXX" && break
17299done
17300
17301
17302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17303
17304  # First separate the path from the arguments. This will split at the first
17305  # space.
17306  complete="$BUILD_CXX"
17307  path="${complete%% *}"
17308  tmp="$complete EOL"
17309  arguments="${tmp#* }"
17310
17311  # Input might be given as Windows format, start by converting to
17312  # unix format.
17313  new_path=`$CYGPATH -u "$path"`
17314
17315  # Now try to locate executable using which
17316  new_path=`$WHICH "$new_path" 2> /dev/null`
17317  # bat and cmd files are not always considered executable in cygwin causing which
17318  # to not find them
17319  if test "x$new_path" = x \
17320           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17321           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17322    new_path=`$CYGPATH -u "$path"`
17323  fi
17324  if test "x$new_path" = x; then
17325    # Oops. Which didn't find the executable.
17326    # The splitting of arguments from the executable at a space might have been incorrect,
17327    # since paths with space are more likely in Windows. Give it another try with the whole
17328    # argument.
17329    path="$complete"
17330    arguments="EOL"
17331    new_path=`$CYGPATH -u "$path"`
17332    new_path=`$WHICH "$new_path" 2> /dev/null`
17333    # bat and cmd files are not always considered executable in cygwin causing which
17334    # to not find them
17335    if test "x$new_path" = x \
17336             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17337             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17338      new_path=`$CYGPATH -u "$path"`
17339    fi
17340    if test "x$new_path" = x; then
17341      # It's still not found. Now this is an unrecoverable error.
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17343$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17344      has_space=`$ECHO "$complete" | $GREP " "`
17345      if test "x$has_space" != x; then
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17348      fi
17349      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17350    fi
17351  fi
17352
17353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17356  # "foo.exe" is OK but "foo" is an error.
17357  #
17358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17359  # It is also a way to make sure we got the proper file name for the real test later on.
17360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17361  if test "x$test_shortpath" = x; then
17362    # Short path failed, file does not exist as specified.
17363    # Try adding .exe or .cmd
17364    if test -f "${new_path}.exe"; then
17365       input_to_shortpath="${new_path}.exe"
17366    elif test -f "${new_path}.cmd"; then
17367       input_to_shortpath="${new_path}.cmd"
17368    else
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17370$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17373      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17374    fi
17375  else
17376    input_to_shortpath="$new_path"
17377  fi
17378
17379  # Call helper function which possibly converts this using DOS-style short mode.
17380  # If so, the updated path is stored in $new_path.
17381  new_path="$input_to_shortpath"
17382
17383  input_path="$input_to_shortpath"
17384  # Check if we need to convert this using DOS-style short mode. If the path
17385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17386  # take no chances and rewrite it.
17387  # Note: m4 eats our [], so we need to use [ and ] instead.
17388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17389  if test "x$has_forbidden_chars" != x; then
17390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17394      # Going to short mode and back again did indeed matter. Since short mode is
17395      # case insensitive, let's make it lowercase to improve readability.
17396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17397      # Now convert it back to Unix-stile (cygpath)
17398      input_path=`$CYGPATH -u "$shortmode_path"`
17399      new_path="$input_path"
17400    fi
17401  fi
17402
17403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17404  if test "x$test_cygdrive_prefix" = x; then
17405    # As a simple fix, exclude /usr/bin since it's not a real path.
17406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17408      # a path prefixed by /cygdrive for fixpath to work.
17409      new_path="$CYGWIN_ROOT_PATH$input_path"
17410    fi
17411  fi
17412
17413  # remove trailing .exe if any
17414  new_path="${new_path/%.exe/}"
17415
17416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17417
17418  # First separate the path from the arguments. This will split at the first
17419  # space.
17420  complete="$BUILD_CXX"
17421  path="${complete%% *}"
17422  tmp="$complete EOL"
17423  arguments="${tmp#* }"
17424
17425  # Input might be given as Windows format, start by converting to
17426  # unix format.
17427  new_path="$path"
17428
17429  windows_path="$new_path"
17430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17431    unix_path=`$CYGPATH -u "$windows_path"`
17432    new_path="$unix_path"
17433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17435    new_path="$unix_path"
17436  fi
17437
17438
17439  # Now try to locate executable using which
17440  new_path=`$WHICH "$new_path" 2> /dev/null`
17441
17442  if test "x$new_path" = x; then
17443    # Oops. Which didn't find the executable.
17444    # The splitting of arguments from the executable at a space might have been incorrect,
17445    # since paths with space are more likely in Windows. Give it another try with the whole
17446    # argument.
17447    path="$complete"
17448    arguments="EOL"
17449    new_path="$path"
17450
17451  windows_path="$new_path"
17452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17453    unix_path=`$CYGPATH -u "$windows_path"`
17454    new_path="$unix_path"
17455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17457    new_path="$unix_path"
17458  fi
17459
17460
17461    new_path=`$WHICH "$new_path" 2> /dev/null`
17462
17463    if test "x$new_path" = x; then
17464      # It's still not found. Now this is an unrecoverable error.
17465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17466$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17467      has_space=`$ECHO "$complete" | $GREP " "`
17468      if test "x$has_space" != x; then
17469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17471      fi
17472      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17473    fi
17474  fi
17475
17476  # Now new_path has a complete unix path to the binary
17477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17478    # Keep paths in /bin as-is, but remove trailing .exe if any
17479    new_path="${new_path/%.exe/}"
17480    # Do not save /bin paths to all_fixpath_prefixes!
17481  else
17482    # Not in mixed or Windows style, start by that.
17483    new_path=`cmd //c echo $new_path`
17484
17485  input_path="$new_path"
17486  # Check if we need to convert this using DOS-style short mode. If the path
17487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17488  # take no chances and rewrite it.
17489  # Note: m4 eats our [], so we need to use [ and ] instead.
17490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17491  if test "x$has_forbidden_chars" != x; then
17492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17494  fi
17495
17496    # Output is in $new_path
17497
17498  windows_path="$new_path"
17499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17500    unix_path=`$CYGPATH -u "$windows_path"`
17501    new_path="$unix_path"
17502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17504    new_path="$unix_path"
17505  fi
17506
17507    # remove trailing .exe if any
17508    new_path="${new_path/%.exe/}"
17509
17510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17512  fi
17513
17514  else
17515    # We're on a posix platform. Hooray! :)
17516    # First separate the path from the arguments. This will split at the first
17517    # space.
17518    complete="$BUILD_CXX"
17519    path="${complete%% *}"
17520    tmp="$complete EOL"
17521    arguments="${tmp#* }"
17522
17523    # Cannot rely on the command "which" here since it doesn't always work.
17524    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17525    if test -z "$is_absolute_path"; then
17526      # Path to executable is not absolute. Find it.
17527      IFS_save="$IFS"
17528      IFS=:
17529      for p in $PATH; do
17530        if test -f "$p/$path" && test -x "$p/$path"; then
17531          new_path="$p/$path"
17532          break
17533        fi
17534      done
17535      IFS="$IFS_save"
17536    else
17537      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17538$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17539      new_path="$path"
17540    fi
17541
17542    if test "x$new_path" = x; then
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17544$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17545        has_space=`$ECHO "$complete" | $GREP " "`
17546        if test "x$has_space" != x; then
17547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17549        fi
17550        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17551      fi
17552  fi
17553
17554      # Now join together the path and the arguments once again
17555      if test "x$arguments" != xEOL; then
17556        new_complete="$new_path ${arguments% *}"
17557      else
17558        new_complete="$new_path"
17559      fi
17560
17561  if test "x$complete" != "x$new_complete"; then
17562      BUILD_CXX="$new_complete"
17563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17564$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17565    fi
17566
17567    # Extract the first word of "ld", so it can be a program name with args.
17568set dummy ld; ac_word=$2
17569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17570$as_echo_n "checking for $ac_word... " >&6; }
17571if ${ac_cv_path_BUILD_LD+:} false; then :
17572  $as_echo_n "(cached) " >&6
17573else
17574  case $BUILD_LD in
17575  [\\/]* | ?:[\\/]*)
17576  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17577  ;;
17578  *)
17579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17580for as_dir in $PATH
17581do
17582  IFS=$as_save_IFS
17583  test -z "$as_dir" && as_dir=.
17584    for ac_exec_ext in '' $ac_executable_extensions; do
17585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17586    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17588    break 2
17589  fi
17590done
17591  done
17592IFS=$as_save_IFS
17593
17594  ;;
17595esac
17596fi
17597BUILD_LD=$ac_cv_path_BUILD_LD
17598if test -n "$BUILD_LD"; then
17599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17600$as_echo "$BUILD_LD" >&6; }
17601else
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17603$as_echo "no" >&6; }
17604fi
17605
17606
17607
17608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17609
17610  # First separate the path from the arguments. This will split at the first
17611  # space.
17612  complete="$BUILD_LD"
17613  path="${complete%% *}"
17614  tmp="$complete EOL"
17615  arguments="${tmp#* }"
17616
17617  # Input might be given as Windows format, start by converting to
17618  # unix format.
17619  new_path=`$CYGPATH -u "$path"`
17620
17621  # Now try to locate executable using which
17622  new_path=`$WHICH "$new_path" 2> /dev/null`
17623  # bat and cmd files are not always considered executable in cygwin causing which
17624  # to not find them
17625  if test "x$new_path" = x \
17626           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17627           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17628    new_path=`$CYGPATH -u "$path"`
17629  fi
17630  if test "x$new_path" = x; then
17631    # Oops. Which didn't find the executable.
17632    # The splitting of arguments from the executable at a space might have been incorrect,
17633    # since paths with space are more likely in Windows. Give it another try with the whole
17634    # argument.
17635    path="$complete"
17636    arguments="EOL"
17637    new_path=`$CYGPATH -u "$path"`
17638    new_path=`$WHICH "$new_path" 2> /dev/null`
17639    # bat and cmd files are not always considered executable in cygwin causing which
17640    # to not find them
17641    if test "x$new_path" = x \
17642             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17643             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17644      new_path=`$CYGPATH -u "$path"`
17645    fi
17646    if test "x$new_path" = x; then
17647      # It's still not found. Now this is an unrecoverable error.
17648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17649$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17650      has_space=`$ECHO "$complete" | $GREP " "`
17651      if test "x$has_space" != x; then
17652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17654      fi
17655      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17656    fi
17657  fi
17658
17659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17662  # "foo.exe" is OK but "foo" is an error.
17663  #
17664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17665  # It is also a way to make sure we got the proper file name for the real test later on.
17666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17667  if test "x$test_shortpath" = x; then
17668    # Short path failed, file does not exist as specified.
17669    # Try adding .exe or .cmd
17670    if test -f "${new_path}.exe"; then
17671       input_to_shortpath="${new_path}.exe"
17672    elif test -f "${new_path}.cmd"; then
17673       input_to_shortpath="${new_path}.cmd"
17674    else
17675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17676$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17679      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17680    fi
17681  else
17682    input_to_shortpath="$new_path"
17683  fi
17684
17685  # Call helper function which possibly converts this using DOS-style short mode.
17686  # If so, the updated path is stored in $new_path.
17687  new_path="$input_to_shortpath"
17688
17689  input_path="$input_to_shortpath"
17690  # Check if we need to convert this using DOS-style short mode. If the path
17691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17692  # take no chances and rewrite it.
17693  # Note: m4 eats our [], so we need to use [ and ] instead.
17694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17695  if test "x$has_forbidden_chars" != x; then
17696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17700      # Going to short mode and back again did indeed matter. Since short mode is
17701      # case insensitive, let's make it lowercase to improve readability.
17702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17703      # Now convert it back to Unix-stile (cygpath)
17704      input_path=`$CYGPATH -u "$shortmode_path"`
17705      new_path="$input_path"
17706    fi
17707  fi
17708
17709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17710  if test "x$test_cygdrive_prefix" = x; then
17711    # As a simple fix, exclude /usr/bin since it's not a real path.
17712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17714      # a path prefixed by /cygdrive for fixpath to work.
17715      new_path="$CYGWIN_ROOT_PATH$input_path"
17716    fi
17717  fi
17718
17719  # remove trailing .exe if any
17720  new_path="${new_path/%.exe/}"
17721
17722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17723
17724  # First separate the path from the arguments. This will split at the first
17725  # space.
17726  complete="$BUILD_LD"
17727  path="${complete%% *}"
17728  tmp="$complete EOL"
17729  arguments="${tmp#* }"
17730
17731  # Input might be given as Windows format, start by converting to
17732  # unix format.
17733  new_path="$path"
17734
17735  windows_path="$new_path"
17736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17737    unix_path=`$CYGPATH -u "$windows_path"`
17738    new_path="$unix_path"
17739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17741    new_path="$unix_path"
17742  fi
17743
17744
17745  # Now try to locate executable using which
17746  new_path=`$WHICH "$new_path" 2> /dev/null`
17747
17748  if test "x$new_path" = x; then
17749    # Oops. Which didn't find the executable.
17750    # The splitting of arguments from the executable at a space might have been incorrect,
17751    # since paths with space are more likely in Windows. Give it another try with the whole
17752    # argument.
17753    path="$complete"
17754    arguments="EOL"
17755    new_path="$path"
17756
17757  windows_path="$new_path"
17758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17759    unix_path=`$CYGPATH -u "$windows_path"`
17760    new_path="$unix_path"
17761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17763    new_path="$unix_path"
17764  fi
17765
17766
17767    new_path=`$WHICH "$new_path" 2> /dev/null`
17768
17769    if test "x$new_path" = x; then
17770      # It's still not found. Now this is an unrecoverable error.
17771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17772$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17773      has_space=`$ECHO "$complete" | $GREP " "`
17774      if test "x$has_space" != x; then
17775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17777      fi
17778      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17779    fi
17780  fi
17781
17782  # Now new_path has a complete unix path to the binary
17783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17784    # Keep paths in /bin as-is, but remove trailing .exe if any
17785    new_path="${new_path/%.exe/}"
17786    # Do not save /bin paths to all_fixpath_prefixes!
17787  else
17788    # Not in mixed or Windows style, start by that.
17789    new_path=`cmd //c echo $new_path`
17790
17791  input_path="$new_path"
17792  # Check if we need to convert this using DOS-style short mode. If the path
17793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17794  # take no chances and rewrite it.
17795  # Note: m4 eats our [], so we need to use [ and ] instead.
17796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17797  if test "x$has_forbidden_chars" != x; then
17798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17800  fi
17801
17802    # Output is in $new_path
17803
17804  windows_path="$new_path"
17805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806    unix_path=`$CYGPATH -u "$windows_path"`
17807    new_path="$unix_path"
17808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17810    new_path="$unix_path"
17811  fi
17812
17813    # remove trailing .exe if any
17814    new_path="${new_path/%.exe/}"
17815
17816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17818  fi
17819
17820  else
17821    # We're on a posix platform. Hooray! :)
17822    # First separate the path from the arguments. This will split at the first
17823    # space.
17824    complete="$BUILD_LD"
17825    path="${complete%% *}"
17826    tmp="$complete EOL"
17827    arguments="${tmp#* }"
17828
17829    # Cannot rely on the command "which" here since it doesn't always work.
17830    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17831    if test -z "$is_absolute_path"; then
17832      # Path to executable is not absolute. Find it.
17833      IFS_save="$IFS"
17834      IFS=:
17835      for p in $PATH; do
17836        if test -f "$p/$path" && test -x "$p/$path"; then
17837          new_path="$p/$path"
17838          break
17839        fi
17840      done
17841      IFS="$IFS_save"
17842    else
17843      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17844$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17845      new_path="$path"
17846    fi
17847
17848    if test "x$new_path" = x; then
17849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17850$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17851        has_space=`$ECHO "$complete" | $GREP " "`
17852        if test "x$has_space" != x; then
17853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17855        fi
17856        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17857      fi
17858  fi
17859
17860      # Now join together the path and the arguments once again
17861      if test "x$arguments" != xEOL; then
17862        new_complete="$new_path ${arguments% *}"
17863      else
17864        new_complete="$new_path"
17865      fi
17866
17867  if test "x$complete" != "x$new_complete"; then
17868      BUILD_LD="$new_complete"
17869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17870$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17871    fi
17872
17873fi
17874
17875
17876
17877
17878# If a devkit is found on the builddeps server, then prepend its path to the
17879# PATH variable. If there are cross compilers available in the devkit, these
17880# will be found by AC_PROG_CC et al.
17881DEVKIT=
17882
17883
17884    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17885        # Source the builddeps file again, to make sure it uses the latest variables!
17886        . $builddepsfile
17887        # Look for a target and build machine specific resource!
17888        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17889        if test "x$resource" = x; then
17890            # Ok, lets instead look for a target specific resource
17891            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17892        fi
17893        if test "x$resource" = x; then
17894            # Ok, lets instead look for a build specific resource
17895            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17896        fi
17897        if test "x$resource" = x; then
17898            # Ok, lets instead look for a generic resource
17899            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17900            resource=${builddep_devkit}
17901        fi
17902        if test "x$resource" != x; then
17903            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17904$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17905	    # If the resource in the builddeps.conf file is an existing directory,
17906	    # for example /java/linux/cups
17907	    if test -d ${resource}; then
17908	       depdir=${resource}
17909	    else
17910
17911# devkit is for example mymodule
17912# $resource is for example libs/general/libmymod_1_2_3.zip
17913# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17914# $with_builddeps_dir is for example /localhome/builddeps
17915# depdir is the name of the variable into which we store the depdir, eg MYMOD
17916# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17917# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17918    filename=`basename $resource`
17919    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17920    filebase=${filename%%.*}
17921    extension=${filename#*.}
17922    installdir=$with_builddeps_dir/$filebase
17923    if test ! -f $installdir/$filename.unpacked; then
17924        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17925$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17926        if test ! -d $installdir; then
17927            mkdir -p $installdir
17928        fi
17929        if test ! -d $installdir; then
17930            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17931        fi
17932        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17933        touch $tmpfile
17934        if test ! -f $tmpfile; then
17935            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17936        fi
17937
17938    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17939    # $tmpfile is the local file name for the downloaded file.
17940    VALID_TOOL=no
17941    if test "x$BDEPS_FTP" = xwget; then
17942       VALID_TOOL=yes
17943       wget -O $tmpfile $with_builddeps_server/$resource
17944    fi
17945    if test "x$BDEPS_FTP" = xlftp; then
17946       VALID_TOOL=yes
17947       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17948    fi
17949    if test "x$BDEPS_FTP" = xftp; then
17950        VALID_TOOL=yes
17951        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17952        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17953        FTPUSERPWD=${FTPSERVER%%@*}
17954        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17955            FTPUSER=${userpwd%%:*}
17956            FTPPWD=${userpwd#*@}
17957            FTPSERVER=${FTPSERVER#*@}
17958        else
17959            FTPUSER=ftp
17960            FTPPWD=ftp
17961        fi
17962        # the "pass" command does not work on some
17963        # ftp clients (read ftp.exe) but if it works,
17964        # passive mode is better!
17965        (\
17966            echo "user $FTPUSER $FTPPWD"        ;\
17967            echo "pass"                         ;\
17968            echo "bin"                          ;\
17969            echo "get $FTPPATH $tmpfile"              ;\
17970        ) | ftp -in $FTPSERVER
17971    fi
17972    if test "x$VALID_TOOL" != xyes; then
17973       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17974    fi
17975
17976        mv $tmpfile $installdir/$filename
17977        if test ! -s $installdir/$filename; then
17978            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17979        fi
17980        case "$extension" in
17981            zip)  echo "Unzipping $installdir/$filename..."
17982               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17983            ;;
17984            tar.gz) echo "Untaring $installdir/$filename..."
17985               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17986            ;;
17987            tgz) echo "Untaring $installdir/$filename..."
17988               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17989            ;;
17990            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17991            ;;
17992        esac
17993    fi
17994    if test -f $installdir/$filename.unpacked; then
17995        depdir=$installdir
17996    fi
17997
17998	    fi
17999            # Source the builddeps file again, because in the previous command, the depdir
18000            # was updated to point at the current build dependency install directory.
18001            . $builddepsfile
18002            # Now extract variables from the builddeps.conf files.
18003            theroot=${builddep_devkit_ROOT}
18004            thecflags=${builddep_devkit_CFLAGS}
18005            thelibs=${builddep_devkit_LIBS}
18006            if test "x$depdir" = x; then
18007                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18008            fi
18009            DEVKIT=$depdir
18010            if test "x$theroot" != x; then
18011               DEVKIT="$theroot"
18012            fi
18013            if test "x$thecflags" != x; then
18014               DEVKIT_CFLAGS="$thecflags"
18015            fi
18016            if test "x$thelibs" != x; then
18017               DEVKIT_LIBS="$thelibs"
18018            fi
18019            # Found devkit
18020                     PATH="$DEVKIT/bin:$PATH"
18021                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18022                     if test "x$x_includes" = "xNONE"; then
18023                         x_includes="$SYS_ROOT/usr/include/X11"
18024                     fi
18025                     if test "x$x_libraries" = "xNONE"; then
18026                         x_libraries="$SYS_ROOT/usr/lib"
18027                     fi
18028
18029
18030        fi
18031
18032    fi
18033
18034
18035if test "x$SYS_ROOT" != "x/" ; then
18036    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18037    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18038    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18039    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18040    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18041    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18042fi
18043
18044# Store the CFLAGS etal passed to the configure script.
18045ORG_CFLAGS="$CFLAGS"
18046ORG_CXXFLAGS="$CXXFLAGS"
18047ORG_OBJCFLAGS="$OBJCFLAGS"
18048
18049# autoconf magic only relies on PATH, so update it if tools dir is specified
18050OLD_PATH="$PATH"
18051if test "x$TOOLS_DIR" != x; then
18052  PATH=$TOOLS_DIR:$PATH
18053fi
18054
18055
18056### Locate C compiler (CC)
18057
18058# gcc is almost always present, but on Windows we
18059# prefer cl.exe and on Solaris we prefer CC.
18060# Thus test for them in this order.
18061if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18062  # Do not probe for cc on MacOSX.
18063  COMPILER_CHECK_LIST="cl gcc"
18064else
18065  COMPILER_CHECK_LIST="cl cc gcc"
18066fi
18067
18068
18069  COMPILER_NAME=C
18070
18071  CC=
18072  # If TOOLS_DIR is set, check for all compiler names in there first
18073  # before checking the rest of the PATH.
18074  if test -n "$TOOLS_DIR"; then
18075    PATH_save="$PATH"
18076    PATH="$TOOLS_DIR"
18077    for ac_prog in $COMPILER_CHECK_LIST
18078do
18079  # Extract the first word of "$ac_prog", so it can be a program name with args.
18080set dummy $ac_prog; ac_word=$2
18081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18082$as_echo_n "checking for $ac_word... " >&6; }
18083if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18084  $as_echo_n "(cached) " >&6
18085else
18086  case $TOOLS_DIR_CC in
18087  [\\/]* | ?:[\\/]*)
18088  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18089  ;;
18090  *)
18091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18092for as_dir in $PATH
18093do
18094  IFS=$as_save_IFS
18095  test -z "$as_dir" && as_dir=.
18096    for ac_exec_ext in '' $ac_executable_extensions; do
18097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18098    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18100    break 2
18101  fi
18102done
18103  done
18104IFS=$as_save_IFS
18105
18106  ;;
18107esac
18108fi
18109TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18110if test -n "$TOOLS_DIR_CC"; then
18111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18112$as_echo "$TOOLS_DIR_CC" >&6; }
18113else
18114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18115$as_echo "no" >&6; }
18116fi
18117
18118
18119  test -n "$TOOLS_DIR_CC" && break
18120done
18121
18122    CC=$TOOLS_DIR_CC
18123    PATH="$PATH_save"
18124  fi
18125
18126  # AC_PATH_PROGS can't be run multiple times with the same variable,
18127  # so create a new name for this run.
18128  if test "x$CC" = x; then
18129    for ac_prog in $COMPILER_CHECK_LIST
18130do
18131  # Extract the first word of "$ac_prog", so it can be a program name with args.
18132set dummy $ac_prog; ac_word=$2
18133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18134$as_echo_n "checking for $ac_word... " >&6; }
18135if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18136  $as_echo_n "(cached) " >&6
18137else
18138  case $POTENTIAL_CC in
18139  [\\/]* | ?:[\\/]*)
18140  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18141  ;;
18142  *)
18143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18144for as_dir in $PATH
18145do
18146  IFS=$as_save_IFS
18147  test -z "$as_dir" && as_dir=.
18148    for ac_exec_ext in '' $ac_executable_extensions; do
18149  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18150    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18152    break 2
18153  fi
18154done
18155  done
18156IFS=$as_save_IFS
18157
18158  ;;
18159esac
18160fi
18161POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18162if test -n "$POTENTIAL_CC"; then
18163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18164$as_echo "$POTENTIAL_CC" >&6; }
18165else
18166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18167$as_echo "no" >&6; }
18168fi
18169
18170
18171  test -n "$POTENTIAL_CC" && break
18172done
18173
18174    CC=$POTENTIAL_CC
18175  fi
18176
18177  if test "x$CC" = x; then
18178
18179    # Print a helpful message on how to acquire the necessary build dependency.
18180    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18181    MISSING_DEPENDENCY=devkit
18182    PKGHANDLER_COMMAND=
18183
18184    case $PKGHANDLER in
18185	apt-get)
18186                apt_help     $MISSING_DEPENDENCY ;;
18187    yum)
18188                yum_help     $MISSING_DEPENDENCY ;;
18189	port)
18190                port_help    $MISSING_DEPENDENCY ;;
18191	pkgutil)
18192                pkgutil_help $MISSING_DEPENDENCY ;;
18193	pkgadd)
18194                pkgadd_help  $MISSING_DEPENDENCY ;;
18195    * )
18196      break ;;
18197    esac
18198
18199    if test "x$PKGHANDLER_COMMAND" != x; then
18200        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18201    fi
18202
18203      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18204  fi
18205
18206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207
18208  # First separate the path from the arguments. This will split at the first
18209  # space.
18210  complete="$CC"
18211  path="${complete%% *}"
18212  tmp="$complete EOL"
18213  arguments="${tmp#* }"
18214
18215  # Input might be given as Windows format, start by converting to
18216  # unix format.
18217  new_path=`$CYGPATH -u "$path"`
18218
18219  # Now try to locate executable using which
18220  new_path=`$WHICH "$new_path" 2> /dev/null`
18221  # bat and cmd files are not always considered executable in cygwin causing which
18222  # to not find them
18223  if test "x$new_path" = x \
18224           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18225           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18226    new_path=`$CYGPATH -u "$path"`
18227  fi
18228  if test "x$new_path" = x; then
18229    # Oops. Which didn't find the executable.
18230    # The splitting of arguments from the executable at a space might have been incorrect,
18231    # since paths with space are more likely in Windows. Give it another try with the whole
18232    # argument.
18233    path="$complete"
18234    arguments="EOL"
18235    new_path=`$CYGPATH -u "$path"`
18236    new_path=`$WHICH "$new_path" 2> /dev/null`
18237    # bat and cmd files are not always considered executable in cygwin causing which
18238    # to not find them
18239    if test "x$new_path" = x \
18240             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18241             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18242      new_path=`$CYGPATH -u "$path"`
18243    fi
18244    if test "x$new_path" = x; then
18245      # It's still not found. Now this is an unrecoverable error.
18246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18247$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18248      has_space=`$ECHO "$complete" | $GREP " "`
18249      if test "x$has_space" != x; then
18250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18252      fi
18253      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18254    fi
18255  fi
18256
18257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18260  # "foo.exe" is OK but "foo" is an error.
18261  #
18262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18263  # It is also a way to make sure we got the proper file name for the real test later on.
18264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18265  if test "x$test_shortpath" = x; then
18266    # Short path failed, file does not exist as specified.
18267    # Try adding .exe or .cmd
18268    if test -f "${new_path}.exe"; then
18269       input_to_shortpath="${new_path}.exe"
18270    elif test -f "${new_path}.cmd"; then
18271       input_to_shortpath="${new_path}.cmd"
18272    else
18273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18274$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18277      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18278    fi
18279  else
18280    input_to_shortpath="$new_path"
18281  fi
18282
18283  # Call helper function which possibly converts this using DOS-style short mode.
18284  # If so, the updated path is stored in $new_path.
18285  new_path="$input_to_shortpath"
18286
18287  input_path="$input_to_shortpath"
18288  # Check if we need to convert this using DOS-style short mode. If the path
18289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18290  # take no chances and rewrite it.
18291  # Note: m4 eats our [], so we need to use [ and ] instead.
18292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18293  if test "x$has_forbidden_chars" != x; then
18294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18298      # Going to short mode and back again did indeed matter. Since short mode is
18299      # case insensitive, let's make it lowercase to improve readability.
18300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18301      # Now convert it back to Unix-stile (cygpath)
18302      input_path=`$CYGPATH -u "$shortmode_path"`
18303      new_path="$input_path"
18304    fi
18305  fi
18306
18307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18308  if test "x$test_cygdrive_prefix" = x; then
18309    # As a simple fix, exclude /usr/bin since it's not a real path.
18310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18312      # a path prefixed by /cygdrive for fixpath to work.
18313      new_path="$CYGWIN_ROOT_PATH$input_path"
18314    fi
18315  fi
18316
18317  # remove trailing .exe if any
18318  new_path="${new_path/%.exe/}"
18319
18320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321
18322  # First separate the path from the arguments. This will split at the first
18323  # space.
18324  complete="$CC"
18325  path="${complete%% *}"
18326  tmp="$complete EOL"
18327  arguments="${tmp#* }"
18328
18329  # Input might be given as Windows format, start by converting to
18330  # unix format.
18331  new_path="$path"
18332
18333  windows_path="$new_path"
18334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18335    unix_path=`$CYGPATH -u "$windows_path"`
18336    new_path="$unix_path"
18337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18339    new_path="$unix_path"
18340  fi
18341
18342
18343  # Now try to locate executable using which
18344  new_path=`$WHICH "$new_path" 2> /dev/null`
18345
18346  if test "x$new_path" = x; then
18347    # Oops. Which didn't find the executable.
18348    # The splitting of arguments from the executable at a space might have been incorrect,
18349    # since paths with space are more likely in Windows. Give it another try with the whole
18350    # argument.
18351    path="$complete"
18352    arguments="EOL"
18353    new_path="$path"
18354
18355  windows_path="$new_path"
18356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18357    unix_path=`$CYGPATH -u "$windows_path"`
18358    new_path="$unix_path"
18359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18361    new_path="$unix_path"
18362  fi
18363
18364
18365    new_path=`$WHICH "$new_path" 2> /dev/null`
18366
18367    if test "x$new_path" = x; then
18368      # It's still not found. Now this is an unrecoverable error.
18369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18370$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18371      has_space=`$ECHO "$complete" | $GREP " "`
18372      if test "x$has_space" != x; then
18373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18375      fi
18376      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18377    fi
18378  fi
18379
18380  # Now new_path has a complete unix path to the binary
18381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18382    # Keep paths in /bin as-is, but remove trailing .exe if any
18383    new_path="${new_path/%.exe/}"
18384    # Do not save /bin paths to all_fixpath_prefixes!
18385  else
18386    # Not in mixed or Windows style, start by that.
18387    new_path=`cmd //c echo $new_path`
18388
18389  input_path="$new_path"
18390  # Check if we need to convert this using DOS-style short mode. If the path
18391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18392  # take no chances and rewrite it.
18393  # Note: m4 eats our [], so we need to use [ and ] instead.
18394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18395  if test "x$has_forbidden_chars" != x; then
18396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18398  fi
18399
18400    # Output is in $new_path
18401
18402  windows_path="$new_path"
18403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18404    unix_path=`$CYGPATH -u "$windows_path"`
18405    new_path="$unix_path"
18406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18408    new_path="$unix_path"
18409  fi
18410
18411    # remove trailing .exe if any
18412    new_path="${new_path/%.exe/}"
18413
18414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18416  fi
18417
18418  else
18419    # We're on a posix platform. Hooray! :)
18420    # First separate the path from the arguments. This will split at the first
18421    # space.
18422    complete="$CC"
18423    path="${complete%% *}"
18424    tmp="$complete EOL"
18425    arguments="${tmp#* }"
18426
18427    # Cannot rely on the command "which" here since it doesn't always work.
18428    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18429    if test -z "$is_absolute_path"; then
18430      # Path to executable is not absolute. Find it.
18431      IFS_save="$IFS"
18432      IFS=:
18433      for p in $PATH; do
18434        if test -f "$p/$path" && test -x "$p/$path"; then
18435          new_path="$p/$path"
18436          break
18437        fi
18438      done
18439      IFS="$IFS_save"
18440    else
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18442$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18443      new_path="$path"
18444    fi
18445
18446    if test "x$new_path" = x; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18448$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18449        has_space=`$ECHO "$complete" | $GREP " "`
18450        if test "x$has_space" != x; then
18451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18453        fi
18454        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18455      fi
18456  fi
18457
18458      # Now join together the path and the arguments once again
18459      if test "x$arguments" != xEOL; then
18460        new_complete="$new_path ${arguments% *}"
18461      else
18462        new_complete="$new_path"
18463      fi
18464
18465  if test "x$complete" != "x$new_complete"; then
18466      CC="$new_complete"
18467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18468$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18469    fi
18470
18471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18472$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18473  TEST_COMPILER="$CC"
18474
18475    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18476        # Follow a chain of symbolic links. Use readlink
18477        # where it exists, else fall back to horribly
18478        # complicated shell code.
18479        if test "x$READLINK_TESTED" != yes; then
18480            # On MacOSX there is a readlink tool with a different
18481            # purpose than the GNU readlink tool. Check the found readlink.
18482            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18483            if test "x$ISGNU" = x; then
18484                 # A readlink that we do not know how to use.
18485                 # Are there other non-GNU readlinks out there?
18486                 READLINK_TESTED=yes
18487                 READLINK=
18488            fi
18489        fi
18490
18491        if test "x$READLINK" != x; then
18492            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18493        else
18494            # Save the current directory for restoring afterwards
18495            STARTDIR=$PWD
18496            COUNTER=0
18497            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18498            sym_link_file=`$BASENAME $TEST_COMPILER`
18499            # Use the system pwd and not the shell builtin to resolve directory symlinks
18500            cd $sym_link_dir
18501            cd `$THEPWDCMD`
18502            sym_link_dir=`$THEPWDCMD`
18503            # Resolve file symlinks
18504            while test $COUNTER -lt 20; do
18505                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18506                if test "x$ISLINK" == x; then
18507                    # This is not a symbolic link! We are done!
18508                    break
18509                fi
18510                # Again resolve directory symlinks since the target of the just found
18511                # link could be in a different directory
18512                cd `$DIRNAME $ISLINK`
18513                sym_link_dir=`$THEPWDCMD`
18514                sym_link_file=`$BASENAME $ISLINK`
18515                let COUNTER=COUNTER+1
18516            done
18517            cd $STARTDIR
18518            TEST_COMPILER=$sym_link_dir/$sym_link_file
18519        fi
18520    fi
18521
18522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18523$as_echo "$TEST_COMPILER" >&6; }
18524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18525$as_echo_n "checking if CC is disguised ccache... " >&6; }
18526
18527  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18528  if test "x$COMPILER_BASENAME" = "xccache"; then
18529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18530$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18531    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18532    # We want to control ccache invocation ourselves, so ignore this cc and try
18533    # searching again.
18534
18535    # Remove the path to the fake ccache cc from the PATH
18536    RETRY_COMPILER_SAVED_PATH="$PATH"
18537    COMPILER_DIRNAME=`$DIRNAME $CC`
18538    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18539
18540    # Try again looking for our compiler
18541    if test -n "$ac_tool_prefix"; then
18542  for ac_prog in $COMPILER_CHECK_LIST
18543  do
18544    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18545set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18547$as_echo_n "checking for $ac_word... " >&6; }
18548if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18549  $as_echo_n "(cached) " >&6
18550else
18551  if test -n "$PROPER_COMPILER_CC"; then
18552  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18553else
18554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18555for as_dir in $PATH
18556do
18557  IFS=$as_save_IFS
18558  test -z "$as_dir" && as_dir=.
18559    for ac_exec_ext in '' $ac_executable_extensions; do
18560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18561    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18563    break 2
18564  fi
18565done
18566  done
18567IFS=$as_save_IFS
18568
18569fi
18570fi
18571PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18572if test -n "$PROPER_COMPILER_CC"; then
18573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18574$as_echo "$PROPER_COMPILER_CC" >&6; }
18575else
18576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18577$as_echo "no" >&6; }
18578fi
18579
18580
18581    test -n "$PROPER_COMPILER_CC" && break
18582  done
18583fi
18584if test -z "$PROPER_COMPILER_CC"; then
18585  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18586  for ac_prog in $COMPILER_CHECK_LIST
18587do
18588  # Extract the first word of "$ac_prog", so it can be a program name with args.
18589set dummy $ac_prog; ac_word=$2
18590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18591$as_echo_n "checking for $ac_word... " >&6; }
18592if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18593  $as_echo_n "(cached) " >&6
18594else
18595  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18596  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18597else
18598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18599for as_dir in $PATH
18600do
18601  IFS=$as_save_IFS
18602  test -z "$as_dir" && as_dir=.
18603    for ac_exec_ext in '' $ac_executable_extensions; do
18604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18605    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18607    break 2
18608  fi
18609done
18610  done
18611IFS=$as_save_IFS
18612
18613fi
18614fi
18615ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18616if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18618$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18619else
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621$as_echo "no" >&6; }
18622fi
18623
18624
18625  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18626done
18627
18628  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18629    PROPER_COMPILER_CC=""
18630  else
18631    case $cross_compiling:$ac_tool_warned in
18632yes:)
18633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18635ac_tool_warned=yes ;;
18636esac
18637    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18638  fi
18639fi
18640
18641
18642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18643
18644  # First separate the path from the arguments. This will split at the first
18645  # space.
18646  complete="$PROPER_COMPILER_CC"
18647  path="${complete%% *}"
18648  tmp="$complete EOL"
18649  arguments="${tmp#* }"
18650
18651  # Input might be given as Windows format, start by converting to
18652  # unix format.
18653  new_path=`$CYGPATH -u "$path"`
18654
18655  # Now try to locate executable using which
18656  new_path=`$WHICH "$new_path" 2> /dev/null`
18657  # bat and cmd files are not always considered executable in cygwin causing which
18658  # to not find them
18659  if test "x$new_path" = x \
18660           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18661           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18662    new_path=`$CYGPATH -u "$path"`
18663  fi
18664  if test "x$new_path" = x; then
18665    # Oops. Which didn't find the executable.
18666    # The splitting of arguments from the executable at a space might have been incorrect,
18667    # since paths with space are more likely in Windows. Give it another try with the whole
18668    # argument.
18669    path="$complete"
18670    arguments="EOL"
18671    new_path=`$CYGPATH -u "$path"`
18672    new_path=`$WHICH "$new_path" 2> /dev/null`
18673    # bat and cmd files are not always considered executable in cygwin causing which
18674    # to not find them
18675    if test "x$new_path" = x \
18676             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18677             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18678      new_path=`$CYGPATH -u "$path"`
18679    fi
18680    if test "x$new_path" = x; then
18681      # It's still not found. Now this is an unrecoverable error.
18682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18683$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18684      has_space=`$ECHO "$complete" | $GREP " "`
18685      if test "x$has_space" != x; then
18686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18688      fi
18689      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18690    fi
18691  fi
18692
18693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18696  # "foo.exe" is OK but "foo" is an error.
18697  #
18698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18699  # It is also a way to make sure we got the proper file name for the real test later on.
18700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18701  if test "x$test_shortpath" = x; then
18702    # Short path failed, file does not exist as specified.
18703    # Try adding .exe or .cmd
18704    if test -f "${new_path}.exe"; then
18705       input_to_shortpath="${new_path}.exe"
18706    elif test -f "${new_path}.cmd"; then
18707       input_to_shortpath="${new_path}.cmd"
18708    else
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18710$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18713      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18714    fi
18715  else
18716    input_to_shortpath="$new_path"
18717  fi
18718
18719  # Call helper function which possibly converts this using DOS-style short mode.
18720  # If so, the updated path is stored in $new_path.
18721  new_path="$input_to_shortpath"
18722
18723  input_path="$input_to_shortpath"
18724  # Check if we need to convert this using DOS-style short mode. If the path
18725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18726  # take no chances and rewrite it.
18727  # Note: m4 eats our [], so we need to use [ and ] instead.
18728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18729  if test "x$has_forbidden_chars" != x; then
18730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18734      # Going to short mode and back again did indeed matter. Since short mode is
18735      # case insensitive, let's make it lowercase to improve readability.
18736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18737      # Now convert it back to Unix-stile (cygpath)
18738      input_path=`$CYGPATH -u "$shortmode_path"`
18739      new_path="$input_path"
18740    fi
18741  fi
18742
18743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18744  if test "x$test_cygdrive_prefix" = x; then
18745    # As a simple fix, exclude /usr/bin since it's not a real path.
18746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18748      # a path prefixed by /cygdrive for fixpath to work.
18749      new_path="$CYGWIN_ROOT_PATH$input_path"
18750    fi
18751  fi
18752
18753  # remove trailing .exe if any
18754  new_path="${new_path/%.exe/}"
18755
18756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18757
18758  # First separate the path from the arguments. This will split at the first
18759  # space.
18760  complete="$PROPER_COMPILER_CC"
18761  path="${complete%% *}"
18762  tmp="$complete EOL"
18763  arguments="${tmp#* }"
18764
18765  # Input might be given as Windows format, start by converting to
18766  # unix format.
18767  new_path="$path"
18768
18769  windows_path="$new_path"
18770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18771    unix_path=`$CYGPATH -u "$windows_path"`
18772    new_path="$unix_path"
18773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18775    new_path="$unix_path"
18776  fi
18777
18778
18779  # Now try to locate executable using which
18780  new_path=`$WHICH "$new_path" 2> /dev/null`
18781
18782  if test "x$new_path" = x; then
18783    # Oops. Which didn't find the executable.
18784    # The splitting of arguments from the executable at a space might have been incorrect,
18785    # since paths with space are more likely in Windows. Give it another try with the whole
18786    # argument.
18787    path="$complete"
18788    arguments="EOL"
18789    new_path="$path"
18790
18791  windows_path="$new_path"
18792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18793    unix_path=`$CYGPATH -u "$windows_path"`
18794    new_path="$unix_path"
18795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18797    new_path="$unix_path"
18798  fi
18799
18800
18801    new_path=`$WHICH "$new_path" 2> /dev/null`
18802
18803    if test "x$new_path" = x; then
18804      # It's still not found. Now this is an unrecoverable error.
18805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18806$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18807      has_space=`$ECHO "$complete" | $GREP " "`
18808      if test "x$has_space" != x; then
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18811      fi
18812      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18813    fi
18814  fi
18815
18816  # Now new_path has a complete unix path to the binary
18817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18818    # Keep paths in /bin as-is, but remove trailing .exe if any
18819    new_path="${new_path/%.exe/}"
18820    # Do not save /bin paths to all_fixpath_prefixes!
18821  else
18822    # Not in mixed or Windows style, start by that.
18823    new_path=`cmd //c echo $new_path`
18824
18825  input_path="$new_path"
18826  # Check if we need to convert this using DOS-style short mode. If the path
18827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18828  # take no chances and rewrite it.
18829  # Note: m4 eats our [], so we need to use [ and ] instead.
18830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18831  if test "x$has_forbidden_chars" != x; then
18832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18834  fi
18835
18836    # Output is in $new_path
18837
18838  windows_path="$new_path"
18839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18840    unix_path=`$CYGPATH -u "$windows_path"`
18841    new_path="$unix_path"
18842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18844    new_path="$unix_path"
18845  fi
18846
18847    # remove trailing .exe if any
18848    new_path="${new_path/%.exe/}"
18849
18850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18852  fi
18853
18854  else
18855    # We're on a posix platform. Hooray! :)
18856    # First separate the path from the arguments. This will split at the first
18857    # space.
18858    complete="$PROPER_COMPILER_CC"
18859    path="${complete%% *}"
18860    tmp="$complete EOL"
18861    arguments="${tmp#* }"
18862
18863    # Cannot rely on the command "which" here since it doesn't always work.
18864    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18865    if test -z "$is_absolute_path"; then
18866      # Path to executable is not absolute. Find it.
18867      IFS_save="$IFS"
18868      IFS=:
18869      for p in $PATH; do
18870        if test -f "$p/$path" && test -x "$p/$path"; then
18871          new_path="$p/$path"
18872          break
18873        fi
18874      done
18875      IFS="$IFS_save"
18876    else
18877      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18878$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18879      new_path="$path"
18880    fi
18881
18882    if test "x$new_path" = x; then
18883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18884$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18885        has_space=`$ECHO "$complete" | $GREP " "`
18886        if test "x$has_space" != x; then
18887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18889        fi
18890        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18891      fi
18892  fi
18893
18894      # Now join together the path and the arguments once again
18895      if test "x$arguments" != xEOL; then
18896        new_complete="$new_path ${arguments% *}"
18897      else
18898        new_complete="$new_path"
18899      fi
18900
18901  if test "x$complete" != "x$new_complete"; then
18902      PROPER_COMPILER_CC="$new_complete"
18903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18904$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18905    fi
18906
18907    PATH="$RETRY_COMPILER_SAVED_PATH"
18908
18909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18910$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18911
18912    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18913        # Follow a chain of symbolic links. Use readlink
18914        # where it exists, else fall back to horribly
18915        # complicated shell code.
18916        if test "x$READLINK_TESTED" != yes; then
18917            # On MacOSX there is a readlink tool with a different
18918            # purpose than the GNU readlink tool. Check the found readlink.
18919            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18920            if test "x$ISGNU" = x; then
18921                 # A readlink that we do not know how to use.
18922                 # Are there other non-GNU readlinks out there?
18923                 READLINK_TESTED=yes
18924                 READLINK=
18925            fi
18926        fi
18927
18928        if test "x$READLINK" != x; then
18929            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18930        else
18931            # Save the current directory for restoring afterwards
18932            STARTDIR=$PWD
18933            COUNTER=0
18934            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18935            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18936            # Use the system pwd and not the shell builtin to resolve directory symlinks
18937            cd $sym_link_dir
18938            cd `$THEPWDCMD`
18939            sym_link_dir=`$THEPWDCMD`
18940            # Resolve file symlinks
18941            while test $COUNTER -lt 20; do
18942                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18943                if test "x$ISLINK" == x; then
18944                    # This is not a symbolic link! We are done!
18945                    break
18946                fi
18947                # Again resolve directory symlinks since the target of the just found
18948                # link could be in a different directory
18949                cd `$DIRNAME $ISLINK`
18950                sym_link_dir=`$THEPWDCMD`
18951                sym_link_file=`$BASENAME $ISLINK`
18952                let COUNTER=COUNTER+1
18953            done
18954            cd $STARTDIR
18955            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18956        fi
18957    fi
18958
18959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18960$as_echo "$PROPER_COMPILER_CC" >&6; }
18961    CC="$PROPER_COMPILER_CC"
18962  else
18963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18964$as_echo "no, keeping CC" >&6; }
18965    CC="$TEST_COMPILER"
18966  fi
18967
18968  COMPILER=$CC
18969  COMPILER_NAME=$COMPILER_NAME
18970
18971  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18972    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18973    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18974    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18975    if test $? -ne 0; then
18976      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18977
18978      { $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
18979$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18980      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18981$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18982      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18983    else
18984      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18985      COMPILER_VENDOR="Sun Studio"
18986    fi
18987  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18988    # First line typically looks something like:
18989    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18990    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18991    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18992    COMPILER_VENDOR="Microsoft CL.EXE"
18993    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18994    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18995      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18996        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18997      fi
18998    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18999      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19000        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19001      fi
19002    fi
19003  else
19004    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19005    # Check that this is likely to be GCC.
19006    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19007    if test $? -ne 0; then
19008      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19009$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19010      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19011$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19012      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19013    fi
19014
19015    # First line typically looks something like:
19016    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19017    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19018    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19019  fi
19020  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19021  CC_VERSION="$COMPILER_VERSION"
19022  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19023  CC_VENDOR="$COMPILER_VENDOR"
19024
19025  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19026$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19027
19028
19029# Now that we have resolved CC ourself, let autoconf have it's go at it
19030ac_ext=c
19031ac_cpp='$CPP $CPPFLAGS'
19032ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19033ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19034ac_compiler_gnu=$ac_cv_c_compiler_gnu
19035if test -n "$ac_tool_prefix"; then
19036  for ac_prog in $CC
19037  do
19038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19041$as_echo_n "checking for $ac_word... " >&6; }
19042if ${ac_cv_prog_CC+:} false; then :
19043  $as_echo_n "(cached) " >&6
19044else
19045  if test -n "$CC"; then
19046  ac_cv_prog_CC="$CC" # Let the user override the test.
19047else
19048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19049for as_dir in $PATH
19050do
19051  IFS=$as_save_IFS
19052  test -z "$as_dir" && as_dir=.
19053    for ac_exec_ext in '' $ac_executable_extensions; do
19054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19055    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19057    break 2
19058  fi
19059done
19060  done
19061IFS=$as_save_IFS
19062
19063fi
19064fi
19065CC=$ac_cv_prog_CC
19066if test -n "$CC"; then
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19068$as_echo "$CC" >&6; }
19069else
19070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19071$as_echo "no" >&6; }
19072fi
19073
19074
19075    test -n "$CC" && break
19076  done
19077fi
19078if test -z "$CC"; then
19079  ac_ct_CC=$CC
19080  for ac_prog in $CC
19081do
19082  # Extract the first word of "$ac_prog", so it can be a program name with args.
19083set dummy $ac_prog; ac_word=$2
19084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19085$as_echo_n "checking for $ac_word... " >&6; }
19086if ${ac_cv_prog_ac_ct_CC+:} false; then :
19087  $as_echo_n "(cached) " >&6
19088else
19089  if test -n "$ac_ct_CC"; then
19090  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19091else
19092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19093for as_dir in $PATH
19094do
19095  IFS=$as_save_IFS
19096  test -z "$as_dir" && as_dir=.
19097    for ac_exec_ext in '' $ac_executable_extensions; do
19098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19099    ac_cv_prog_ac_ct_CC="$ac_prog"
19100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19101    break 2
19102  fi
19103done
19104  done
19105IFS=$as_save_IFS
19106
19107fi
19108fi
19109ac_ct_CC=$ac_cv_prog_ac_ct_CC
19110if test -n "$ac_ct_CC"; then
19111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19112$as_echo "$ac_ct_CC" >&6; }
19113else
19114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19115$as_echo "no" >&6; }
19116fi
19117
19118
19119  test -n "$ac_ct_CC" && break
19120done
19121
19122  if test "x$ac_ct_CC" = x; then
19123    CC=""
19124  else
19125    case $cross_compiling:$ac_tool_warned in
19126yes:)
19127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19129ac_tool_warned=yes ;;
19130esac
19131    CC=$ac_ct_CC
19132  fi
19133fi
19134
19135
19136test -z "$CC" && { { $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 $? "no acceptable C compiler found in \$PATH
19139See \`config.log' for more details" "$LINENO" 5; }
19140
19141# Provide some information about the compiler.
19142$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19143set X $ac_compile
19144ac_compiler=$2
19145for ac_option in --version -v -V -qversion; do
19146  { { ac_try="$ac_compiler $ac_option >&5"
19147case "(($ac_try" in
19148  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19149  *) ac_try_echo=$ac_try;;
19150esac
19151eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19152$as_echo "$ac_try_echo"; } >&5
19153  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19154  ac_status=$?
19155  if test -s conftest.err; then
19156    sed '10a\
19157... rest of stderr output deleted ...
19158         10q' conftest.err >conftest.er1
19159    cat conftest.er1 >&5
19160  fi
19161  rm -f conftest.er1 conftest.err
19162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19163  test $ac_status = 0; }
19164done
19165
19166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19167/* end confdefs.h.  */
19168
19169int
19170main ()
19171{
19172
19173  ;
19174  return 0;
19175}
19176_ACEOF
19177ac_clean_files_save=$ac_clean_files
19178ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19179# Try to create an executable without -o first, disregard a.out.
19180# It will help us diagnose broken compilers, and finding out an intuition
19181# of exeext.
19182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19183$as_echo_n "checking whether the C compiler works... " >&6; }
19184ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19185
19186# The possible output files:
19187ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19188
19189ac_rmfiles=
19190for ac_file in $ac_files
19191do
19192  case $ac_file in
19193    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19194    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19195  esac
19196done
19197rm -f $ac_rmfiles
19198
19199if { { ac_try="$ac_link_default"
19200case "(($ac_try" in
19201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19202  *) ac_try_echo=$ac_try;;
19203esac
19204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19205$as_echo "$ac_try_echo"; } >&5
19206  (eval "$ac_link_default") 2>&5
19207  ac_status=$?
19208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19209  test $ac_status = 0; }; then :
19210  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19211# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19212# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19213# so that the user can short-circuit this test for compilers unknown to
19214# Autoconf.
19215for ac_file in $ac_files ''
19216do
19217  test -f "$ac_file" || continue
19218  case $ac_file in
19219    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19220	;;
19221    [ab].out )
19222	# We found the default executable, but exeext='' is most
19223	# certainly right.
19224	break;;
19225    *.* )
19226	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19227	then :; else
19228	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19229	fi
19230	# We set ac_cv_exeext here because the later test for it is not
19231	# safe: cross compilers may not add the suffix if given an `-o'
19232	# argument, so we may need to know it at that point already.
19233	# Even if this section looks crufty: it has the advantage of
19234	# actually working.
19235	break;;
19236    * )
19237	break;;
19238  esac
19239done
19240test "$ac_cv_exeext" = no && ac_cv_exeext=
19241
19242else
19243  ac_file=''
19244fi
19245if test -z "$ac_file"; then :
19246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19247$as_echo "no" >&6; }
19248$as_echo "$as_me: failed program was:" >&5
19249sed 's/^/| /' conftest.$ac_ext >&5
19250
19251{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19253as_fn_error 77 "C compiler cannot create executables
19254See \`config.log' for more details" "$LINENO" 5; }
19255else
19256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19257$as_echo "yes" >&6; }
19258fi
19259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19260$as_echo_n "checking for C compiler default output file name... " >&6; }
19261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19262$as_echo "$ac_file" >&6; }
19263ac_exeext=$ac_cv_exeext
19264
19265rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19266ac_clean_files=$ac_clean_files_save
19267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19268$as_echo_n "checking for suffix of executables... " >&6; }
19269if { { ac_try="$ac_link"
19270case "(($ac_try" in
19271  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19272  *) ac_try_echo=$ac_try;;
19273esac
19274eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19275$as_echo "$ac_try_echo"; } >&5
19276  (eval "$ac_link") 2>&5
19277  ac_status=$?
19278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19279  test $ac_status = 0; }; then :
19280  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19281# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19282# work properly (i.e., refer to `conftest.exe'), while it won't with
19283# `rm'.
19284for ac_file in conftest.exe conftest conftest.*; do
19285  test -f "$ac_file" || continue
19286  case $ac_file in
19287    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19288    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19289	  break;;
19290    * ) break;;
19291  esac
19292done
19293else
19294  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19296as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19297See \`config.log' for more details" "$LINENO" 5; }
19298fi
19299rm -f conftest conftest$ac_cv_exeext
19300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19301$as_echo "$ac_cv_exeext" >&6; }
19302
19303rm -f conftest.$ac_ext
19304EXEEXT=$ac_cv_exeext
19305ac_exeext=$EXEEXT
19306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19307/* end confdefs.h.  */
19308#include <stdio.h>
19309int
19310main ()
19311{
19312FILE *f = fopen ("conftest.out", "w");
19313 return ferror (f) || fclose (f) != 0;
19314
19315  ;
19316  return 0;
19317}
19318_ACEOF
19319ac_clean_files="$ac_clean_files conftest.out"
19320# Check that the compiler produces executables we can run.  If not, either
19321# the compiler is broken, or we cross compile.
19322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19323$as_echo_n "checking whether we are cross compiling... " >&6; }
19324if test "$cross_compiling" != yes; then
19325  { { ac_try="$ac_link"
19326case "(($ac_try" in
19327  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19328  *) ac_try_echo=$ac_try;;
19329esac
19330eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19331$as_echo "$ac_try_echo"; } >&5
19332  (eval "$ac_link") 2>&5
19333  ac_status=$?
19334  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19335  test $ac_status = 0; }
19336  if { ac_try='./conftest$ac_cv_exeext'
19337  { { case "(($ac_try" in
19338  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19339  *) ac_try_echo=$ac_try;;
19340esac
19341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19342$as_echo "$ac_try_echo"; } >&5
19343  (eval "$ac_try") 2>&5
19344  ac_status=$?
19345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19346  test $ac_status = 0; }; }; then
19347    cross_compiling=no
19348  else
19349    if test "$cross_compiling" = maybe; then
19350	cross_compiling=yes
19351    else
19352	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19354as_fn_error $? "cannot run C compiled programs.
19355If you meant to cross compile, use \`--host'.
19356See \`config.log' for more details" "$LINENO" 5; }
19357    fi
19358  fi
19359fi
19360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19361$as_echo "$cross_compiling" >&6; }
19362
19363rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19364ac_clean_files=$ac_clean_files_save
19365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19366$as_echo_n "checking for suffix of object files... " >&6; }
19367if ${ac_cv_objext+:} false; then :
19368  $as_echo_n "(cached) " >&6
19369else
19370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19371/* end confdefs.h.  */
19372
19373int
19374main ()
19375{
19376
19377  ;
19378  return 0;
19379}
19380_ACEOF
19381rm -f conftest.o conftest.obj
19382if { { ac_try="$ac_compile"
19383case "(($ac_try" in
19384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19385  *) ac_try_echo=$ac_try;;
19386esac
19387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19388$as_echo "$ac_try_echo"; } >&5
19389  (eval "$ac_compile") 2>&5
19390  ac_status=$?
19391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19392  test $ac_status = 0; }; then :
19393  for ac_file in conftest.o conftest.obj conftest.*; do
19394  test -f "$ac_file" || continue;
19395  case $ac_file in
19396    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19397    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19398       break;;
19399  esac
19400done
19401else
19402  $as_echo "$as_me: failed program was:" >&5
19403sed 's/^/| /' conftest.$ac_ext >&5
19404
19405{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19407as_fn_error $? "cannot compute suffix of object files: cannot compile
19408See \`config.log' for more details" "$LINENO" 5; }
19409fi
19410rm -f conftest.$ac_cv_objext conftest.$ac_ext
19411fi
19412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19413$as_echo "$ac_cv_objext" >&6; }
19414OBJEXT=$ac_cv_objext
19415ac_objext=$OBJEXT
19416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19417$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19418if ${ac_cv_c_compiler_gnu+:} false; then :
19419  $as_echo_n "(cached) " >&6
19420else
19421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19422/* end confdefs.h.  */
19423
19424int
19425main ()
19426{
19427#ifndef __GNUC__
19428       choke me
19429#endif
19430
19431  ;
19432  return 0;
19433}
19434_ACEOF
19435if ac_fn_c_try_compile "$LINENO"; then :
19436  ac_compiler_gnu=yes
19437else
19438  ac_compiler_gnu=no
19439fi
19440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19441ac_cv_c_compiler_gnu=$ac_compiler_gnu
19442
19443fi
19444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19445$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19446if test $ac_compiler_gnu = yes; then
19447  GCC=yes
19448else
19449  GCC=
19450fi
19451ac_test_CFLAGS=${CFLAGS+set}
19452ac_save_CFLAGS=$CFLAGS
19453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19454$as_echo_n "checking whether $CC accepts -g... " >&6; }
19455if ${ac_cv_prog_cc_g+:} false; then :
19456  $as_echo_n "(cached) " >&6
19457else
19458  ac_save_c_werror_flag=$ac_c_werror_flag
19459   ac_c_werror_flag=yes
19460   ac_cv_prog_cc_g=no
19461   CFLAGS="-g"
19462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19463/* end confdefs.h.  */
19464
19465int
19466main ()
19467{
19468
19469  ;
19470  return 0;
19471}
19472_ACEOF
19473if ac_fn_c_try_compile "$LINENO"; then :
19474  ac_cv_prog_cc_g=yes
19475else
19476  CFLAGS=""
19477      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19478/* end confdefs.h.  */
19479
19480int
19481main ()
19482{
19483
19484  ;
19485  return 0;
19486}
19487_ACEOF
19488if ac_fn_c_try_compile "$LINENO"; then :
19489
19490else
19491  ac_c_werror_flag=$ac_save_c_werror_flag
19492	 CFLAGS="-g"
19493	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19494/* end confdefs.h.  */
19495
19496int
19497main ()
19498{
19499
19500  ;
19501  return 0;
19502}
19503_ACEOF
19504if ac_fn_c_try_compile "$LINENO"; then :
19505  ac_cv_prog_cc_g=yes
19506fi
19507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19508fi
19509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19510fi
19511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19512   ac_c_werror_flag=$ac_save_c_werror_flag
19513fi
19514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19515$as_echo "$ac_cv_prog_cc_g" >&6; }
19516if test "$ac_test_CFLAGS" = set; then
19517  CFLAGS=$ac_save_CFLAGS
19518elif test $ac_cv_prog_cc_g = yes; then
19519  if test "$GCC" = yes; then
19520    CFLAGS="-g -O2"
19521  else
19522    CFLAGS="-g"
19523  fi
19524else
19525  if test "$GCC" = yes; then
19526    CFLAGS="-O2"
19527  else
19528    CFLAGS=
19529  fi
19530fi
19531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19532$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19533if ${ac_cv_prog_cc_c89+:} false; then :
19534  $as_echo_n "(cached) " >&6
19535else
19536  ac_cv_prog_cc_c89=no
19537ac_save_CC=$CC
19538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19539/* end confdefs.h.  */
19540#include <stdarg.h>
19541#include <stdio.h>
19542#include <sys/types.h>
19543#include <sys/stat.h>
19544/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19545struct buf { int x; };
19546FILE * (*rcsopen) (struct buf *, struct stat *, int);
19547static char *e (p, i)
19548     char **p;
19549     int i;
19550{
19551  return p[i];
19552}
19553static char *f (char * (*g) (char **, int), char **p, ...)
19554{
19555  char *s;
19556  va_list v;
19557  va_start (v,p);
19558  s = g (p, va_arg (v,int));
19559  va_end (v);
19560  return s;
19561}
19562
19563/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19564   function prototypes and stuff, but not '\xHH' hex character constants.
19565   These don't provoke an error unfortunately, instead are silently treated
19566   as 'x'.  The following induces an error, until -std is added to get
19567   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19568   array size at least.  It's necessary to write '\x00'==0 to get something
19569   that's true only with -std.  */
19570int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19571
19572/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19573   inside strings and character constants.  */
19574#define FOO(x) 'x'
19575int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19576
19577int test (int i, double x);
19578struct s1 {int (*f) (int a);};
19579struct s2 {int (*f) (double a);};
19580int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19581int argc;
19582char **argv;
19583int
19584main ()
19585{
19586return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19587  ;
19588  return 0;
19589}
19590_ACEOF
19591for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19592	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19593do
19594  CC="$ac_save_CC $ac_arg"
19595  if ac_fn_c_try_compile "$LINENO"; then :
19596  ac_cv_prog_cc_c89=$ac_arg
19597fi
19598rm -f core conftest.err conftest.$ac_objext
19599  test "x$ac_cv_prog_cc_c89" != "xno" && break
19600done
19601rm -f conftest.$ac_ext
19602CC=$ac_save_CC
19603
19604fi
19605# AC_CACHE_VAL
19606case "x$ac_cv_prog_cc_c89" in
19607  x)
19608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19609$as_echo "none needed" >&6; } ;;
19610  xno)
19611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19612$as_echo "unsupported" >&6; } ;;
19613  *)
19614    CC="$CC $ac_cv_prog_cc_c89"
19615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19616$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19617esac
19618if test "x$ac_cv_prog_cc_c89" != xno; then :
19619
19620fi
19621
19622ac_ext=cpp
19623ac_cpp='$CXXCPP $CPPFLAGS'
19624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19627
19628
19629### Locate C++ compiler (CXX)
19630
19631if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19632  # Do not probe for CC on MacOSX.
19633  COMPILER_CHECK_LIST="cl g++"
19634else
19635  COMPILER_CHECK_LIST="cl CC g++"
19636fi
19637
19638  COMPILER_NAME=C++
19639
19640  CXX=
19641  # If TOOLS_DIR is set, check for all compiler names in there first
19642  # before checking the rest of the PATH.
19643  if test -n "$TOOLS_DIR"; then
19644    PATH_save="$PATH"
19645    PATH="$TOOLS_DIR"
19646    for ac_prog in $COMPILER_CHECK_LIST
19647do
19648  # Extract the first word of "$ac_prog", so it can be a program name with args.
19649set dummy $ac_prog; ac_word=$2
19650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19651$as_echo_n "checking for $ac_word... " >&6; }
19652if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19653  $as_echo_n "(cached) " >&6
19654else
19655  case $TOOLS_DIR_CXX in
19656  [\\/]* | ?:[\\/]*)
19657  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19658  ;;
19659  *)
19660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19661for as_dir in $PATH
19662do
19663  IFS=$as_save_IFS
19664  test -z "$as_dir" && as_dir=.
19665    for ac_exec_ext in '' $ac_executable_extensions; do
19666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19667    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19669    break 2
19670  fi
19671done
19672  done
19673IFS=$as_save_IFS
19674
19675  ;;
19676esac
19677fi
19678TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19679if test -n "$TOOLS_DIR_CXX"; then
19680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19681$as_echo "$TOOLS_DIR_CXX" >&6; }
19682else
19683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19684$as_echo "no" >&6; }
19685fi
19686
19687
19688  test -n "$TOOLS_DIR_CXX" && break
19689done
19690
19691    CXX=$TOOLS_DIR_CXX
19692    PATH="$PATH_save"
19693  fi
19694
19695  # AC_PATH_PROGS can't be run multiple times with the same variable,
19696  # so create a new name for this run.
19697  if test "x$CXX" = x; then
19698    for ac_prog in $COMPILER_CHECK_LIST
19699do
19700  # Extract the first word of "$ac_prog", so it can be a program name with args.
19701set dummy $ac_prog; ac_word=$2
19702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19703$as_echo_n "checking for $ac_word... " >&6; }
19704if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19705  $as_echo_n "(cached) " >&6
19706else
19707  case $POTENTIAL_CXX in
19708  [\\/]* | ?:[\\/]*)
19709  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19710  ;;
19711  *)
19712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19713for as_dir in $PATH
19714do
19715  IFS=$as_save_IFS
19716  test -z "$as_dir" && as_dir=.
19717    for ac_exec_ext in '' $ac_executable_extensions; do
19718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19719    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19721    break 2
19722  fi
19723done
19724  done
19725IFS=$as_save_IFS
19726
19727  ;;
19728esac
19729fi
19730POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19731if test -n "$POTENTIAL_CXX"; then
19732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19733$as_echo "$POTENTIAL_CXX" >&6; }
19734else
19735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19736$as_echo "no" >&6; }
19737fi
19738
19739
19740  test -n "$POTENTIAL_CXX" && break
19741done
19742
19743    CXX=$POTENTIAL_CXX
19744  fi
19745
19746  if test "x$CXX" = x; then
19747
19748    # Print a helpful message on how to acquire the necessary build dependency.
19749    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19750    MISSING_DEPENDENCY=devkit
19751    PKGHANDLER_COMMAND=
19752
19753    case $PKGHANDLER in
19754	apt-get)
19755                apt_help     $MISSING_DEPENDENCY ;;
19756    yum)
19757                yum_help     $MISSING_DEPENDENCY ;;
19758	port)
19759                port_help    $MISSING_DEPENDENCY ;;
19760	pkgutil)
19761                pkgutil_help $MISSING_DEPENDENCY ;;
19762	pkgadd)
19763                pkgadd_help  $MISSING_DEPENDENCY ;;
19764    * )
19765      break ;;
19766    esac
19767
19768    if test "x$PKGHANDLER_COMMAND" != x; then
19769        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19770    fi
19771
19772      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19773  fi
19774
19775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19776
19777  # First separate the path from the arguments. This will split at the first
19778  # space.
19779  complete="$CXX"
19780  path="${complete%% *}"
19781  tmp="$complete EOL"
19782  arguments="${tmp#* }"
19783
19784  # Input might be given as Windows format, start by converting to
19785  # unix format.
19786  new_path=`$CYGPATH -u "$path"`
19787
19788  # Now try to locate executable using which
19789  new_path=`$WHICH "$new_path" 2> /dev/null`
19790  # bat and cmd files are not always considered executable in cygwin causing which
19791  # to not find them
19792  if test "x$new_path" = x \
19793           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19794           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19795    new_path=`$CYGPATH -u "$path"`
19796  fi
19797  if test "x$new_path" = x; then
19798    # Oops. Which didn't find the executable.
19799    # The splitting of arguments from the executable at a space might have been incorrect,
19800    # since paths with space are more likely in Windows. Give it another try with the whole
19801    # argument.
19802    path="$complete"
19803    arguments="EOL"
19804    new_path=`$CYGPATH -u "$path"`
19805    new_path=`$WHICH "$new_path" 2> /dev/null`
19806    # bat and cmd files are not always considered executable in cygwin causing which
19807    # to not find them
19808    if test "x$new_path" = x \
19809             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19810             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19811      new_path=`$CYGPATH -u "$path"`
19812    fi
19813    if test "x$new_path" = x; then
19814      # It's still not found. Now this is an unrecoverable error.
19815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19816$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19817      has_space=`$ECHO "$complete" | $GREP " "`
19818      if test "x$has_space" != x; then
19819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19821      fi
19822      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19823    fi
19824  fi
19825
19826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19829  # "foo.exe" is OK but "foo" is an error.
19830  #
19831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19832  # It is also a way to make sure we got the proper file name for the real test later on.
19833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19834  if test "x$test_shortpath" = x; then
19835    # Short path failed, file does not exist as specified.
19836    # Try adding .exe or .cmd
19837    if test -f "${new_path}.exe"; then
19838       input_to_shortpath="${new_path}.exe"
19839    elif test -f "${new_path}.cmd"; then
19840       input_to_shortpath="${new_path}.cmd"
19841    else
19842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19843$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19846      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19847    fi
19848  else
19849    input_to_shortpath="$new_path"
19850  fi
19851
19852  # Call helper function which possibly converts this using DOS-style short mode.
19853  # If so, the updated path is stored in $new_path.
19854  new_path="$input_to_shortpath"
19855
19856  input_path="$input_to_shortpath"
19857  # Check if we need to convert this using DOS-style short mode. If the path
19858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19859  # take no chances and rewrite it.
19860  # Note: m4 eats our [], so we need to use [ and ] instead.
19861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19862  if test "x$has_forbidden_chars" != x; then
19863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19867      # Going to short mode and back again did indeed matter. Since short mode is
19868      # case insensitive, let's make it lowercase to improve readability.
19869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19870      # Now convert it back to Unix-stile (cygpath)
19871      input_path=`$CYGPATH -u "$shortmode_path"`
19872      new_path="$input_path"
19873    fi
19874  fi
19875
19876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19877  if test "x$test_cygdrive_prefix" = x; then
19878    # As a simple fix, exclude /usr/bin since it's not a real path.
19879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19881      # a path prefixed by /cygdrive for fixpath to work.
19882      new_path="$CYGWIN_ROOT_PATH$input_path"
19883    fi
19884  fi
19885
19886  # remove trailing .exe if any
19887  new_path="${new_path/%.exe/}"
19888
19889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19890
19891  # First separate the path from the arguments. This will split at the first
19892  # space.
19893  complete="$CXX"
19894  path="${complete%% *}"
19895  tmp="$complete EOL"
19896  arguments="${tmp#* }"
19897
19898  # Input might be given as Windows format, start by converting to
19899  # unix format.
19900  new_path="$path"
19901
19902  windows_path="$new_path"
19903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19904    unix_path=`$CYGPATH -u "$windows_path"`
19905    new_path="$unix_path"
19906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19908    new_path="$unix_path"
19909  fi
19910
19911
19912  # Now try to locate executable using which
19913  new_path=`$WHICH "$new_path" 2> /dev/null`
19914
19915  if test "x$new_path" = x; then
19916    # Oops. Which didn't find the executable.
19917    # The splitting of arguments from the executable at a space might have been incorrect,
19918    # since paths with space are more likely in Windows. Give it another try with the whole
19919    # argument.
19920    path="$complete"
19921    arguments="EOL"
19922    new_path="$path"
19923
19924  windows_path="$new_path"
19925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19926    unix_path=`$CYGPATH -u "$windows_path"`
19927    new_path="$unix_path"
19928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19930    new_path="$unix_path"
19931  fi
19932
19933
19934    new_path=`$WHICH "$new_path" 2> /dev/null`
19935
19936    if test "x$new_path" = x; then
19937      # It's still not found. Now this is an unrecoverable error.
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19939$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19940      has_space=`$ECHO "$complete" | $GREP " "`
19941      if test "x$has_space" != x; then
19942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19944      fi
19945      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19946    fi
19947  fi
19948
19949  # Now new_path has a complete unix path to the binary
19950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19951    # Keep paths in /bin as-is, but remove trailing .exe if any
19952    new_path="${new_path/%.exe/}"
19953    # Do not save /bin paths to all_fixpath_prefixes!
19954  else
19955    # Not in mixed or Windows style, start by that.
19956    new_path=`cmd //c echo $new_path`
19957
19958  input_path="$new_path"
19959  # Check if we need to convert this using DOS-style short mode. If the path
19960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19961  # take no chances and rewrite it.
19962  # Note: m4 eats our [], so we need to use [ and ] instead.
19963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19964  if test "x$has_forbidden_chars" != x; then
19965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19967  fi
19968
19969    # Output is in $new_path
19970
19971  windows_path="$new_path"
19972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19973    unix_path=`$CYGPATH -u "$windows_path"`
19974    new_path="$unix_path"
19975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19977    new_path="$unix_path"
19978  fi
19979
19980    # remove trailing .exe if any
19981    new_path="${new_path/%.exe/}"
19982
19983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19985  fi
19986
19987  else
19988    # We're on a posix platform. Hooray! :)
19989    # First separate the path from the arguments. This will split at the first
19990    # space.
19991    complete="$CXX"
19992    path="${complete%% *}"
19993    tmp="$complete EOL"
19994    arguments="${tmp#* }"
19995
19996    # Cannot rely on the command "which" here since it doesn't always work.
19997    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19998    if test -z "$is_absolute_path"; then
19999      # Path to executable is not absolute. Find it.
20000      IFS_save="$IFS"
20001      IFS=:
20002      for p in $PATH; do
20003        if test -f "$p/$path" && test -x "$p/$path"; then
20004          new_path="$p/$path"
20005          break
20006        fi
20007      done
20008      IFS="$IFS_save"
20009    else
20010      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20011$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20012      new_path="$path"
20013    fi
20014
20015    if test "x$new_path" = x; then
20016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20017$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20018        has_space=`$ECHO "$complete" | $GREP " "`
20019        if test "x$has_space" != x; then
20020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20022        fi
20023        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20024      fi
20025  fi
20026
20027      # Now join together the path and the arguments once again
20028      if test "x$arguments" != xEOL; then
20029        new_complete="$new_path ${arguments% *}"
20030      else
20031        new_complete="$new_path"
20032      fi
20033
20034  if test "x$complete" != "x$new_complete"; then
20035      CXX="$new_complete"
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20037$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20038    fi
20039
20040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20041$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20042  TEST_COMPILER="$CXX"
20043
20044    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20045        # Follow a chain of symbolic links. Use readlink
20046        # where it exists, else fall back to horribly
20047        # complicated shell code.
20048        if test "x$READLINK_TESTED" != yes; then
20049            # On MacOSX there is a readlink tool with a different
20050            # purpose than the GNU readlink tool. Check the found readlink.
20051            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20052            if test "x$ISGNU" = x; then
20053                 # A readlink that we do not know how to use.
20054                 # Are there other non-GNU readlinks out there?
20055                 READLINK_TESTED=yes
20056                 READLINK=
20057            fi
20058        fi
20059
20060        if test "x$READLINK" != x; then
20061            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20062        else
20063            # Save the current directory for restoring afterwards
20064            STARTDIR=$PWD
20065            COUNTER=0
20066            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20067            sym_link_file=`$BASENAME $TEST_COMPILER`
20068            # Use the system pwd and not the shell builtin to resolve directory symlinks
20069            cd $sym_link_dir
20070            cd `$THEPWDCMD`
20071            sym_link_dir=`$THEPWDCMD`
20072            # Resolve file symlinks
20073            while test $COUNTER -lt 20; do
20074                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20075                if test "x$ISLINK" == x; then
20076                    # This is not a symbolic link! We are done!
20077                    break
20078                fi
20079                # Again resolve directory symlinks since the target of the just found
20080                # link could be in a different directory
20081                cd `$DIRNAME $ISLINK`
20082                sym_link_dir=`$THEPWDCMD`
20083                sym_link_file=`$BASENAME $ISLINK`
20084                let COUNTER=COUNTER+1
20085            done
20086            cd $STARTDIR
20087            TEST_COMPILER=$sym_link_dir/$sym_link_file
20088        fi
20089    fi
20090
20091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20092$as_echo "$TEST_COMPILER" >&6; }
20093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20094$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20095
20096  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20097  if test "x$COMPILER_BASENAME" = "xccache"; then
20098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20099$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20100    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20101    # We want to control ccache invocation ourselves, so ignore this cc and try
20102    # searching again.
20103
20104    # Remove the path to the fake ccache cc from the PATH
20105    RETRY_COMPILER_SAVED_PATH="$PATH"
20106    COMPILER_DIRNAME=`$DIRNAME $CXX`
20107    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20108
20109    # Try again looking for our compiler
20110    if test -n "$ac_tool_prefix"; then
20111  for ac_prog in $COMPILER_CHECK_LIST
20112  do
20113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20116$as_echo_n "checking for $ac_word... " >&6; }
20117if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20118  $as_echo_n "(cached) " >&6
20119else
20120  if test -n "$PROPER_COMPILER_CXX"; then
20121  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20122else
20123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20124for as_dir in $PATH
20125do
20126  IFS=$as_save_IFS
20127  test -z "$as_dir" && as_dir=.
20128    for ac_exec_ext in '' $ac_executable_extensions; do
20129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20130    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20132    break 2
20133  fi
20134done
20135  done
20136IFS=$as_save_IFS
20137
20138fi
20139fi
20140PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20141if test -n "$PROPER_COMPILER_CXX"; then
20142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20143$as_echo "$PROPER_COMPILER_CXX" >&6; }
20144else
20145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20146$as_echo "no" >&6; }
20147fi
20148
20149
20150    test -n "$PROPER_COMPILER_CXX" && break
20151  done
20152fi
20153if test -z "$PROPER_COMPILER_CXX"; then
20154  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20155  for ac_prog in $COMPILER_CHECK_LIST
20156do
20157  # Extract the first word of "$ac_prog", so it can be a program name with args.
20158set dummy $ac_prog; ac_word=$2
20159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20160$as_echo_n "checking for $ac_word... " >&6; }
20161if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20162  $as_echo_n "(cached) " >&6
20163else
20164  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20165  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20166else
20167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20168for as_dir in $PATH
20169do
20170  IFS=$as_save_IFS
20171  test -z "$as_dir" && as_dir=.
20172    for ac_exec_ext in '' $ac_executable_extensions; do
20173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20174    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20176    break 2
20177  fi
20178done
20179  done
20180IFS=$as_save_IFS
20181
20182fi
20183fi
20184ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20185if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20187$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20188else
20189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20190$as_echo "no" >&6; }
20191fi
20192
20193
20194  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20195done
20196
20197  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20198    PROPER_COMPILER_CXX=""
20199  else
20200    case $cross_compiling:$ac_tool_warned in
20201yes:)
20202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20204ac_tool_warned=yes ;;
20205esac
20206    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20207  fi
20208fi
20209
20210
20211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20212
20213  # First separate the path from the arguments. This will split at the first
20214  # space.
20215  complete="$PROPER_COMPILER_CXX"
20216  path="${complete%% *}"
20217  tmp="$complete EOL"
20218  arguments="${tmp#* }"
20219
20220  # Input might be given as Windows format, start by converting to
20221  # unix format.
20222  new_path=`$CYGPATH -u "$path"`
20223
20224  # Now try to locate executable using which
20225  new_path=`$WHICH "$new_path" 2> /dev/null`
20226  # bat and cmd files are not always considered executable in cygwin causing which
20227  # to not find them
20228  if test "x$new_path" = x \
20229           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20230           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20231    new_path=`$CYGPATH -u "$path"`
20232  fi
20233  if test "x$new_path" = x; then
20234    # Oops. Which didn't find the executable.
20235    # The splitting of arguments from the executable at a space might have been incorrect,
20236    # since paths with space are more likely in Windows. Give it another try with the whole
20237    # argument.
20238    path="$complete"
20239    arguments="EOL"
20240    new_path=`$CYGPATH -u "$path"`
20241    new_path=`$WHICH "$new_path" 2> /dev/null`
20242    # bat and cmd files are not always considered executable in cygwin causing which
20243    # to not find them
20244    if test "x$new_path" = x \
20245             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20246             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20247      new_path=`$CYGPATH -u "$path"`
20248    fi
20249    if test "x$new_path" = x; then
20250      # It's still not found. Now this is an unrecoverable error.
20251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20252$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20253      has_space=`$ECHO "$complete" | $GREP " "`
20254      if test "x$has_space" != x; then
20255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20257      fi
20258      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20259    fi
20260  fi
20261
20262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20265  # "foo.exe" is OK but "foo" is an error.
20266  #
20267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20268  # It is also a way to make sure we got the proper file name for the real test later on.
20269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20270  if test "x$test_shortpath" = x; then
20271    # Short path failed, file does not exist as specified.
20272    # Try adding .exe or .cmd
20273    if test -f "${new_path}.exe"; then
20274       input_to_shortpath="${new_path}.exe"
20275    elif test -f "${new_path}.cmd"; then
20276       input_to_shortpath="${new_path}.cmd"
20277    else
20278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20279$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20282      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20283    fi
20284  else
20285    input_to_shortpath="$new_path"
20286  fi
20287
20288  # Call helper function which possibly converts this using DOS-style short mode.
20289  # If so, the updated path is stored in $new_path.
20290  new_path="$input_to_shortpath"
20291
20292  input_path="$input_to_shortpath"
20293  # Check if we need to convert this using DOS-style short mode. If the path
20294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20295  # take no chances and rewrite it.
20296  # Note: m4 eats our [], so we need to use [ and ] instead.
20297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20298  if test "x$has_forbidden_chars" != x; then
20299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20303      # Going to short mode and back again did indeed matter. Since short mode is
20304      # case insensitive, let's make it lowercase to improve readability.
20305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20306      # Now convert it back to Unix-stile (cygpath)
20307      input_path=`$CYGPATH -u "$shortmode_path"`
20308      new_path="$input_path"
20309    fi
20310  fi
20311
20312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20313  if test "x$test_cygdrive_prefix" = x; then
20314    # As a simple fix, exclude /usr/bin since it's not a real path.
20315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20317      # a path prefixed by /cygdrive for fixpath to work.
20318      new_path="$CYGWIN_ROOT_PATH$input_path"
20319    fi
20320  fi
20321
20322  # remove trailing .exe if any
20323  new_path="${new_path/%.exe/}"
20324
20325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20326
20327  # First separate the path from the arguments. This will split at the first
20328  # space.
20329  complete="$PROPER_COMPILER_CXX"
20330  path="${complete%% *}"
20331  tmp="$complete EOL"
20332  arguments="${tmp#* }"
20333
20334  # Input might be given as Windows format, start by converting to
20335  # unix format.
20336  new_path="$path"
20337
20338  windows_path="$new_path"
20339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20340    unix_path=`$CYGPATH -u "$windows_path"`
20341    new_path="$unix_path"
20342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20344    new_path="$unix_path"
20345  fi
20346
20347
20348  # Now try to locate executable using which
20349  new_path=`$WHICH "$new_path" 2> /dev/null`
20350
20351  if test "x$new_path" = x; then
20352    # Oops. Which didn't find the executable.
20353    # The splitting of arguments from the executable at a space might have been incorrect,
20354    # since paths with space are more likely in Windows. Give it another try with the whole
20355    # argument.
20356    path="$complete"
20357    arguments="EOL"
20358    new_path="$path"
20359
20360  windows_path="$new_path"
20361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20362    unix_path=`$CYGPATH -u "$windows_path"`
20363    new_path="$unix_path"
20364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20366    new_path="$unix_path"
20367  fi
20368
20369
20370    new_path=`$WHICH "$new_path" 2> /dev/null`
20371
20372    if test "x$new_path" = x; then
20373      # It's still not found. Now this is an unrecoverable error.
20374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20375$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20376      has_space=`$ECHO "$complete" | $GREP " "`
20377      if test "x$has_space" != x; then
20378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20380      fi
20381      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20382    fi
20383  fi
20384
20385  # Now new_path has a complete unix path to the binary
20386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20387    # Keep paths in /bin as-is, but remove trailing .exe if any
20388    new_path="${new_path/%.exe/}"
20389    # Do not save /bin paths to all_fixpath_prefixes!
20390  else
20391    # Not in mixed or Windows style, start by that.
20392    new_path=`cmd //c echo $new_path`
20393
20394  input_path="$new_path"
20395  # Check if we need to convert this using DOS-style short mode. If the path
20396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20397  # take no chances and rewrite it.
20398  # Note: m4 eats our [], so we need to use [ and ] instead.
20399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20400  if test "x$has_forbidden_chars" != x; then
20401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20403  fi
20404
20405    # Output is in $new_path
20406
20407  windows_path="$new_path"
20408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20409    unix_path=`$CYGPATH -u "$windows_path"`
20410    new_path="$unix_path"
20411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20413    new_path="$unix_path"
20414  fi
20415
20416    # remove trailing .exe if any
20417    new_path="${new_path/%.exe/}"
20418
20419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20421  fi
20422
20423  else
20424    # We're on a posix platform. Hooray! :)
20425    # First separate the path from the arguments. This will split at the first
20426    # space.
20427    complete="$PROPER_COMPILER_CXX"
20428    path="${complete%% *}"
20429    tmp="$complete EOL"
20430    arguments="${tmp#* }"
20431
20432    # Cannot rely on the command "which" here since it doesn't always work.
20433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20434    if test -z "$is_absolute_path"; then
20435      # Path to executable is not absolute. Find it.
20436      IFS_save="$IFS"
20437      IFS=:
20438      for p in $PATH; do
20439        if test -f "$p/$path" && test -x "$p/$path"; then
20440          new_path="$p/$path"
20441          break
20442        fi
20443      done
20444      IFS="$IFS_save"
20445    else
20446      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20447$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20448      new_path="$path"
20449    fi
20450
20451    if test "x$new_path" = x; then
20452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20453$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20454        has_space=`$ECHO "$complete" | $GREP " "`
20455        if test "x$has_space" != x; then
20456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20458        fi
20459        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20460      fi
20461  fi
20462
20463      # Now join together the path and the arguments once again
20464      if test "x$arguments" != xEOL; then
20465        new_complete="$new_path ${arguments% *}"
20466      else
20467        new_complete="$new_path"
20468      fi
20469
20470  if test "x$complete" != "x$new_complete"; then
20471      PROPER_COMPILER_CXX="$new_complete"
20472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20473$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20474    fi
20475
20476    PATH="$RETRY_COMPILER_SAVED_PATH"
20477
20478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20479$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20480
20481    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20482        # Follow a chain of symbolic links. Use readlink
20483        # where it exists, else fall back to horribly
20484        # complicated shell code.
20485        if test "x$READLINK_TESTED" != yes; then
20486            # On MacOSX there is a readlink tool with a different
20487            # purpose than the GNU readlink tool. Check the found readlink.
20488            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20489            if test "x$ISGNU" = x; then
20490                 # A readlink that we do not know how to use.
20491                 # Are there other non-GNU readlinks out there?
20492                 READLINK_TESTED=yes
20493                 READLINK=
20494            fi
20495        fi
20496
20497        if test "x$READLINK" != x; then
20498            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20499        else
20500            # Save the current directory for restoring afterwards
20501            STARTDIR=$PWD
20502            COUNTER=0
20503            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20504            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20505            # Use the system pwd and not the shell builtin to resolve directory symlinks
20506            cd $sym_link_dir
20507            cd `$THEPWDCMD`
20508            sym_link_dir=`$THEPWDCMD`
20509            # Resolve file symlinks
20510            while test $COUNTER -lt 20; do
20511                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20512                if test "x$ISLINK" == x; then
20513                    # This is not a symbolic link! We are done!
20514                    break
20515                fi
20516                # Again resolve directory symlinks since the target of the just found
20517                # link could be in a different directory
20518                cd `$DIRNAME $ISLINK`
20519                sym_link_dir=`$THEPWDCMD`
20520                sym_link_file=`$BASENAME $ISLINK`
20521                let COUNTER=COUNTER+1
20522            done
20523            cd $STARTDIR
20524            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20525        fi
20526    fi
20527
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20529$as_echo "$PROPER_COMPILER_CXX" >&6; }
20530    CXX="$PROPER_COMPILER_CXX"
20531  else
20532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20533$as_echo "no, keeping CXX" >&6; }
20534    CXX="$TEST_COMPILER"
20535  fi
20536
20537  COMPILER=$CXX
20538  COMPILER_NAME=$COMPILER_NAME
20539
20540  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20541    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20542    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20543    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20544    if test $? -ne 0; then
20545      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20546
20547      { $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
20548$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20549      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20550$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20551      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20552    else
20553      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20554      COMPILER_VENDOR="Sun Studio"
20555    fi
20556  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20557    # First line typically looks something like:
20558    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20559    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20560    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20561    COMPILER_VENDOR="Microsoft CL.EXE"
20562    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20563    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20564      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20565        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20566      fi
20567    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20568      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20569        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20570      fi
20571    fi
20572  else
20573    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20574    # Check that this is likely to be GCC.
20575    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20576    if test $? -ne 0; then
20577      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20578$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20579      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20580$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20581      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20582    fi
20583
20584    # First line typically looks something like:
20585    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20586    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20587    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20588  fi
20589  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20590  CXX_VERSION="$COMPILER_VERSION"
20591  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20592  CXX_VENDOR="$COMPILER_VENDOR"
20593
20594  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20595$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20596
20597
20598# Now that we have resolved CXX ourself, let autoconf have it's go at it
20599ac_ext=cpp
20600ac_cpp='$CXXCPP $CPPFLAGS'
20601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20604if test -z "$CXX"; then
20605  if test -n "$CCC"; then
20606    CXX=$CCC
20607  else
20608    if test -n "$ac_tool_prefix"; then
20609  for ac_prog in $CXX
20610  do
20611    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20612set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20614$as_echo_n "checking for $ac_word... " >&6; }
20615if ${ac_cv_prog_CXX+:} false; then :
20616  $as_echo_n "(cached) " >&6
20617else
20618  if test -n "$CXX"; then
20619  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20620else
20621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20622for as_dir in $PATH
20623do
20624  IFS=$as_save_IFS
20625  test -z "$as_dir" && as_dir=.
20626    for ac_exec_ext in '' $ac_executable_extensions; do
20627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20628    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20630    break 2
20631  fi
20632done
20633  done
20634IFS=$as_save_IFS
20635
20636fi
20637fi
20638CXX=$ac_cv_prog_CXX
20639if test -n "$CXX"; then
20640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20641$as_echo "$CXX" >&6; }
20642else
20643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20644$as_echo "no" >&6; }
20645fi
20646
20647
20648    test -n "$CXX" && break
20649  done
20650fi
20651if test -z "$CXX"; then
20652  ac_ct_CXX=$CXX
20653  for ac_prog in $CXX
20654do
20655  # Extract the first word of "$ac_prog", so it can be a program name with args.
20656set dummy $ac_prog; ac_word=$2
20657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20658$as_echo_n "checking for $ac_word... " >&6; }
20659if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20660  $as_echo_n "(cached) " >&6
20661else
20662  if test -n "$ac_ct_CXX"; then
20663  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20664else
20665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20666for as_dir in $PATH
20667do
20668  IFS=$as_save_IFS
20669  test -z "$as_dir" && as_dir=.
20670    for ac_exec_ext in '' $ac_executable_extensions; do
20671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20672    ac_cv_prog_ac_ct_CXX="$ac_prog"
20673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20674    break 2
20675  fi
20676done
20677  done
20678IFS=$as_save_IFS
20679
20680fi
20681fi
20682ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20683if test -n "$ac_ct_CXX"; then
20684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20685$as_echo "$ac_ct_CXX" >&6; }
20686else
20687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20688$as_echo "no" >&6; }
20689fi
20690
20691
20692  test -n "$ac_ct_CXX" && break
20693done
20694
20695  if test "x$ac_ct_CXX" = x; then
20696    CXX="g++"
20697  else
20698    case $cross_compiling:$ac_tool_warned in
20699yes:)
20700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20702ac_tool_warned=yes ;;
20703esac
20704    CXX=$ac_ct_CXX
20705  fi
20706fi
20707
20708  fi
20709fi
20710# Provide some information about the compiler.
20711$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20712set X $ac_compile
20713ac_compiler=$2
20714for ac_option in --version -v -V -qversion; do
20715  { { ac_try="$ac_compiler $ac_option >&5"
20716case "(($ac_try" in
20717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20718  *) ac_try_echo=$ac_try;;
20719esac
20720eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20721$as_echo "$ac_try_echo"; } >&5
20722  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20723  ac_status=$?
20724  if test -s conftest.err; then
20725    sed '10a\
20726... rest of stderr output deleted ...
20727         10q' conftest.err >conftest.er1
20728    cat conftest.er1 >&5
20729  fi
20730  rm -f conftest.er1 conftest.err
20731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20732  test $ac_status = 0; }
20733done
20734
20735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20736$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20737if ${ac_cv_cxx_compiler_gnu+:} false; then :
20738  $as_echo_n "(cached) " >&6
20739else
20740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20741/* end confdefs.h.  */
20742
20743int
20744main ()
20745{
20746#ifndef __GNUC__
20747       choke me
20748#endif
20749
20750  ;
20751  return 0;
20752}
20753_ACEOF
20754if ac_fn_cxx_try_compile "$LINENO"; then :
20755  ac_compiler_gnu=yes
20756else
20757  ac_compiler_gnu=no
20758fi
20759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20760ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20761
20762fi
20763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20764$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20765if test $ac_compiler_gnu = yes; then
20766  GXX=yes
20767else
20768  GXX=
20769fi
20770ac_test_CXXFLAGS=${CXXFLAGS+set}
20771ac_save_CXXFLAGS=$CXXFLAGS
20772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20773$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20774if ${ac_cv_prog_cxx_g+:} false; then :
20775  $as_echo_n "(cached) " >&6
20776else
20777  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20778   ac_cxx_werror_flag=yes
20779   ac_cv_prog_cxx_g=no
20780   CXXFLAGS="-g"
20781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20782/* end confdefs.h.  */
20783
20784int
20785main ()
20786{
20787
20788  ;
20789  return 0;
20790}
20791_ACEOF
20792if ac_fn_cxx_try_compile "$LINENO"; then :
20793  ac_cv_prog_cxx_g=yes
20794else
20795  CXXFLAGS=""
20796      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20797/* end confdefs.h.  */
20798
20799int
20800main ()
20801{
20802
20803  ;
20804  return 0;
20805}
20806_ACEOF
20807if ac_fn_cxx_try_compile "$LINENO"; then :
20808
20809else
20810  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20811	 CXXFLAGS="-g"
20812	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20813/* end confdefs.h.  */
20814
20815int
20816main ()
20817{
20818
20819  ;
20820  return 0;
20821}
20822_ACEOF
20823if ac_fn_cxx_try_compile "$LINENO"; then :
20824  ac_cv_prog_cxx_g=yes
20825fi
20826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827fi
20828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20829fi
20830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20831   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20832fi
20833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20834$as_echo "$ac_cv_prog_cxx_g" >&6; }
20835if test "$ac_test_CXXFLAGS" = set; then
20836  CXXFLAGS=$ac_save_CXXFLAGS
20837elif test $ac_cv_prog_cxx_g = yes; then
20838  if test "$GXX" = yes; then
20839    CXXFLAGS="-g -O2"
20840  else
20841    CXXFLAGS="-g"
20842  fi
20843else
20844  if test "$GXX" = yes; then
20845    CXXFLAGS="-O2"
20846  else
20847    CXXFLAGS=
20848  fi
20849fi
20850ac_ext=cpp
20851ac_cpp='$CXXCPP $CPPFLAGS'
20852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20855
20856
20857### Locate other tools
20858
20859if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20860    ac_ext=m
20861ac_cpp='$OBJCPP $CPPFLAGS'
20862ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20863ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20864ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20865if test -n "$ac_tool_prefix"; then
20866  for ac_prog in gcc objcc objc cc CC
20867  do
20868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20871$as_echo_n "checking for $ac_word... " >&6; }
20872if ${ac_cv_prog_OBJC+:} false; then :
20873  $as_echo_n "(cached) " >&6
20874else
20875  if test -n "$OBJC"; then
20876  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20877else
20878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20879for as_dir in $PATH
20880do
20881  IFS=$as_save_IFS
20882  test -z "$as_dir" && as_dir=.
20883    for ac_exec_ext in '' $ac_executable_extensions; do
20884  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20885    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20887    break 2
20888  fi
20889done
20890  done
20891IFS=$as_save_IFS
20892
20893fi
20894fi
20895OBJC=$ac_cv_prog_OBJC
20896if test -n "$OBJC"; then
20897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20898$as_echo "$OBJC" >&6; }
20899else
20900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20901$as_echo "no" >&6; }
20902fi
20903
20904
20905    test -n "$OBJC" && break
20906  done
20907fi
20908if test -z "$OBJC"; then
20909  ac_ct_OBJC=$OBJC
20910  for ac_prog in gcc objcc objc cc CC
20911do
20912  # Extract the first word of "$ac_prog", so it can be a program name with args.
20913set dummy $ac_prog; ac_word=$2
20914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20915$as_echo_n "checking for $ac_word... " >&6; }
20916if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20917  $as_echo_n "(cached) " >&6
20918else
20919  if test -n "$ac_ct_OBJC"; then
20920  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20921else
20922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20923for as_dir in $PATH
20924do
20925  IFS=$as_save_IFS
20926  test -z "$as_dir" && as_dir=.
20927    for ac_exec_ext in '' $ac_executable_extensions; do
20928  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20929    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20931    break 2
20932  fi
20933done
20934  done
20935IFS=$as_save_IFS
20936
20937fi
20938fi
20939ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20940if test -n "$ac_ct_OBJC"; then
20941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20942$as_echo "$ac_ct_OBJC" >&6; }
20943else
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20945$as_echo "no" >&6; }
20946fi
20947
20948
20949  test -n "$ac_ct_OBJC" && break
20950done
20951
20952  if test "x$ac_ct_OBJC" = x; then
20953    OBJC="gcc"
20954  else
20955    case $cross_compiling:$ac_tool_warned in
20956yes:)
20957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20959ac_tool_warned=yes ;;
20960esac
20961    OBJC=$ac_ct_OBJC
20962  fi
20963fi
20964
20965# Provide some information about the compiler.
20966$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20967set X $ac_compile
20968ac_compiler=$2
20969for ac_option in --version -v -V -qversion; do
20970  { { ac_try="$ac_compiler $ac_option >&5"
20971case "(($ac_try" in
20972  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20973  *) ac_try_echo=$ac_try;;
20974esac
20975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20976$as_echo "$ac_try_echo"; } >&5
20977  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20978  ac_status=$?
20979  if test -s conftest.err; then
20980    sed '10a\
20981... rest of stderr output deleted ...
20982         10q' conftest.err >conftest.er1
20983    cat conftest.er1 >&5
20984  fi
20985  rm -f conftest.er1 conftest.err
20986  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20987  test $ac_status = 0; }
20988done
20989
20990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20991$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20992if ${ac_cv_objc_compiler_gnu+:} false; then :
20993  $as_echo_n "(cached) " >&6
20994else
20995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20996/* end confdefs.h.  */
20997
20998int
20999main ()
21000{
21001#ifndef __GNUC__
21002       choke me
21003#endif
21004
21005  ;
21006  return 0;
21007}
21008_ACEOF
21009if ac_fn_objc_try_compile "$LINENO"; then :
21010  ac_compiler_gnu=yes
21011else
21012  ac_compiler_gnu=no
21013fi
21014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21015ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21016
21017fi
21018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21019$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21020if test $ac_compiler_gnu = yes; then
21021  GOBJC=yes
21022else
21023  GOBJC=
21024fi
21025ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21026ac_save_OBJCFLAGS=$OBJCFLAGS
21027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21028$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21029if ${ac_cv_prog_objc_g+:} false; then :
21030  $as_echo_n "(cached) " >&6
21031else
21032  ac_save_objc_werror_flag=$ac_objc_werror_flag
21033   ac_objc_werror_flag=yes
21034   ac_cv_prog_objc_g=no
21035   OBJCFLAGS="-g"
21036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21037/* end confdefs.h.  */
21038
21039int
21040main ()
21041{
21042
21043  ;
21044  return 0;
21045}
21046_ACEOF
21047if ac_fn_objc_try_compile "$LINENO"; then :
21048  ac_cv_prog_objc_g=yes
21049else
21050  OBJCFLAGS=""
21051      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21052/* end confdefs.h.  */
21053
21054int
21055main ()
21056{
21057
21058  ;
21059  return 0;
21060}
21061_ACEOF
21062if ac_fn_objc_try_compile "$LINENO"; then :
21063
21064else
21065  ac_objc_werror_flag=$ac_save_objc_werror_flag
21066	 OBJCFLAGS="-g"
21067	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21068/* end confdefs.h.  */
21069
21070int
21071main ()
21072{
21073
21074  ;
21075  return 0;
21076}
21077_ACEOF
21078if ac_fn_objc_try_compile "$LINENO"; then :
21079  ac_cv_prog_objc_g=yes
21080fi
21081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21082fi
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21084fi
21085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21086   ac_objc_werror_flag=$ac_save_objc_werror_flag
21087fi
21088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21089$as_echo "$ac_cv_prog_objc_g" >&6; }
21090if test "$ac_test_OBJCFLAGS" = set; then
21091  OBJCFLAGS=$ac_save_OBJCFLAGS
21092elif test $ac_cv_prog_objc_g = yes; then
21093  if test "$GOBJC" = yes; then
21094    OBJCFLAGS="-g -O2"
21095  else
21096    OBJCFLAGS="-g"
21097  fi
21098else
21099  if test "$GOBJC" = yes; then
21100    OBJCFLAGS="-O2"
21101  else
21102    OBJCFLAGS=
21103  fi
21104fi
21105ac_ext=cpp
21106ac_cpp='$CXXCPP $CPPFLAGS'
21107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21110
21111
21112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21113
21114  # First separate the path from the arguments. This will split at the first
21115  # space.
21116  complete="$OBJC"
21117  path="${complete%% *}"
21118  tmp="$complete EOL"
21119  arguments="${tmp#* }"
21120
21121  # Input might be given as Windows format, start by converting to
21122  # unix format.
21123  new_path=`$CYGPATH -u "$path"`
21124
21125  # Now try to locate executable using which
21126  new_path=`$WHICH "$new_path" 2> /dev/null`
21127  # bat and cmd files are not always considered executable in cygwin causing which
21128  # to not find them
21129  if test "x$new_path" = x \
21130           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21131           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21132    new_path=`$CYGPATH -u "$path"`
21133  fi
21134  if test "x$new_path" = x; then
21135    # Oops. Which didn't find the executable.
21136    # The splitting of arguments from the executable at a space might have been incorrect,
21137    # since paths with space are more likely in Windows. Give it another try with the whole
21138    # argument.
21139    path="$complete"
21140    arguments="EOL"
21141    new_path=`$CYGPATH -u "$path"`
21142    new_path=`$WHICH "$new_path" 2> /dev/null`
21143    # bat and cmd files are not always considered executable in cygwin causing which
21144    # to not find them
21145    if test "x$new_path" = x \
21146             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21147             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21148      new_path=`$CYGPATH -u "$path"`
21149    fi
21150    if test "x$new_path" = x; then
21151      # It's still not found. Now this is an unrecoverable error.
21152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21153$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21154      has_space=`$ECHO "$complete" | $GREP " "`
21155      if test "x$has_space" != x; then
21156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21158      fi
21159      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21160    fi
21161  fi
21162
21163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21166  # "foo.exe" is OK but "foo" is an error.
21167  #
21168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21169  # It is also a way to make sure we got the proper file name for the real test later on.
21170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21171  if test "x$test_shortpath" = x; then
21172    # Short path failed, file does not exist as specified.
21173    # Try adding .exe or .cmd
21174    if test -f "${new_path}.exe"; then
21175       input_to_shortpath="${new_path}.exe"
21176    elif test -f "${new_path}.cmd"; then
21177       input_to_shortpath="${new_path}.cmd"
21178    else
21179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21180$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21183      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21184    fi
21185  else
21186    input_to_shortpath="$new_path"
21187  fi
21188
21189  # Call helper function which possibly converts this using DOS-style short mode.
21190  # If so, the updated path is stored in $new_path.
21191  new_path="$input_to_shortpath"
21192
21193  input_path="$input_to_shortpath"
21194  # Check if we need to convert this using DOS-style short mode. If the path
21195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21196  # take no chances and rewrite it.
21197  # Note: m4 eats our [], so we need to use [ and ] instead.
21198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21199  if test "x$has_forbidden_chars" != x; then
21200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21204      # Going to short mode and back again did indeed matter. Since short mode is
21205      # case insensitive, let's make it lowercase to improve readability.
21206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21207      # Now convert it back to Unix-stile (cygpath)
21208      input_path=`$CYGPATH -u "$shortmode_path"`
21209      new_path="$input_path"
21210    fi
21211  fi
21212
21213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21214  if test "x$test_cygdrive_prefix" = x; then
21215    # As a simple fix, exclude /usr/bin since it's not a real path.
21216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21218      # a path prefixed by /cygdrive for fixpath to work.
21219      new_path="$CYGWIN_ROOT_PATH$input_path"
21220    fi
21221  fi
21222
21223  # remove trailing .exe if any
21224  new_path="${new_path/%.exe/}"
21225
21226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21227
21228  # First separate the path from the arguments. This will split at the first
21229  # space.
21230  complete="$OBJC"
21231  path="${complete%% *}"
21232  tmp="$complete EOL"
21233  arguments="${tmp#* }"
21234
21235  # Input might be given as Windows format, start by converting to
21236  # unix format.
21237  new_path="$path"
21238
21239  windows_path="$new_path"
21240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21241    unix_path=`$CYGPATH -u "$windows_path"`
21242    new_path="$unix_path"
21243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21245    new_path="$unix_path"
21246  fi
21247
21248
21249  # Now try to locate executable using which
21250  new_path=`$WHICH "$new_path" 2> /dev/null`
21251
21252  if test "x$new_path" = x; then
21253    # Oops. Which didn't find the executable.
21254    # The splitting of arguments from the executable at a space might have been incorrect,
21255    # since paths with space are more likely in Windows. Give it another try with the whole
21256    # argument.
21257    path="$complete"
21258    arguments="EOL"
21259    new_path="$path"
21260
21261  windows_path="$new_path"
21262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21263    unix_path=`$CYGPATH -u "$windows_path"`
21264    new_path="$unix_path"
21265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21267    new_path="$unix_path"
21268  fi
21269
21270
21271    new_path=`$WHICH "$new_path" 2> /dev/null`
21272
21273    if test "x$new_path" = x; then
21274      # It's still not found. Now this is an unrecoverable error.
21275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21276$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21277      has_space=`$ECHO "$complete" | $GREP " "`
21278      if test "x$has_space" != x; then
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21281      fi
21282      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21283    fi
21284  fi
21285
21286  # Now new_path has a complete unix path to the binary
21287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21288    # Keep paths in /bin as-is, but remove trailing .exe if any
21289    new_path="${new_path/%.exe/}"
21290    # Do not save /bin paths to all_fixpath_prefixes!
21291  else
21292    # Not in mixed or Windows style, start by that.
21293    new_path=`cmd //c echo $new_path`
21294
21295  input_path="$new_path"
21296  # Check if we need to convert this using DOS-style short mode. If the path
21297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21298  # take no chances and rewrite it.
21299  # Note: m4 eats our [], so we need to use [ and ] instead.
21300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21301  if test "x$has_forbidden_chars" != x; then
21302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21304  fi
21305
21306    # Output is in $new_path
21307
21308  windows_path="$new_path"
21309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21310    unix_path=`$CYGPATH -u "$windows_path"`
21311    new_path="$unix_path"
21312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21314    new_path="$unix_path"
21315  fi
21316
21317    # remove trailing .exe if any
21318    new_path="${new_path/%.exe/}"
21319
21320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21322  fi
21323
21324  else
21325    # We're on a posix platform. Hooray! :)
21326    # First separate the path from the arguments. This will split at the first
21327    # space.
21328    complete="$OBJC"
21329    path="${complete%% *}"
21330    tmp="$complete EOL"
21331    arguments="${tmp#* }"
21332
21333    # Cannot rely on the command "which" here since it doesn't always work.
21334    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21335    if test -z "$is_absolute_path"; then
21336      # Path to executable is not absolute. Find it.
21337      IFS_save="$IFS"
21338      IFS=:
21339      for p in $PATH; do
21340        if test -f "$p/$path" && test -x "$p/$path"; then
21341          new_path="$p/$path"
21342          break
21343        fi
21344      done
21345      IFS="$IFS_save"
21346    else
21347      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21348$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21349      new_path="$path"
21350    fi
21351
21352    if test "x$new_path" = x; then
21353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21354$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21355        has_space=`$ECHO "$complete" | $GREP " "`
21356        if test "x$has_space" != x; then
21357          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21358$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21359        fi
21360        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21361      fi
21362  fi
21363
21364      # Now join together the path and the arguments once again
21365      if test "x$arguments" != xEOL; then
21366        new_complete="$new_path ${arguments% *}"
21367      else
21368        new_complete="$new_path"
21369      fi
21370
21371  if test "x$complete" != "x$new_complete"; then
21372      OBJC="$new_complete"
21373      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21374$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21375    fi
21376
21377else
21378    OBJC=
21379fi
21380
21381# Restore the flags to the user specified values.
21382# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21383CFLAGS="$ORG_CFLAGS"
21384CXXFLAGS="$ORG_CXXFLAGS"
21385OBJCFLAGS="$ORG_OBJCFLAGS"
21386
21387LD="$CC"
21388LDEXE="$CC"
21389LDCXX="$CXX"
21390LDEXECXX="$CXX"
21391
21392# LDEXE is the linker to use, when creating executables.
21393
21394# Linking C++ libraries.
21395
21396# Linking C++ executables.
21397
21398
21399if test "x$OPENJDK_TARGET_OS" != xwindows; then
21400    if test -n "$ac_tool_prefix"; then
21401  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21402set dummy ${ac_tool_prefix}ar; ac_word=$2
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21404$as_echo_n "checking for $ac_word... " >&6; }
21405if ${ac_cv_prog_AR+:} false; then :
21406  $as_echo_n "(cached) " >&6
21407else
21408  if test -n "$AR"; then
21409  ac_cv_prog_AR="$AR" # Let the user override the test.
21410else
21411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21412for as_dir in $PATH
21413do
21414  IFS=$as_save_IFS
21415  test -z "$as_dir" && as_dir=.
21416    for ac_exec_ext in '' $ac_executable_extensions; do
21417  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21418    ac_cv_prog_AR="${ac_tool_prefix}ar"
21419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21420    break 2
21421  fi
21422done
21423  done
21424IFS=$as_save_IFS
21425
21426fi
21427fi
21428AR=$ac_cv_prog_AR
21429if test -n "$AR"; then
21430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21431$as_echo "$AR" >&6; }
21432else
21433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21434$as_echo "no" >&6; }
21435fi
21436
21437
21438fi
21439if test -z "$ac_cv_prog_AR"; then
21440  ac_ct_AR=$AR
21441  # Extract the first word of "ar", so it can be a program name with args.
21442set dummy ar; ac_word=$2
21443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21444$as_echo_n "checking for $ac_word... " >&6; }
21445if ${ac_cv_prog_ac_ct_AR+:} false; then :
21446  $as_echo_n "(cached) " >&6
21447else
21448  if test -n "$ac_ct_AR"; then
21449  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21450else
21451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21452for as_dir in $PATH
21453do
21454  IFS=$as_save_IFS
21455  test -z "$as_dir" && as_dir=.
21456    for ac_exec_ext in '' $ac_executable_extensions; do
21457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21458    ac_cv_prog_ac_ct_AR="ar"
21459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21460    break 2
21461  fi
21462done
21463  done
21464IFS=$as_save_IFS
21465
21466fi
21467fi
21468ac_ct_AR=$ac_cv_prog_ac_ct_AR
21469if test -n "$ac_ct_AR"; then
21470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21471$as_echo "$ac_ct_AR" >&6; }
21472else
21473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21474$as_echo "no" >&6; }
21475fi
21476
21477  if test "x$ac_ct_AR" = x; then
21478    AR=""
21479  else
21480    case $cross_compiling:$ac_tool_warned in
21481yes:)
21482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21484ac_tool_warned=yes ;;
21485esac
21486    AR=$ac_ct_AR
21487  fi
21488else
21489  AR="$ac_cv_prog_AR"
21490fi
21491
21492
21493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21494
21495  # First separate the path from the arguments. This will split at the first
21496  # space.
21497  complete="$AR"
21498  path="${complete%% *}"
21499  tmp="$complete EOL"
21500  arguments="${tmp#* }"
21501
21502  # Input might be given as Windows format, start by converting to
21503  # unix format.
21504  new_path=`$CYGPATH -u "$path"`
21505
21506  # Now try to locate executable using which
21507  new_path=`$WHICH "$new_path" 2> /dev/null`
21508  # bat and cmd files are not always considered executable in cygwin causing which
21509  # to not find them
21510  if test "x$new_path" = x \
21511           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21512           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21513    new_path=`$CYGPATH -u "$path"`
21514  fi
21515  if test "x$new_path" = x; then
21516    # Oops. Which didn't find the executable.
21517    # The splitting of arguments from the executable at a space might have been incorrect,
21518    # since paths with space are more likely in Windows. Give it another try with the whole
21519    # argument.
21520    path="$complete"
21521    arguments="EOL"
21522    new_path=`$CYGPATH -u "$path"`
21523    new_path=`$WHICH "$new_path" 2> /dev/null`
21524    # bat and cmd files are not always considered executable in cygwin causing which
21525    # to not find them
21526    if test "x$new_path" = x \
21527             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21528             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21529      new_path=`$CYGPATH -u "$path"`
21530    fi
21531    if test "x$new_path" = x; then
21532      # It's still not found. Now this is an unrecoverable error.
21533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21534$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21535      has_space=`$ECHO "$complete" | $GREP " "`
21536      if test "x$has_space" != x; then
21537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21539      fi
21540      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21541    fi
21542  fi
21543
21544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21547  # "foo.exe" is OK but "foo" is an error.
21548  #
21549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21550  # It is also a way to make sure we got the proper file name for the real test later on.
21551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21552  if test "x$test_shortpath" = x; then
21553    # Short path failed, file does not exist as specified.
21554    # Try adding .exe or .cmd
21555    if test -f "${new_path}.exe"; then
21556       input_to_shortpath="${new_path}.exe"
21557    elif test -f "${new_path}.cmd"; then
21558       input_to_shortpath="${new_path}.cmd"
21559    else
21560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21561$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21564      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21565    fi
21566  else
21567    input_to_shortpath="$new_path"
21568  fi
21569
21570  # Call helper function which possibly converts this using DOS-style short mode.
21571  # If so, the updated path is stored in $new_path.
21572  new_path="$input_to_shortpath"
21573
21574  input_path="$input_to_shortpath"
21575  # Check if we need to convert this using DOS-style short mode. If the path
21576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21577  # take no chances and rewrite it.
21578  # Note: m4 eats our [], so we need to use [ and ] instead.
21579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21580  if test "x$has_forbidden_chars" != x; then
21581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21585      # Going to short mode and back again did indeed matter. Since short mode is
21586      # case insensitive, let's make it lowercase to improve readability.
21587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21588      # Now convert it back to Unix-stile (cygpath)
21589      input_path=`$CYGPATH -u "$shortmode_path"`
21590      new_path="$input_path"
21591    fi
21592  fi
21593
21594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21595  if test "x$test_cygdrive_prefix" = x; then
21596    # As a simple fix, exclude /usr/bin since it's not a real path.
21597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21599      # a path prefixed by /cygdrive for fixpath to work.
21600      new_path="$CYGWIN_ROOT_PATH$input_path"
21601    fi
21602  fi
21603
21604  # remove trailing .exe if any
21605  new_path="${new_path/%.exe/}"
21606
21607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21608
21609  # First separate the path from the arguments. This will split at the first
21610  # space.
21611  complete="$AR"
21612  path="${complete%% *}"
21613  tmp="$complete EOL"
21614  arguments="${tmp#* }"
21615
21616  # Input might be given as Windows format, start by converting to
21617  # unix format.
21618  new_path="$path"
21619
21620  windows_path="$new_path"
21621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21622    unix_path=`$CYGPATH -u "$windows_path"`
21623    new_path="$unix_path"
21624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21626    new_path="$unix_path"
21627  fi
21628
21629
21630  # Now try to locate executable using which
21631  new_path=`$WHICH "$new_path" 2> /dev/null`
21632
21633  if test "x$new_path" = x; then
21634    # Oops. Which didn't find the executable.
21635    # The splitting of arguments from the executable at a space might have been incorrect,
21636    # since paths with space are more likely in Windows. Give it another try with the whole
21637    # argument.
21638    path="$complete"
21639    arguments="EOL"
21640    new_path="$path"
21641
21642  windows_path="$new_path"
21643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21644    unix_path=`$CYGPATH -u "$windows_path"`
21645    new_path="$unix_path"
21646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21648    new_path="$unix_path"
21649  fi
21650
21651
21652    new_path=`$WHICH "$new_path" 2> /dev/null`
21653
21654    if test "x$new_path" = x; then
21655      # It's still not found. Now this is an unrecoverable error.
21656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21657$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21658      has_space=`$ECHO "$complete" | $GREP " "`
21659      if test "x$has_space" != x; then
21660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21662      fi
21663      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21664    fi
21665  fi
21666
21667  # Now new_path has a complete unix path to the binary
21668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21669    # Keep paths in /bin as-is, but remove trailing .exe if any
21670    new_path="${new_path/%.exe/}"
21671    # Do not save /bin paths to all_fixpath_prefixes!
21672  else
21673    # Not in mixed or Windows style, start by that.
21674    new_path=`cmd //c echo $new_path`
21675
21676  input_path="$new_path"
21677  # Check if we need to convert this using DOS-style short mode. If the path
21678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21679  # take no chances and rewrite it.
21680  # Note: m4 eats our [], so we need to use [ and ] instead.
21681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21682  if test "x$has_forbidden_chars" != x; then
21683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21685  fi
21686
21687    # Output is in $new_path
21688
21689  windows_path="$new_path"
21690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21691    unix_path=`$CYGPATH -u "$windows_path"`
21692    new_path="$unix_path"
21693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21695    new_path="$unix_path"
21696  fi
21697
21698    # remove trailing .exe if any
21699    new_path="${new_path/%.exe/}"
21700
21701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21703  fi
21704
21705  else
21706    # We're on a posix platform. Hooray! :)
21707    # First separate the path from the arguments. This will split at the first
21708    # space.
21709    complete="$AR"
21710    path="${complete%% *}"
21711    tmp="$complete EOL"
21712    arguments="${tmp#* }"
21713
21714    # Cannot rely on the command "which" here since it doesn't always work.
21715    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21716    if test -z "$is_absolute_path"; then
21717      # Path to executable is not absolute. Find it.
21718      IFS_save="$IFS"
21719      IFS=:
21720      for p in $PATH; do
21721        if test -f "$p/$path" && test -x "$p/$path"; then
21722          new_path="$p/$path"
21723          break
21724        fi
21725      done
21726      IFS="$IFS_save"
21727    else
21728      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21729$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21730      new_path="$path"
21731    fi
21732
21733    if test "x$new_path" = x; then
21734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21735$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21736        has_space=`$ECHO "$complete" | $GREP " "`
21737        if test "x$has_space" != x; then
21738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21740        fi
21741        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21742      fi
21743  fi
21744
21745      # Now join together the path and the arguments once again
21746      if test "x$arguments" != xEOL; then
21747        new_complete="$new_path ${arguments% *}"
21748      else
21749        new_complete="$new_path"
21750      fi
21751
21752  if test "x$complete" != "x$new_complete"; then
21753      AR="$new_complete"
21754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21755$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21756    fi
21757
21758fi
21759if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21760    ARFLAGS="-r"
21761else
21762    ARFLAGS=""
21763fi
21764
21765
21766# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21767HOTSPOT_CXX="$CXX"
21768HOTSPOT_LD="$LD"
21769
21770
21771
21772COMPILER_NAME=gcc
21773COMPILER_TYPE=CC
21774if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21775
21776    # For now, assume that we are always compiling using cl.exe.
21777    CC_OUT_OPTION=-Fo
21778    EXE_OUT_OPTION=-out:
21779    LD_OUT_OPTION=-out:
21780    AR_OUT_OPTION=-out:
21781    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21782    # program for something completely different.
21783    # Extract the first word of "link", so it can be a program name with args.
21784set dummy link; ac_word=$2
21785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21786$as_echo_n "checking for $ac_word... " >&6; }
21787if ${ac_cv_prog_WINLD+:} false; then :
21788  $as_echo_n "(cached) " >&6
21789else
21790  if test -n "$WINLD"; then
21791  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21792else
21793  ac_prog_rejected=no
21794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21795for as_dir in $PATH
21796do
21797  IFS=$as_save_IFS
21798  test -z "$as_dir" && as_dir=.
21799    for ac_exec_ext in '' $ac_executable_extensions; do
21800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21801    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21802       ac_prog_rejected=yes
21803       continue
21804     fi
21805    ac_cv_prog_WINLD="link"
21806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21807    break 2
21808  fi
21809done
21810  done
21811IFS=$as_save_IFS
21812
21813if test $ac_prog_rejected = yes; then
21814  # We found a bogon in the path, so make sure we never use it.
21815  set dummy $ac_cv_prog_WINLD
21816  shift
21817  if test $# != 0; then
21818    # We chose a different compiler from the bogus one.
21819    # However, it has the same basename, so the bogon will be chosen
21820    # first if we set WINLD to just the basename; use the full file name.
21821    shift
21822    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21823  fi
21824fi
21825fi
21826fi
21827WINLD=$ac_cv_prog_WINLD
21828if test -n "$WINLD"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21830$as_echo "$WINLD" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837    # Since we must ignore the first found link, WINLD will contain
21838    # the full path to the link.exe program.
21839
21840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21841
21842  # First separate the path from the arguments. This will split at the first
21843  # space.
21844  complete="$WINLD"
21845  path="${complete%% *}"
21846  tmp="$complete EOL"
21847  arguments="${tmp#* }"
21848
21849  # Input might be given as Windows format, start by converting to
21850  # unix format.
21851  new_path=`$CYGPATH -u "$path"`
21852
21853  # Now try to locate executable using which
21854  new_path=`$WHICH "$new_path" 2> /dev/null`
21855  # bat and cmd files are not always considered executable in cygwin causing which
21856  # to not find them
21857  if test "x$new_path" = x \
21858           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21859           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21860    new_path=`$CYGPATH -u "$path"`
21861  fi
21862  if test "x$new_path" = x; then
21863    # Oops. Which didn't find the executable.
21864    # The splitting of arguments from the executable at a space might have been incorrect,
21865    # since paths with space are more likely in Windows. Give it another try with the whole
21866    # argument.
21867    path="$complete"
21868    arguments="EOL"
21869    new_path=`$CYGPATH -u "$path"`
21870    new_path=`$WHICH "$new_path" 2> /dev/null`
21871    # bat and cmd files are not always considered executable in cygwin causing which
21872    # to not find them
21873    if test "x$new_path" = x \
21874             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21875             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21876      new_path=`$CYGPATH -u "$path"`
21877    fi
21878    if test "x$new_path" = x; then
21879      # It's still not found. Now this is an unrecoverable error.
21880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21881$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21882      has_space=`$ECHO "$complete" | $GREP " "`
21883      if test "x$has_space" != x; then
21884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21886      fi
21887      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21888    fi
21889  fi
21890
21891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21894  # "foo.exe" is OK but "foo" is an error.
21895  #
21896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21897  # It is also a way to make sure we got the proper file name for the real test later on.
21898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21899  if test "x$test_shortpath" = x; then
21900    # Short path failed, file does not exist as specified.
21901    # Try adding .exe or .cmd
21902    if test -f "${new_path}.exe"; then
21903       input_to_shortpath="${new_path}.exe"
21904    elif test -f "${new_path}.cmd"; then
21905       input_to_shortpath="${new_path}.cmd"
21906    else
21907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21908$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21911      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21912    fi
21913  else
21914    input_to_shortpath="$new_path"
21915  fi
21916
21917  # Call helper function which possibly converts this using DOS-style short mode.
21918  # If so, the updated path is stored in $new_path.
21919  new_path="$input_to_shortpath"
21920
21921  input_path="$input_to_shortpath"
21922  # Check if we need to convert this using DOS-style short mode. If the path
21923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21924  # take no chances and rewrite it.
21925  # Note: m4 eats our [], so we need to use [ and ] instead.
21926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21927  if test "x$has_forbidden_chars" != x; then
21928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21932      # Going to short mode and back again did indeed matter. Since short mode is
21933      # case insensitive, let's make it lowercase to improve readability.
21934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21935      # Now convert it back to Unix-stile (cygpath)
21936      input_path=`$CYGPATH -u "$shortmode_path"`
21937      new_path="$input_path"
21938    fi
21939  fi
21940
21941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21942  if test "x$test_cygdrive_prefix" = x; then
21943    # As a simple fix, exclude /usr/bin since it's not a real path.
21944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21946      # a path prefixed by /cygdrive for fixpath to work.
21947      new_path="$CYGWIN_ROOT_PATH$input_path"
21948    fi
21949  fi
21950
21951  # remove trailing .exe if any
21952  new_path="${new_path/%.exe/}"
21953
21954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21955
21956  # First separate the path from the arguments. This will split at the first
21957  # space.
21958  complete="$WINLD"
21959  path="${complete%% *}"
21960  tmp="$complete EOL"
21961  arguments="${tmp#* }"
21962
21963  # Input might be given as Windows format, start by converting to
21964  # unix format.
21965  new_path="$path"
21966
21967  windows_path="$new_path"
21968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21969    unix_path=`$CYGPATH -u "$windows_path"`
21970    new_path="$unix_path"
21971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21973    new_path="$unix_path"
21974  fi
21975
21976
21977  # Now try to locate executable using which
21978  new_path=`$WHICH "$new_path" 2> /dev/null`
21979
21980  if test "x$new_path" = x; then
21981    # Oops. Which didn't find the executable.
21982    # The splitting of arguments from the executable at a space might have been incorrect,
21983    # since paths with space are more likely in Windows. Give it another try with the whole
21984    # argument.
21985    path="$complete"
21986    arguments="EOL"
21987    new_path="$path"
21988
21989  windows_path="$new_path"
21990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21991    unix_path=`$CYGPATH -u "$windows_path"`
21992    new_path="$unix_path"
21993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21995    new_path="$unix_path"
21996  fi
21997
21998
21999    new_path=`$WHICH "$new_path" 2> /dev/null`
22000
22001    if test "x$new_path" = x; then
22002      # It's still not found. Now this is an unrecoverable error.
22003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22004$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22005      has_space=`$ECHO "$complete" | $GREP " "`
22006      if test "x$has_space" != x; then
22007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22009      fi
22010      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22011    fi
22012  fi
22013
22014  # Now new_path has a complete unix path to the binary
22015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22016    # Keep paths in /bin as-is, but remove trailing .exe if any
22017    new_path="${new_path/%.exe/}"
22018    # Do not save /bin paths to all_fixpath_prefixes!
22019  else
22020    # Not in mixed or Windows style, start by that.
22021    new_path=`cmd //c echo $new_path`
22022
22023  input_path="$new_path"
22024  # Check if we need to convert this using DOS-style short mode. If the path
22025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22026  # take no chances and rewrite it.
22027  # Note: m4 eats our [], so we need to use [ and ] instead.
22028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22029  if test "x$has_forbidden_chars" != x; then
22030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22032  fi
22033
22034    # Output is in $new_path
22035
22036  windows_path="$new_path"
22037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22038    unix_path=`$CYGPATH -u "$windows_path"`
22039    new_path="$unix_path"
22040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22042    new_path="$unix_path"
22043  fi
22044
22045    # remove trailing .exe if any
22046    new_path="${new_path/%.exe/}"
22047
22048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22050  fi
22051
22052  else
22053    # We're on a posix platform. Hooray! :)
22054    # First separate the path from the arguments. This will split at the first
22055    # space.
22056    complete="$WINLD"
22057    path="${complete%% *}"
22058    tmp="$complete EOL"
22059    arguments="${tmp#* }"
22060
22061    # Cannot rely on the command "which" here since it doesn't always work.
22062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22063    if test -z "$is_absolute_path"; then
22064      # Path to executable is not absolute. Find it.
22065      IFS_save="$IFS"
22066      IFS=:
22067      for p in $PATH; do
22068        if test -f "$p/$path" && test -x "$p/$path"; then
22069          new_path="$p/$path"
22070          break
22071        fi
22072      done
22073      IFS="$IFS_save"
22074    else
22075      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22076$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22077      new_path="$path"
22078    fi
22079
22080    if test "x$new_path" = x; then
22081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22082$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22083        has_space=`$ECHO "$complete" | $GREP " "`
22084        if test "x$has_space" != x; then
22085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22087        fi
22088        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22089      fi
22090  fi
22091
22092      # Now join together the path and the arguments once again
22093      if test "x$arguments" != xEOL; then
22094        new_complete="$new_path ${arguments% *}"
22095      else
22096        new_complete="$new_path"
22097      fi
22098
22099  if test "x$complete" != "x$new_complete"; then
22100      WINLD="$new_complete"
22101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22102$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22103    fi
22104
22105    printf "Windows linker was found at $WINLD\n"
22106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22107$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22108    "$WINLD" --version > /dev/null
22109    if test $? -eq 0 ; then
22110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22111$as_echo "no" >&6; }
22112      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22113    else
22114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22115$as_echo "yes" >&6; }
22116    fi
22117    LD="$WINLD"
22118    LDEXE="$WINLD"
22119    LDCXX="$WINLD"
22120    LDEXECXX="$WINLD"
22121
22122    # Extract the first word of "mt", so it can be a program name with args.
22123set dummy mt; ac_word=$2
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22125$as_echo_n "checking for $ac_word... " >&6; }
22126if ${ac_cv_prog_MT+:} false; then :
22127  $as_echo_n "(cached) " >&6
22128else
22129  if test -n "$MT"; then
22130  ac_cv_prog_MT="$MT" # Let the user override the test.
22131else
22132  ac_prog_rejected=no
22133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22134for as_dir in $PATH
22135do
22136  IFS=$as_save_IFS
22137  test -z "$as_dir" && as_dir=.
22138    for ac_exec_ext in '' $ac_executable_extensions; do
22139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22140    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22141       ac_prog_rejected=yes
22142       continue
22143     fi
22144    ac_cv_prog_MT="mt"
22145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22146    break 2
22147  fi
22148done
22149  done
22150IFS=$as_save_IFS
22151
22152if test $ac_prog_rejected = yes; then
22153  # We found a bogon in the path, so make sure we never use it.
22154  set dummy $ac_cv_prog_MT
22155  shift
22156  if test $# != 0; then
22157    # We chose a different compiler from the bogus one.
22158    # However, it has the same basename, so the bogon will be chosen
22159    # first if we set MT to just the basename; use the full file name.
22160    shift
22161    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22162  fi
22163fi
22164fi
22165fi
22166MT=$ac_cv_prog_MT
22167if test -n "$MT"; then
22168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22169$as_echo "$MT" >&6; }
22170else
22171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22172$as_echo "no" >&6; }
22173fi
22174
22175
22176
22177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22178
22179  # First separate the path from the arguments. This will split at the first
22180  # space.
22181  complete="$MT"
22182  path="${complete%% *}"
22183  tmp="$complete EOL"
22184  arguments="${tmp#* }"
22185
22186  # Input might be given as Windows format, start by converting to
22187  # unix format.
22188  new_path=`$CYGPATH -u "$path"`
22189
22190  # Now try to locate executable using which
22191  new_path=`$WHICH "$new_path" 2> /dev/null`
22192  # bat and cmd files are not always considered executable in cygwin causing which
22193  # to not find them
22194  if test "x$new_path" = x \
22195           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22196           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22197    new_path=`$CYGPATH -u "$path"`
22198  fi
22199  if test "x$new_path" = x; then
22200    # Oops. Which didn't find the executable.
22201    # The splitting of arguments from the executable at a space might have been incorrect,
22202    # since paths with space are more likely in Windows. Give it another try with the whole
22203    # argument.
22204    path="$complete"
22205    arguments="EOL"
22206    new_path=`$CYGPATH -u "$path"`
22207    new_path=`$WHICH "$new_path" 2> /dev/null`
22208    # bat and cmd files are not always considered executable in cygwin causing which
22209    # to not find them
22210    if test "x$new_path" = x \
22211             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22212             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22213      new_path=`$CYGPATH -u "$path"`
22214    fi
22215    if test "x$new_path" = x; then
22216      # It's still not found. Now this is an unrecoverable error.
22217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22218$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22219      has_space=`$ECHO "$complete" | $GREP " "`
22220      if test "x$has_space" != x; then
22221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22223      fi
22224      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22225    fi
22226  fi
22227
22228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22231  # "foo.exe" is OK but "foo" is an error.
22232  #
22233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22234  # It is also a way to make sure we got the proper file name for the real test later on.
22235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22236  if test "x$test_shortpath" = x; then
22237    # Short path failed, file does not exist as specified.
22238    # Try adding .exe or .cmd
22239    if test -f "${new_path}.exe"; then
22240       input_to_shortpath="${new_path}.exe"
22241    elif test -f "${new_path}.cmd"; then
22242       input_to_shortpath="${new_path}.cmd"
22243    else
22244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22245$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22248      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22249    fi
22250  else
22251    input_to_shortpath="$new_path"
22252  fi
22253
22254  # Call helper function which possibly converts this using DOS-style short mode.
22255  # If so, the updated path is stored in $new_path.
22256  new_path="$input_to_shortpath"
22257
22258  input_path="$input_to_shortpath"
22259  # Check if we need to convert this using DOS-style short mode. If the path
22260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22261  # take no chances and rewrite it.
22262  # Note: m4 eats our [], so we need to use [ and ] instead.
22263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22264  if test "x$has_forbidden_chars" != x; then
22265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22269      # Going to short mode and back again did indeed matter. Since short mode is
22270      # case insensitive, let's make it lowercase to improve readability.
22271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22272      # Now convert it back to Unix-stile (cygpath)
22273      input_path=`$CYGPATH -u "$shortmode_path"`
22274      new_path="$input_path"
22275    fi
22276  fi
22277
22278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22279  if test "x$test_cygdrive_prefix" = x; then
22280    # As a simple fix, exclude /usr/bin since it's not a real path.
22281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22283      # a path prefixed by /cygdrive for fixpath to work.
22284      new_path="$CYGWIN_ROOT_PATH$input_path"
22285    fi
22286  fi
22287
22288  # remove trailing .exe if any
22289  new_path="${new_path/%.exe/}"
22290
22291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22292
22293  # First separate the path from the arguments. This will split at the first
22294  # space.
22295  complete="$MT"
22296  path="${complete%% *}"
22297  tmp="$complete EOL"
22298  arguments="${tmp#* }"
22299
22300  # Input might be given as Windows format, start by converting to
22301  # unix format.
22302  new_path="$path"
22303
22304  windows_path="$new_path"
22305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22306    unix_path=`$CYGPATH -u "$windows_path"`
22307    new_path="$unix_path"
22308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22310    new_path="$unix_path"
22311  fi
22312
22313
22314  # Now try to locate executable using which
22315  new_path=`$WHICH "$new_path" 2> /dev/null`
22316
22317  if test "x$new_path" = x; then
22318    # Oops. Which didn't find the executable.
22319    # The splitting of arguments from the executable at a space might have been incorrect,
22320    # since paths with space are more likely in Windows. Give it another try with the whole
22321    # argument.
22322    path="$complete"
22323    arguments="EOL"
22324    new_path="$path"
22325
22326  windows_path="$new_path"
22327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22328    unix_path=`$CYGPATH -u "$windows_path"`
22329    new_path="$unix_path"
22330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22332    new_path="$unix_path"
22333  fi
22334
22335
22336    new_path=`$WHICH "$new_path" 2> /dev/null`
22337
22338    if test "x$new_path" = x; then
22339      # It's still not found. Now this is an unrecoverable error.
22340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22341$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22342      has_space=`$ECHO "$complete" | $GREP " "`
22343      if test "x$has_space" != x; then
22344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22346      fi
22347      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22348    fi
22349  fi
22350
22351  # Now new_path has a complete unix path to the binary
22352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22353    # Keep paths in /bin as-is, but remove trailing .exe if any
22354    new_path="${new_path/%.exe/}"
22355    # Do not save /bin paths to all_fixpath_prefixes!
22356  else
22357    # Not in mixed or Windows style, start by that.
22358    new_path=`cmd //c echo $new_path`
22359
22360  input_path="$new_path"
22361  # Check if we need to convert this using DOS-style short mode. If the path
22362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22363  # take no chances and rewrite it.
22364  # Note: m4 eats our [], so we need to use [ and ] instead.
22365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22366  if test "x$has_forbidden_chars" != x; then
22367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369  fi
22370
22371    # Output is in $new_path
22372
22373  windows_path="$new_path"
22374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22375    unix_path=`$CYGPATH -u "$windows_path"`
22376    new_path="$unix_path"
22377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22379    new_path="$unix_path"
22380  fi
22381
22382    # remove trailing .exe if any
22383    new_path="${new_path/%.exe/}"
22384
22385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22387  fi
22388
22389  else
22390    # We're on a posix platform. Hooray! :)
22391    # First separate the path from the arguments. This will split at the first
22392    # space.
22393    complete="$MT"
22394    path="${complete%% *}"
22395    tmp="$complete EOL"
22396    arguments="${tmp#* }"
22397
22398    # Cannot rely on the command "which" here since it doesn't always work.
22399    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22400    if test -z "$is_absolute_path"; then
22401      # Path to executable is not absolute. Find it.
22402      IFS_save="$IFS"
22403      IFS=:
22404      for p in $PATH; do
22405        if test -f "$p/$path" && test -x "$p/$path"; then
22406          new_path="$p/$path"
22407          break
22408        fi
22409      done
22410      IFS="$IFS_save"
22411    else
22412      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22413$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22414      new_path="$path"
22415    fi
22416
22417    if test "x$new_path" = x; then
22418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22419$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22420        has_space=`$ECHO "$complete" | $GREP " "`
22421        if test "x$has_space" != x; then
22422          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22423$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22424        fi
22425        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22426      fi
22427  fi
22428
22429      # Now join together the path and the arguments once again
22430      if test "x$arguments" != xEOL; then
22431        new_complete="$new_path ${arguments% *}"
22432      else
22433        new_complete="$new_path"
22434      fi
22435
22436  if test "x$complete" != "x$new_complete"; then
22437      MT="$new_complete"
22438      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22439$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22440    fi
22441
22442    # The resource compiler
22443    # Extract the first word of "rc", so it can be a program name with args.
22444set dummy rc; ac_word=$2
22445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22446$as_echo_n "checking for $ac_word... " >&6; }
22447if ${ac_cv_prog_RC+:} false; then :
22448  $as_echo_n "(cached) " >&6
22449else
22450  if test -n "$RC"; then
22451  ac_cv_prog_RC="$RC" # Let the user override the test.
22452else
22453  ac_prog_rejected=no
22454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22455for as_dir in $PATH
22456do
22457  IFS=$as_save_IFS
22458  test -z "$as_dir" && as_dir=.
22459    for ac_exec_ext in '' $ac_executable_extensions; do
22460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22461    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22462       ac_prog_rejected=yes
22463       continue
22464     fi
22465    ac_cv_prog_RC="rc"
22466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22467    break 2
22468  fi
22469done
22470  done
22471IFS=$as_save_IFS
22472
22473if test $ac_prog_rejected = yes; then
22474  # We found a bogon in the path, so make sure we never use it.
22475  set dummy $ac_cv_prog_RC
22476  shift
22477  if test $# != 0; then
22478    # We chose a different compiler from the bogus one.
22479    # However, it has the same basename, so the bogon will be chosen
22480    # first if we set RC to just the basename; use the full file name.
22481    shift
22482    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22483  fi
22484fi
22485fi
22486fi
22487RC=$ac_cv_prog_RC
22488if test -n "$RC"; then
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22490$as_echo "$RC" >&6; }
22491else
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22493$as_echo "no" >&6; }
22494fi
22495
22496
22497
22498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22499
22500  # First separate the path from the arguments. This will split at the first
22501  # space.
22502  complete="$RC"
22503  path="${complete%% *}"
22504  tmp="$complete EOL"
22505  arguments="${tmp#* }"
22506
22507  # Input might be given as Windows format, start by converting to
22508  # unix format.
22509  new_path=`$CYGPATH -u "$path"`
22510
22511  # Now try to locate executable using which
22512  new_path=`$WHICH "$new_path" 2> /dev/null`
22513  # bat and cmd files are not always considered executable in cygwin causing which
22514  # to not find them
22515  if test "x$new_path" = x \
22516           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22517           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22518    new_path=`$CYGPATH -u "$path"`
22519  fi
22520  if test "x$new_path" = x; then
22521    # Oops. Which didn't find the executable.
22522    # The splitting of arguments from the executable at a space might have been incorrect,
22523    # since paths with space are more likely in Windows. Give it another try with the whole
22524    # argument.
22525    path="$complete"
22526    arguments="EOL"
22527    new_path=`$CYGPATH -u "$path"`
22528    new_path=`$WHICH "$new_path" 2> /dev/null`
22529    # bat and cmd files are not always considered executable in cygwin causing which
22530    # to not find them
22531    if test "x$new_path" = x \
22532             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22533             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22534      new_path=`$CYGPATH -u "$path"`
22535    fi
22536    if test "x$new_path" = x; then
22537      # It's still not found. Now this is an unrecoverable error.
22538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22539$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22540      has_space=`$ECHO "$complete" | $GREP " "`
22541      if test "x$has_space" != x; then
22542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22544      fi
22545      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22546    fi
22547  fi
22548
22549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22552  # "foo.exe" is OK but "foo" is an error.
22553  #
22554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22555  # It is also a way to make sure we got the proper file name for the real test later on.
22556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22557  if test "x$test_shortpath" = x; then
22558    # Short path failed, file does not exist as specified.
22559    # Try adding .exe or .cmd
22560    if test -f "${new_path}.exe"; then
22561       input_to_shortpath="${new_path}.exe"
22562    elif test -f "${new_path}.cmd"; then
22563       input_to_shortpath="${new_path}.cmd"
22564    else
22565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22566$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22569      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22570    fi
22571  else
22572    input_to_shortpath="$new_path"
22573  fi
22574
22575  # Call helper function which possibly converts this using DOS-style short mode.
22576  # If so, the updated path is stored in $new_path.
22577  new_path="$input_to_shortpath"
22578
22579  input_path="$input_to_shortpath"
22580  # Check if we need to convert this using DOS-style short mode. If the path
22581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22582  # take no chances and rewrite it.
22583  # Note: m4 eats our [], so we need to use [ and ] instead.
22584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22585  if test "x$has_forbidden_chars" != x; then
22586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22590      # Going to short mode and back again did indeed matter. Since short mode is
22591      # case insensitive, let's make it lowercase to improve readability.
22592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22593      # Now convert it back to Unix-stile (cygpath)
22594      input_path=`$CYGPATH -u "$shortmode_path"`
22595      new_path="$input_path"
22596    fi
22597  fi
22598
22599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22600  if test "x$test_cygdrive_prefix" = x; then
22601    # As a simple fix, exclude /usr/bin since it's not a real path.
22602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22604      # a path prefixed by /cygdrive for fixpath to work.
22605      new_path="$CYGWIN_ROOT_PATH$input_path"
22606    fi
22607  fi
22608
22609  # remove trailing .exe if any
22610  new_path="${new_path/%.exe/}"
22611
22612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22613
22614  # First separate the path from the arguments. This will split at the first
22615  # space.
22616  complete="$RC"
22617  path="${complete%% *}"
22618  tmp="$complete EOL"
22619  arguments="${tmp#* }"
22620
22621  # Input might be given as Windows format, start by converting to
22622  # unix format.
22623  new_path="$path"
22624
22625  windows_path="$new_path"
22626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22627    unix_path=`$CYGPATH -u "$windows_path"`
22628    new_path="$unix_path"
22629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22631    new_path="$unix_path"
22632  fi
22633
22634
22635  # Now try to locate executable using which
22636  new_path=`$WHICH "$new_path" 2> /dev/null`
22637
22638  if test "x$new_path" = x; then
22639    # Oops. Which didn't find the executable.
22640    # The splitting of arguments from the executable at a space might have been incorrect,
22641    # since paths with space are more likely in Windows. Give it another try with the whole
22642    # argument.
22643    path="$complete"
22644    arguments="EOL"
22645    new_path="$path"
22646
22647  windows_path="$new_path"
22648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22649    unix_path=`$CYGPATH -u "$windows_path"`
22650    new_path="$unix_path"
22651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22653    new_path="$unix_path"
22654  fi
22655
22656
22657    new_path=`$WHICH "$new_path" 2> /dev/null`
22658
22659    if test "x$new_path" = x; then
22660      # It's still not found. Now this is an unrecoverable error.
22661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22662$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22663      has_space=`$ECHO "$complete" | $GREP " "`
22664      if test "x$has_space" != x; then
22665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22667      fi
22668      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22669    fi
22670  fi
22671
22672  # Now new_path has a complete unix path to the binary
22673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22674    # Keep paths in /bin as-is, but remove trailing .exe if any
22675    new_path="${new_path/%.exe/}"
22676    # Do not save /bin paths to all_fixpath_prefixes!
22677  else
22678    # Not in mixed or Windows style, start by that.
22679    new_path=`cmd //c echo $new_path`
22680
22681  input_path="$new_path"
22682  # Check if we need to convert this using DOS-style short mode. If the path
22683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22684  # take no chances and rewrite it.
22685  # Note: m4 eats our [], so we need to use [ and ] instead.
22686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22687  if test "x$has_forbidden_chars" != x; then
22688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22690  fi
22691
22692    # Output is in $new_path
22693
22694  windows_path="$new_path"
22695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22696    unix_path=`$CYGPATH -u "$windows_path"`
22697    new_path="$unix_path"
22698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22700    new_path="$unix_path"
22701  fi
22702
22703    # remove trailing .exe if any
22704    new_path="${new_path/%.exe/}"
22705
22706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22708  fi
22709
22710  else
22711    # We're on a posix platform. Hooray! :)
22712    # First separate the path from the arguments. This will split at the first
22713    # space.
22714    complete="$RC"
22715    path="${complete%% *}"
22716    tmp="$complete EOL"
22717    arguments="${tmp#* }"
22718
22719    # Cannot rely on the command "which" here since it doesn't always work.
22720    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22721    if test -z "$is_absolute_path"; then
22722      # Path to executable is not absolute. Find it.
22723      IFS_save="$IFS"
22724      IFS=:
22725      for p in $PATH; do
22726        if test -f "$p/$path" && test -x "$p/$path"; then
22727          new_path="$p/$path"
22728          break
22729        fi
22730      done
22731      IFS="$IFS_save"
22732    else
22733      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22734$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22735      new_path="$path"
22736    fi
22737
22738    if test "x$new_path" = x; then
22739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22740$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22741        has_space=`$ECHO "$complete" | $GREP " "`
22742        if test "x$has_space" != x; then
22743          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22744$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22745        fi
22746        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22747      fi
22748  fi
22749
22750      # Now join together the path and the arguments once again
22751      if test "x$arguments" != xEOL; then
22752        new_complete="$new_path ${arguments% *}"
22753      else
22754        new_complete="$new_path"
22755      fi
22756
22757  if test "x$complete" != "x$new_complete"; then
22758      RC="$new_complete"
22759      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22760$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22761    fi
22762
22763
22764    # For hotspot, we need these in Windows mixed path,
22765    # so rewrite them all. Need added .exe suffix.
22766    HOTSPOT_CXX="$CXX.exe"
22767    HOTSPOT_LD="$LD.exe"
22768    HOTSPOT_MT="$MT.exe"
22769    HOTSPOT_RC="$RC.exe"
22770
22771  unix_path="$HOTSPOT_CXX"
22772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22773    windows_path=`$CYGPATH -m "$unix_path"`
22774    HOTSPOT_CXX="$windows_path"
22775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22776    windows_path=`cmd //c echo $unix_path`
22777    HOTSPOT_CXX="$windows_path"
22778  fi
22779
22780
22781  unix_path="$HOTSPOT_LD"
22782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22783    windows_path=`$CYGPATH -m "$unix_path"`
22784    HOTSPOT_LD="$windows_path"
22785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22786    windows_path=`cmd //c echo $unix_path`
22787    HOTSPOT_LD="$windows_path"
22788  fi
22789
22790
22791  unix_path="$HOTSPOT_MT"
22792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22793    windows_path=`$CYGPATH -m "$unix_path"`
22794    HOTSPOT_MT="$windows_path"
22795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22796    windows_path=`cmd //c echo $unix_path`
22797    HOTSPOT_MT="$windows_path"
22798  fi
22799
22800
22801  unix_path="$HOTSPOT_RC"
22802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22803    windows_path=`$CYGPATH -m "$unix_path"`
22804    HOTSPOT_RC="$windows_path"
22805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22806    windows_path=`cmd //c echo $unix_path`
22807    HOTSPOT_RC="$windows_path"
22808  fi
22809
22810
22811
22812
22813    RC_FLAGS="-nologo -l 0x409 -r"
22814    if test "x$VARIANT" = xOPT; then :
22815
22816        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22817
22818fi
22819    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22820    if test "x$JDK_UPDATE_VERSION" = x; then :
22821
22822        JDK_UPDATE_VERSION_NOTNULL=0
22823
22824fi
22825    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22826    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22827    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22828    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22829    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22830    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22831    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22832
22833    # lib.exe is used to create static libraries.
22834    # Extract the first word of "lib", so it can be a program name with args.
22835set dummy lib; ac_word=$2
22836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22837$as_echo_n "checking for $ac_word... " >&6; }
22838if ${ac_cv_prog_WINAR+:} false; then :
22839  $as_echo_n "(cached) " >&6
22840else
22841  if test -n "$WINAR"; then
22842  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22843else
22844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22845for as_dir in $PATH
22846do
22847  IFS=$as_save_IFS
22848  test -z "$as_dir" && as_dir=.
22849    for ac_exec_ext in '' $ac_executable_extensions; do
22850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22851    ac_cv_prog_WINAR="lib"
22852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22853    break 2
22854  fi
22855done
22856  done
22857IFS=$as_save_IFS
22858
22859fi
22860fi
22861WINAR=$ac_cv_prog_WINAR
22862if test -n "$WINAR"; then
22863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22864$as_echo "$WINAR" >&6; }
22865else
22866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22867$as_echo "no" >&6; }
22868fi
22869
22870
22871
22872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22873
22874  # First separate the path from the arguments. This will split at the first
22875  # space.
22876  complete="$WINAR"
22877  path="${complete%% *}"
22878  tmp="$complete EOL"
22879  arguments="${tmp#* }"
22880
22881  # Input might be given as Windows format, start by converting to
22882  # unix format.
22883  new_path=`$CYGPATH -u "$path"`
22884
22885  # Now try to locate executable using which
22886  new_path=`$WHICH "$new_path" 2> /dev/null`
22887  # bat and cmd files are not always considered executable in cygwin causing which
22888  # to not find them
22889  if test "x$new_path" = x \
22890           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22891           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22892    new_path=`$CYGPATH -u "$path"`
22893  fi
22894  if test "x$new_path" = x; then
22895    # Oops. Which didn't find the executable.
22896    # The splitting of arguments from the executable at a space might have been incorrect,
22897    # since paths with space are more likely in Windows. Give it another try with the whole
22898    # argument.
22899    path="$complete"
22900    arguments="EOL"
22901    new_path=`$CYGPATH -u "$path"`
22902    new_path=`$WHICH "$new_path" 2> /dev/null`
22903    # bat and cmd files are not always considered executable in cygwin causing which
22904    # to not find them
22905    if test "x$new_path" = x \
22906             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22907             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22908      new_path=`$CYGPATH -u "$path"`
22909    fi
22910    if test "x$new_path" = x; then
22911      # It's still not found. Now this is an unrecoverable error.
22912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22913$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22914      has_space=`$ECHO "$complete" | $GREP " "`
22915      if test "x$has_space" != x; then
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22918      fi
22919      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22920    fi
22921  fi
22922
22923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22926  # "foo.exe" is OK but "foo" is an error.
22927  #
22928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22929  # It is also a way to make sure we got the proper file name for the real test later on.
22930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22931  if test "x$test_shortpath" = x; then
22932    # Short path failed, file does not exist as specified.
22933    # Try adding .exe or .cmd
22934    if test -f "${new_path}.exe"; then
22935       input_to_shortpath="${new_path}.exe"
22936    elif test -f "${new_path}.cmd"; then
22937       input_to_shortpath="${new_path}.cmd"
22938    else
22939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22940$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22943      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22944    fi
22945  else
22946    input_to_shortpath="$new_path"
22947  fi
22948
22949  # Call helper function which possibly converts this using DOS-style short mode.
22950  # If so, the updated path is stored in $new_path.
22951  new_path="$input_to_shortpath"
22952
22953  input_path="$input_to_shortpath"
22954  # Check if we need to convert this using DOS-style short mode. If the path
22955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22956  # take no chances and rewrite it.
22957  # Note: m4 eats our [], so we need to use [ and ] instead.
22958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22959  if test "x$has_forbidden_chars" != x; then
22960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22964      # Going to short mode and back again did indeed matter. Since short mode is
22965      # case insensitive, let's make it lowercase to improve readability.
22966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22967      # Now convert it back to Unix-stile (cygpath)
22968      input_path=`$CYGPATH -u "$shortmode_path"`
22969      new_path="$input_path"
22970    fi
22971  fi
22972
22973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22974  if test "x$test_cygdrive_prefix" = x; then
22975    # As a simple fix, exclude /usr/bin since it's not a real path.
22976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22978      # a path prefixed by /cygdrive for fixpath to work.
22979      new_path="$CYGWIN_ROOT_PATH$input_path"
22980    fi
22981  fi
22982
22983  # remove trailing .exe if any
22984  new_path="${new_path/%.exe/}"
22985
22986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22987
22988  # First separate the path from the arguments. This will split at the first
22989  # space.
22990  complete="$WINAR"
22991  path="${complete%% *}"
22992  tmp="$complete EOL"
22993  arguments="${tmp#* }"
22994
22995  # Input might be given as Windows format, start by converting to
22996  # unix format.
22997  new_path="$path"
22998
22999  windows_path="$new_path"
23000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23001    unix_path=`$CYGPATH -u "$windows_path"`
23002    new_path="$unix_path"
23003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23005    new_path="$unix_path"
23006  fi
23007
23008
23009  # Now try to locate executable using which
23010  new_path=`$WHICH "$new_path" 2> /dev/null`
23011
23012  if test "x$new_path" = x; then
23013    # Oops. Which didn't find the executable.
23014    # The splitting of arguments from the executable at a space might have been incorrect,
23015    # since paths with space are more likely in Windows. Give it another try with the whole
23016    # argument.
23017    path="$complete"
23018    arguments="EOL"
23019    new_path="$path"
23020
23021  windows_path="$new_path"
23022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23023    unix_path=`$CYGPATH -u "$windows_path"`
23024    new_path="$unix_path"
23025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23027    new_path="$unix_path"
23028  fi
23029
23030
23031    new_path=`$WHICH "$new_path" 2> /dev/null`
23032
23033    if test "x$new_path" = x; then
23034      # It's still not found. Now this is an unrecoverable error.
23035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23036$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23037      has_space=`$ECHO "$complete" | $GREP " "`
23038      if test "x$has_space" != x; then
23039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23041      fi
23042      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23043    fi
23044  fi
23045
23046  # Now new_path has a complete unix path to the binary
23047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23048    # Keep paths in /bin as-is, but remove trailing .exe if any
23049    new_path="${new_path/%.exe/}"
23050    # Do not save /bin paths to all_fixpath_prefixes!
23051  else
23052    # Not in mixed or Windows style, start by that.
23053    new_path=`cmd //c echo $new_path`
23054
23055  input_path="$new_path"
23056  # Check if we need to convert this using DOS-style short mode. If the path
23057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23058  # take no chances and rewrite it.
23059  # Note: m4 eats our [], so we need to use [ and ] instead.
23060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23061  if test "x$has_forbidden_chars" != x; then
23062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23064  fi
23065
23066    # Output is in $new_path
23067
23068  windows_path="$new_path"
23069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23070    unix_path=`$CYGPATH -u "$windows_path"`
23071    new_path="$unix_path"
23072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23074    new_path="$unix_path"
23075  fi
23076
23077    # remove trailing .exe if any
23078    new_path="${new_path/%.exe/}"
23079
23080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23082  fi
23083
23084  else
23085    # We're on a posix platform. Hooray! :)
23086    # First separate the path from the arguments. This will split at the first
23087    # space.
23088    complete="$WINAR"
23089    path="${complete%% *}"
23090    tmp="$complete EOL"
23091    arguments="${tmp#* }"
23092
23093    # Cannot rely on the command "which" here since it doesn't always work.
23094    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23095    if test -z "$is_absolute_path"; then
23096      # Path to executable is not absolute. Find it.
23097      IFS_save="$IFS"
23098      IFS=:
23099      for p in $PATH; do
23100        if test -f "$p/$path" && test -x "$p/$path"; then
23101          new_path="$p/$path"
23102          break
23103        fi
23104      done
23105      IFS="$IFS_save"
23106    else
23107      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23108$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23109      new_path="$path"
23110    fi
23111
23112    if test "x$new_path" = x; then
23113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23114$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23115        has_space=`$ECHO "$complete" | $GREP " "`
23116        if test "x$has_space" != x; then
23117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23119        fi
23120        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23121      fi
23122  fi
23123
23124      # Now join together the path and the arguments once again
23125      if test "x$arguments" != xEOL; then
23126        new_complete="$new_path ${arguments% *}"
23127      else
23128        new_complete="$new_path"
23129      fi
23130
23131  if test "x$complete" != "x$new_complete"; then
23132      WINAR="$new_complete"
23133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23134$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23135    fi
23136
23137    AR="$WINAR"
23138    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23139
23140    # Extract the first word of "dumpbin", so it can be a program name with args.
23141set dummy dumpbin; ac_word=$2
23142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23143$as_echo_n "checking for $ac_word... " >&6; }
23144if ${ac_cv_prog_DUMPBIN+:} false; then :
23145  $as_echo_n "(cached) " >&6
23146else
23147  if test -n "$DUMPBIN"; then
23148  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23149else
23150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23151for as_dir in $PATH
23152do
23153  IFS=$as_save_IFS
23154  test -z "$as_dir" && as_dir=.
23155    for ac_exec_ext in '' $ac_executable_extensions; do
23156  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23157    ac_cv_prog_DUMPBIN="dumpbin"
23158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23159    break 2
23160  fi
23161done
23162  done
23163IFS=$as_save_IFS
23164
23165fi
23166fi
23167DUMPBIN=$ac_cv_prog_DUMPBIN
23168if test -n "$DUMPBIN"; then
23169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23170$as_echo "$DUMPBIN" >&6; }
23171else
23172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23173$as_echo "no" >&6; }
23174fi
23175
23176
23177
23178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23179
23180  # First separate the path from the arguments. This will split at the first
23181  # space.
23182  complete="$DUMPBIN"
23183  path="${complete%% *}"
23184  tmp="$complete EOL"
23185  arguments="${tmp#* }"
23186
23187  # Input might be given as Windows format, start by converting to
23188  # unix format.
23189  new_path=`$CYGPATH -u "$path"`
23190
23191  # Now try to locate executable using which
23192  new_path=`$WHICH "$new_path" 2> /dev/null`
23193  # bat and cmd files are not always considered executable in cygwin causing which
23194  # to not find them
23195  if test "x$new_path" = x \
23196           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23197           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23198    new_path=`$CYGPATH -u "$path"`
23199  fi
23200  if test "x$new_path" = x; then
23201    # Oops. Which didn't find the executable.
23202    # The splitting of arguments from the executable at a space might have been incorrect,
23203    # since paths with space are more likely in Windows. Give it another try with the whole
23204    # argument.
23205    path="$complete"
23206    arguments="EOL"
23207    new_path=`$CYGPATH -u "$path"`
23208    new_path=`$WHICH "$new_path" 2> /dev/null`
23209    # bat and cmd files are not always considered executable in cygwin causing which
23210    # to not find them
23211    if test "x$new_path" = x \
23212             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23213             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23214      new_path=`$CYGPATH -u "$path"`
23215    fi
23216    if test "x$new_path" = x; then
23217      # It's still not found. Now this is an unrecoverable error.
23218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23219$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23220      has_space=`$ECHO "$complete" | $GREP " "`
23221      if test "x$has_space" != x; then
23222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23224      fi
23225      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23226    fi
23227  fi
23228
23229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23232  # "foo.exe" is OK but "foo" is an error.
23233  #
23234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23235  # It is also a way to make sure we got the proper file name for the real test later on.
23236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23237  if test "x$test_shortpath" = x; then
23238    # Short path failed, file does not exist as specified.
23239    # Try adding .exe or .cmd
23240    if test -f "${new_path}.exe"; then
23241       input_to_shortpath="${new_path}.exe"
23242    elif test -f "${new_path}.cmd"; then
23243       input_to_shortpath="${new_path}.cmd"
23244    else
23245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23246$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23249      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23250    fi
23251  else
23252    input_to_shortpath="$new_path"
23253  fi
23254
23255  # Call helper function which possibly converts this using DOS-style short mode.
23256  # If so, the updated path is stored in $new_path.
23257  new_path="$input_to_shortpath"
23258
23259  input_path="$input_to_shortpath"
23260  # Check if we need to convert this using DOS-style short mode. If the path
23261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23262  # take no chances and rewrite it.
23263  # Note: m4 eats our [], so we need to use [ and ] instead.
23264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23265  if test "x$has_forbidden_chars" != x; then
23266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23270      # Going to short mode and back again did indeed matter. Since short mode is
23271      # case insensitive, let's make it lowercase to improve readability.
23272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23273      # Now convert it back to Unix-stile (cygpath)
23274      input_path=`$CYGPATH -u "$shortmode_path"`
23275      new_path="$input_path"
23276    fi
23277  fi
23278
23279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23280  if test "x$test_cygdrive_prefix" = x; then
23281    # As a simple fix, exclude /usr/bin since it's not a real path.
23282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23284      # a path prefixed by /cygdrive for fixpath to work.
23285      new_path="$CYGWIN_ROOT_PATH$input_path"
23286    fi
23287  fi
23288
23289  # remove trailing .exe if any
23290  new_path="${new_path/%.exe/}"
23291
23292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23293
23294  # First separate the path from the arguments. This will split at the first
23295  # space.
23296  complete="$DUMPBIN"
23297  path="${complete%% *}"
23298  tmp="$complete EOL"
23299  arguments="${tmp#* }"
23300
23301  # Input might be given as Windows format, start by converting to
23302  # unix format.
23303  new_path="$path"
23304
23305  windows_path="$new_path"
23306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23307    unix_path=`$CYGPATH -u "$windows_path"`
23308    new_path="$unix_path"
23309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23311    new_path="$unix_path"
23312  fi
23313
23314
23315  # Now try to locate executable using which
23316  new_path=`$WHICH "$new_path" 2> /dev/null`
23317
23318  if test "x$new_path" = x; then
23319    # Oops. Which didn't find the executable.
23320    # The splitting of arguments from the executable at a space might have been incorrect,
23321    # since paths with space are more likely in Windows. Give it another try with the whole
23322    # argument.
23323    path="$complete"
23324    arguments="EOL"
23325    new_path="$path"
23326
23327  windows_path="$new_path"
23328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23329    unix_path=`$CYGPATH -u "$windows_path"`
23330    new_path="$unix_path"
23331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23333    new_path="$unix_path"
23334  fi
23335
23336
23337    new_path=`$WHICH "$new_path" 2> /dev/null`
23338
23339    if test "x$new_path" = x; then
23340      # It's still not found. Now this is an unrecoverable error.
23341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23342$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23343      has_space=`$ECHO "$complete" | $GREP " "`
23344      if test "x$has_space" != x; then
23345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23347      fi
23348      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23349    fi
23350  fi
23351
23352  # Now new_path has a complete unix path to the binary
23353  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23354    # Keep paths in /bin as-is, but remove trailing .exe if any
23355    new_path="${new_path/%.exe/}"
23356    # Do not save /bin paths to all_fixpath_prefixes!
23357  else
23358    # Not in mixed or Windows style, start by that.
23359    new_path=`cmd //c echo $new_path`
23360
23361  input_path="$new_path"
23362  # Check if we need to convert this using DOS-style short mode. If the path
23363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23364  # take no chances and rewrite it.
23365  # Note: m4 eats our [], so we need to use [ and ] instead.
23366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23367  if test "x$has_forbidden_chars" != x; then
23368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23370  fi
23371
23372    # Output is in $new_path
23373
23374  windows_path="$new_path"
23375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23376    unix_path=`$CYGPATH -u "$windows_path"`
23377    new_path="$unix_path"
23378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23380    new_path="$unix_path"
23381  fi
23382
23383    # remove trailing .exe if any
23384    new_path="${new_path/%.exe/}"
23385
23386    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23387    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23388  fi
23389
23390  else
23391    # We're on a posix platform. Hooray! :)
23392    # First separate the path from the arguments. This will split at the first
23393    # space.
23394    complete="$DUMPBIN"
23395    path="${complete%% *}"
23396    tmp="$complete EOL"
23397    arguments="${tmp#* }"
23398
23399    # Cannot rely on the command "which" here since it doesn't always work.
23400    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23401    if test -z "$is_absolute_path"; then
23402      # Path to executable is not absolute. Find it.
23403      IFS_save="$IFS"
23404      IFS=:
23405      for p in $PATH; do
23406        if test -f "$p/$path" && test -x "$p/$path"; then
23407          new_path="$p/$path"
23408          break
23409        fi
23410      done
23411      IFS="$IFS_save"
23412    else
23413      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23414$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23415      new_path="$path"
23416    fi
23417
23418    if test "x$new_path" = x; then
23419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23420$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23421        has_space=`$ECHO "$complete" | $GREP " "`
23422        if test "x$has_space" != x; then
23423          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23424$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23425        fi
23426        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23427      fi
23428  fi
23429
23430      # Now join together the path and the arguments once again
23431      if test "x$arguments" != xEOL; then
23432        new_complete="$new_path ${arguments% *}"
23433      else
23434        new_complete="$new_path"
23435      fi
23436
23437  if test "x$complete" != "x$new_complete"; then
23438      DUMPBIN="$new_complete"
23439      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23440$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23441    fi
23442
23443
23444    COMPILER_TYPE=CL
23445    CCXXFLAGS="$CCXXFLAGS -nologo"
23446
23447fi
23448
23449
23450
23451ac_ext=c
23452ac_cpp='$CPP $CPPFLAGS'
23453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23455ac_compiler_gnu=$ac_cv_c_compiler_gnu
23456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23457$as_echo_n "checking how to run the C preprocessor... " >&6; }
23458# On Suns, sometimes $CPP names a directory.
23459if test -n "$CPP" && test -d "$CPP"; then
23460  CPP=
23461fi
23462if test -z "$CPP"; then
23463  if ${ac_cv_prog_CPP+:} false; then :
23464  $as_echo_n "(cached) " >&6
23465else
23466      # Double quotes because CPP needs to be expanded
23467    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23468    do
23469      ac_preproc_ok=false
23470for ac_c_preproc_warn_flag in '' yes
23471do
23472  # Use a header file that comes with gcc, so configuring glibc
23473  # with a fresh cross-compiler works.
23474  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23475  # <limits.h> exists even on freestanding compilers.
23476  # On the NeXT, cc -E runs the code through the compiler's parser,
23477  # not just through cpp. "Syntax error" is here to catch this case.
23478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23479/* end confdefs.h.  */
23480#ifdef __STDC__
23481# include <limits.h>
23482#else
23483# include <assert.h>
23484#endif
23485		     Syntax error
23486_ACEOF
23487if ac_fn_c_try_cpp "$LINENO"; then :
23488
23489else
23490  # Broken: fails on valid input.
23491continue
23492fi
23493rm -f conftest.err conftest.i conftest.$ac_ext
23494
23495  # OK, works on sane cases.  Now check whether nonexistent headers
23496  # can be detected and how.
23497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23498/* end confdefs.h.  */
23499#include <ac_nonexistent.h>
23500_ACEOF
23501if ac_fn_c_try_cpp "$LINENO"; then :
23502  # Broken: success on invalid input.
23503continue
23504else
23505  # Passes both tests.
23506ac_preproc_ok=:
23507break
23508fi
23509rm -f conftest.err conftest.i conftest.$ac_ext
23510
23511done
23512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23513rm -f conftest.i conftest.err conftest.$ac_ext
23514if $ac_preproc_ok; then :
23515  break
23516fi
23517
23518    done
23519    ac_cv_prog_CPP=$CPP
23520
23521fi
23522  CPP=$ac_cv_prog_CPP
23523else
23524  ac_cv_prog_CPP=$CPP
23525fi
23526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23527$as_echo "$CPP" >&6; }
23528ac_preproc_ok=false
23529for ac_c_preproc_warn_flag in '' yes
23530do
23531  # Use a header file that comes with gcc, so configuring glibc
23532  # with a fresh cross-compiler works.
23533  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23534  # <limits.h> exists even on freestanding compilers.
23535  # On the NeXT, cc -E runs the code through the compiler's parser,
23536  # not just through cpp. "Syntax error" is here to catch this case.
23537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23538/* end confdefs.h.  */
23539#ifdef __STDC__
23540# include <limits.h>
23541#else
23542# include <assert.h>
23543#endif
23544		     Syntax error
23545_ACEOF
23546if ac_fn_c_try_cpp "$LINENO"; then :
23547
23548else
23549  # Broken: fails on valid input.
23550continue
23551fi
23552rm -f conftest.err conftest.i conftest.$ac_ext
23553
23554  # OK, works on sane cases.  Now check whether nonexistent headers
23555  # can be detected and how.
23556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23557/* end confdefs.h.  */
23558#include <ac_nonexistent.h>
23559_ACEOF
23560if ac_fn_c_try_cpp "$LINENO"; then :
23561  # Broken: success on invalid input.
23562continue
23563else
23564  # Passes both tests.
23565ac_preproc_ok=:
23566break
23567fi
23568rm -f conftest.err conftest.i conftest.$ac_ext
23569
23570done
23571# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23572rm -f conftest.i conftest.err conftest.$ac_ext
23573if $ac_preproc_ok; then :
23574
23575else
23576  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23578as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23579See \`config.log' for more details" "$LINENO" 5; }
23580fi
23581
23582ac_ext=cpp
23583ac_cpp='$CXXCPP $CPPFLAGS'
23584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23587
23588
23589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23590
23591  # First separate the path from the arguments. This will split at the first
23592  # space.
23593  complete="$CPP"
23594  path="${complete%% *}"
23595  tmp="$complete EOL"
23596  arguments="${tmp#* }"
23597
23598  # Input might be given as Windows format, start by converting to
23599  # unix format.
23600  new_path=`$CYGPATH -u "$path"`
23601
23602  # Now try to locate executable using which
23603  new_path=`$WHICH "$new_path" 2> /dev/null`
23604  # bat and cmd files are not always considered executable in cygwin causing which
23605  # to not find them
23606  if test "x$new_path" = x \
23607           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23608           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23609    new_path=`$CYGPATH -u "$path"`
23610  fi
23611  if test "x$new_path" = x; then
23612    # Oops. Which didn't find the executable.
23613    # The splitting of arguments from the executable at a space might have been incorrect,
23614    # since paths with space are more likely in Windows. Give it another try with the whole
23615    # argument.
23616    path="$complete"
23617    arguments="EOL"
23618    new_path=`$CYGPATH -u "$path"`
23619    new_path=`$WHICH "$new_path" 2> /dev/null`
23620    # bat and cmd files are not always considered executable in cygwin causing which
23621    # to not find them
23622    if test "x$new_path" = x \
23623             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23624             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23625      new_path=`$CYGPATH -u "$path"`
23626    fi
23627    if test "x$new_path" = x; then
23628      # It's still not found. Now this is an unrecoverable error.
23629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23630$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23631      has_space=`$ECHO "$complete" | $GREP " "`
23632      if test "x$has_space" != x; then
23633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23635      fi
23636      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23637    fi
23638  fi
23639
23640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23643  # "foo.exe" is OK but "foo" is an error.
23644  #
23645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23646  # It is also a way to make sure we got the proper file name for the real test later on.
23647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23648  if test "x$test_shortpath" = x; then
23649    # Short path failed, file does not exist as specified.
23650    # Try adding .exe or .cmd
23651    if test -f "${new_path}.exe"; then
23652       input_to_shortpath="${new_path}.exe"
23653    elif test -f "${new_path}.cmd"; then
23654       input_to_shortpath="${new_path}.cmd"
23655    else
23656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23657$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23661    fi
23662  else
23663    input_to_shortpath="$new_path"
23664  fi
23665
23666  # Call helper function which possibly converts this using DOS-style short mode.
23667  # If so, the updated path is stored in $new_path.
23668  new_path="$input_to_shortpath"
23669
23670  input_path="$input_to_shortpath"
23671  # Check if we need to convert this using DOS-style short mode. If the path
23672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23673  # take no chances and rewrite it.
23674  # Note: m4 eats our [], so we need to use [ and ] instead.
23675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23676  if test "x$has_forbidden_chars" != x; then
23677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23681      # Going to short mode and back again did indeed matter. Since short mode is
23682      # case insensitive, let's make it lowercase to improve readability.
23683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23684      # Now convert it back to Unix-stile (cygpath)
23685      input_path=`$CYGPATH -u "$shortmode_path"`
23686      new_path="$input_path"
23687    fi
23688  fi
23689
23690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23691  if test "x$test_cygdrive_prefix" = x; then
23692    # As a simple fix, exclude /usr/bin since it's not a real path.
23693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23695      # a path prefixed by /cygdrive for fixpath to work.
23696      new_path="$CYGWIN_ROOT_PATH$input_path"
23697    fi
23698  fi
23699
23700  # remove trailing .exe if any
23701  new_path="${new_path/%.exe/}"
23702
23703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23704
23705  # First separate the path from the arguments. This will split at the first
23706  # space.
23707  complete="$CPP"
23708  path="${complete%% *}"
23709  tmp="$complete EOL"
23710  arguments="${tmp#* }"
23711
23712  # Input might be given as Windows format, start by converting to
23713  # unix format.
23714  new_path="$path"
23715
23716  windows_path="$new_path"
23717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23718    unix_path=`$CYGPATH -u "$windows_path"`
23719    new_path="$unix_path"
23720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23722    new_path="$unix_path"
23723  fi
23724
23725
23726  # Now try to locate executable using which
23727  new_path=`$WHICH "$new_path" 2> /dev/null`
23728
23729  if test "x$new_path" = x; then
23730    # Oops. Which didn't find the executable.
23731    # The splitting of arguments from the executable at a space might have been incorrect,
23732    # since paths with space are more likely in Windows. Give it another try with the whole
23733    # argument.
23734    path="$complete"
23735    arguments="EOL"
23736    new_path="$path"
23737
23738  windows_path="$new_path"
23739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23740    unix_path=`$CYGPATH -u "$windows_path"`
23741    new_path="$unix_path"
23742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23744    new_path="$unix_path"
23745  fi
23746
23747
23748    new_path=`$WHICH "$new_path" 2> /dev/null`
23749
23750    if test "x$new_path" = x; then
23751      # It's still not found. Now this is an unrecoverable error.
23752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23753$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23754      has_space=`$ECHO "$complete" | $GREP " "`
23755      if test "x$has_space" != x; then
23756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23758      fi
23759      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23760    fi
23761  fi
23762
23763  # Now new_path has a complete unix path to the binary
23764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23765    # Keep paths in /bin as-is, but remove trailing .exe if any
23766    new_path="${new_path/%.exe/}"
23767    # Do not save /bin paths to all_fixpath_prefixes!
23768  else
23769    # Not in mixed or Windows style, start by that.
23770    new_path=`cmd //c echo $new_path`
23771
23772  input_path="$new_path"
23773  # Check if we need to convert this using DOS-style short mode. If the path
23774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23775  # take no chances and rewrite it.
23776  # Note: m4 eats our [], so we need to use [ and ] instead.
23777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23778  if test "x$has_forbidden_chars" != x; then
23779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23781  fi
23782
23783    # Output is in $new_path
23784
23785  windows_path="$new_path"
23786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23787    unix_path=`$CYGPATH -u "$windows_path"`
23788    new_path="$unix_path"
23789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23791    new_path="$unix_path"
23792  fi
23793
23794    # remove trailing .exe if any
23795    new_path="${new_path/%.exe/}"
23796
23797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23799  fi
23800
23801  else
23802    # We're on a posix platform. Hooray! :)
23803    # First separate the path from the arguments. This will split at the first
23804    # space.
23805    complete="$CPP"
23806    path="${complete%% *}"
23807    tmp="$complete EOL"
23808    arguments="${tmp#* }"
23809
23810    # Cannot rely on the command "which" here since it doesn't always work.
23811    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23812    if test -z "$is_absolute_path"; then
23813      # Path to executable is not absolute. Find it.
23814      IFS_save="$IFS"
23815      IFS=:
23816      for p in $PATH; do
23817        if test -f "$p/$path" && test -x "$p/$path"; then
23818          new_path="$p/$path"
23819          break
23820        fi
23821      done
23822      IFS="$IFS_save"
23823    else
23824      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23825$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23826      new_path="$path"
23827    fi
23828
23829    if test "x$new_path" = x; then
23830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23831$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23832        has_space=`$ECHO "$complete" | $GREP " "`
23833        if test "x$has_space" != x; then
23834          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23836        fi
23837        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23838      fi
23839  fi
23840
23841      # Now join together the path and the arguments once again
23842      if test "x$arguments" != xEOL; then
23843        new_complete="$new_path ${arguments% *}"
23844      else
23845        new_complete="$new_path"
23846      fi
23847
23848  if test "x$complete" != "x$new_complete"; then
23849      CPP="$new_complete"
23850      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23851$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23852    fi
23853
23854
23855ac_ext=cpp
23856ac_cpp='$CXXCPP $CPPFLAGS'
23857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23861$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23862if test -z "$CXXCPP"; then
23863  if ${ac_cv_prog_CXXCPP+:} false; then :
23864  $as_echo_n "(cached) " >&6
23865else
23866      # Double quotes because CXXCPP needs to be expanded
23867    for CXXCPP in "$CXX -E" "/lib/cpp"
23868    do
23869      ac_preproc_ok=false
23870for ac_cxx_preproc_warn_flag in '' yes
23871do
23872  # Use a header file that comes with gcc, so configuring glibc
23873  # with a fresh cross-compiler works.
23874  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23875  # <limits.h> exists even on freestanding compilers.
23876  # On the NeXT, cc -E runs the code through the compiler's parser,
23877  # not just through cpp. "Syntax error" is here to catch this case.
23878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23879/* end confdefs.h.  */
23880#ifdef __STDC__
23881# include <limits.h>
23882#else
23883# include <assert.h>
23884#endif
23885		     Syntax error
23886_ACEOF
23887if ac_fn_cxx_try_cpp "$LINENO"; then :
23888
23889else
23890  # Broken: fails on valid input.
23891continue
23892fi
23893rm -f conftest.err conftest.i conftest.$ac_ext
23894
23895  # OK, works on sane cases.  Now check whether nonexistent headers
23896  # can be detected and how.
23897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23898/* end confdefs.h.  */
23899#include <ac_nonexistent.h>
23900_ACEOF
23901if ac_fn_cxx_try_cpp "$LINENO"; then :
23902  # Broken: success on invalid input.
23903continue
23904else
23905  # Passes both tests.
23906ac_preproc_ok=:
23907break
23908fi
23909rm -f conftest.err conftest.i conftest.$ac_ext
23910
23911done
23912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23913rm -f conftest.i conftest.err conftest.$ac_ext
23914if $ac_preproc_ok; then :
23915  break
23916fi
23917
23918    done
23919    ac_cv_prog_CXXCPP=$CXXCPP
23920
23921fi
23922  CXXCPP=$ac_cv_prog_CXXCPP
23923else
23924  ac_cv_prog_CXXCPP=$CXXCPP
23925fi
23926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23927$as_echo "$CXXCPP" >&6; }
23928ac_preproc_ok=false
23929for ac_cxx_preproc_warn_flag in '' yes
23930do
23931  # Use a header file that comes with gcc, so configuring glibc
23932  # with a fresh cross-compiler works.
23933  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23934  # <limits.h> exists even on freestanding compilers.
23935  # On the NeXT, cc -E runs the code through the compiler's parser,
23936  # not just through cpp. "Syntax error" is here to catch this case.
23937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23938/* end confdefs.h.  */
23939#ifdef __STDC__
23940# include <limits.h>
23941#else
23942# include <assert.h>
23943#endif
23944		     Syntax error
23945_ACEOF
23946if ac_fn_cxx_try_cpp "$LINENO"; then :
23947
23948else
23949  # Broken: fails on valid input.
23950continue
23951fi
23952rm -f conftest.err conftest.i conftest.$ac_ext
23953
23954  # OK, works on sane cases.  Now check whether nonexistent headers
23955  # can be detected and how.
23956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23957/* end confdefs.h.  */
23958#include <ac_nonexistent.h>
23959_ACEOF
23960if ac_fn_cxx_try_cpp "$LINENO"; then :
23961  # Broken: success on invalid input.
23962continue
23963else
23964  # Passes both tests.
23965ac_preproc_ok=:
23966break
23967fi
23968rm -f conftest.err conftest.i conftest.$ac_ext
23969
23970done
23971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23972rm -f conftest.i conftest.err conftest.$ac_ext
23973if $ac_preproc_ok; then :
23974
23975else
23976  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23978as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23979See \`config.log' for more details" "$LINENO" 5; }
23980fi
23981
23982ac_ext=cpp
23983ac_cpp='$CXXCPP $CPPFLAGS'
23984ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23985ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23986ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23987
23988
23989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23990
23991  # First separate the path from the arguments. This will split at the first
23992  # space.
23993  complete="$CXXCPP"
23994  path="${complete%% *}"
23995  tmp="$complete EOL"
23996  arguments="${tmp#* }"
23997
23998  # Input might be given as Windows format, start by converting to
23999  # unix format.
24000  new_path=`$CYGPATH -u "$path"`
24001
24002  # Now try to locate executable using which
24003  new_path=`$WHICH "$new_path" 2> /dev/null`
24004  # bat and cmd files are not always considered executable in cygwin causing which
24005  # to not find them
24006  if test "x$new_path" = x \
24007           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24008           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24009    new_path=`$CYGPATH -u "$path"`
24010  fi
24011  if test "x$new_path" = x; then
24012    # Oops. Which didn't find the executable.
24013    # The splitting of arguments from the executable at a space might have been incorrect,
24014    # since paths with space are more likely in Windows. Give it another try with the whole
24015    # argument.
24016    path="$complete"
24017    arguments="EOL"
24018    new_path=`$CYGPATH -u "$path"`
24019    new_path=`$WHICH "$new_path" 2> /dev/null`
24020    # bat and cmd files are not always considered executable in cygwin causing which
24021    # to not find them
24022    if test "x$new_path" = x \
24023             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24024             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24025      new_path=`$CYGPATH -u "$path"`
24026    fi
24027    if test "x$new_path" = x; then
24028      # It's still not found. Now this is an unrecoverable error.
24029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24030$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24031      has_space=`$ECHO "$complete" | $GREP " "`
24032      if test "x$has_space" != x; then
24033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24035      fi
24036      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24037    fi
24038  fi
24039
24040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24043  # "foo.exe" is OK but "foo" is an error.
24044  #
24045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24046  # It is also a way to make sure we got the proper file name for the real test later on.
24047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24048  if test "x$test_shortpath" = x; then
24049    # Short path failed, file does not exist as specified.
24050    # Try adding .exe or .cmd
24051    if test -f "${new_path}.exe"; then
24052       input_to_shortpath="${new_path}.exe"
24053    elif test -f "${new_path}.cmd"; then
24054       input_to_shortpath="${new_path}.cmd"
24055    else
24056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24057$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24060      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24061    fi
24062  else
24063    input_to_shortpath="$new_path"
24064  fi
24065
24066  # Call helper function which possibly converts this using DOS-style short mode.
24067  # If so, the updated path is stored in $new_path.
24068  new_path="$input_to_shortpath"
24069
24070  input_path="$input_to_shortpath"
24071  # Check if we need to convert this using DOS-style short mode. If the path
24072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24073  # take no chances and rewrite it.
24074  # Note: m4 eats our [], so we need to use [ and ] instead.
24075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24076  if test "x$has_forbidden_chars" != x; then
24077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24081      # Going to short mode and back again did indeed matter. Since short mode is
24082      # case insensitive, let's make it lowercase to improve readability.
24083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24084      # Now convert it back to Unix-stile (cygpath)
24085      input_path=`$CYGPATH -u "$shortmode_path"`
24086      new_path="$input_path"
24087    fi
24088  fi
24089
24090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24091  if test "x$test_cygdrive_prefix" = x; then
24092    # As a simple fix, exclude /usr/bin since it's not a real path.
24093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24095      # a path prefixed by /cygdrive for fixpath to work.
24096      new_path="$CYGWIN_ROOT_PATH$input_path"
24097    fi
24098  fi
24099
24100  # remove trailing .exe if any
24101  new_path="${new_path/%.exe/}"
24102
24103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24104
24105  # First separate the path from the arguments. This will split at the first
24106  # space.
24107  complete="$CXXCPP"
24108  path="${complete%% *}"
24109  tmp="$complete EOL"
24110  arguments="${tmp#* }"
24111
24112  # Input might be given as Windows format, start by converting to
24113  # unix format.
24114  new_path="$path"
24115
24116  windows_path="$new_path"
24117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24118    unix_path=`$CYGPATH -u "$windows_path"`
24119    new_path="$unix_path"
24120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24122    new_path="$unix_path"
24123  fi
24124
24125
24126  # Now try to locate executable using which
24127  new_path=`$WHICH "$new_path" 2> /dev/null`
24128
24129  if test "x$new_path" = x; then
24130    # Oops. Which didn't find the executable.
24131    # The splitting of arguments from the executable at a space might have been incorrect,
24132    # since paths with space are more likely in Windows. Give it another try with the whole
24133    # argument.
24134    path="$complete"
24135    arguments="EOL"
24136    new_path="$path"
24137
24138  windows_path="$new_path"
24139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24140    unix_path=`$CYGPATH -u "$windows_path"`
24141    new_path="$unix_path"
24142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24144    new_path="$unix_path"
24145  fi
24146
24147
24148    new_path=`$WHICH "$new_path" 2> /dev/null`
24149
24150    if test "x$new_path" = x; then
24151      # It's still not found. Now this is an unrecoverable error.
24152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24153$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24154      has_space=`$ECHO "$complete" | $GREP " "`
24155      if test "x$has_space" != x; then
24156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24158      fi
24159      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24160    fi
24161  fi
24162
24163  # Now new_path has a complete unix path to the binary
24164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24165    # Keep paths in /bin as-is, but remove trailing .exe if any
24166    new_path="${new_path/%.exe/}"
24167    # Do not save /bin paths to all_fixpath_prefixes!
24168  else
24169    # Not in mixed or Windows style, start by that.
24170    new_path=`cmd //c echo $new_path`
24171
24172  input_path="$new_path"
24173  # Check if we need to convert this using DOS-style short mode. If the path
24174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24175  # take no chances and rewrite it.
24176  # Note: m4 eats our [], so we need to use [ and ] instead.
24177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24178  if test "x$has_forbidden_chars" != x; then
24179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24181  fi
24182
24183    # Output is in $new_path
24184
24185  windows_path="$new_path"
24186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24187    unix_path=`$CYGPATH -u "$windows_path"`
24188    new_path="$unix_path"
24189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24191    new_path="$unix_path"
24192  fi
24193
24194    # remove trailing .exe if any
24195    new_path="${new_path/%.exe/}"
24196
24197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24199  fi
24200
24201  else
24202    # We're on a posix platform. Hooray! :)
24203    # First separate the path from the arguments. This will split at the first
24204    # space.
24205    complete="$CXXCPP"
24206    path="${complete%% *}"
24207    tmp="$complete EOL"
24208    arguments="${tmp#* }"
24209
24210    # Cannot rely on the command "which" here since it doesn't always work.
24211    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24212    if test -z "$is_absolute_path"; then
24213      # Path to executable is not absolute. Find it.
24214      IFS_save="$IFS"
24215      IFS=:
24216      for p in $PATH; do
24217        if test -f "$p/$path" && test -x "$p/$path"; then
24218          new_path="$p/$path"
24219          break
24220        fi
24221      done
24222      IFS="$IFS_save"
24223    else
24224      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24225$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24226      new_path="$path"
24227    fi
24228
24229    if test "x$new_path" = x; then
24230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24231$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24232        has_space=`$ECHO "$complete" | $GREP " "`
24233        if test "x$has_space" != x; then
24234          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24236        fi
24237        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24238      fi
24239  fi
24240
24241      # Now join together the path and the arguments once again
24242      if test "x$arguments" != xEOL; then
24243        new_complete="$new_path ${arguments% *}"
24244      else
24245        new_complete="$new_path"
24246      fi
24247
24248  if test "x$complete" != "x$new_complete"; then
24249      CXXCPP="$new_complete"
24250      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24251$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24252    fi
24253
24254
24255if test "x$COMPILE_TYPE" != "xcross"; then
24256    # If we are not cross compiling, use the same compilers for
24257    # building the build platform executables. The cross-compilation
24258    # case needed to be done earlier, but this can only be done after
24259    # the native tools have been localized.
24260    BUILD_CC="$CC"
24261    BUILD_CXX="$CXX"
24262    BUILD_LD="$LD"
24263fi
24264
24265# for solaris we really need solaris tools, and not gnu equivalent
24266#   these seems to normally reside in /usr/ccs/bin so add that to path before
24267#   starting to probe
24268#
24269#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24270#         so that it can be overriden --with-tools-dir
24271if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24272    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24273fi
24274
24275# Find the right assembler.
24276if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24277    # Extract the first word of "as", so it can be a program name with args.
24278set dummy as; ac_word=$2
24279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24280$as_echo_n "checking for $ac_word... " >&6; }
24281if ${ac_cv_path_AS+:} false; then :
24282  $as_echo_n "(cached) " >&6
24283else
24284  case $AS in
24285  [\\/]* | ?:[\\/]*)
24286  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24287  ;;
24288  *)
24289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24290for as_dir in $PATH
24291do
24292  IFS=$as_save_IFS
24293  test -z "$as_dir" && as_dir=.
24294    for ac_exec_ext in '' $ac_executable_extensions; do
24295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24296    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24298    break 2
24299  fi
24300done
24301  done
24302IFS=$as_save_IFS
24303
24304  ;;
24305esac
24306fi
24307AS=$ac_cv_path_AS
24308if test -n "$AS"; then
24309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24310$as_echo "$AS" >&6; }
24311else
24312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24313$as_echo "no" >&6; }
24314fi
24315
24316
24317
24318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24319
24320  # First separate the path from the arguments. This will split at the first
24321  # space.
24322  complete="$AS"
24323  path="${complete%% *}"
24324  tmp="$complete EOL"
24325  arguments="${tmp#* }"
24326
24327  # Input might be given as Windows format, start by converting to
24328  # unix format.
24329  new_path=`$CYGPATH -u "$path"`
24330
24331  # Now try to locate executable using which
24332  new_path=`$WHICH "$new_path" 2> /dev/null`
24333  # bat and cmd files are not always considered executable in cygwin causing which
24334  # to not find them
24335  if test "x$new_path" = x \
24336           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24337           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24338    new_path=`$CYGPATH -u "$path"`
24339  fi
24340  if test "x$new_path" = x; then
24341    # Oops. Which didn't find the executable.
24342    # The splitting of arguments from the executable at a space might have been incorrect,
24343    # since paths with space are more likely in Windows. Give it another try with the whole
24344    # argument.
24345    path="$complete"
24346    arguments="EOL"
24347    new_path=`$CYGPATH -u "$path"`
24348    new_path=`$WHICH "$new_path" 2> /dev/null`
24349    # bat and cmd files are not always considered executable in cygwin causing which
24350    # to not find them
24351    if test "x$new_path" = x \
24352             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24353             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24354      new_path=`$CYGPATH -u "$path"`
24355    fi
24356    if test "x$new_path" = x; then
24357      # It's still not found. Now this is an unrecoverable error.
24358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24359$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24360      has_space=`$ECHO "$complete" | $GREP " "`
24361      if test "x$has_space" != x; then
24362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24364      fi
24365      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24366    fi
24367  fi
24368
24369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24372  # "foo.exe" is OK but "foo" is an error.
24373  #
24374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24375  # It is also a way to make sure we got the proper file name for the real test later on.
24376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24377  if test "x$test_shortpath" = x; then
24378    # Short path failed, file does not exist as specified.
24379    # Try adding .exe or .cmd
24380    if test -f "${new_path}.exe"; then
24381       input_to_shortpath="${new_path}.exe"
24382    elif test -f "${new_path}.cmd"; then
24383       input_to_shortpath="${new_path}.cmd"
24384    else
24385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24386$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24389      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24390    fi
24391  else
24392    input_to_shortpath="$new_path"
24393  fi
24394
24395  # Call helper function which possibly converts this using DOS-style short mode.
24396  # If so, the updated path is stored in $new_path.
24397  new_path="$input_to_shortpath"
24398
24399  input_path="$input_to_shortpath"
24400  # Check if we need to convert this using DOS-style short mode. If the path
24401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24402  # take no chances and rewrite it.
24403  # Note: m4 eats our [], so we need to use [ and ] instead.
24404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24405  if test "x$has_forbidden_chars" != x; then
24406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24410      # Going to short mode and back again did indeed matter. Since short mode is
24411      # case insensitive, let's make it lowercase to improve readability.
24412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24413      # Now convert it back to Unix-stile (cygpath)
24414      input_path=`$CYGPATH -u "$shortmode_path"`
24415      new_path="$input_path"
24416    fi
24417  fi
24418
24419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24420  if test "x$test_cygdrive_prefix" = x; then
24421    # As a simple fix, exclude /usr/bin since it's not a real path.
24422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24424      # a path prefixed by /cygdrive for fixpath to work.
24425      new_path="$CYGWIN_ROOT_PATH$input_path"
24426    fi
24427  fi
24428
24429  # remove trailing .exe if any
24430  new_path="${new_path/%.exe/}"
24431
24432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24433
24434  # First separate the path from the arguments. This will split at the first
24435  # space.
24436  complete="$AS"
24437  path="${complete%% *}"
24438  tmp="$complete EOL"
24439  arguments="${tmp#* }"
24440
24441  # Input might be given as Windows format, start by converting to
24442  # unix format.
24443  new_path="$path"
24444
24445  windows_path="$new_path"
24446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24447    unix_path=`$CYGPATH -u "$windows_path"`
24448    new_path="$unix_path"
24449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24451    new_path="$unix_path"
24452  fi
24453
24454
24455  # Now try to locate executable using which
24456  new_path=`$WHICH "$new_path" 2> /dev/null`
24457
24458  if test "x$new_path" = x; then
24459    # Oops. Which didn't find the executable.
24460    # The splitting of arguments from the executable at a space might have been incorrect,
24461    # since paths with space are more likely in Windows. Give it another try with the whole
24462    # argument.
24463    path="$complete"
24464    arguments="EOL"
24465    new_path="$path"
24466
24467  windows_path="$new_path"
24468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24469    unix_path=`$CYGPATH -u "$windows_path"`
24470    new_path="$unix_path"
24471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24473    new_path="$unix_path"
24474  fi
24475
24476
24477    new_path=`$WHICH "$new_path" 2> /dev/null`
24478
24479    if test "x$new_path" = x; then
24480      # It's still not found. Now this is an unrecoverable error.
24481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24482$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24483      has_space=`$ECHO "$complete" | $GREP " "`
24484      if test "x$has_space" != x; then
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24487      fi
24488      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24489    fi
24490  fi
24491
24492  # Now new_path has a complete unix path to the binary
24493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24494    # Keep paths in /bin as-is, but remove trailing .exe if any
24495    new_path="${new_path/%.exe/}"
24496    # Do not save /bin paths to all_fixpath_prefixes!
24497  else
24498    # Not in mixed or Windows style, start by that.
24499    new_path=`cmd //c echo $new_path`
24500
24501  input_path="$new_path"
24502  # Check if we need to convert this using DOS-style short mode. If the path
24503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24504  # take no chances and rewrite it.
24505  # Note: m4 eats our [], so we need to use [ and ] instead.
24506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24507  if test "x$has_forbidden_chars" != x; then
24508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24510  fi
24511
24512    # Output is in $new_path
24513
24514  windows_path="$new_path"
24515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24516    unix_path=`$CYGPATH -u "$windows_path"`
24517    new_path="$unix_path"
24518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24520    new_path="$unix_path"
24521  fi
24522
24523    # remove trailing .exe if any
24524    new_path="${new_path/%.exe/}"
24525
24526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24528  fi
24529
24530  else
24531    # We're on a posix platform. Hooray! :)
24532    # First separate the path from the arguments. This will split at the first
24533    # space.
24534    complete="$AS"
24535    path="${complete%% *}"
24536    tmp="$complete EOL"
24537    arguments="${tmp#* }"
24538
24539    # Cannot rely on the command "which" here since it doesn't always work.
24540    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24541    if test -z "$is_absolute_path"; then
24542      # Path to executable is not absolute. Find it.
24543      IFS_save="$IFS"
24544      IFS=:
24545      for p in $PATH; do
24546        if test -f "$p/$path" && test -x "$p/$path"; then
24547          new_path="$p/$path"
24548          break
24549        fi
24550      done
24551      IFS="$IFS_save"
24552    else
24553      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24554$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24555      new_path="$path"
24556    fi
24557
24558    if test "x$new_path" = x; then
24559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24560$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24561        has_space=`$ECHO "$complete" | $GREP " "`
24562        if test "x$has_space" != x; then
24563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24565        fi
24566        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24567      fi
24568  fi
24569
24570      # Now join together the path and the arguments once again
24571      if test "x$arguments" != xEOL; then
24572        new_complete="$new_path ${arguments% *}"
24573      else
24574        new_complete="$new_path"
24575      fi
24576
24577  if test "x$complete" != "x$new_complete"; then
24578      AS="$new_complete"
24579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24580$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24581    fi
24582
24583else
24584    AS="$CC -c"
24585fi
24586
24587
24588if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24589    for ac_prog in gnm nm
24590do
24591  # Extract the first word of "$ac_prog", so it can be a program name with args.
24592set dummy $ac_prog; ac_word=$2
24593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24594$as_echo_n "checking for $ac_word... " >&6; }
24595if ${ac_cv_path_NM+:} false; then :
24596  $as_echo_n "(cached) " >&6
24597else
24598  case $NM in
24599  [\\/]* | ?:[\\/]*)
24600  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24601  ;;
24602  *)
24603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24604for as_dir in $PATH
24605do
24606  IFS=$as_save_IFS
24607  test -z "$as_dir" && as_dir=.
24608    for ac_exec_ext in '' $ac_executable_extensions; do
24609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24610    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24612    break 2
24613  fi
24614done
24615  done
24616IFS=$as_save_IFS
24617
24618  ;;
24619esac
24620fi
24621NM=$ac_cv_path_NM
24622if test -n "$NM"; then
24623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24624$as_echo "$NM" >&6; }
24625else
24626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24627$as_echo "no" >&6; }
24628fi
24629
24630
24631  test -n "$NM" && break
24632done
24633
24634
24635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636
24637  # First separate the path from the arguments. This will split at the first
24638  # space.
24639  complete="$NM"
24640  path="${complete%% *}"
24641  tmp="$complete EOL"
24642  arguments="${tmp#* }"
24643
24644  # Input might be given as Windows format, start by converting to
24645  # unix format.
24646  new_path=`$CYGPATH -u "$path"`
24647
24648  # Now try to locate executable using which
24649  new_path=`$WHICH "$new_path" 2> /dev/null`
24650  # bat and cmd files are not always considered executable in cygwin causing which
24651  # to not find them
24652  if test "x$new_path" = x \
24653           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24654           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24655    new_path=`$CYGPATH -u "$path"`
24656  fi
24657  if test "x$new_path" = x; then
24658    # Oops. Which didn't find the executable.
24659    # The splitting of arguments from the executable at a space might have been incorrect,
24660    # since paths with space are more likely in Windows. Give it another try with the whole
24661    # argument.
24662    path="$complete"
24663    arguments="EOL"
24664    new_path=`$CYGPATH -u "$path"`
24665    new_path=`$WHICH "$new_path" 2> /dev/null`
24666    # bat and cmd files are not always considered executable in cygwin causing which
24667    # to not find them
24668    if test "x$new_path" = x \
24669             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24670             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24671      new_path=`$CYGPATH -u "$path"`
24672    fi
24673    if test "x$new_path" = x; then
24674      # It's still not found. Now this is an unrecoverable error.
24675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24676$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24677      has_space=`$ECHO "$complete" | $GREP " "`
24678      if test "x$has_space" != x; then
24679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24681      fi
24682      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24683    fi
24684  fi
24685
24686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24689  # "foo.exe" is OK but "foo" is an error.
24690  #
24691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24692  # It is also a way to make sure we got the proper file name for the real test later on.
24693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24694  if test "x$test_shortpath" = x; then
24695    # Short path failed, file does not exist as specified.
24696    # Try adding .exe or .cmd
24697    if test -f "${new_path}.exe"; then
24698       input_to_shortpath="${new_path}.exe"
24699    elif test -f "${new_path}.cmd"; then
24700       input_to_shortpath="${new_path}.cmd"
24701    else
24702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24703$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24706      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24707    fi
24708  else
24709    input_to_shortpath="$new_path"
24710  fi
24711
24712  # Call helper function which possibly converts this using DOS-style short mode.
24713  # If so, the updated path is stored in $new_path.
24714  new_path="$input_to_shortpath"
24715
24716  input_path="$input_to_shortpath"
24717  # Check if we need to convert this using DOS-style short mode. If the path
24718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24719  # take no chances and rewrite it.
24720  # Note: m4 eats our [], so we need to use [ and ] instead.
24721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24722  if test "x$has_forbidden_chars" != x; then
24723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24727      # Going to short mode and back again did indeed matter. Since short mode is
24728      # case insensitive, let's make it lowercase to improve readability.
24729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24730      # Now convert it back to Unix-stile (cygpath)
24731      input_path=`$CYGPATH -u "$shortmode_path"`
24732      new_path="$input_path"
24733    fi
24734  fi
24735
24736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24737  if test "x$test_cygdrive_prefix" = x; then
24738    # As a simple fix, exclude /usr/bin since it's not a real path.
24739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24741      # a path prefixed by /cygdrive for fixpath to work.
24742      new_path="$CYGWIN_ROOT_PATH$input_path"
24743    fi
24744  fi
24745
24746  # remove trailing .exe if any
24747  new_path="${new_path/%.exe/}"
24748
24749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24750
24751  # First separate the path from the arguments. This will split at the first
24752  # space.
24753  complete="$NM"
24754  path="${complete%% *}"
24755  tmp="$complete EOL"
24756  arguments="${tmp#* }"
24757
24758  # Input might be given as Windows format, start by converting to
24759  # unix format.
24760  new_path="$path"
24761
24762  windows_path="$new_path"
24763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764    unix_path=`$CYGPATH -u "$windows_path"`
24765    new_path="$unix_path"
24766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24768    new_path="$unix_path"
24769  fi
24770
24771
24772  # Now try to locate executable using which
24773  new_path=`$WHICH "$new_path" 2> /dev/null`
24774
24775  if test "x$new_path" = x; then
24776    # Oops. Which didn't find the executable.
24777    # The splitting of arguments from the executable at a space might have been incorrect,
24778    # since paths with space are more likely in Windows. Give it another try with the whole
24779    # argument.
24780    path="$complete"
24781    arguments="EOL"
24782    new_path="$path"
24783
24784  windows_path="$new_path"
24785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786    unix_path=`$CYGPATH -u "$windows_path"`
24787    new_path="$unix_path"
24788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24790    new_path="$unix_path"
24791  fi
24792
24793
24794    new_path=`$WHICH "$new_path" 2> /dev/null`
24795
24796    if test "x$new_path" = x; then
24797      # It's still not found. Now this is an unrecoverable error.
24798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24799$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24800      has_space=`$ECHO "$complete" | $GREP " "`
24801      if test "x$has_space" != x; then
24802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24804      fi
24805      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24806    fi
24807  fi
24808
24809  # Now new_path has a complete unix path to the binary
24810  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24811    # Keep paths in /bin as-is, but remove trailing .exe if any
24812    new_path="${new_path/%.exe/}"
24813    # Do not save /bin paths to all_fixpath_prefixes!
24814  else
24815    # Not in mixed or Windows style, start by that.
24816    new_path=`cmd //c echo $new_path`
24817
24818  input_path="$new_path"
24819  # Check if we need to convert this using DOS-style short mode. If the path
24820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24821  # take no chances and rewrite it.
24822  # Note: m4 eats our [], so we need to use [ and ] instead.
24823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24824  if test "x$has_forbidden_chars" != x; then
24825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24827  fi
24828
24829    # Output is in $new_path
24830
24831  windows_path="$new_path"
24832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24833    unix_path=`$CYGPATH -u "$windows_path"`
24834    new_path="$unix_path"
24835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24837    new_path="$unix_path"
24838  fi
24839
24840    # remove trailing .exe if any
24841    new_path="${new_path/%.exe/}"
24842
24843    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24844    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24845  fi
24846
24847  else
24848    # We're on a posix platform. Hooray! :)
24849    # First separate the path from the arguments. This will split at the first
24850    # space.
24851    complete="$NM"
24852    path="${complete%% *}"
24853    tmp="$complete EOL"
24854    arguments="${tmp#* }"
24855
24856    # Cannot rely on the command "which" here since it doesn't always work.
24857    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24858    if test -z "$is_absolute_path"; then
24859      # Path to executable is not absolute. Find it.
24860      IFS_save="$IFS"
24861      IFS=:
24862      for p in $PATH; do
24863        if test -f "$p/$path" && test -x "$p/$path"; then
24864          new_path="$p/$path"
24865          break
24866        fi
24867      done
24868      IFS="$IFS_save"
24869    else
24870      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24871$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24872      new_path="$path"
24873    fi
24874
24875    if test "x$new_path" = x; then
24876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24877$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24878        has_space=`$ECHO "$complete" | $GREP " "`
24879        if test "x$has_space" != x; then
24880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24882        fi
24883        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24884      fi
24885  fi
24886
24887      # Now join together the path and the arguments once again
24888      if test "x$arguments" != xEOL; then
24889        new_complete="$new_path ${arguments% *}"
24890      else
24891        new_complete="$new_path"
24892      fi
24893
24894  if test "x$complete" != "x$new_complete"; then
24895      NM="$new_complete"
24896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24897$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24898    fi
24899
24900    # Extract the first word of "strip", so it can be a program name with args.
24901set dummy strip; ac_word=$2
24902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24903$as_echo_n "checking for $ac_word... " >&6; }
24904if ${ac_cv_path_STRIP+:} false; then :
24905  $as_echo_n "(cached) " >&6
24906else
24907  case $STRIP in
24908  [\\/]* | ?:[\\/]*)
24909  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24910  ;;
24911  *)
24912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24913for as_dir in $PATH
24914do
24915  IFS=$as_save_IFS
24916  test -z "$as_dir" && as_dir=.
24917    for ac_exec_ext in '' $ac_executable_extensions; do
24918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24919    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24921    break 2
24922  fi
24923done
24924  done
24925IFS=$as_save_IFS
24926
24927  ;;
24928esac
24929fi
24930STRIP=$ac_cv_path_STRIP
24931if test -n "$STRIP"; then
24932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24933$as_echo "$STRIP" >&6; }
24934else
24935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24936$as_echo "no" >&6; }
24937fi
24938
24939
24940
24941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942
24943  # First separate the path from the arguments. This will split at the first
24944  # space.
24945  complete="$STRIP"
24946  path="${complete%% *}"
24947  tmp="$complete EOL"
24948  arguments="${tmp#* }"
24949
24950  # Input might be given as Windows format, start by converting to
24951  # unix format.
24952  new_path=`$CYGPATH -u "$path"`
24953
24954  # Now try to locate executable using which
24955  new_path=`$WHICH "$new_path" 2> /dev/null`
24956  # bat and cmd files are not always considered executable in cygwin causing which
24957  # to not find them
24958  if test "x$new_path" = x \
24959           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24960           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24961    new_path=`$CYGPATH -u "$path"`
24962  fi
24963  if test "x$new_path" = x; then
24964    # Oops. Which didn't find the executable.
24965    # The splitting of arguments from the executable at a space might have been incorrect,
24966    # since paths with space are more likely in Windows. Give it another try with the whole
24967    # argument.
24968    path="$complete"
24969    arguments="EOL"
24970    new_path=`$CYGPATH -u "$path"`
24971    new_path=`$WHICH "$new_path" 2> /dev/null`
24972    # bat and cmd files are not always considered executable in cygwin causing which
24973    # to not find them
24974    if test "x$new_path" = x \
24975             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24976             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24977      new_path=`$CYGPATH -u "$path"`
24978    fi
24979    if test "x$new_path" = x; then
24980      # It's still not found. Now this is an unrecoverable error.
24981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24982$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24983      has_space=`$ECHO "$complete" | $GREP " "`
24984      if test "x$has_space" != x; then
24985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24987      fi
24988      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24989    fi
24990  fi
24991
24992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24995  # "foo.exe" is OK but "foo" is an error.
24996  #
24997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24998  # It is also a way to make sure we got the proper file name for the real test later on.
24999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25000  if test "x$test_shortpath" = x; then
25001    # Short path failed, file does not exist as specified.
25002    # Try adding .exe or .cmd
25003    if test -f "${new_path}.exe"; then
25004       input_to_shortpath="${new_path}.exe"
25005    elif test -f "${new_path}.cmd"; then
25006       input_to_shortpath="${new_path}.cmd"
25007    else
25008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25009$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25012      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25013    fi
25014  else
25015    input_to_shortpath="$new_path"
25016  fi
25017
25018  # Call helper function which possibly converts this using DOS-style short mode.
25019  # If so, the updated path is stored in $new_path.
25020  new_path="$input_to_shortpath"
25021
25022  input_path="$input_to_shortpath"
25023  # Check if we need to convert this using DOS-style short mode. If the path
25024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25025  # take no chances and rewrite it.
25026  # Note: m4 eats our [], so we need to use [ and ] instead.
25027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25028  if test "x$has_forbidden_chars" != x; then
25029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25033      # Going to short mode and back again did indeed matter. Since short mode is
25034      # case insensitive, let's make it lowercase to improve readability.
25035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25036      # Now convert it back to Unix-stile (cygpath)
25037      input_path=`$CYGPATH -u "$shortmode_path"`
25038      new_path="$input_path"
25039    fi
25040  fi
25041
25042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25043  if test "x$test_cygdrive_prefix" = x; then
25044    # As a simple fix, exclude /usr/bin since it's not a real path.
25045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25047      # a path prefixed by /cygdrive for fixpath to work.
25048      new_path="$CYGWIN_ROOT_PATH$input_path"
25049    fi
25050  fi
25051
25052  # remove trailing .exe if any
25053  new_path="${new_path/%.exe/}"
25054
25055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25056
25057  # First separate the path from the arguments. This will split at the first
25058  # space.
25059  complete="$STRIP"
25060  path="${complete%% *}"
25061  tmp="$complete EOL"
25062  arguments="${tmp#* }"
25063
25064  # Input might be given as Windows format, start by converting to
25065  # unix format.
25066  new_path="$path"
25067
25068  windows_path="$new_path"
25069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25070    unix_path=`$CYGPATH -u "$windows_path"`
25071    new_path="$unix_path"
25072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25074    new_path="$unix_path"
25075  fi
25076
25077
25078  # Now try to locate executable using which
25079  new_path=`$WHICH "$new_path" 2> /dev/null`
25080
25081  if test "x$new_path" = x; then
25082    # Oops. Which didn't find the executable.
25083    # The splitting of arguments from the executable at a space might have been incorrect,
25084    # since paths with space are more likely in Windows. Give it another try with the whole
25085    # argument.
25086    path="$complete"
25087    arguments="EOL"
25088    new_path="$path"
25089
25090  windows_path="$new_path"
25091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092    unix_path=`$CYGPATH -u "$windows_path"`
25093    new_path="$unix_path"
25094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25096    new_path="$unix_path"
25097  fi
25098
25099
25100    new_path=`$WHICH "$new_path" 2> /dev/null`
25101
25102    if test "x$new_path" = x; then
25103      # It's still not found. Now this is an unrecoverable error.
25104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25105$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25106      has_space=`$ECHO "$complete" | $GREP " "`
25107      if test "x$has_space" != x; then
25108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25110      fi
25111      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25112    fi
25113  fi
25114
25115  # Now new_path has a complete unix path to the binary
25116  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25117    # Keep paths in /bin as-is, but remove trailing .exe if any
25118    new_path="${new_path/%.exe/}"
25119    # Do not save /bin paths to all_fixpath_prefixes!
25120  else
25121    # Not in mixed or Windows style, start by that.
25122    new_path=`cmd //c echo $new_path`
25123
25124  input_path="$new_path"
25125  # Check if we need to convert this using DOS-style short mode. If the path
25126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25127  # take no chances and rewrite it.
25128  # Note: m4 eats our [], so we need to use [ and ] instead.
25129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25130  if test "x$has_forbidden_chars" != x; then
25131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25133  fi
25134
25135    # Output is in $new_path
25136
25137  windows_path="$new_path"
25138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25139    unix_path=`$CYGPATH -u "$windows_path"`
25140    new_path="$unix_path"
25141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25143    new_path="$unix_path"
25144  fi
25145
25146    # remove trailing .exe if any
25147    new_path="${new_path/%.exe/}"
25148
25149    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25150    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25151  fi
25152
25153  else
25154    # We're on a posix platform. Hooray! :)
25155    # First separate the path from the arguments. This will split at the first
25156    # space.
25157    complete="$STRIP"
25158    path="${complete%% *}"
25159    tmp="$complete EOL"
25160    arguments="${tmp#* }"
25161
25162    # Cannot rely on the command "which" here since it doesn't always work.
25163    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25164    if test -z "$is_absolute_path"; then
25165      # Path to executable is not absolute. Find it.
25166      IFS_save="$IFS"
25167      IFS=:
25168      for p in $PATH; do
25169        if test -f "$p/$path" && test -x "$p/$path"; then
25170          new_path="$p/$path"
25171          break
25172        fi
25173      done
25174      IFS="$IFS_save"
25175    else
25176      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25177$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25178      new_path="$path"
25179    fi
25180
25181    if test "x$new_path" = x; then
25182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25183$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25184        has_space=`$ECHO "$complete" | $GREP " "`
25185        if test "x$has_space" != x; then
25186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25188        fi
25189        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25190      fi
25191  fi
25192
25193      # Now join together the path and the arguments once again
25194      if test "x$arguments" != xEOL; then
25195        new_complete="$new_path ${arguments% *}"
25196      else
25197        new_complete="$new_path"
25198      fi
25199
25200  if test "x$complete" != "x$new_complete"; then
25201      STRIP="$new_complete"
25202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25203$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25204    fi
25205
25206    # Extract the first word of "mcs", so it can be a program name with args.
25207set dummy mcs; ac_word=$2
25208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25209$as_echo_n "checking for $ac_word... " >&6; }
25210if ${ac_cv_path_MCS+:} false; then :
25211  $as_echo_n "(cached) " >&6
25212else
25213  case $MCS in
25214  [\\/]* | ?:[\\/]*)
25215  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25216  ;;
25217  *)
25218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25219for as_dir in $PATH
25220do
25221  IFS=$as_save_IFS
25222  test -z "$as_dir" && as_dir=.
25223    for ac_exec_ext in '' $ac_executable_extensions; do
25224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25225    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25227    break 2
25228  fi
25229done
25230  done
25231IFS=$as_save_IFS
25232
25233  ;;
25234esac
25235fi
25236MCS=$ac_cv_path_MCS
25237if test -n "$MCS"; then
25238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25239$as_echo "$MCS" >&6; }
25240else
25241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25242$as_echo "no" >&6; }
25243fi
25244
25245
25246
25247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25248
25249  # First separate the path from the arguments. This will split at the first
25250  # space.
25251  complete="$MCS"
25252  path="${complete%% *}"
25253  tmp="$complete EOL"
25254  arguments="${tmp#* }"
25255
25256  # Input might be given as Windows format, start by converting to
25257  # unix format.
25258  new_path=`$CYGPATH -u "$path"`
25259
25260  # Now try to locate executable using which
25261  new_path=`$WHICH "$new_path" 2> /dev/null`
25262  # bat and cmd files are not always considered executable in cygwin causing which
25263  # to not find them
25264  if test "x$new_path" = x \
25265           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25266           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25267    new_path=`$CYGPATH -u "$path"`
25268  fi
25269  if test "x$new_path" = x; then
25270    # Oops. Which didn't find the executable.
25271    # The splitting of arguments from the executable at a space might have been incorrect,
25272    # since paths with space are more likely in Windows. Give it another try with the whole
25273    # argument.
25274    path="$complete"
25275    arguments="EOL"
25276    new_path=`$CYGPATH -u "$path"`
25277    new_path=`$WHICH "$new_path" 2> /dev/null`
25278    # bat and cmd files are not always considered executable in cygwin causing which
25279    # to not find them
25280    if test "x$new_path" = x \
25281             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25282             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25283      new_path=`$CYGPATH -u "$path"`
25284    fi
25285    if test "x$new_path" = x; then
25286      # It's still not found. Now this is an unrecoverable error.
25287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25288$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25289      has_space=`$ECHO "$complete" | $GREP " "`
25290      if test "x$has_space" != x; then
25291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25293      fi
25294      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25295    fi
25296  fi
25297
25298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25301  # "foo.exe" is OK but "foo" is an error.
25302  #
25303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25304  # It is also a way to make sure we got the proper file name for the real test later on.
25305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25306  if test "x$test_shortpath" = x; then
25307    # Short path failed, file does not exist as specified.
25308    # Try adding .exe or .cmd
25309    if test -f "${new_path}.exe"; then
25310       input_to_shortpath="${new_path}.exe"
25311    elif test -f "${new_path}.cmd"; then
25312       input_to_shortpath="${new_path}.cmd"
25313    else
25314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25315$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25318      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25319    fi
25320  else
25321    input_to_shortpath="$new_path"
25322  fi
25323
25324  # Call helper function which possibly converts this using DOS-style short mode.
25325  # If so, the updated path is stored in $new_path.
25326  new_path="$input_to_shortpath"
25327
25328  input_path="$input_to_shortpath"
25329  # Check if we need to convert this using DOS-style short mode. If the path
25330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25331  # take no chances and rewrite it.
25332  # Note: m4 eats our [], so we need to use [ and ] instead.
25333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25334  if test "x$has_forbidden_chars" != x; then
25335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25339      # Going to short mode and back again did indeed matter. Since short mode is
25340      # case insensitive, let's make it lowercase to improve readability.
25341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25342      # Now convert it back to Unix-stile (cygpath)
25343      input_path=`$CYGPATH -u "$shortmode_path"`
25344      new_path="$input_path"
25345    fi
25346  fi
25347
25348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25349  if test "x$test_cygdrive_prefix" = x; then
25350    # As a simple fix, exclude /usr/bin since it's not a real path.
25351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25353      # a path prefixed by /cygdrive for fixpath to work.
25354      new_path="$CYGWIN_ROOT_PATH$input_path"
25355    fi
25356  fi
25357
25358  # remove trailing .exe if any
25359  new_path="${new_path/%.exe/}"
25360
25361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25362
25363  # First separate the path from the arguments. This will split at the first
25364  # space.
25365  complete="$MCS"
25366  path="${complete%% *}"
25367  tmp="$complete EOL"
25368  arguments="${tmp#* }"
25369
25370  # Input might be given as Windows format, start by converting to
25371  # unix format.
25372  new_path="$path"
25373
25374  windows_path="$new_path"
25375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25376    unix_path=`$CYGPATH -u "$windows_path"`
25377    new_path="$unix_path"
25378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25380    new_path="$unix_path"
25381  fi
25382
25383
25384  # Now try to locate executable using which
25385  new_path=`$WHICH "$new_path" 2> /dev/null`
25386
25387  if test "x$new_path" = x; then
25388    # Oops. Which didn't find the executable.
25389    # The splitting of arguments from the executable at a space might have been incorrect,
25390    # since paths with space are more likely in Windows. Give it another try with the whole
25391    # argument.
25392    path="$complete"
25393    arguments="EOL"
25394    new_path="$path"
25395
25396  windows_path="$new_path"
25397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25398    unix_path=`$CYGPATH -u "$windows_path"`
25399    new_path="$unix_path"
25400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25402    new_path="$unix_path"
25403  fi
25404
25405
25406    new_path=`$WHICH "$new_path" 2> /dev/null`
25407
25408    if test "x$new_path" = x; then
25409      # It's still not found. Now this is an unrecoverable error.
25410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25411$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25412      has_space=`$ECHO "$complete" | $GREP " "`
25413      if test "x$has_space" != x; then
25414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25416      fi
25417      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25418    fi
25419  fi
25420
25421  # Now new_path has a complete unix path to the binary
25422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25423    # Keep paths in /bin as-is, but remove trailing .exe if any
25424    new_path="${new_path/%.exe/}"
25425    # Do not save /bin paths to all_fixpath_prefixes!
25426  else
25427    # Not in mixed or Windows style, start by that.
25428    new_path=`cmd //c echo $new_path`
25429
25430  input_path="$new_path"
25431  # Check if we need to convert this using DOS-style short mode. If the path
25432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25433  # take no chances and rewrite it.
25434  # Note: m4 eats our [], so we need to use [ and ] instead.
25435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25436  if test "x$has_forbidden_chars" != x; then
25437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439  fi
25440
25441    # Output is in $new_path
25442
25443  windows_path="$new_path"
25444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25445    unix_path=`$CYGPATH -u "$windows_path"`
25446    new_path="$unix_path"
25447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25449    new_path="$unix_path"
25450  fi
25451
25452    # remove trailing .exe if any
25453    new_path="${new_path/%.exe/}"
25454
25455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25457  fi
25458
25459  else
25460    # We're on a posix platform. Hooray! :)
25461    # First separate the path from the arguments. This will split at the first
25462    # space.
25463    complete="$MCS"
25464    path="${complete%% *}"
25465    tmp="$complete EOL"
25466    arguments="${tmp#* }"
25467
25468    # Cannot rely on the command "which" here since it doesn't always work.
25469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25470    if test -z "$is_absolute_path"; then
25471      # Path to executable is not absolute. Find it.
25472      IFS_save="$IFS"
25473      IFS=:
25474      for p in $PATH; do
25475        if test -f "$p/$path" && test -x "$p/$path"; then
25476          new_path="$p/$path"
25477          break
25478        fi
25479      done
25480      IFS="$IFS_save"
25481    else
25482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25483$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25484      new_path="$path"
25485    fi
25486
25487    if test "x$new_path" = x; then
25488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25489$as_echo "$as_me: The path of MCS, 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}: This might be caused by spaces in the path, which is not allowed." >&5
25493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25494        fi
25495        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25496      fi
25497  fi
25498
25499      # Now join together the path and the arguments once again
25500      if test "x$arguments" != xEOL; then
25501        new_complete="$new_path ${arguments% *}"
25502      else
25503        new_complete="$new_path"
25504      fi
25505
25506  if test "x$complete" != "x$new_complete"; then
25507      MCS="$new_complete"
25508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25509$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25510    fi
25511
25512elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25513    if test -n "$ac_tool_prefix"; then
25514  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25515set dummy ${ac_tool_prefix}nm; ac_word=$2
25516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25517$as_echo_n "checking for $ac_word... " >&6; }
25518if ${ac_cv_prog_NM+:} false; then :
25519  $as_echo_n "(cached) " >&6
25520else
25521  if test -n "$NM"; then
25522  ac_cv_prog_NM="$NM" # Let the user override the test.
25523else
25524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25525for as_dir in $PATH
25526do
25527  IFS=$as_save_IFS
25528  test -z "$as_dir" && as_dir=.
25529    for ac_exec_ext in '' $ac_executable_extensions; do
25530  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25531    ac_cv_prog_NM="${ac_tool_prefix}nm"
25532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25533    break 2
25534  fi
25535done
25536  done
25537IFS=$as_save_IFS
25538
25539fi
25540fi
25541NM=$ac_cv_prog_NM
25542if test -n "$NM"; then
25543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25544$as_echo "$NM" >&6; }
25545else
25546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25547$as_echo "no" >&6; }
25548fi
25549
25550
25551fi
25552if test -z "$ac_cv_prog_NM"; then
25553  ac_ct_NM=$NM
25554  # Extract the first word of "nm", so it can be a program name with args.
25555set dummy nm; ac_word=$2
25556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25557$as_echo_n "checking for $ac_word... " >&6; }
25558if ${ac_cv_prog_ac_ct_NM+:} false; then :
25559  $as_echo_n "(cached) " >&6
25560else
25561  if test -n "$ac_ct_NM"; then
25562  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25563else
25564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25565for as_dir in $PATH
25566do
25567  IFS=$as_save_IFS
25568  test -z "$as_dir" && as_dir=.
25569    for ac_exec_ext in '' $ac_executable_extensions; do
25570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25571    ac_cv_prog_ac_ct_NM="nm"
25572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25573    break 2
25574  fi
25575done
25576  done
25577IFS=$as_save_IFS
25578
25579fi
25580fi
25581ac_ct_NM=$ac_cv_prog_ac_ct_NM
25582if test -n "$ac_ct_NM"; then
25583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25584$as_echo "$ac_ct_NM" >&6; }
25585else
25586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25587$as_echo "no" >&6; }
25588fi
25589
25590  if test "x$ac_ct_NM" = x; then
25591    NM=""
25592  else
25593    case $cross_compiling:$ac_tool_warned in
25594yes:)
25595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25597ac_tool_warned=yes ;;
25598esac
25599    NM=$ac_ct_NM
25600  fi
25601else
25602  NM="$ac_cv_prog_NM"
25603fi
25604
25605
25606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25607
25608  # First separate the path from the arguments. This will split at the first
25609  # space.
25610  complete="$NM"
25611  path="${complete%% *}"
25612  tmp="$complete EOL"
25613  arguments="${tmp#* }"
25614
25615  # Input might be given as Windows format, start by converting to
25616  # unix format.
25617  new_path=`$CYGPATH -u "$path"`
25618
25619  # Now try to locate executable using which
25620  new_path=`$WHICH "$new_path" 2> /dev/null`
25621  # bat and cmd files are not always considered executable in cygwin causing which
25622  # to not find them
25623  if test "x$new_path" = x \
25624           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25625           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25626    new_path=`$CYGPATH -u "$path"`
25627  fi
25628  if test "x$new_path" = x; then
25629    # Oops. Which didn't find the executable.
25630    # The splitting of arguments from the executable at a space might have been incorrect,
25631    # since paths with space are more likely in Windows. Give it another try with the whole
25632    # argument.
25633    path="$complete"
25634    arguments="EOL"
25635    new_path=`$CYGPATH -u "$path"`
25636    new_path=`$WHICH "$new_path" 2> /dev/null`
25637    # bat and cmd files are not always considered executable in cygwin causing which
25638    # to not find them
25639    if test "x$new_path" = x \
25640             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25641             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25642      new_path=`$CYGPATH -u "$path"`
25643    fi
25644    if test "x$new_path" = x; then
25645      # It's still not found. Now this is an unrecoverable error.
25646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25647$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25648      has_space=`$ECHO "$complete" | $GREP " "`
25649      if test "x$has_space" != x; then
25650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25652      fi
25653      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25654    fi
25655  fi
25656
25657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25660  # "foo.exe" is OK but "foo" is an error.
25661  #
25662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25663  # It is also a way to make sure we got the proper file name for the real test later on.
25664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25665  if test "x$test_shortpath" = x; then
25666    # Short path failed, file does not exist as specified.
25667    # Try adding .exe or .cmd
25668    if test -f "${new_path}.exe"; then
25669       input_to_shortpath="${new_path}.exe"
25670    elif test -f "${new_path}.cmd"; then
25671       input_to_shortpath="${new_path}.cmd"
25672    else
25673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25674$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25677      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25678    fi
25679  else
25680    input_to_shortpath="$new_path"
25681  fi
25682
25683  # Call helper function which possibly converts this using DOS-style short mode.
25684  # If so, the updated path is stored in $new_path.
25685  new_path="$input_to_shortpath"
25686
25687  input_path="$input_to_shortpath"
25688  # Check if we need to convert this using DOS-style short mode. If the path
25689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25690  # take no chances and rewrite it.
25691  # Note: m4 eats our [], so we need to use [ and ] instead.
25692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25693  if test "x$has_forbidden_chars" != x; then
25694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25698      # Going to short mode and back again did indeed matter. Since short mode is
25699      # case insensitive, let's make it lowercase to improve readability.
25700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25701      # Now convert it back to Unix-stile (cygpath)
25702      input_path=`$CYGPATH -u "$shortmode_path"`
25703      new_path="$input_path"
25704    fi
25705  fi
25706
25707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25708  if test "x$test_cygdrive_prefix" = x; then
25709    # As a simple fix, exclude /usr/bin since it's not a real path.
25710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25712      # a path prefixed by /cygdrive for fixpath to work.
25713      new_path="$CYGWIN_ROOT_PATH$input_path"
25714    fi
25715  fi
25716
25717  # remove trailing .exe if any
25718  new_path="${new_path/%.exe/}"
25719
25720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25721
25722  # First separate the path from the arguments. This will split at the first
25723  # space.
25724  complete="$NM"
25725  path="${complete%% *}"
25726  tmp="$complete EOL"
25727  arguments="${tmp#* }"
25728
25729  # Input might be given as Windows format, start by converting to
25730  # unix format.
25731  new_path="$path"
25732
25733  windows_path="$new_path"
25734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25735    unix_path=`$CYGPATH -u "$windows_path"`
25736    new_path="$unix_path"
25737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25739    new_path="$unix_path"
25740  fi
25741
25742
25743  # Now try to locate executable using which
25744  new_path=`$WHICH "$new_path" 2> /dev/null`
25745
25746  if test "x$new_path" = x; then
25747    # Oops. Which didn't find the executable.
25748    # The splitting of arguments from the executable at a space might have been incorrect,
25749    # since paths with space are more likely in Windows. Give it another try with the whole
25750    # argument.
25751    path="$complete"
25752    arguments="EOL"
25753    new_path="$path"
25754
25755  windows_path="$new_path"
25756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25757    unix_path=`$CYGPATH -u "$windows_path"`
25758    new_path="$unix_path"
25759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25761    new_path="$unix_path"
25762  fi
25763
25764
25765    new_path=`$WHICH "$new_path" 2> /dev/null`
25766
25767    if test "x$new_path" = x; then
25768      # It's still not found. Now this is an unrecoverable error.
25769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25770$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25771      has_space=`$ECHO "$complete" | $GREP " "`
25772      if test "x$has_space" != x; then
25773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25775      fi
25776      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25777    fi
25778  fi
25779
25780  # Now new_path has a complete unix path to the binary
25781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25782    # Keep paths in /bin as-is, but remove trailing .exe if any
25783    new_path="${new_path/%.exe/}"
25784    # Do not save /bin paths to all_fixpath_prefixes!
25785  else
25786    # Not in mixed or Windows style, start by that.
25787    new_path=`cmd //c echo $new_path`
25788
25789  input_path="$new_path"
25790  # Check if we need to convert this using DOS-style short mode. If the path
25791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25792  # take no chances and rewrite it.
25793  # Note: m4 eats our [], so we need to use [ and ] instead.
25794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25795  if test "x$has_forbidden_chars" != x; then
25796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25798  fi
25799
25800    # Output is in $new_path
25801
25802  windows_path="$new_path"
25803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25804    unix_path=`$CYGPATH -u "$windows_path"`
25805    new_path="$unix_path"
25806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25808    new_path="$unix_path"
25809  fi
25810
25811    # remove trailing .exe if any
25812    new_path="${new_path/%.exe/}"
25813
25814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25816  fi
25817
25818  else
25819    # We're on a posix platform. Hooray! :)
25820    # First separate the path from the arguments. This will split at the first
25821    # space.
25822    complete="$NM"
25823    path="${complete%% *}"
25824    tmp="$complete EOL"
25825    arguments="${tmp#* }"
25826
25827    # Cannot rely on the command "which" here since it doesn't always work.
25828    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25829    if test -z "$is_absolute_path"; then
25830      # Path to executable is not absolute. Find it.
25831      IFS_save="$IFS"
25832      IFS=:
25833      for p in $PATH; do
25834        if test -f "$p/$path" && test -x "$p/$path"; then
25835          new_path="$p/$path"
25836          break
25837        fi
25838      done
25839      IFS="$IFS_save"
25840    else
25841      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25842$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25843      new_path="$path"
25844    fi
25845
25846    if test "x$new_path" = x; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25848$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25849        has_space=`$ECHO "$complete" | $GREP " "`
25850        if test "x$has_space" != x; then
25851          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25852$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25853        fi
25854        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25855      fi
25856  fi
25857
25858      # Now join together the path and the arguments once again
25859      if test "x$arguments" != xEOL; then
25860        new_complete="$new_path ${arguments% *}"
25861      else
25862        new_complete="$new_path"
25863      fi
25864
25865  if test "x$complete" != "x$new_complete"; then
25866      NM="$new_complete"
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25868$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25869    fi
25870
25871    if test -n "$ac_tool_prefix"; then
25872  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25873set dummy ${ac_tool_prefix}strip; ac_word=$2
25874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25875$as_echo_n "checking for $ac_word... " >&6; }
25876if ${ac_cv_prog_STRIP+:} false; then :
25877  $as_echo_n "(cached) " >&6
25878else
25879  if test -n "$STRIP"; then
25880  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25881else
25882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25883for as_dir in $PATH
25884do
25885  IFS=$as_save_IFS
25886  test -z "$as_dir" && as_dir=.
25887    for ac_exec_ext in '' $ac_executable_extensions; do
25888  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25889    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25891    break 2
25892  fi
25893done
25894  done
25895IFS=$as_save_IFS
25896
25897fi
25898fi
25899STRIP=$ac_cv_prog_STRIP
25900if test -n "$STRIP"; then
25901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25902$as_echo "$STRIP" >&6; }
25903else
25904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25905$as_echo "no" >&6; }
25906fi
25907
25908
25909fi
25910if test -z "$ac_cv_prog_STRIP"; then
25911  ac_ct_STRIP=$STRIP
25912  # Extract the first word of "strip", so it can be a program name with args.
25913set dummy strip; ac_word=$2
25914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25915$as_echo_n "checking for $ac_word... " >&6; }
25916if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25917  $as_echo_n "(cached) " >&6
25918else
25919  if test -n "$ac_ct_STRIP"; then
25920  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25921else
25922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25923for as_dir in $PATH
25924do
25925  IFS=$as_save_IFS
25926  test -z "$as_dir" && as_dir=.
25927    for ac_exec_ext in '' $ac_executable_extensions; do
25928  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25929    ac_cv_prog_ac_ct_STRIP="strip"
25930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25931    break 2
25932  fi
25933done
25934  done
25935IFS=$as_save_IFS
25936
25937fi
25938fi
25939ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25940if test -n "$ac_ct_STRIP"; then
25941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25942$as_echo "$ac_ct_STRIP" >&6; }
25943else
25944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25945$as_echo "no" >&6; }
25946fi
25947
25948  if test "x$ac_ct_STRIP" = x; then
25949    STRIP=""
25950  else
25951    case $cross_compiling:$ac_tool_warned in
25952yes:)
25953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25955ac_tool_warned=yes ;;
25956esac
25957    STRIP=$ac_ct_STRIP
25958  fi
25959else
25960  STRIP="$ac_cv_prog_STRIP"
25961fi
25962
25963
25964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25965
25966  # First separate the path from the arguments. This will split at the first
25967  # space.
25968  complete="$STRIP"
25969  path="${complete%% *}"
25970  tmp="$complete EOL"
25971  arguments="${tmp#* }"
25972
25973  # Input might be given as Windows format, start by converting to
25974  # unix format.
25975  new_path=`$CYGPATH -u "$path"`
25976
25977  # Now try to locate executable using which
25978  new_path=`$WHICH "$new_path" 2> /dev/null`
25979  # bat and cmd files are not always considered executable in cygwin causing which
25980  # to not find them
25981  if test "x$new_path" = x \
25982           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25983           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25984    new_path=`$CYGPATH -u "$path"`
25985  fi
25986  if test "x$new_path" = x; then
25987    # Oops. Which didn't find the executable.
25988    # The splitting of arguments from the executable at a space might have been incorrect,
25989    # since paths with space are more likely in Windows. Give it another try with the whole
25990    # argument.
25991    path="$complete"
25992    arguments="EOL"
25993    new_path=`$CYGPATH -u "$path"`
25994    new_path=`$WHICH "$new_path" 2> /dev/null`
25995    # bat and cmd files are not always considered executable in cygwin causing which
25996    # to not find them
25997    if test "x$new_path" = x \
25998             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25999             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26000      new_path=`$CYGPATH -u "$path"`
26001    fi
26002    if test "x$new_path" = x; then
26003      # It's still not found. Now this is an unrecoverable error.
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26005$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26006      has_space=`$ECHO "$complete" | $GREP " "`
26007      if test "x$has_space" != x; then
26008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26010      fi
26011      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26012    fi
26013  fi
26014
26015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26018  # "foo.exe" is OK but "foo" is an error.
26019  #
26020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26021  # It is also a way to make sure we got the proper file name for the real test later on.
26022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26023  if test "x$test_shortpath" = x; then
26024    # Short path failed, file does not exist as specified.
26025    # Try adding .exe or .cmd
26026    if test -f "${new_path}.exe"; then
26027       input_to_shortpath="${new_path}.exe"
26028    elif test -f "${new_path}.cmd"; then
26029       input_to_shortpath="${new_path}.cmd"
26030    else
26031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26032$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26035      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26036    fi
26037  else
26038    input_to_shortpath="$new_path"
26039  fi
26040
26041  # Call helper function which possibly converts this using DOS-style short mode.
26042  # If so, the updated path is stored in $new_path.
26043  new_path="$input_to_shortpath"
26044
26045  input_path="$input_to_shortpath"
26046  # Check if we need to convert this using DOS-style short mode. If the path
26047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26048  # take no chances and rewrite it.
26049  # Note: m4 eats our [], so we need to use [ and ] instead.
26050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26051  if test "x$has_forbidden_chars" != x; then
26052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26056      # Going to short mode and back again did indeed matter. Since short mode is
26057      # case insensitive, let's make it lowercase to improve readability.
26058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26059      # Now convert it back to Unix-stile (cygpath)
26060      input_path=`$CYGPATH -u "$shortmode_path"`
26061      new_path="$input_path"
26062    fi
26063  fi
26064
26065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26066  if test "x$test_cygdrive_prefix" = x; then
26067    # As a simple fix, exclude /usr/bin since it's not a real path.
26068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26070      # a path prefixed by /cygdrive for fixpath to work.
26071      new_path="$CYGWIN_ROOT_PATH$input_path"
26072    fi
26073  fi
26074
26075  # remove trailing .exe if any
26076  new_path="${new_path/%.exe/}"
26077
26078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26079
26080  # First separate the path from the arguments. This will split at the first
26081  # space.
26082  complete="$STRIP"
26083  path="${complete%% *}"
26084  tmp="$complete EOL"
26085  arguments="${tmp#* }"
26086
26087  # Input might be given as Windows format, start by converting to
26088  # unix format.
26089  new_path="$path"
26090
26091  windows_path="$new_path"
26092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093    unix_path=`$CYGPATH -u "$windows_path"`
26094    new_path="$unix_path"
26095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26097    new_path="$unix_path"
26098  fi
26099
26100
26101  # Now try to locate executable using which
26102  new_path=`$WHICH "$new_path" 2> /dev/null`
26103
26104  if test "x$new_path" = x; then
26105    # Oops. Which didn't find the executable.
26106    # The splitting of arguments from the executable at a space might have been incorrect,
26107    # since paths with space are more likely in Windows. Give it another try with the whole
26108    # argument.
26109    path="$complete"
26110    arguments="EOL"
26111    new_path="$path"
26112
26113  windows_path="$new_path"
26114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26115    unix_path=`$CYGPATH -u "$windows_path"`
26116    new_path="$unix_path"
26117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26119    new_path="$unix_path"
26120  fi
26121
26122
26123    new_path=`$WHICH "$new_path" 2> /dev/null`
26124
26125    if test "x$new_path" = x; then
26126      # It's still not found. Now this is an unrecoverable error.
26127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26128$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26129      has_space=`$ECHO "$complete" | $GREP " "`
26130      if test "x$has_space" != x; then
26131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26133      fi
26134      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26135    fi
26136  fi
26137
26138  # Now new_path has a complete unix path to the binary
26139  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26140    # Keep paths in /bin as-is, but remove trailing .exe if any
26141    new_path="${new_path/%.exe/}"
26142    # Do not save /bin paths to all_fixpath_prefixes!
26143  else
26144    # Not in mixed or Windows style, start by that.
26145    new_path=`cmd //c echo $new_path`
26146
26147  input_path="$new_path"
26148  # Check if we need to convert this using DOS-style short mode. If the path
26149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26150  # take no chances and rewrite it.
26151  # Note: m4 eats our [], so we need to use [ and ] instead.
26152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26153  if test "x$has_forbidden_chars" != x; then
26154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26156  fi
26157
26158    # Output is in $new_path
26159
26160  windows_path="$new_path"
26161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26162    unix_path=`$CYGPATH -u "$windows_path"`
26163    new_path="$unix_path"
26164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26166    new_path="$unix_path"
26167  fi
26168
26169    # remove trailing .exe if any
26170    new_path="${new_path/%.exe/}"
26171
26172    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26173    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26174  fi
26175
26176  else
26177    # We're on a posix platform. Hooray! :)
26178    # First separate the path from the arguments. This will split at the first
26179    # space.
26180    complete="$STRIP"
26181    path="${complete%% *}"
26182    tmp="$complete EOL"
26183    arguments="${tmp#* }"
26184
26185    # Cannot rely on the command "which" here since it doesn't always work.
26186    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26187    if test -z "$is_absolute_path"; then
26188      # Path to executable is not absolute. Find it.
26189      IFS_save="$IFS"
26190      IFS=:
26191      for p in $PATH; do
26192        if test -f "$p/$path" && test -x "$p/$path"; then
26193          new_path="$p/$path"
26194          break
26195        fi
26196      done
26197      IFS="$IFS_save"
26198    else
26199      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26200$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26201      new_path="$path"
26202    fi
26203
26204    if test "x$new_path" = x; then
26205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26206$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26207        has_space=`$ECHO "$complete" | $GREP " "`
26208        if test "x$has_space" != x; then
26209          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26210$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26211        fi
26212        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26213      fi
26214  fi
26215
26216      # Now join together the path and the arguments once again
26217      if test "x$arguments" != xEOL; then
26218        new_complete="$new_path ${arguments% *}"
26219      else
26220        new_complete="$new_path"
26221      fi
26222
26223  if test "x$complete" != "x$new_complete"; then
26224      STRIP="$new_complete"
26225      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26226$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26227    fi
26228
26229fi
26230
26231# objcopy is used for moving debug symbols to separate files when
26232# full debug symbols are enabled.
26233if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26234    if test -n "$ac_tool_prefix"; then
26235  for ac_prog in gobjcopy objcopy
26236  do
26237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26240$as_echo_n "checking for $ac_word... " >&6; }
26241if ${ac_cv_prog_OBJCOPY+:} false; then :
26242  $as_echo_n "(cached) " >&6
26243else
26244  if test -n "$OBJCOPY"; then
26245  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26246else
26247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26248for as_dir in $PATH
26249do
26250  IFS=$as_save_IFS
26251  test -z "$as_dir" && as_dir=.
26252    for ac_exec_ext in '' $ac_executable_extensions; do
26253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26254    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26256    break 2
26257  fi
26258done
26259  done
26260IFS=$as_save_IFS
26261
26262fi
26263fi
26264OBJCOPY=$ac_cv_prog_OBJCOPY
26265if test -n "$OBJCOPY"; then
26266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26267$as_echo "$OBJCOPY" >&6; }
26268else
26269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26270$as_echo "no" >&6; }
26271fi
26272
26273
26274    test -n "$OBJCOPY" && break
26275  done
26276fi
26277if test -z "$OBJCOPY"; then
26278  ac_ct_OBJCOPY=$OBJCOPY
26279  for ac_prog in gobjcopy objcopy
26280do
26281  # Extract the first word of "$ac_prog", so it can be a program name with args.
26282set dummy $ac_prog; ac_word=$2
26283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26284$as_echo_n "checking for $ac_word... " >&6; }
26285if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26286  $as_echo_n "(cached) " >&6
26287else
26288  if test -n "$ac_ct_OBJCOPY"; then
26289  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26290else
26291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26292for as_dir in $PATH
26293do
26294  IFS=$as_save_IFS
26295  test -z "$as_dir" && as_dir=.
26296    for ac_exec_ext in '' $ac_executable_extensions; do
26297  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26298    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26300    break 2
26301  fi
26302done
26303  done
26304IFS=$as_save_IFS
26305
26306fi
26307fi
26308ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26309if test -n "$ac_ct_OBJCOPY"; then
26310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26311$as_echo "$ac_ct_OBJCOPY" >&6; }
26312else
26313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26314$as_echo "no" >&6; }
26315fi
26316
26317
26318  test -n "$ac_ct_OBJCOPY" && break
26319done
26320
26321  if test "x$ac_ct_OBJCOPY" = x; then
26322    OBJCOPY=""
26323  else
26324    case $cross_compiling:$ac_tool_warned in
26325yes:)
26326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26328ac_tool_warned=yes ;;
26329esac
26330    OBJCOPY=$ac_ct_OBJCOPY
26331  fi
26332fi
26333
26334    # Only call fixup if objcopy was found.
26335    if test -n "$OBJCOPY"; then
26336
26337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26338
26339  # First separate the path from the arguments. This will split at the first
26340  # space.
26341  complete="$OBJCOPY"
26342  path="${complete%% *}"
26343  tmp="$complete EOL"
26344  arguments="${tmp#* }"
26345
26346  # Input might be given as Windows format, start by converting to
26347  # unix format.
26348  new_path=`$CYGPATH -u "$path"`
26349
26350  # Now try to locate executable using which
26351  new_path=`$WHICH "$new_path" 2> /dev/null`
26352  # bat and cmd files are not always considered executable in cygwin causing which
26353  # to not find them
26354  if test "x$new_path" = x \
26355           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26356           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26357    new_path=`$CYGPATH -u "$path"`
26358  fi
26359  if test "x$new_path" = x; then
26360    # Oops. Which didn't find the executable.
26361    # The splitting of arguments from the executable at a space might have been incorrect,
26362    # since paths with space are more likely in Windows. Give it another try with the whole
26363    # argument.
26364    path="$complete"
26365    arguments="EOL"
26366    new_path=`$CYGPATH -u "$path"`
26367    new_path=`$WHICH "$new_path" 2> /dev/null`
26368    # bat and cmd files are not always considered executable in cygwin causing which
26369    # to not find them
26370    if test "x$new_path" = x \
26371             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26372             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26373      new_path=`$CYGPATH -u "$path"`
26374    fi
26375    if test "x$new_path" = x; then
26376      # It's still not found. Now this is an unrecoverable error.
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26378$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26379      has_space=`$ECHO "$complete" | $GREP " "`
26380      if test "x$has_space" != x; then
26381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26383      fi
26384      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26385    fi
26386  fi
26387
26388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26391  # "foo.exe" is OK but "foo" is an error.
26392  #
26393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26394  # It is also a way to make sure we got the proper file name for the real test later on.
26395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26396  if test "x$test_shortpath" = x; then
26397    # Short path failed, file does not exist as specified.
26398    # Try adding .exe or .cmd
26399    if test -f "${new_path}.exe"; then
26400       input_to_shortpath="${new_path}.exe"
26401    elif test -f "${new_path}.cmd"; then
26402       input_to_shortpath="${new_path}.cmd"
26403    else
26404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26405$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26408      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26409    fi
26410  else
26411    input_to_shortpath="$new_path"
26412  fi
26413
26414  # Call helper function which possibly converts this using DOS-style short mode.
26415  # If so, the updated path is stored in $new_path.
26416  new_path="$input_to_shortpath"
26417
26418  input_path="$input_to_shortpath"
26419  # Check if we need to convert this using DOS-style short mode. If the path
26420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26421  # take no chances and rewrite it.
26422  # Note: m4 eats our [], so we need to use [ and ] instead.
26423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26424  if test "x$has_forbidden_chars" != x; then
26425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26429      # Going to short mode and back again did indeed matter. Since short mode is
26430      # case insensitive, let's make it lowercase to improve readability.
26431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26432      # Now convert it back to Unix-stile (cygpath)
26433      input_path=`$CYGPATH -u "$shortmode_path"`
26434      new_path="$input_path"
26435    fi
26436  fi
26437
26438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26439  if test "x$test_cygdrive_prefix" = x; then
26440    # As a simple fix, exclude /usr/bin since it's not a real path.
26441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26443      # a path prefixed by /cygdrive for fixpath to work.
26444      new_path="$CYGWIN_ROOT_PATH$input_path"
26445    fi
26446  fi
26447
26448  # remove trailing .exe if any
26449  new_path="${new_path/%.exe/}"
26450
26451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26452
26453  # First separate the path from the arguments. This will split at the first
26454  # space.
26455  complete="$OBJCOPY"
26456  path="${complete%% *}"
26457  tmp="$complete EOL"
26458  arguments="${tmp#* }"
26459
26460  # Input might be given as Windows format, start by converting to
26461  # unix format.
26462  new_path="$path"
26463
26464  windows_path="$new_path"
26465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26466    unix_path=`$CYGPATH -u "$windows_path"`
26467    new_path="$unix_path"
26468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26470    new_path="$unix_path"
26471  fi
26472
26473
26474  # Now try to locate executable using which
26475  new_path=`$WHICH "$new_path" 2> /dev/null`
26476
26477  if test "x$new_path" = x; then
26478    # Oops. Which didn't find the executable.
26479    # The splitting of arguments from the executable at a space might have been incorrect,
26480    # since paths with space are more likely in Windows. Give it another try with the whole
26481    # argument.
26482    path="$complete"
26483    arguments="EOL"
26484    new_path="$path"
26485
26486  windows_path="$new_path"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    new_path="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    new_path="$unix_path"
26493  fi
26494
26495
26496    new_path=`$WHICH "$new_path" 2> /dev/null`
26497
26498    if test "x$new_path" = x; then
26499      # It's still not found. Now this is an unrecoverable error.
26500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26501$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26502      has_space=`$ECHO "$complete" | $GREP " "`
26503      if test "x$has_space" != x; then
26504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26506      fi
26507      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26508    fi
26509  fi
26510
26511  # Now new_path has a complete unix path to the binary
26512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26513    # Keep paths in /bin as-is, but remove trailing .exe if any
26514    new_path="${new_path/%.exe/}"
26515    # Do not save /bin paths to all_fixpath_prefixes!
26516  else
26517    # Not in mixed or Windows style, start by that.
26518    new_path=`cmd //c echo $new_path`
26519
26520  input_path="$new_path"
26521  # Check if we need to convert this using DOS-style short mode. If the path
26522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26523  # take no chances and rewrite it.
26524  # Note: m4 eats our [], so we need to use [ and ] instead.
26525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26526  if test "x$has_forbidden_chars" != x; then
26527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26529  fi
26530
26531    # Output is in $new_path
26532
26533  windows_path="$new_path"
26534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26535    unix_path=`$CYGPATH -u "$windows_path"`
26536    new_path="$unix_path"
26537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26539    new_path="$unix_path"
26540  fi
26541
26542    # remove trailing .exe if any
26543    new_path="${new_path/%.exe/}"
26544
26545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26547  fi
26548
26549  else
26550    # We're on a posix platform. Hooray! :)
26551    # First separate the path from the arguments. This will split at the first
26552    # space.
26553    complete="$OBJCOPY"
26554    path="${complete%% *}"
26555    tmp="$complete EOL"
26556    arguments="${tmp#* }"
26557
26558    # Cannot rely on the command "which" here since it doesn't always work.
26559    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26560    if test -z "$is_absolute_path"; then
26561      # Path to executable is not absolute. Find it.
26562      IFS_save="$IFS"
26563      IFS=:
26564      for p in $PATH; do
26565        if test -f "$p/$path" && test -x "$p/$path"; then
26566          new_path="$p/$path"
26567          break
26568        fi
26569      done
26570      IFS="$IFS_save"
26571    else
26572      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26573$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26574      new_path="$path"
26575    fi
26576
26577    if test "x$new_path" = x; then
26578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26579$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26580        has_space=`$ECHO "$complete" | $GREP " "`
26581        if test "x$has_space" != x; then
26582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26584        fi
26585        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26586      fi
26587  fi
26588
26589      # Now join together the path and the arguments once again
26590      if test "x$arguments" != xEOL; then
26591        new_complete="$new_path ${arguments% *}"
26592      else
26593        new_complete="$new_path"
26594      fi
26595
26596  if test "x$complete" != "x$new_complete"; then
26597      OBJCOPY="$new_complete"
26598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26599$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26600    fi
26601
26602    fi
26603fi
26604
26605if test -n "$ac_tool_prefix"; then
26606  for ac_prog in gobjdump objdump
26607  do
26608    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26611$as_echo_n "checking for $ac_word... " >&6; }
26612if ${ac_cv_prog_OBJDUMP+:} false; then :
26613  $as_echo_n "(cached) " >&6
26614else
26615  if test -n "$OBJDUMP"; then
26616  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26617else
26618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26619for as_dir in $PATH
26620do
26621  IFS=$as_save_IFS
26622  test -z "$as_dir" && as_dir=.
26623    for ac_exec_ext in '' $ac_executable_extensions; do
26624  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26625    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26627    break 2
26628  fi
26629done
26630  done
26631IFS=$as_save_IFS
26632
26633fi
26634fi
26635OBJDUMP=$ac_cv_prog_OBJDUMP
26636if test -n "$OBJDUMP"; then
26637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26638$as_echo "$OBJDUMP" >&6; }
26639else
26640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26641$as_echo "no" >&6; }
26642fi
26643
26644
26645    test -n "$OBJDUMP" && break
26646  done
26647fi
26648if test -z "$OBJDUMP"; then
26649  ac_ct_OBJDUMP=$OBJDUMP
26650  for ac_prog in gobjdump objdump
26651do
26652  # Extract the first word of "$ac_prog", so it can be a program name with args.
26653set dummy $ac_prog; ac_word=$2
26654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26655$as_echo_n "checking for $ac_word... " >&6; }
26656if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26657  $as_echo_n "(cached) " >&6
26658else
26659  if test -n "$ac_ct_OBJDUMP"; then
26660  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26661else
26662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26663for as_dir in $PATH
26664do
26665  IFS=$as_save_IFS
26666  test -z "$as_dir" && as_dir=.
26667    for ac_exec_ext in '' $ac_executable_extensions; do
26668  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26669    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26671    break 2
26672  fi
26673done
26674  done
26675IFS=$as_save_IFS
26676
26677fi
26678fi
26679ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26680if test -n "$ac_ct_OBJDUMP"; then
26681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26682$as_echo "$ac_ct_OBJDUMP" >&6; }
26683else
26684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26685$as_echo "no" >&6; }
26686fi
26687
26688
26689  test -n "$ac_ct_OBJDUMP" && break
26690done
26691
26692  if test "x$ac_ct_OBJDUMP" = x; then
26693    OBJDUMP=""
26694  else
26695    case $cross_compiling:$ac_tool_warned in
26696yes:)
26697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26699ac_tool_warned=yes ;;
26700esac
26701    OBJDUMP=$ac_ct_OBJDUMP
26702  fi
26703fi
26704
26705if test "x$OBJDUMP" != x; then
26706  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26707
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709
26710  # First separate the path from the arguments. This will split at the first
26711  # space.
26712  complete="$OBJDUMP"
26713  path="${complete%% *}"
26714  tmp="$complete EOL"
26715  arguments="${tmp#* }"
26716
26717  # Input might be given as Windows format, start by converting to
26718  # unix format.
26719  new_path=`$CYGPATH -u "$path"`
26720
26721  # Now try to locate executable using which
26722  new_path=`$WHICH "$new_path" 2> /dev/null`
26723  # bat and cmd files are not always considered executable in cygwin causing which
26724  # to not find them
26725  if test "x$new_path" = x \
26726           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26727           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26728    new_path=`$CYGPATH -u "$path"`
26729  fi
26730  if test "x$new_path" = x; then
26731    # Oops. Which didn't find the executable.
26732    # The splitting of arguments from the executable at a space might have been incorrect,
26733    # since paths with space are more likely in Windows. Give it another try with the whole
26734    # argument.
26735    path="$complete"
26736    arguments="EOL"
26737    new_path=`$CYGPATH -u "$path"`
26738    new_path=`$WHICH "$new_path" 2> /dev/null`
26739    # bat and cmd files are not always considered executable in cygwin causing which
26740    # to not find them
26741    if test "x$new_path" = x \
26742             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26743             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26744      new_path=`$CYGPATH -u "$path"`
26745    fi
26746    if test "x$new_path" = x; then
26747      # It's still not found. Now this is an unrecoverable error.
26748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26749$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26750      has_space=`$ECHO "$complete" | $GREP " "`
26751      if test "x$has_space" != x; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26754      fi
26755      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26756    fi
26757  fi
26758
26759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26762  # "foo.exe" is OK but "foo" is an error.
26763  #
26764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26765  # It is also a way to make sure we got the proper file name for the real test later on.
26766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26767  if test "x$test_shortpath" = x; then
26768    # Short path failed, file does not exist as specified.
26769    # Try adding .exe or .cmd
26770    if test -f "${new_path}.exe"; then
26771       input_to_shortpath="${new_path}.exe"
26772    elif test -f "${new_path}.cmd"; then
26773       input_to_shortpath="${new_path}.cmd"
26774    else
26775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26776$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26779      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26780    fi
26781  else
26782    input_to_shortpath="$new_path"
26783  fi
26784
26785  # Call helper function which possibly converts this using DOS-style short mode.
26786  # If so, the updated path is stored in $new_path.
26787  new_path="$input_to_shortpath"
26788
26789  input_path="$input_to_shortpath"
26790  # Check if we need to convert this using DOS-style short mode. If the path
26791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26792  # take no chances and rewrite it.
26793  # Note: m4 eats our [], so we need to use [ and ] instead.
26794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26795  if test "x$has_forbidden_chars" != x; then
26796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26800      # Going to short mode and back again did indeed matter. Since short mode is
26801      # case insensitive, let's make it lowercase to improve readability.
26802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803      # Now convert it back to Unix-stile (cygpath)
26804      input_path=`$CYGPATH -u "$shortmode_path"`
26805      new_path="$input_path"
26806    fi
26807  fi
26808
26809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26810  if test "x$test_cygdrive_prefix" = x; then
26811    # As a simple fix, exclude /usr/bin since it's not a real path.
26812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26814      # a path prefixed by /cygdrive for fixpath to work.
26815      new_path="$CYGWIN_ROOT_PATH$input_path"
26816    fi
26817  fi
26818
26819  # remove trailing .exe if any
26820  new_path="${new_path/%.exe/}"
26821
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823
26824  # First separate the path from the arguments. This will split at the first
26825  # space.
26826  complete="$OBJDUMP"
26827  path="${complete%% *}"
26828  tmp="$complete EOL"
26829  arguments="${tmp#* }"
26830
26831  # Input might be given as Windows format, start by converting to
26832  # unix format.
26833  new_path="$path"
26834
26835  windows_path="$new_path"
26836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837    unix_path=`$CYGPATH -u "$windows_path"`
26838    new_path="$unix_path"
26839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26841    new_path="$unix_path"
26842  fi
26843
26844
26845  # Now try to locate executable using which
26846  new_path=`$WHICH "$new_path" 2> /dev/null`
26847
26848  if test "x$new_path" = x; then
26849    # Oops. Which didn't find the executable.
26850    # The splitting of arguments from the executable at a space might have been incorrect,
26851    # since paths with space are more likely in Windows. Give it another try with the whole
26852    # argument.
26853    path="$complete"
26854    arguments="EOL"
26855    new_path="$path"
26856
26857  windows_path="$new_path"
26858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859    unix_path=`$CYGPATH -u "$windows_path"`
26860    new_path="$unix_path"
26861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26863    new_path="$unix_path"
26864  fi
26865
26866
26867    new_path=`$WHICH "$new_path" 2> /dev/null`
26868
26869    if test "x$new_path" = x; then
26870      # It's still not found. Now this is an unrecoverable error.
26871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26872$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26873      has_space=`$ECHO "$complete" | $GREP " "`
26874      if test "x$has_space" != x; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26877      fi
26878      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26879    fi
26880  fi
26881
26882  # Now new_path has a complete unix path to the binary
26883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26884    # Keep paths in /bin as-is, but remove trailing .exe if any
26885    new_path="${new_path/%.exe/}"
26886    # Do not save /bin paths to all_fixpath_prefixes!
26887  else
26888    # Not in mixed or Windows style, start by that.
26889    new_path=`cmd //c echo $new_path`
26890
26891  input_path="$new_path"
26892  # Check if we need to convert this using DOS-style short mode. If the path
26893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26894  # take no chances and rewrite it.
26895  # Note: m4 eats our [], so we need to use [ and ] instead.
26896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26897  if test "x$has_forbidden_chars" != x; then
26898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26900  fi
26901
26902    # Output is in $new_path
26903
26904  windows_path="$new_path"
26905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906    unix_path=`$CYGPATH -u "$windows_path"`
26907    new_path="$unix_path"
26908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26910    new_path="$unix_path"
26911  fi
26912
26913    # remove trailing .exe if any
26914    new_path="${new_path/%.exe/}"
26915
26916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26918  fi
26919
26920  else
26921    # We're on a posix platform. Hooray! :)
26922    # First separate the path from the arguments. This will split at the first
26923    # space.
26924    complete="$OBJDUMP"
26925    path="${complete%% *}"
26926    tmp="$complete EOL"
26927    arguments="${tmp#* }"
26928
26929    # Cannot rely on the command "which" here since it doesn't always work.
26930    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26931    if test -z "$is_absolute_path"; then
26932      # Path to executable is not absolute. Find it.
26933      IFS_save="$IFS"
26934      IFS=:
26935      for p in $PATH; do
26936        if test -f "$p/$path" && test -x "$p/$path"; then
26937          new_path="$p/$path"
26938          break
26939        fi
26940      done
26941      IFS="$IFS_save"
26942    else
26943      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26944$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26945      new_path="$path"
26946    fi
26947
26948    if test "x$new_path" = x; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26950$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26951        has_space=`$ECHO "$complete" | $GREP " "`
26952        if test "x$has_space" != x; then
26953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26955        fi
26956        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26957      fi
26958  fi
26959
26960      # Now join together the path and the arguments once again
26961      if test "x$arguments" != xEOL; then
26962        new_complete="$new_path ${arguments% *}"
26963      else
26964        new_complete="$new_path"
26965      fi
26966
26967  if test "x$complete" != "x$new_complete"; then
26968      OBJDUMP="$new_complete"
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26970$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26971    fi
26972
26973fi
26974
26975if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26976   # Extract the first word of "lipo", so it can be a program name with args.
26977set dummy lipo; ac_word=$2
26978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26979$as_echo_n "checking for $ac_word... " >&6; }
26980if ${ac_cv_path_LIPO+:} false; then :
26981  $as_echo_n "(cached) " >&6
26982else
26983  case $LIPO in
26984  [\\/]* | ?:[\\/]*)
26985  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26986  ;;
26987  *)
26988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26989for as_dir in $PATH
26990do
26991  IFS=$as_save_IFS
26992  test -z "$as_dir" && as_dir=.
26993    for ac_exec_ext in '' $ac_executable_extensions; do
26994  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26995    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26997    break 2
26998  fi
26999done
27000  done
27001IFS=$as_save_IFS
27002
27003  ;;
27004esac
27005fi
27006LIPO=$ac_cv_path_LIPO
27007if test -n "$LIPO"; then
27008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27009$as_echo "$LIPO" >&6; }
27010else
27011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27012$as_echo "no" >&6; }
27013fi
27014
27015
27016
27017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27018
27019  # First separate the path from the arguments. This will split at the first
27020  # space.
27021  complete="$LIPO"
27022  path="${complete%% *}"
27023  tmp="$complete EOL"
27024  arguments="${tmp#* }"
27025
27026  # Input might be given as Windows format, start by converting to
27027  # unix format.
27028  new_path=`$CYGPATH -u "$path"`
27029
27030  # Now try to locate executable using which
27031  new_path=`$WHICH "$new_path" 2> /dev/null`
27032  # bat and cmd files are not always considered executable in cygwin causing which
27033  # to not find them
27034  if test "x$new_path" = x \
27035           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27036           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27037    new_path=`$CYGPATH -u "$path"`
27038  fi
27039  if test "x$new_path" = x; then
27040    # Oops. Which didn't find the executable.
27041    # The splitting of arguments from the executable at a space might have been incorrect,
27042    # since paths with space are more likely in Windows. Give it another try with the whole
27043    # argument.
27044    path="$complete"
27045    arguments="EOL"
27046    new_path=`$CYGPATH -u "$path"`
27047    new_path=`$WHICH "$new_path" 2> /dev/null`
27048    # bat and cmd files are not always considered executable in cygwin causing which
27049    # to not find them
27050    if test "x$new_path" = x \
27051             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27052             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27053      new_path=`$CYGPATH -u "$path"`
27054    fi
27055    if test "x$new_path" = x; then
27056      # It's still not found. Now this is an unrecoverable error.
27057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27058$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27059      has_space=`$ECHO "$complete" | $GREP " "`
27060      if test "x$has_space" != x; then
27061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27063      fi
27064      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27065    fi
27066  fi
27067
27068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27071  # "foo.exe" is OK but "foo" is an error.
27072  #
27073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27074  # It is also a way to make sure we got the proper file name for the real test later on.
27075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27076  if test "x$test_shortpath" = x; then
27077    # Short path failed, file does not exist as specified.
27078    # Try adding .exe or .cmd
27079    if test -f "${new_path}.exe"; then
27080       input_to_shortpath="${new_path}.exe"
27081    elif test -f "${new_path}.cmd"; then
27082       input_to_shortpath="${new_path}.cmd"
27083    else
27084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27085$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27088      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27089    fi
27090  else
27091    input_to_shortpath="$new_path"
27092  fi
27093
27094  # Call helper function which possibly converts this using DOS-style short mode.
27095  # If so, the updated path is stored in $new_path.
27096  new_path="$input_to_shortpath"
27097
27098  input_path="$input_to_shortpath"
27099  # Check if we need to convert this using DOS-style short mode. If the path
27100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27101  # take no chances and rewrite it.
27102  # Note: m4 eats our [], so we need to use [ and ] instead.
27103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27104  if test "x$has_forbidden_chars" != x; then
27105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27109      # Going to short mode and back again did indeed matter. Since short mode is
27110      # case insensitive, let's make it lowercase to improve readability.
27111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27112      # Now convert it back to Unix-stile (cygpath)
27113      input_path=`$CYGPATH -u "$shortmode_path"`
27114      new_path="$input_path"
27115    fi
27116  fi
27117
27118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27119  if test "x$test_cygdrive_prefix" = x; then
27120    # As a simple fix, exclude /usr/bin since it's not a real path.
27121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27123      # a path prefixed by /cygdrive for fixpath to work.
27124      new_path="$CYGWIN_ROOT_PATH$input_path"
27125    fi
27126  fi
27127
27128  # remove trailing .exe if any
27129  new_path="${new_path/%.exe/}"
27130
27131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27132
27133  # First separate the path from the arguments. This will split at the first
27134  # space.
27135  complete="$LIPO"
27136  path="${complete%% *}"
27137  tmp="$complete EOL"
27138  arguments="${tmp#* }"
27139
27140  # Input might be given as Windows format, start by converting to
27141  # unix format.
27142  new_path="$path"
27143
27144  windows_path="$new_path"
27145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27146    unix_path=`$CYGPATH -u "$windows_path"`
27147    new_path="$unix_path"
27148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27150    new_path="$unix_path"
27151  fi
27152
27153
27154  # Now try to locate executable using which
27155  new_path=`$WHICH "$new_path" 2> /dev/null`
27156
27157  if test "x$new_path" = x; then
27158    # Oops. Which didn't find the executable.
27159    # The splitting of arguments from the executable at a space might have been incorrect,
27160    # since paths with space are more likely in Windows. Give it another try with the whole
27161    # argument.
27162    path="$complete"
27163    arguments="EOL"
27164    new_path="$path"
27165
27166  windows_path="$new_path"
27167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27168    unix_path=`$CYGPATH -u "$windows_path"`
27169    new_path="$unix_path"
27170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27172    new_path="$unix_path"
27173  fi
27174
27175
27176    new_path=`$WHICH "$new_path" 2> /dev/null`
27177
27178    if test "x$new_path" = x; then
27179      # It's still not found. Now this is an unrecoverable error.
27180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27181$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27182      has_space=`$ECHO "$complete" | $GREP " "`
27183      if test "x$has_space" != x; then
27184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27186      fi
27187      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27188    fi
27189  fi
27190
27191  # Now new_path has a complete unix path to the binary
27192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27193    # Keep paths in /bin as-is, but remove trailing .exe if any
27194    new_path="${new_path/%.exe/}"
27195    # Do not save /bin paths to all_fixpath_prefixes!
27196  else
27197    # Not in mixed or Windows style, start by that.
27198    new_path=`cmd //c echo $new_path`
27199
27200  input_path="$new_path"
27201  # Check if we need to convert this using DOS-style short mode. If the path
27202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27203  # take no chances and rewrite it.
27204  # Note: m4 eats our [], so we need to use [ and ] instead.
27205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27206  if test "x$has_forbidden_chars" != x; then
27207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27209  fi
27210
27211    # Output is in $new_path
27212
27213  windows_path="$new_path"
27214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27215    unix_path=`$CYGPATH -u "$windows_path"`
27216    new_path="$unix_path"
27217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27219    new_path="$unix_path"
27220  fi
27221
27222    # remove trailing .exe if any
27223    new_path="${new_path/%.exe/}"
27224
27225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27227  fi
27228
27229  else
27230    # We're on a posix platform. Hooray! :)
27231    # First separate the path from the arguments. This will split at the first
27232    # space.
27233    complete="$LIPO"
27234    path="${complete%% *}"
27235    tmp="$complete EOL"
27236    arguments="${tmp#* }"
27237
27238    # Cannot rely on the command "which" here since it doesn't always work.
27239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27240    if test -z "$is_absolute_path"; then
27241      # Path to executable is not absolute. Find it.
27242      IFS_save="$IFS"
27243      IFS=:
27244      for p in $PATH; do
27245        if test -f "$p/$path" && test -x "$p/$path"; then
27246          new_path="$p/$path"
27247          break
27248        fi
27249      done
27250      IFS="$IFS_save"
27251    else
27252      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27253$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27254      new_path="$path"
27255    fi
27256
27257    if test "x$new_path" = x; then
27258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27259$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27260        has_space=`$ECHO "$complete" | $GREP " "`
27261        if test "x$has_space" != x; then
27262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27264        fi
27265        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27266      fi
27267  fi
27268
27269      # Now join together the path and the arguments once again
27270      if test "x$arguments" != xEOL; then
27271        new_complete="$new_path ${arguments% *}"
27272      else
27273        new_complete="$new_path"
27274      fi
27275
27276  if test "x$complete" != "x$new_complete"; then
27277      LIPO="$new_complete"
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27279$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27280    fi
27281
27282fi
27283
27284# Restore old path without tools dir
27285PATH="$OLD_PATH"
27286
27287
27288# FIXME: Currently we must test this after paths but before flags. Fix!
27289
27290# And we can test some aspects on the target using configure macros.
27291
27292
27293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27294$as_echo_n "checking for ANSI C header files... " >&6; }
27295if ${ac_cv_header_stdc+:} false; then :
27296  $as_echo_n "(cached) " >&6
27297else
27298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27299/* end confdefs.h.  */
27300#include <stdlib.h>
27301#include <stdarg.h>
27302#include <string.h>
27303#include <float.h>
27304
27305int
27306main ()
27307{
27308
27309  ;
27310  return 0;
27311}
27312_ACEOF
27313if ac_fn_cxx_try_compile "$LINENO"; then :
27314  ac_cv_header_stdc=yes
27315else
27316  ac_cv_header_stdc=no
27317fi
27318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27319
27320if test $ac_cv_header_stdc = yes; then
27321  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27323/* end confdefs.h.  */
27324#include <string.h>
27325
27326_ACEOF
27327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27328  $EGREP "memchr" >/dev/null 2>&1; then :
27329
27330else
27331  ac_cv_header_stdc=no
27332fi
27333rm -f conftest*
27334
27335fi
27336
27337if test $ac_cv_header_stdc = yes; then
27338  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27340/* end confdefs.h.  */
27341#include <stdlib.h>
27342
27343_ACEOF
27344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27345  $EGREP "free" >/dev/null 2>&1; then :
27346
27347else
27348  ac_cv_header_stdc=no
27349fi
27350rm -f conftest*
27351
27352fi
27353
27354if test $ac_cv_header_stdc = yes; then
27355  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27356  if test "$cross_compiling" = yes; then :
27357  :
27358else
27359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27360/* end confdefs.h.  */
27361#include <ctype.h>
27362#include <stdlib.h>
27363#if ((' ' & 0x0FF) == 0x020)
27364# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27365# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27366#else
27367# define ISLOWER(c) \
27368		   (('a' <= (c) && (c) <= 'i') \
27369		     || ('j' <= (c) && (c) <= 'r') \
27370		     || ('s' <= (c) && (c) <= 'z'))
27371# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27372#endif
27373
27374#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27375int
27376main ()
27377{
27378  int i;
27379  for (i = 0; i < 256; i++)
27380    if (XOR (islower (i), ISLOWER (i))
27381	|| toupper (i) != TOUPPER (i))
27382      return 2;
27383  return 0;
27384}
27385_ACEOF
27386if ac_fn_cxx_try_run "$LINENO"; then :
27387
27388else
27389  ac_cv_header_stdc=no
27390fi
27391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27392  conftest.$ac_objext conftest.beam conftest.$ac_ext
27393fi
27394
27395fi
27396fi
27397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27398$as_echo "$ac_cv_header_stdc" >&6; }
27399if test $ac_cv_header_stdc = yes; then
27400
27401$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27402
27403fi
27404
27405# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27406for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27407		  inttypes.h stdint.h unistd.h
27408do :
27409  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27410ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27411"
27412if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27413  cat >>confdefs.h <<_ACEOF
27414#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27415_ACEOF
27416
27417fi
27418
27419done
27420
27421
27422
27423###############################################################################
27424#
27425# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27426# (The JVM can use 32 or 64 bit Java pointers but that decision
27427# is made at runtime.)
27428#
27429if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27430  # Always specify -m flags on Solaris
27431
27432  # keep track of c/cxx flags that we added outselves...
27433  #   to prevent emitting warning...
27434  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27435  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27436  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27437
27438  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27439  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27440  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27441
27442  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27443  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27444  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27445
27446elif test "x$COMPILE_TYPE" = xreduced; then
27447  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27448    # Specify -m if running reduced on other Posix platforms
27449
27450  # keep track of c/cxx flags that we added outselves...
27451  #   to prevent emitting warning...
27452  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27453  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27454  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27455
27456  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27457  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27458  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27459
27460  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27461  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27462  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27463
27464  fi
27465fi
27466
27467# Make compilation sanity check
27468for ac_header in stdio.h
27469do :
27470  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27471if test "x$ac_cv_header_stdio_h" = xyes; then :
27472  cat >>confdefs.h <<_ACEOF
27473#define HAVE_STDIO_H 1
27474_ACEOF
27475
27476else
27477
27478  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27479$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27480  if test "x$COMPILE_TYPE" = xreduced; then
27481    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27482$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27483  elif test "x$COMPILE_TYPE" = xcross; then
27484    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27485$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27486  fi
27487  as_fn_error $? "Cannot continue." "$LINENO" 5
27488
27489fi
27490
27491done
27492
27493
27494# The cast to long int works around a bug in the HP C Compiler
27495# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27496# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27497# This bug is HP SR number 8606223364.
27498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27499$as_echo_n "checking size of int *... " >&6; }
27500if ${ac_cv_sizeof_int_p+:} false; then :
27501  $as_echo_n "(cached) " >&6
27502else
27503  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27504
27505else
27506  if test "$ac_cv_type_int_p" = yes; then
27507     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27509as_fn_error 77 "cannot compute sizeof (int *)
27510See \`config.log' for more details" "$LINENO" 5; }
27511   else
27512     ac_cv_sizeof_int_p=0
27513   fi
27514fi
27515
27516fi
27517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27518$as_echo "$ac_cv_sizeof_int_p" >&6; }
27519
27520
27521
27522cat >>confdefs.h <<_ACEOF
27523#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27524_ACEOF
27525
27526
27527
27528if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27529  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27530  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27531fi
27532
27533if test "x$SIZEOF_INT_P" = x; then
27534    # The test failed, lets stick to the assumed value.
27535    { $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
27536$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27537else
27538    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27539
27540    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27541        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
27542    fi
27543fi
27544
27545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27546$as_echo_n "checking for target address size... " >&6; }
27547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27548$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27549
27550
27551###############################################################################
27552#
27553# Is the target little of big endian?
27554#
27555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27556$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27557if ${ac_cv_c_bigendian+:} false; then :
27558  $as_echo_n "(cached) " >&6
27559else
27560  ac_cv_c_bigendian=unknown
27561    # See if we're dealing with a universal compiler.
27562    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27563/* end confdefs.h.  */
27564#ifndef __APPLE_CC__
27565	       not a universal capable compiler
27566	     #endif
27567	     typedef int dummy;
27568
27569_ACEOF
27570if ac_fn_cxx_try_compile "$LINENO"; then :
27571
27572	# Check for potential -arch flags.  It is not universal unless
27573	# there are at least two -arch flags with different values.
27574	ac_arch=
27575	ac_prev=
27576	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27577	 if test -n "$ac_prev"; then
27578	   case $ac_word in
27579	     i?86 | x86_64 | ppc | ppc64)
27580	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27581		 ac_arch=$ac_word
27582	       else
27583		 ac_cv_c_bigendian=universal
27584		 break
27585	       fi
27586	       ;;
27587	   esac
27588	   ac_prev=
27589	 elif test "x$ac_word" = "x-arch"; then
27590	   ac_prev=arch
27591	 fi
27592       done
27593fi
27594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27595    if test $ac_cv_c_bigendian = unknown; then
27596      # See if sys/param.h defines the BYTE_ORDER macro.
27597      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27598/* end confdefs.h.  */
27599#include <sys/types.h>
27600	     #include <sys/param.h>
27601
27602int
27603main ()
27604{
27605#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27606		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27607		     && LITTLE_ENDIAN)
27608	      bogus endian macros
27609	     #endif
27610
27611  ;
27612  return 0;
27613}
27614_ACEOF
27615if ac_fn_cxx_try_compile "$LINENO"; then :
27616  # It does; now see whether it defined to BIG_ENDIAN or not.
27617	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27618/* end confdefs.h.  */
27619#include <sys/types.h>
27620		#include <sys/param.h>
27621
27622int
27623main ()
27624{
27625#if BYTE_ORDER != BIG_ENDIAN
27626		 not big endian
27627		#endif
27628
27629  ;
27630  return 0;
27631}
27632_ACEOF
27633if ac_fn_cxx_try_compile "$LINENO"; then :
27634  ac_cv_c_bigendian=yes
27635else
27636  ac_cv_c_bigendian=no
27637fi
27638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27639fi
27640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27641    fi
27642    if test $ac_cv_c_bigendian = unknown; then
27643      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27644      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27645/* end confdefs.h.  */
27646#include <limits.h>
27647
27648int
27649main ()
27650{
27651#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27652	      bogus endian macros
27653	     #endif
27654
27655  ;
27656  return 0;
27657}
27658_ACEOF
27659if ac_fn_cxx_try_compile "$LINENO"; then :
27660  # It does; now see whether it defined to _BIG_ENDIAN or not.
27661	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27662/* end confdefs.h.  */
27663#include <limits.h>
27664
27665int
27666main ()
27667{
27668#ifndef _BIG_ENDIAN
27669		 not big endian
27670		#endif
27671
27672  ;
27673  return 0;
27674}
27675_ACEOF
27676if ac_fn_cxx_try_compile "$LINENO"; then :
27677  ac_cv_c_bigendian=yes
27678else
27679  ac_cv_c_bigendian=no
27680fi
27681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27682fi
27683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27684    fi
27685    if test $ac_cv_c_bigendian = unknown; then
27686      # Compile a test program.
27687      if test "$cross_compiling" = yes; then :
27688  # Try to guess by grepping values from an object file.
27689	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27690/* end confdefs.h.  */
27691short int ascii_mm[] =
27692		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27693		short int ascii_ii[] =
27694		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27695		int use_ascii (int i) {
27696		  return ascii_mm[i] + ascii_ii[i];
27697		}
27698		short int ebcdic_ii[] =
27699		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27700		short int ebcdic_mm[] =
27701		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27702		int use_ebcdic (int i) {
27703		  return ebcdic_mm[i] + ebcdic_ii[i];
27704		}
27705		extern int foo;
27706
27707int
27708main ()
27709{
27710return use_ascii (foo) == use_ebcdic (foo);
27711  ;
27712  return 0;
27713}
27714_ACEOF
27715if ac_fn_cxx_try_compile "$LINENO"; then :
27716  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27717	      ac_cv_c_bigendian=yes
27718	    fi
27719	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27720	      if test "$ac_cv_c_bigendian" = unknown; then
27721		ac_cv_c_bigendian=no
27722	      else
27723		# finding both strings is unlikely to happen, but who knows?
27724		ac_cv_c_bigendian=unknown
27725	      fi
27726	    fi
27727fi
27728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27729else
27730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27731/* end confdefs.h.  */
27732$ac_includes_default
27733int
27734main ()
27735{
27736
27737	     /* Are we little or big endian?  From Harbison&Steele.  */
27738	     union
27739	     {
27740	       long int l;
27741	       char c[sizeof (long int)];
27742	     } u;
27743	     u.l = 1;
27744	     return u.c[sizeof (long int) - 1] == 1;
27745
27746  ;
27747  return 0;
27748}
27749_ACEOF
27750if ac_fn_cxx_try_run "$LINENO"; then :
27751  ac_cv_c_bigendian=no
27752else
27753  ac_cv_c_bigendian=yes
27754fi
27755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27756  conftest.$ac_objext conftest.beam conftest.$ac_ext
27757fi
27758
27759    fi
27760fi
27761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27762$as_echo "$ac_cv_c_bigendian" >&6; }
27763 case $ac_cv_c_bigendian in #(
27764   yes)
27765     ENDIAN="big";; #(
27766   no)
27767     ENDIAN="little" ;; #(
27768   universal)
27769     ENDIAN="universal_endianness"
27770     ;; #(
27771   *)
27772     ENDIAN="unknown" ;;
27773 esac
27774
27775
27776if test "x$ENDIAN" = xuniversal_endianness; then
27777    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27778fi
27779if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27780    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
27781fi
27782
27783
27784# Configure flags for the tools
27785
27786
27787###############################################################################
27788#
27789# How to compile shared libraries.
27790#
27791
27792if test "x$GCC" = xyes; then
27793    COMPILER_NAME=gcc
27794    PICFLAG="-fPIC"
27795    LIBRARY_PREFIX=lib
27796    SHARED_LIBRARY='lib$1.so'
27797    STATIC_LIBRARY='lib$1.a'
27798    SHARED_LIBRARY_FLAGS="-shared"
27799    SHARED_LIBRARY_SUFFIX='.so'
27800    STATIC_LIBRARY_SUFFIX='.a'
27801    OBJ_SUFFIX='.o'
27802    EXE_SUFFIX=''
27803    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27804    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27805    C_FLAG_REORDER=''
27806    CXX_FLAG_REORDER=''
27807    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27808    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27809    LD="$CC"
27810    LDEXE="$CC"
27811    LDCXX="$CXX"
27812    LDEXECXX="$CXX"
27813    POST_STRIP_CMD="$STRIP -g"
27814
27815    # Linking is different on MacOSX
27816    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27817        # Might change in the future to clang.
27818        COMPILER_NAME=gcc
27819        SHARED_LIBRARY='lib$1.dylib'
27820        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27821        SHARED_LIBRARY_SUFFIX='.dylib'
27822        EXE_SUFFIX=''
27823        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27824        SET_SHARED_LIBRARY_MAPFILE=''
27825        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27826        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27827        POST_STRIP_CMD="$STRIP -S"
27828    fi
27829else
27830    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27831        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27832        COMPILER_NAME=ossc
27833        PICFLAG="-KPIC"
27834        LIBRARY_PREFIX=lib
27835        SHARED_LIBRARY='lib$1.so'
27836        STATIC_LIBRARY='lib$1.a'
27837        SHARED_LIBRARY_FLAGS="-G"
27838        SHARED_LIBRARY_SUFFIX='.so'
27839        STATIC_LIBRARY_SUFFIX='.a'
27840        OBJ_SUFFIX='.o'
27841        EXE_SUFFIX=''
27842        SET_SHARED_LIBRARY_NAME=''
27843        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27844	C_FLAG_REORDER='-xF'
27845	CXX_FLAG_REORDER='-xF'
27846        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27847        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27848        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27849        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27850        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27851        POST_STRIP_CMD="$STRIP -x"
27852        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27853    fi
27854    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27855        # If it is not gcc, then assume it is the MS Visual Studio compiler
27856        COMPILER_NAME=cl
27857        PICFLAG=""
27858        LIBRARY_PREFIX=
27859        SHARED_LIBRARY='$1.dll'
27860        STATIC_LIBRARY='$1.lib'
27861        SHARED_LIBRARY_FLAGS="-LD"
27862        SHARED_LIBRARY_SUFFIX='.dll'
27863        STATIC_LIBRARY_SUFFIX='.lib'
27864        OBJ_SUFFIX='.obj'
27865        EXE_SUFFIX='.exe'
27866        SET_SHARED_LIBRARY_NAME=''
27867        SET_SHARED_LIBRARY_MAPFILE=''
27868        SET_SHARED_LIBRARY_ORIGIN=''
27869        SET_EXECUTABLE_ORIGIN=''
27870    fi
27871fi
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890# The (cross) compiler is now configured, we can now test capabilities
27891# of the target platform.
27892
27893
27894
27895###############################################################################
27896#
27897# Setup the opt flags for different compilers
27898# and different operating systems.
27899#
27900
27901#
27902# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27903#
27904if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27905    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27906    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27907    CFLAGS="$CFLAGS -mstackrealign"
27908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27909$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27910    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27911/* end confdefs.h.  */
27912int main() { return 0; }
27913_ACEOF
27914if ac_fn_cxx_try_link "$LINENO"; then :
27915
27916		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27917$as_echo "yes" >&6; }
27918
27919else
27920
27921		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27922$as_echo "no" >&6; }
27923	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27924
27925fi
27926rm -f core conftest.err conftest.$ac_objext \
27927    conftest$ac_exeext conftest.$ac_ext
27928fi
27929
27930C_FLAG_DEPS="-MMD -MF"
27931CXX_FLAG_DEPS="-MMD -MF"
27932
27933case $COMPILER_TYPE in
27934  CC )
27935    D_FLAG="-g"
27936    case $COMPILER_NAME in
27937      gcc )
27938      	case $OPENJDK_TARGET_OS in
27939	  macosx )
27940	    # On MacOSX we optimize for size, something
27941	    # we should do for all platforms?
27942	    C_O_FLAG_HI="-Os"
27943	    C_O_FLAG_NORM="-Os"
27944	    C_O_FLAG_NONE=""
27945	    ;;
27946	  *)
27947	    C_O_FLAG_HI="-O3"
27948	    C_O_FLAG_NORM="-O2"
27949	    C_O_FLAG_NONE="-O0"
27950	    CFLAGS_DEBUG_SYMBOLS="-g"
27951	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27952	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27953	       CFLAGS_DEBUG_SYMBOLS="-g1"
27954	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27955	    fi
27956	    ;;
27957	esac
27958        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27959        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27960        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27961        ;;
27962      ossc )
27963        #
27964        # Forte has different names for this with their C++ compiler...
27965        #
27966        C_FLAG_DEPS="-xMMD -xMF"
27967        CXX_FLAG_DEPS="-xMMD -xMF"
27968
27969        # Extra options used with HIGHEST
27970        #
27971        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27972        #          done with care, there are some assumptions below that need to
27973        #          be understood about the use of pointers, and IEEE behavior.
27974        #
27975        # Use non-standard floating point mode (not IEEE 754)
27976        CC_HIGHEST="$CC_HIGHEST -fns"
27977        # Do some simplification of floating point arithmetic (not IEEE 754)
27978        CC_HIGHEST="$CC_HIGHEST -fsimple"
27979        # Use single precision floating point with 'float'
27980        CC_HIGHEST="$CC_HIGHEST -fsingle"
27981        # Assume memory references via basic pointer types do not alias
27982        #   (Source with excessing pointer casting and data access with mixed
27983        #    pointer types are not recommended)
27984        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27985        # Use intrinsic or inline versions for math/std functions
27986        #   (If you expect perfect errno behavior, do not use this)
27987        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27988        # Loop data dependency optimizations (need -xO3 or higher)
27989        CC_HIGHEST="$CC_HIGHEST -xdepend"
27990        # Pointer parameters to functions do not overlap
27991        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27992        #    If you pass in multiple pointers to the same data, do not use this)
27993        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27994        # Inline some library routines
27995        #   (If you expect perfect errno behavior, do not use this)
27996        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27997        # Use optimized math routines
27998        #   (If you expect perfect errno behavior, do not use this)
27999        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28000        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28001
28002        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28003          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28004          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28005        fi
28006
28007        case $OPENJDK_TARGET_CPU_ARCH in
28008          x86)
28009            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28010            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28011            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28012            C_O_FLAG_NONE="-xregs=no%frameptr"
28013            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28014            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28015            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28016            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28017            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28018               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28019               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28020            fi
28021            ;;
28022          sparc)
28023            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28024            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28025            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28026            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28027            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28028            C_O_FLAG_NONE=""
28029            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28030            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28031            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28032            CXX_O_FLAG_NONE=""
28033            ;;
28034        esac
28035
28036    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28037    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28038    esac
28039    ;;
28040  CL )
28041    D_FLAG=
28042    C_O_FLAG_HIGHEST="-O2"
28043    C_O_FLAG_HI="-O1"
28044    C_O_FLAG_NORM="-O1"
28045    C_O_FLAG_NONE="-Od"
28046    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28047    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28048    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28049    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28050    ;;
28051esac
28052
28053if test -z "$C_O_FLAG_HIGHEST"; then
28054   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28055fi
28056
28057if test -z "$CXX_O_FLAG_HIGHEST"; then
28058   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28059fi
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28075   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28076$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28077fi
28078
28079if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28080   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28081$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28082fi
28083
28084if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28085   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28086$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28087fi
28088
28089
28090# Check whether --with-extra-cflags was given.
28091if test "${with_extra_cflags+set}" = set; then :
28092  withval=$with_extra_cflags;
28093fi
28094
28095
28096
28097# Check whether --with-extra-cxxflags was given.
28098if test "${with_extra_cxxflags+set}" = set; then :
28099  withval=$with_extra_cxxflags;
28100fi
28101
28102
28103
28104# Check whether --with-extra-ldflags was given.
28105if test "${with_extra_ldflags+set}" = set; then :
28106  withval=$with_extra_ldflags;
28107fi
28108
28109
28110CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28111CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28112LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28113
28114# Hotspot needs these set in their legacy form
28115LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28116LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28117LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28118
28119
28120
28121
28122
28123###############################################################################
28124#
28125# Now setup the CFLAGS and LDFLAGS for the JDK build.
28126# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28127#
28128case $COMPILER_NAME in
28129      gcc )
28130      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28131                          -pipe \
28132                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28133	  case $OPENJDK_TARGET_CPU_ARCH in
28134	  arm )
28135            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28136	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28137	  ;;
28138	  ppc )
28139            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28140	  ;;
28141	  * )
28142	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28143	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28144          ;;
28145	  esac
28146          ;;
28147      ossc )
28148          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28149          case $OPENJDK_TARGET_CPU_ARCH in
28150          x86 )
28151            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28152       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28153          ;;
28154          esac
28155
28156      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28157      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28158
28159          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28160          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28161          ;;
28162      cl )
28163          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28164               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28165	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28166	       -DWIN32 -DIAL"
28167          case $OPENJDK_TARGET_CPU in
28168              x86 )
28169                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28170                  ;;
28171              x86_64 )
28172                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28173                  ;;
28174          esac
28175          ;;
28176esac
28177
28178###############################################################################
28179
28180CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28181
28182# The package path is used only on macosx?
28183PACKAGE_PATH=/opt/local
28184
28185
28186if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28187    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28188    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28189    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28190    #   Note: -Dmacro         is the same as    #define macro 1
28191    #         -Dmacro=	    is the same as    #define macro
28192    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28193        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28194    else
28195        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28196    fi
28197else
28198    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28199fi
28200if test "x$OPENJDK_TARGET_OS" = xlinux; then
28201    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28202fi
28203if test "x$OPENJDK_TARGET_OS" = xwindows; then
28204    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28205fi
28206if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28207    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28208fi
28209if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28210    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28211fi
28212if test "x$OPENJDK_TARGET_OS" = xbsd; then
28213    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28214fi
28215if test "x$DEBUG_LEVEL" = xrelease; then
28216    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28217    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28218        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28219    fi
28220else
28221    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28222fi
28223
28224CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28225CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28226
28227CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28228        -I${JDK_OUTPUTDIR}/include \
28229        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28230        -I${JDK_TOPDIR}/src/share/javavm/export \
28231        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28232        -I${JDK_TOPDIR}/src/share/native/common \
28233        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28234
28235# The shared libraries are compiled using the picflag.
28236CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28237CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28238
28239# Executable flags
28240CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28241CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28242
28243# Now this is odd. The JDK native libraries have to link against libjvm.so
28244# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28245# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28246# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28247# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28248# libraries will link to whatever is in memory. Yuck.
28249#
28250# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28251if test "x$COMPILER_NAME" = xcl; then
28252    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28253    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28254        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28255    fi
28256    # TODO: make -debug optional "--disable-full-debug-symbols"
28257    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28258    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28259    LDFLAGS_JDKLIB_SUFFIX=""
28260    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28261        LDFLAGS_STACK_SIZE=1048576
28262    else
28263        LDFLAGS_STACK_SIZE=327680
28264    fi
28265    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28266else
28267    if test "x$COMPILER_NAME" = xgcc; then
28268        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28269        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28270        if test -n "$HAS_GNU_HASH"; then
28271            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28272        fi
28273        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28274          # And since we now know that the linker is gnu, then add -z defs, to forbid
28275          # undefined symbols in object files.
28276          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28277          if test "x$DEBUG_LEVEL" = "xrelease"; then
28278              # When building release libraries, tell the linker optimize them.
28279              # Should this be supplied to the OSS linker as well?
28280              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28281          fi
28282        fi
28283    fi
28284    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28285                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28286
28287    # On some platforms (mac) the linker warns about non existing -L dirs.
28288    # Add server first if available. Linking aginst client does not always produce the same results.
28289    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28290    # Default to server for other variants.
28291    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28292        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28293    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28294        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28295    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28296        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28297    else
28298        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28299    fi
28300
28301    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28302    if test "x$COMPILER_NAME" = xossc; then
28303        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28304    fi
28305
28306    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28307    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28308        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28309    fi
28310fi
28311
28312# Adjust flags according to debug level.
28313case $DEBUG_LEVEL in
28314      fastdebug )
28315              CFLAGS="$CFLAGS $D_FLAG"
28316              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28317              ;;
28318      slowdebug )
28319              CFLAGS="$CFLAGS $D_FLAG"
28320	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28321	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28322	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28323	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28324              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28325              ;;
28326esac
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342# Setup debug symbols (need objcopy from the toolchain for that)
28343
28344#
28345# ENABLE_DEBUG_SYMBOLS
28346# This must be done after the toolchain is setup, since we're looking at objcopy.
28347#
28348# Check whether --enable-debug-symbols was given.
28349if test "${enable_debug_symbols+set}" = set; then :
28350  enableval=$enable_debug_symbols;
28351fi
28352
28353
28354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28355$as_echo_n "checking if we should generate debug symbols... " >&6; }
28356
28357if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28358   # explicit enabling of enable-debug-symbols and can't find objcopy
28359   #   this is an error
28360   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28361fi
28362
28363if test "x$enable_debug_symbols" = "xyes"; then
28364  ENABLE_DEBUG_SYMBOLS=true
28365elif test "x$enable_debug_symbols" = "xno"; then
28366  ENABLE_DEBUG_SYMBOLS=false
28367else
28368  # default on macosx is false
28369  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28370    ENABLE_DEBUG_SYMBOLS=false
28371  # Default is on if objcopy is found, otherwise off
28372  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28373    ENABLE_DEBUG_SYMBOLS=true
28374  else
28375    ENABLE_DEBUG_SYMBOLS=false
28376  fi
28377fi
28378
28379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28380$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28381
28382#
28383# ZIP_DEBUGINFO_FILES
28384#
28385# Check whether --enable-zip-debug-info was given.
28386if test "${enable_zip_debug_info+set}" = set; then :
28387  enableval=$enable_zip_debug_info;
28388fi
28389
28390
28391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28392$as_echo_n "checking if we should zip debug-info files... " >&6; }
28393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28394$as_echo "${enable_zip_debug_info}" >&6; }
28395
28396if test "x${enable_zip_debug_info}" = "xno"; then
28397   ZIP_DEBUGINFO_FILES=false
28398else
28399   ZIP_DEBUGINFO_FILES=true
28400fi
28401
28402
28403
28404
28405
28406
28407
28408###############################################################################
28409#
28410# Check dependencies for external and internal libraries.
28411#
28412###############################################################################
28413
28414
28415
28416###############################################################################
28417#
28418# OS specific settings that we never will need to probe.
28419#
28420if test "x$OPENJDK_TARGET_OS" = xlinux; then
28421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28422$as_echo_n "checking what is not needed on Linux?... " >&6; }
28423    PULSE_NOT_NEEDED=yes
28424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28425$as_echo "pulse" >&6; }
28426fi
28427
28428if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28430$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28431    ALSA_NOT_NEEDED=yes
28432    PULSE_NOT_NEEDED=yes
28433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28434$as_echo "alsa pulse" >&6; }
28435fi
28436
28437if test "x$OPENJDK_TARGET_OS" = xwindows; then
28438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28439$as_echo_n "checking what is not needed on Windows?... " >&6; }
28440    CUPS_NOT_NEEDED=yes
28441    ALSA_NOT_NEEDED=yes
28442    PULSE_NOT_NEEDED=yes
28443    X11_NOT_NEEDED=yes
28444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28445$as_echo "alsa cups pulse x11" >&6; }
28446fi
28447
28448if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28450$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28451    ALSA_NOT_NEEDED=yes
28452    PULSE_NOT_NEEDED=yes
28453    X11_NOT_NEEDED=yes
28454    FREETYPE2_NOT_NEEDED=yes
28455    # If the java runtime framework is disabled, then we need X11.
28456    # This will be adjusted below.
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28458$as_echo "alsa pulse x11" >&6; }
28459fi
28460
28461if test "x$OPENJDK_TARGET_OS" = xbsd; then
28462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28463$as_echo_n "checking what is not needed on bsd?... " >&6; }
28464    ALSA_NOT_NEEDED=yes
28465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28466$as_echo "alsa" >&6; }
28467fi
28468
28469if test "x$OPENJDK" = "xfalse"; then
28470    FREETYPE2_NOT_NEEDED=yes
28471fi
28472
28473if test "x$SUPPORT_HEADFUL" = xno; then
28474    X11_NOT_NEEDED=yes
28475fi
28476
28477###############################################################################
28478#
28479# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28480# that uses this API.
28481#
28482# Check whether --enable-macosx-runtime-support was given.
28483if test "${enable_macosx_runtime_support+set}" = set; then :
28484  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28485else
28486  MACOSX_RUNTIME_SUPPORT="no"
28487fi
28488
28489
28490USE_MACOSX_RUNTIME_SUPPORT=no
28491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28492$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28493if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28494    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28495        MACOSX_RUNTIME_SUPPORT=yes
28496        USE_MACOSX_RUNTIME_SUPPORT=yes
28497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28498$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28499    else
28500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28501$as_echo "yes, but explicitly disabled." >&6; }
28502    fi
28503else
28504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28505$as_echo "no" >&6; }
28506fi
28507
28508if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28510$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28511    X11_NOT_NEEDED=
28512    FREETYPE2_NOT_NEEDED=
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28514$as_echo "alsa pulse" >&6; }
28515fi
28516
28517
28518
28519
28520###############################################################################
28521#
28522# Check for X Windows
28523#
28524
28525# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28526# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28527# --x-libraries for the sysroot, if that seems to be correct.
28528if test "x$SYS_ROOT" != "x/"; then
28529  if test "x$x_includes" = xNONE; then
28530    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28531      x_includes="$SYS_ROOT/usr/X11R6/include"
28532    fi
28533  fi
28534  if test "x$x_libraries" = xNONE; then
28535    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28536      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28537    fi
28538  fi
28539fi
28540
28541# Now let autoconf do it's magic
28542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28543$as_echo_n "checking for X... " >&6; }
28544
28545
28546# Check whether --with-x was given.
28547if test "${with_x+set}" = set; then :
28548  withval=$with_x;
28549fi
28550
28551# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28552if test "x$with_x" = xno; then
28553  # The user explicitly disabled X.
28554  have_x=disabled
28555else
28556  case $x_includes,$x_libraries in #(
28557    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28558    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28559  $as_echo_n "(cached) " >&6
28560else
28561  # One or both of the vars are not set, and there is no cached value.
28562ac_x_includes=no ac_x_libraries=no
28563rm -f -r conftest.dir
28564if mkdir conftest.dir; then
28565  cd conftest.dir
28566  cat >Imakefile <<'_ACEOF'
28567incroot:
28568	@echo incroot='${INCROOT}'
28569usrlibdir:
28570	@echo usrlibdir='${USRLIBDIR}'
28571libdir:
28572	@echo libdir='${LIBDIR}'
28573_ACEOF
28574  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28575    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28576    for ac_var in incroot usrlibdir libdir; do
28577      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28578    done
28579    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28580    for ac_extension in a so sl dylib la dll; do
28581      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28582	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28583	ac_im_usrlibdir=$ac_im_libdir; break
28584      fi
28585    done
28586    # Screen out bogus values from the imake configuration.  They are
28587    # bogus both because they are the default anyway, and because
28588    # using them would break gcc on systems where it needs fixed includes.
28589    case $ac_im_incroot in
28590	/usr/include) ac_x_includes= ;;
28591	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28592    esac
28593    case $ac_im_usrlibdir in
28594	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28595	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28596    esac
28597  fi
28598  cd ..
28599  rm -f -r conftest.dir
28600fi
28601
28602# Standard set of common directories for X headers.
28603# Check X11 before X11Rn because it is often a symlink to the current release.
28604ac_x_header_dirs='
28605/usr/X11/include
28606/usr/X11R7/include
28607/usr/X11R6/include
28608/usr/X11R5/include
28609/usr/X11R4/include
28610
28611/usr/include/X11
28612/usr/include/X11R7
28613/usr/include/X11R6
28614/usr/include/X11R5
28615/usr/include/X11R4
28616
28617/usr/local/X11/include
28618/usr/local/X11R7/include
28619/usr/local/X11R6/include
28620/usr/local/X11R5/include
28621/usr/local/X11R4/include
28622
28623/usr/local/include/X11
28624/usr/local/include/X11R7
28625/usr/local/include/X11R6
28626/usr/local/include/X11R5
28627/usr/local/include/X11R4
28628
28629/usr/X386/include
28630/usr/x386/include
28631/usr/XFree86/include/X11
28632
28633/usr/include
28634/usr/local/include
28635/usr/unsupported/include
28636/usr/athena/include
28637/usr/local/x11r5/include
28638/usr/lpp/Xamples/include
28639
28640/usr/openwin/include
28641/usr/openwin/share/include'
28642
28643if test "$ac_x_includes" = no; then
28644  # Guess where to find include files, by looking for Xlib.h.
28645  # First, try using that file with no special directory specified.
28646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28647/* end confdefs.h.  */
28648#include <X11/Xlib.h>
28649_ACEOF
28650if ac_fn_cxx_try_cpp "$LINENO"; then :
28651  # We can compile using X headers with no special include directory.
28652ac_x_includes=
28653else
28654  for ac_dir in $ac_x_header_dirs; do
28655  if test -r "$ac_dir/X11/Xlib.h"; then
28656    ac_x_includes=$ac_dir
28657    break
28658  fi
28659done
28660fi
28661rm -f conftest.err conftest.i conftest.$ac_ext
28662fi # $ac_x_includes = no
28663
28664if test "$ac_x_libraries" = no; then
28665  # Check for the libraries.
28666  # See if we find them without any special options.
28667  # Don't add to $LIBS permanently.
28668  ac_save_LIBS=$LIBS
28669  LIBS="-lX11 $LIBS"
28670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671/* end confdefs.h.  */
28672#include <X11/Xlib.h>
28673int
28674main ()
28675{
28676XrmInitialize ()
28677  ;
28678  return 0;
28679}
28680_ACEOF
28681if ac_fn_cxx_try_link "$LINENO"; then :
28682  LIBS=$ac_save_LIBS
28683# We can link X programs with no special library path.
28684ac_x_libraries=
28685else
28686  LIBS=$ac_save_LIBS
28687for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28688do
28689  # Don't even attempt the hair of trying to link an X program!
28690  for ac_extension in a so sl dylib la dll; do
28691    if test -r "$ac_dir/libX11.$ac_extension"; then
28692      ac_x_libraries=$ac_dir
28693      break 2
28694    fi
28695  done
28696done
28697fi
28698rm -f core conftest.err conftest.$ac_objext \
28699    conftest$ac_exeext conftest.$ac_ext
28700fi # $ac_x_libraries = no
28701
28702case $ac_x_includes,$ac_x_libraries in #(
28703  no,* | *,no | *\'*)
28704    # Didn't find X, or a directory has "'" in its name.
28705    ac_cv_have_x="have_x=no";; #(
28706  *)
28707    # Record where we found X for the cache.
28708    ac_cv_have_x="have_x=yes\
28709	ac_x_includes='$ac_x_includes'\
28710	ac_x_libraries='$ac_x_libraries'"
28711esac
28712fi
28713;; #(
28714    *) have_x=yes;;
28715  esac
28716  eval "$ac_cv_have_x"
28717fi # $with_x != no
28718
28719if test "$have_x" != yes; then
28720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28721$as_echo "$have_x" >&6; }
28722  no_x=yes
28723else
28724  # If each of the values was on the command line, it overrides each guess.
28725  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28726  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28727  # Update the cache value to reflect the command line values.
28728  ac_cv_have_x="have_x=yes\
28729	ac_x_includes='$x_includes'\
28730	ac_x_libraries='$x_libraries'"
28731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28732$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28733fi
28734
28735if test "$no_x" = yes; then
28736  # Not all programs may use this symbol, but it does not hurt to define it.
28737
28738$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28739
28740  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28741else
28742  if test -n "$x_includes"; then
28743    X_CFLAGS="$X_CFLAGS -I$x_includes"
28744  fi
28745
28746  # It would also be nice to do this for all -L options, not just this one.
28747  if test -n "$x_libraries"; then
28748    X_LIBS="$X_LIBS -L$x_libraries"
28749    # For Solaris; some versions of Sun CC require a space after -R and
28750    # others require no space.  Words are not sufficient . . . .
28751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28752$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28753    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28754    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28755    ac_cxx_werror_flag=yes
28756    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28757/* end confdefs.h.  */
28758
28759int
28760main ()
28761{
28762
28763  ;
28764  return 0;
28765}
28766_ACEOF
28767if ac_fn_cxx_try_link "$LINENO"; then :
28768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28769$as_echo "no" >&6; }
28770       X_LIBS="$X_LIBS -R$x_libraries"
28771else
28772  LIBS="$ac_xsave_LIBS -R $x_libraries"
28773       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28774/* end confdefs.h.  */
28775
28776int
28777main ()
28778{
28779
28780  ;
28781  return 0;
28782}
28783_ACEOF
28784if ac_fn_cxx_try_link "$LINENO"; then :
28785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28786$as_echo "yes" >&6; }
28787	  X_LIBS="$X_LIBS -R $x_libraries"
28788else
28789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28790$as_echo "neither works" >&6; }
28791fi
28792rm -f core conftest.err conftest.$ac_objext \
28793    conftest$ac_exeext conftest.$ac_ext
28794fi
28795rm -f core conftest.err conftest.$ac_objext \
28796    conftest$ac_exeext conftest.$ac_ext
28797    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28798    LIBS=$ac_xsave_LIBS
28799  fi
28800
28801  # Check for system-dependent libraries X programs must link with.
28802  # Do this before checking for the system-independent R6 libraries
28803  # (-lICE), since we may need -lsocket or whatever for X linking.
28804
28805  if test "$ISC" = yes; then
28806    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28807  else
28808    # Martyn Johnson says this is needed for Ultrix, if the X
28809    # libraries were built with DECnet support.  And Karl Berry says
28810    # the Alpha needs dnet_stub (dnet does not exist).
28811    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28812    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28813/* end confdefs.h.  */
28814
28815/* Override any GCC internal prototype to avoid an error.
28816   Use char because int might match the return type of a GCC
28817   builtin and then its argument prototype would still apply.  */
28818#ifdef __cplusplus
28819extern "C"
28820#endif
28821char XOpenDisplay ();
28822int
28823main ()
28824{
28825return XOpenDisplay ();
28826  ;
28827  return 0;
28828}
28829_ACEOF
28830if ac_fn_cxx_try_link "$LINENO"; then :
28831
28832else
28833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28834$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28835if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28836  $as_echo_n "(cached) " >&6
28837else
28838  ac_check_lib_save_LIBS=$LIBS
28839LIBS="-ldnet  $LIBS"
28840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28841/* end confdefs.h.  */
28842
28843/* Override any GCC internal prototype to avoid an error.
28844   Use char because int might match the return type of a GCC
28845   builtin and then its argument prototype would still apply.  */
28846#ifdef __cplusplus
28847extern "C"
28848#endif
28849char dnet_ntoa ();
28850int
28851main ()
28852{
28853return dnet_ntoa ();
28854  ;
28855  return 0;
28856}
28857_ACEOF
28858if ac_fn_cxx_try_link "$LINENO"; then :
28859  ac_cv_lib_dnet_dnet_ntoa=yes
28860else
28861  ac_cv_lib_dnet_dnet_ntoa=no
28862fi
28863rm -f core conftest.err conftest.$ac_objext \
28864    conftest$ac_exeext conftest.$ac_ext
28865LIBS=$ac_check_lib_save_LIBS
28866fi
28867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28868$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28869if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28870  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28871fi
28872
28873    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28875$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28876if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28877  $as_echo_n "(cached) " >&6
28878else
28879  ac_check_lib_save_LIBS=$LIBS
28880LIBS="-ldnet_stub  $LIBS"
28881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28882/* end confdefs.h.  */
28883
28884/* Override any GCC internal prototype to avoid an error.
28885   Use char because int might match the return type of a GCC
28886   builtin and then its argument prototype would still apply.  */
28887#ifdef __cplusplus
28888extern "C"
28889#endif
28890char dnet_ntoa ();
28891int
28892main ()
28893{
28894return dnet_ntoa ();
28895  ;
28896  return 0;
28897}
28898_ACEOF
28899if ac_fn_cxx_try_link "$LINENO"; then :
28900  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28901else
28902  ac_cv_lib_dnet_stub_dnet_ntoa=no
28903fi
28904rm -f core conftest.err conftest.$ac_objext \
28905    conftest$ac_exeext conftest.$ac_ext
28906LIBS=$ac_check_lib_save_LIBS
28907fi
28908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28909$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28910if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28911  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28912fi
28913
28914    fi
28915fi
28916rm -f core conftest.err conftest.$ac_objext \
28917    conftest$ac_exeext conftest.$ac_ext
28918    LIBS="$ac_xsave_LIBS"
28919
28920    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28921    # to get the SysV transport functions.
28922    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28923    # needs -lnsl.
28924    # The nsl library prevents programs from opening the X display
28925    # on Irix 5.2, according to T.E. Dickey.
28926    # The functions gethostbyname, getservbyname, and inet_addr are
28927    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28928    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28929if test "x$ac_cv_func_gethostbyname" = xyes; then :
28930
28931fi
28932
28933    if test $ac_cv_func_gethostbyname = no; then
28934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28935$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28936if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28937  $as_echo_n "(cached) " >&6
28938else
28939  ac_check_lib_save_LIBS=$LIBS
28940LIBS="-lnsl  $LIBS"
28941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28942/* end confdefs.h.  */
28943
28944/* Override any GCC internal prototype to avoid an error.
28945   Use char because int might match the return type of a GCC
28946   builtin and then its argument prototype would still apply.  */
28947#ifdef __cplusplus
28948extern "C"
28949#endif
28950char gethostbyname ();
28951int
28952main ()
28953{
28954return gethostbyname ();
28955  ;
28956  return 0;
28957}
28958_ACEOF
28959if ac_fn_cxx_try_link "$LINENO"; then :
28960  ac_cv_lib_nsl_gethostbyname=yes
28961else
28962  ac_cv_lib_nsl_gethostbyname=no
28963fi
28964rm -f core conftest.err conftest.$ac_objext \
28965    conftest$ac_exeext conftest.$ac_ext
28966LIBS=$ac_check_lib_save_LIBS
28967fi
28968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28969$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28970if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
28971  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28972fi
28973
28974      if test $ac_cv_lib_nsl_gethostbyname = no; then
28975	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28976$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28977if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
28978  $as_echo_n "(cached) " >&6
28979else
28980  ac_check_lib_save_LIBS=$LIBS
28981LIBS="-lbsd  $LIBS"
28982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28983/* end confdefs.h.  */
28984
28985/* Override any GCC internal prototype to avoid an error.
28986   Use char because int might match the return type of a GCC
28987   builtin and then its argument prototype would still apply.  */
28988#ifdef __cplusplus
28989extern "C"
28990#endif
28991char gethostbyname ();
28992int
28993main ()
28994{
28995return gethostbyname ();
28996  ;
28997  return 0;
28998}
28999_ACEOF
29000if ac_fn_cxx_try_link "$LINENO"; then :
29001  ac_cv_lib_bsd_gethostbyname=yes
29002else
29003  ac_cv_lib_bsd_gethostbyname=no
29004fi
29005rm -f core conftest.err conftest.$ac_objext \
29006    conftest$ac_exeext conftest.$ac_ext
29007LIBS=$ac_check_lib_save_LIBS
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29010$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29011if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29012  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29013fi
29014
29015      fi
29016    fi
29017
29018    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29019    # socket/setsockopt and other routines are undefined under SCO ODT
29020    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29021    # on later versions), says Simon Leinen: it contains gethostby*
29022    # variants that don't use the name server (or something).  -lsocket
29023    # must be given before -lnsl if both are needed.  We assume that
29024    # if connect needs -lnsl, so does gethostbyname.
29025    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29026if test "x$ac_cv_func_connect" = xyes; then :
29027
29028fi
29029
29030    if test $ac_cv_func_connect = no; then
29031      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29032$as_echo_n "checking for connect in -lsocket... " >&6; }
29033if ${ac_cv_lib_socket_connect+:} false; then :
29034  $as_echo_n "(cached) " >&6
29035else
29036  ac_check_lib_save_LIBS=$LIBS
29037LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29039/* end confdefs.h.  */
29040
29041/* Override any GCC internal prototype to avoid an error.
29042   Use char because int might match the return type of a GCC
29043   builtin and then its argument prototype would still apply.  */
29044#ifdef __cplusplus
29045extern "C"
29046#endif
29047char connect ();
29048int
29049main ()
29050{
29051return connect ();
29052  ;
29053  return 0;
29054}
29055_ACEOF
29056if ac_fn_cxx_try_link "$LINENO"; then :
29057  ac_cv_lib_socket_connect=yes
29058else
29059  ac_cv_lib_socket_connect=no
29060fi
29061rm -f core conftest.err conftest.$ac_objext \
29062    conftest$ac_exeext conftest.$ac_ext
29063LIBS=$ac_check_lib_save_LIBS
29064fi
29065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29066$as_echo "$ac_cv_lib_socket_connect" >&6; }
29067if test "x$ac_cv_lib_socket_connect" = xyes; then :
29068  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29069fi
29070
29071    fi
29072
29073    # Guillermo Gomez says -lposix is necessary on A/UX.
29074    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29075if test "x$ac_cv_func_remove" = xyes; then :
29076
29077fi
29078
29079    if test $ac_cv_func_remove = no; then
29080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29081$as_echo_n "checking for remove in -lposix... " >&6; }
29082if ${ac_cv_lib_posix_remove+:} false; then :
29083  $as_echo_n "(cached) " >&6
29084else
29085  ac_check_lib_save_LIBS=$LIBS
29086LIBS="-lposix  $LIBS"
29087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29088/* end confdefs.h.  */
29089
29090/* Override any GCC internal prototype to avoid an error.
29091   Use char because int might match the return type of a GCC
29092   builtin and then its argument prototype would still apply.  */
29093#ifdef __cplusplus
29094extern "C"
29095#endif
29096char remove ();
29097int
29098main ()
29099{
29100return remove ();
29101  ;
29102  return 0;
29103}
29104_ACEOF
29105if ac_fn_cxx_try_link "$LINENO"; then :
29106  ac_cv_lib_posix_remove=yes
29107else
29108  ac_cv_lib_posix_remove=no
29109fi
29110rm -f core conftest.err conftest.$ac_objext \
29111    conftest$ac_exeext conftest.$ac_ext
29112LIBS=$ac_check_lib_save_LIBS
29113fi
29114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29115$as_echo "$ac_cv_lib_posix_remove" >&6; }
29116if test "x$ac_cv_lib_posix_remove" = xyes; then :
29117  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29118fi
29119
29120    fi
29121
29122    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29123    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29124if test "x$ac_cv_func_shmat" = xyes; then :
29125
29126fi
29127
29128    if test $ac_cv_func_shmat = no; then
29129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29130$as_echo_n "checking for shmat in -lipc... " >&6; }
29131if ${ac_cv_lib_ipc_shmat+:} false; then :
29132  $as_echo_n "(cached) " >&6
29133else
29134  ac_check_lib_save_LIBS=$LIBS
29135LIBS="-lipc  $LIBS"
29136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29137/* end confdefs.h.  */
29138
29139/* Override any GCC internal prototype to avoid an error.
29140   Use char because int might match the return type of a GCC
29141   builtin and then its argument prototype would still apply.  */
29142#ifdef __cplusplus
29143extern "C"
29144#endif
29145char shmat ();
29146int
29147main ()
29148{
29149return shmat ();
29150  ;
29151  return 0;
29152}
29153_ACEOF
29154if ac_fn_cxx_try_link "$LINENO"; then :
29155  ac_cv_lib_ipc_shmat=yes
29156else
29157  ac_cv_lib_ipc_shmat=no
29158fi
29159rm -f core conftest.err conftest.$ac_objext \
29160    conftest$ac_exeext conftest.$ac_ext
29161LIBS=$ac_check_lib_save_LIBS
29162fi
29163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29164$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29165if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29166  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29167fi
29168
29169    fi
29170  fi
29171
29172  # Check for libraries that X11R6 Xt/Xaw programs need.
29173  ac_save_LDFLAGS=$LDFLAGS
29174  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29175  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29176  # check for ICE first), but we must link in the order -lSM -lICE or
29177  # we get undefined symbols.  So assume we have SM if we have ICE.
29178  # These have to be linked with before -lX11, unlike the other
29179  # libraries we check for below, so use a different variable.
29180  # John Interrante, Karl Berry
29181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29182$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29183if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29184  $as_echo_n "(cached) " >&6
29185else
29186  ac_check_lib_save_LIBS=$LIBS
29187LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29189/* end confdefs.h.  */
29190
29191/* Override any GCC internal prototype to avoid an error.
29192   Use char because int might match the return type of a GCC
29193   builtin and then its argument prototype would still apply.  */
29194#ifdef __cplusplus
29195extern "C"
29196#endif
29197char IceConnectionNumber ();
29198int
29199main ()
29200{
29201return IceConnectionNumber ();
29202  ;
29203  return 0;
29204}
29205_ACEOF
29206if ac_fn_cxx_try_link "$LINENO"; then :
29207  ac_cv_lib_ICE_IceConnectionNumber=yes
29208else
29209  ac_cv_lib_ICE_IceConnectionNumber=no
29210fi
29211rm -f core conftest.err conftest.$ac_objext \
29212    conftest$ac_exeext conftest.$ac_ext
29213LIBS=$ac_check_lib_save_LIBS
29214fi
29215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29216$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29217if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29218  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29219fi
29220
29221  LDFLAGS=$ac_save_LDFLAGS
29222
29223fi
29224
29225
29226if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29227
29228    # Print a helpful message on how to acquire the necessary build dependency.
29229    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29230    MISSING_DEPENDENCY=x11
29231    PKGHANDLER_COMMAND=
29232
29233    case $PKGHANDLER in
29234	apt-get)
29235                apt_help     $MISSING_DEPENDENCY ;;
29236    yum)
29237                yum_help     $MISSING_DEPENDENCY ;;
29238	port)
29239                port_help    $MISSING_DEPENDENCY ;;
29240	pkgutil)
29241                pkgutil_help $MISSING_DEPENDENCY ;;
29242	pkgadd)
29243                pkgadd_help  $MISSING_DEPENDENCY ;;
29244    * )
29245      break ;;
29246    esac
29247
29248    if test "x$PKGHANDLER_COMMAND" != x; then
29249        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29250    fi
29251
29252    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29253fi
29254
29255# Some of the old makefiles require a setting of OPENWIN_HOME
29256# Since the X11R6 directory has disappeared on later Linuxes,
29257# we need to probe for it.
29258if test "x$OPENJDK_TARGET_OS" = xlinux; then
29259    if test -d "$SYS_ROOT/usr/X11R6"; then
29260        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29261    fi
29262    if test -d "$SYS_ROOT/usr/include/X11"; then
29263        OPENWIN_HOME="$SYS_ROOT/usr"
29264    fi
29265fi
29266if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29267    OPENWIN_HOME="/usr/openwin"
29268fi
29269
29270
29271
29272#
29273# Weird Sol10 something check...TODO change to try compile
29274#
29275if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29276  if test "`uname -r`" = "5.10"; then
29277     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29278     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29279     fi
29280  fi
29281fi
29282
29283ac_ext=c
29284ac_cpp='$CPP $CPPFLAGS'
29285ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29286ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29287ac_compiler_gnu=$ac_cv_c_compiler_gnu
29288
29289OLD_CFLAGS="$CFLAGS"
29290CFLAGS="$CFLAGS $X_CFLAGS"
29291
29292# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29293for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29294do :
29295  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29296ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29297                   # include <X11/Xutil.h>
29298
29299"
29300if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29301  cat >>confdefs.h <<_ACEOF
29302#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29303_ACEOF
29304 X11_A_OK=yes
29305else
29306  X11_A_OK=no
29307fi
29308
29309done
29310
29311
29312CFLAGS="$OLD_CFLAGS"
29313ac_ext=cpp
29314ac_cpp='$CXXCPP $CPPFLAGS'
29315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29318
29319
29320if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29321
29322    # Print a helpful message on how to acquire the necessary build dependency.
29323    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29324    MISSING_DEPENDENCY=x11
29325    PKGHANDLER_COMMAND=
29326
29327    case $PKGHANDLER in
29328	apt-get)
29329                apt_help     $MISSING_DEPENDENCY ;;
29330    yum)
29331                yum_help     $MISSING_DEPENDENCY ;;
29332	port)
29333                port_help    $MISSING_DEPENDENCY ;;
29334	pkgutil)
29335                pkgutil_help $MISSING_DEPENDENCY ;;
29336	pkgadd)
29337                pkgadd_help  $MISSING_DEPENDENCY ;;
29338    * )
29339      break ;;
29340    esac
29341
29342    if test "x$PKGHANDLER_COMMAND" != x; then
29343        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29344    fi
29345
29346    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29347fi
29348
29349
29350
29351
29352
29353
29354###############################################################################
29355#
29356# The common unix printing system cups is used to print from java.
29357#
29358
29359# Check whether --with-cups was given.
29360if test "${with_cups+set}" = set; then :
29361  withval=$with_cups;
29362fi
29363
29364
29365# Check whether --with-cups-include was given.
29366if test "${with_cups_include+set}" = set; then :
29367  withval=$with_cups_include;
29368fi
29369
29370
29371if test "x$CUPS_NOT_NEEDED" = xyes; then
29372	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29373		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29374$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29375	fi
29376	CUPS_CFLAGS=
29377else
29378	CUPS_FOUND=no
29379
29380	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29381	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29382	fi
29383
29384	if test "x${with_cups}" != x; then
29385	    CUPS_CFLAGS="-I${with_cups}/include"
29386	    CUPS_FOUND=yes
29387	fi
29388	if test "x${with_cups_include}" != x; then
29389	    CUPS_CFLAGS="-I${with_cups_include}"
29390	    CUPS_FOUND=yes
29391	fi
29392	if test "x$CUPS_FOUND" = xno; then
29393
29394
29395    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29396        # Source the builddeps file again, to make sure it uses the latest variables!
29397        . $builddepsfile
29398        # Look for a target and build machine specific resource!
29399        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29400        if test "x$resource" = x; then
29401            # Ok, lets instead look for a target specific resource
29402            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29403        fi
29404        if test "x$resource" = x; then
29405            # Ok, lets instead look for a build specific resource
29406            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29407        fi
29408        if test "x$resource" = x; then
29409            # Ok, lets instead look for a generic resource
29410            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29411            resource=${builddep_cups}
29412        fi
29413        if test "x$resource" != x; then
29414            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29415$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29416	    # If the resource in the builddeps.conf file is an existing directory,
29417	    # for example /java/linux/cups
29418	    if test -d ${resource}; then
29419	       depdir=${resource}
29420	    else
29421
29422# cups is for example mymodule
29423# $resource is for example libs/general/libmymod_1_2_3.zip
29424# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29425# $with_builddeps_dir is for example /localhome/builddeps
29426# depdir is the name of the variable into which we store the depdir, eg MYMOD
29427# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29428# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29429    filename=`basename $resource`
29430    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29431    filebase=${filename%%.*}
29432    extension=${filename#*.}
29433    installdir=$with_builddeps_dir/$filebase
29434    if test ! -f $installdir/$filename.unpacked; then
29435        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29436$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29437        if test ! -d $installdir; then
29438            mkdir -p $installdir
29439        fi
29440        if test ! -d $installdir; then
29441            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29442        fi
29443        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29444        touch $tmpfile
29445        if test ! -f $tmpfile; then
29446            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29447        fi
29448
29449    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29450    # $tmpfile is the local file name for the downloaded file.
29451    VALID_TOOL=no
29452    if test "x$BDEPS_FTP" = xwget; then
29453       VALID_TOOL=yes
29454       wget -O $tmpfile $with_builddeps_server/$resource
29455    fi
29456    if test "x$BDEPS_FTP" = xlftp; then
29457       VALID_TOOL=yes
29458       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29459    fi
29460    if test "x$BDEPS_FTP" = xftp; then
29461        VALID_TOOL=yes
29462        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29463        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29464        FTPUSERPWD=${FTPSERVER%%@*}
29465        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29466            FTPUSER=${userpwd%%:*}
29467            FTPPWD=${userpwd#*@}
29468            FTPSERVER=${FTPSERVER#*@}
29469        else
29470            FTPUSER=ftp
29471            FTPPWD=ftp
29472        fi
29473        # the "pass" command does not work on some
29474        # ftp clients (read ftp.exe) but if it works,
29475        # passive mode is better!
29476        (\
29477            echo "user $FTPUSER $FTPPWD"        ;\
29478            echo "pass"                         ;\
29479            echo "bin"                          ;\
29480            echo "get $FTPPATH $tmpfile"              ;\
29481        ) | ftp -in $FTPSERVER
29482    fi
29483    if test "x$VALID_TOOL" != xyes; then
29484       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29485    fi
29486
29487        mv $tmpfile $installdir/$filename
29488        if test ! -s $installdir/$filename; then
29489            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29490        fi
29491        case "$extension" in
29492            zip)  echo "Unzipping $installdir/$filename..."
29493               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29494            ;;
29495            tar.gz) echo "Untaring $installdir/$filename..."
29496               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29497            ;;
29498            tgz) echo "Untaring $installdir/$filename..."
29499               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29500            ;;
29501            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29502            ;;
29503        esac
29504    fi
29505    if test -f $installdir/$filename.unpacked; then
29506        depdir=$installdir
29507    fi
29508
29509	    fi
29510            # Source the builddeps file again, because in the previous command, the depdir
29511            # was updated to point at the current build dependency install directory.
29512            . $builddepsfile
29513            # Now extract variables from the builddeps.conf files.
29514            theroot=${builddep_cups_ROOT}
29515            thecflags=${builddep_cups_CFLAGS}
29516            thelibs=${builddep_cups_LIBS}
29517            if test "x$depdir" = x; then
29518                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29519            fi
29520            CUPS=$depdir
29521            if test "x$theroot" != x; then
29522               CUPS="$theroot"
29523            fi
29524            if test "x$thecflags" != x; then
29525               CUPS_CFLAGS="$thecflags"
29526            fi
29527            if test "x$thelibs" != x; then
29528               CUPS_LIBS="$thelibs"
29529            fi
29530            CUPS_FOUND=yes
29531
29532        fi
29533
29534    fi
29535
29536	fi
29537	if test "x$CUPS_FOUND" = xno; then
29538	    # Are the cups headers installed in the default /usr/include location?
29539	    for ac_header in cups/cups.h cups/ppd.h
29540do :
29541  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29542ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29543if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29544  cat >>confdefs.h <<_ACEOF
29545#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29546_ACEOF
29547 CUPS_FOUND=yes
29548	                      CUPS_CFLAGS=
29549	                      DEFAULT_CUPS=yes
29550fi
29551
29552done
29553
29554	fi
29555	if test "x$CUPS_FOUND" = xno; then
29556	    # Getting nervous now? Lets poke around for standard Solaris third-party
29557	    # package installation locations.
29558	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29559$as_echo_n "checking for cups headers... " >&6; }
29560	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29561	       # An SFW package seems to be installed!
29562	       CUPS_FOUND=yes
29563	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29564	    elif test -s /opt/csw/include/cups/cups.h; then
29565	       # A CSW package seems to be installed!
29566	       CUPS_FOUND=yes
29567	       CUPS_CFLAGS="-I/opt/csw/include"
29568	    fi
29569	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29570$as_echo "$CUPS_FOUND" >&6; }
29571	fi
29572	if test "x$CUPS_FOUND" = xno; then
29573
29574    # Print a helpful message on how to acquire the necessary build dependency.
29575    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29576    MISSING_DEPENDENCY=cups
29577    PKGHANDLER_COMMAND=
29578
29579    case $PKGHANDLER in
29580	apt-get)
29581                apt_help     $MISSING_DEPENDENCY ;;
29582    yum)
29583                yum_help     $MISSING_DEPENDENCY ;;
29584	port)
29585                port_help    $MISSING_DEPENDENCY ;;
29586	pkgutil)
29587                pkgutil_help $MISSING_DEPENDENCY ;;
29588	pkgadd)
29589                pkgadd_help  $MISSING_DEPENDENCY ;;
29590    * )
29591      break ;;
29592    esac
29593
29594    if test "x$PKGHANDLER_COMMAND" != x; then
29595        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29596    fi
29597
29598	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29599	fi
29600fi
29601
29602
29603
29604
29605
29606
29607###############################################################################
29608#
29609# The ubiquitous freetype2 library is used to render fonts.
29610#
29611
29612# Check whether --with-freetype was given.
29613if test "${with_freetype+set}" = set; then :
29614  withval=$with_freetype;
29615fi
29616
29617
29618# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29619USING_SYSTEM_FT_LIB=false
29620
29621if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29622	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29623		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29624$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29625	fi
29626	FREETYPE2_CFLAGS=
29627	FREETYPE2_LIBS=
29628        FREETYPE2_LIB_PATH=
29629else
29630	FREETYPE2_FOUND=no
29631
29632	if test "x$with_freetype" != x; then
29633
29634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29635
29636  # Input might be given as Windows format, start by converting to
29637  # unix format.
29638  path="$with_freetype"
29639  new_path=`$CYGPATH -u "$path"`
29640
29641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29644  # "foo.exe" is OK but "foo" is an error.
29645  #
29646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29647  # It is also a way to make sure we got the proper file name for the real test later on.
29648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29649  if test "x$test_shortpath" = x; then
29650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29651$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29652    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29653  fi
29654
29655  # Call helper function which possibly converts this using DOS-style short mode.
29656  # If so, the updated path is stored in $new_path.
29657
29658  input_path="$new_path"
29659  # Check if we need to convert this using DOS-style short mode. If the path
29660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29661  # take no chances and rewrite it.
29662  # Note: m4 eats our [], so we need to use [ and ] instead.
29663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29664  if test "x$has_forbidden_chars" != x; then
29665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29669      # Going to short mode and back again did indeed matter. Since short mode is
29670      # case insensitive, let's make it lowercase to improve readability.
29671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29672      # Now convert it back to Unix-stile (cygpath)
29673      input_path=`$CYGPATH -u "$shortmode_path"`
29674      new_path="$input_path"
29675    fi
29676  fi
29677
29678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29679  if test "x$test_cygdrive_prefix" = x; then
29680    # As a simple fix, exclude /usr/bin since it's not a real path.
29681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29683      # a path prefixed by /cygdrive for fixpath to work.
29684      new_path="$CYGWIN_ROOT_PATH$input_path"
29685    fi
29686  fi
29687
29688
29689  if test "x$path" != "x$new_path"; then
29690    with_freetype="$new_path"
29691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29692$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29693  fi
29694
29695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29696
29697  path="$with_freetype"
29698  has_colon=`$ECHO $path | $GREP ^.:`
29699  new_path="$path"
29700  if test "x$has_colon" = x; then
29701    # Not in mixed or Windows style, start by that.
29702    new_path=`cmd //c echo $path`
29703  fi
29704
29705
29706  input_path="$new_path"
29707  # Check if we need to convert this using DOS-style short mode. If the path
29708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29709  # take no chances and rewrite it.
29710  # Note: m4 eats our [], so we need to use [ and ] instead.
29711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29712  if test "x$has_forbidden_chars" != x; then
29713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29715  fi
29716
29717
29718  windows_path="$new_path"
29719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29720    unix_path=`$CYGPATH -u "$windows_path"`
29721    new_path="$unix_path"
29722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29724    new_path="$unix_path"
29725  fi
29726
29727  if test "x$path" != "x$new_path"; then
29728    with_freetype="$new_path"
29729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29730$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29731  fi
29732
29733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29735
29736  else
29737    # We're on a posix platform. Hooray! :)
29738    path="$with_freetype"
29739
29740    if test ! -f "$path" && test ! -d "$path"; then
29741      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29742    fi
29743
29744    has_space=`$ECHO "$path" | $GREP " "`
29745    if test "x$has_space" != x; then
29746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29747$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29749    fi
29750  fi
29751
29752	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29753            FREETYPE2_LIB_PATH="$with_freetype/lib"
29754            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29755                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29756                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29757            fi
29758            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29759                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29760            fi
29761	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29762            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29763                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29764            fi
29765 	    FREETYPE2_FOUND=yes
29766   	    if test "x$FREETYPE2_FOUND" = xyes; then
29767	        # Verify that the directories exist
29768                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29769		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29770		fi
29771	        # List the contents of the lib.
29772		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29773                if test "x$FREETYPELIB" = x; then
29774		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29775		fi
29776	        # Check one h-file
29777                if ! test -s "$with_freetype/include/ft2build.h"; then
29778		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29779		fi
29780            fi
29781        fi
29782	if test "x$FREETYPE2_FOUND" = xno; then
29783
29784
29785    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29786        # Source the builddeps file again, to make sure it uses the latest variables!
29787        . $builddepsfile
29788        # Look for a target and build machine specific resource!
29789        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29790        if test "x$resource" = x; then
29791            # Ok, lets instead look for a target specific resource
29792            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29793        fi
29794        if test "x$resource" = x; then
29795            # Ok, lets instead look for a build specific resource
29796            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29797        fi
29798        if test "x$resource" = x; then
29799            # Ok, lets instead look for a generic resource
29800            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29801            resource=${builddep_freetype2}
29802        fi
29803        if test "x$resource" != x; then
29804            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29805$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29806	    # If the resource in the builddeps.conf file is an existing directory,
29807	    # for example /java/linux/cups
29808	    if test -d ${resource}; then
29809	       depdir=${resource}
29810	    else
29811
29812# freetype2 is for example mymodule
29813# $resource is for example libs/general/libmymod_1_2_3.zip
29814# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29815# $with_builddeps_dir is for example /localhome/builddeps
29816# depdir is the name of the variable into which we store the depdir, eg MYMOD
29817# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29818# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29819    filename=`basename $resource`
29820    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29821    filebase=${filename%%.*}
29822    extension=${filename#*.}
29823    installdir=$with_builddeps_dir/$filebase
29824    if test ! -f $installdir/$filename.unpacked; then
29825        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29826$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29827        if test ! -d $installdir; then
29828            mkdir -p $installdir
29829        fi
29830        if test ! -d $installdir; then
29831            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29832        fi
29833        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29834        touch $tmpfile
29835        if test ! -f $tmpfile; then
29836            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29837        fi
29838
29839    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29840    # $tmpfile is the local file name for the downloaded file.
29841    VALID_TOOL=no
29842    if test "x$BDEPS_FTP" = xwget; then
29843       VALID_TOOL=yes
29844       wget -O $tmpfile $with_builddeps_server/$resource
29845    fi
29846    if test "x$BDEPS_FTP" = xlftp; then
29847       VALID_TOOL=yes
29848       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29849    fi
29850    if test "x$BDEPS_FTP" = xftp; then
29851        VALID_TOOL=yes
29852        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29853        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29854        FTPUSERPWD=${FTPSERVER%%@*}
29855        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29856            FTPUSER=${userpwd%%:*}
29857            FTPPWD=${userpwd#*@}
29858            FTPSERVER=${FTPSERVER#*@}
29859        else
29860            FTPUSER=ftp
29861            FTPPWD=ftp
29862        fi
29863        # the "pass" command does not work on some
29864        # ftp clients (read ftp.exe) but if it works,
29865        # passive mode is better!
29866        (\
29867            echo "user $FTPUSER $FTPPWD"        ;\
29868            echo "pass"                         ;\
29869            echo "bin"                          ;\
29870            echo "get $FTPPATH $tmpfile"              ;\
29871        ) | ftp -in $FTPSERVER
29872    fi
29873    if test "x$VALID_TOOL" != xyes; then
29874       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29875    fi
29876
29877        mv $tmpfile $installdir/$filename
29878        if test ! -s $installdir/$filename; then
29879            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29880        fi
29881        case "$extension" in
29882            zip)  echo "Unzipping $installdir/$filename..."
29883               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29884            ;;
29885            tar.gz) echo "Untaring $installdir/$filename..."
29886               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29887            ;;
29888            tgz) echo "Untaring $installdir/$filename..."
29889               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29890            ;;
29891            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29892            ;;
29893        esac
29894    fi
29895    if test -f $installdir/$filename.unpacked; then
29896        depdir=$installdir
29897    fi
29898
29899	    fi
29900            # Source the builddeps file again, because in the previous command, the depdir
29901            # was updated to point at the current build dependency install directory.
29902            . $builddepsfile
29903            # Now extract variables from the builddeps.conf files.
29904            theroot=${builddep_freetype2_ROOT}
29905            thecflags=${builddep_freetype2_CFLAGS}
29906            thelibs=${builddep_freetype2_LIBS}
29907            if test "x$depdir" = x; then
29908                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29909            fi
29910            FREETYPE2=$depdir
29911            if test "x$theroot" != x; then
29912               FREETYPE2="$theroot"
29913            fi
29914            if test "x$thecflags" != x; then
29915               FREETYPE2_CFLAGS="$thecflags"
29916            fi
29917            if test "x$thelibs" != x; then
29918               FREETYPE2_LIBS="$thelibs"
29919            fi
29920            FREETYPE2_FOUND=yes
29921            else FREETYPE2_FOUND=no
29922
29923        fi
29924        else FREETYPE2_FOUND=no
29925
29926    fi
29927
29928            USING_SYSTEM_FT_LIB=true
29929	fi
29930	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29931            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29932
29933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29934
29935  # Input might be given as Windows format, start by converting to
29936  # unix format.
29937  path="$FREETYPELOCATION"
29938  new_path=`$CYGPATH -u "$path"`
29939
29940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29943  # "foo.exe" is OK but "foo" is an error.
29944  #
29945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29946  # It is also a way to make sure we got the proper file name for the real test later on.
29947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29948  if test "x$test_shortpath" = x; then
29949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29950$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29951    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29952  fi
29953
29954  # Call helper function which possibly converts this using DOS-style short mode.
29955  # If so, the updated path is stored in $new_path.
29956
29957  input_path="$new_path"
29958  # Check if we need to convert this using DOS-style short mode. If the path
29959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29960  # take no chances and rewrite it.
29961  # Note: m4 eats our [], so we need to use [ and ] instead.
29962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29963  if test "x$has_forbidden_chars" != x; then
29964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29968      # Going to short mode and back again did indeed matter. Since short mode is
29969      # case insensitive, let's make it lowercase to improve readability.
29970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29971      # Now convert it back to Unix-stile (cygpath)
29972      input_path=`$CYGPATH -u "$shortmode_path"`
29973      new_path="$input_path"
29974    fi
29975  fi
29976
29977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29978  if test "x$test_cygdrive_prefix" = x; then
29979    # As a simple fix, exclude /usr/bin since it's not a real path.
29980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29982      # a path prefixed by /cygdrive for fixpath to work.
29983      new_path="$CYGWIN_ROOT_PATH$input_path"
29984    fi
29985  fi
29986
29987
29988  if test "x$path" != "x$new_path"; then
29989    FREETYPELOCATION="$new_path"
29990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29991$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29992  fi
29993
29994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29995
29996  path="$FREETYPELOCATION"
29997  has_colon=`$ECHO $path | $GREP ^.:`
29998  new_path="$path"
29999  if test "x$has_colon" = x; then
30000    # Not in mixed or Windows style, start by that.
30001    new_path=`cmd //c echo $path`
30002  fi
30003
30004
30005  input_path="$new_path"
30006  # Check if we need to convert this using DOS-style short mode. If the path
30007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30008  # take no chances and rewrite it.
30009  # Note: m4 eats our [], so we need to use [ and ] instead.
30010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30011  if test "x$has_forbidden_chars" != x; then
30012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30014  fi
30015
30016
30017  windows_path="$new_path"
30018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30019    unix_path=`$CYGPATH -u "$windows_path"`
30020    new_path="$unix_path"
30021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30023    new_path="$unix_path"
30024  fi
30025
30026  if test "x$path" != "x$new_path"; then
30027    FREETYPELOCATION="$new_path"
30028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30029$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30030  fi
30031
30032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30034
30035  else
30036    # We're on a posix platform. Hooray! :)
30037    path="$FREETYPELOCATION"
30038
30039    if test ! -f "$path" && test ! -d "$path"; then
30040      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30041    fi
30042
30043    has_space=`$ECHO "$path" | $GREP " "`
30044    if test "x$has_space" != x; then
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30046$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30047      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30048    fi
30049  fi
30050
30051	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30052$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30053	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30054	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30055	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30056 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30057                if ! test -s "$FREETYPE2_LIBS"; then
30058		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30059		fi
30060                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30061		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30062		fi
30063                USING_SYSTEM_FT_LIB=true
30064                FREETYPE2_FOUND=yes
30065	    fi
30066	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30067$as_echo "$FREETYPE2_FOUND" >&6; }
30068        fi
30069	if test "x$FREETYPE2_FOUND" = xno; then
30070
30071pkg_failed=no
30072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30073$as_echo_n "checking for FREETYPE2... " >&6; }
30074
30075if test -n "$FREETYPE2_CFLAGS"; then
30076    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30077 elif test -n "$PKG_CONFIG"; then
30078    if test -n "$PKG_CONFIG" && \
30079    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30080  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30081  ac_status=$?
30082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30083  test $ac_status = 0; }; then
30084  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30085else
30086  pkg_failed=yes
30087fi
30088 else
30089    pkg_failed=untried
30090fi
30091if test -n "$FREETYPE2_LIBS"; then
30092    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30093 elif test -n "$PKG_CONFIG"; then
30094    if test -n "$PKG_CONFIG" && \
30095    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30096  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30097  ac_status=$?
30098  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30099  test $ac_status = 0; }; then
30100  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30101else
30102  pkg_failed=yes
30103fi
30104 else
30105    pkg_failed=untried
30106fi
30107
30108
30109
30110if test $pkg_failed = yes; then
30111
30112if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30113        _pkg_short_errors_supported=yes
30114else
30115        _pkg_short_errors_supported=no
30116fi
30117        if test $_pkg_short_errors_supported = yes; then
30118	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30119        else
30120	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30121        fi
30122	# Put the nasty error message in config.log where it belongs
30123	echo "$FREETYPE2_PKG_ERRORS" >&5
30124
30125	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30126$as_echo "no" >&6; }
30127                FREETYPE2_FOUND=no
30128elif test $pkg_failed = untried; then
30129	FREETYPE2_FOUND=no
30130else
30131	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30132	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30134$as_echo "yes" >&6; }
30135	FREETYPE2_FOUND=yes
30136fi
30137            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30138            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30139            USING_SYSTEM_FT_LIB=true
30140            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30141            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30142              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30143            fi
30144	fi
30145	if test "x$FREETYPE2_FOUND" = xno; then
30146	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30147$as_echo_n "checking for freetype in some standard locations... " >&6; }
30148
30149	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30150	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30151	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30152	    fi
30153	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30154	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30155	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30156	    fi
30157
30158	    PREV_CXXCFLAGS="$CXXFLAGS"
30159	    PREV_LDFLAGS="$LDFLAGS"
30160	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30161	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30162	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30163/* end confdefs.h.  */
30164#include<ft2build.h>
30165	                    #include FT_FREETYPE_H
30166	                   int main() { return 0; }
30167
30168_ACEOF
30169if ac_fn_cxx_try_link "$LINENO"; then :
30170
30171	                      # Yes, the default cflags and libs did the trick.
30172	                      FREETYPE2_FOUND=yes
30173	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30174	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30175
30176else
30177
30178	                      FREETYPE2_FOUND=no
30179
30180fi
30181rm -f core conftest.err conftest.$ac_objext \
30182    conftest$ac_exeext conftest.$ac_ext
30183            CXXCFLAGS="$PREV_CXXFLAGS"
30184	    LDFLAGS="$PREV_LDFLAGS"
30185	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30186$as_echo "$FREETYPE2_FOUND" >&6; }
30187            USING_SYSTEM_FT_LIB=true
30188	fi
30189	if test "x$FREETYPE2_FOUND" = xno; then
30190
30191    # Print a helpful message on how to acquire the necessary build dependency.
30192    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30193    MISSING_DEPENDENCY=freetype2
30194    PKGHANDLER_COMMAND=
30195
30196    case $PKGHANDLER in
30197	apt-get)
30198                apt_help     $MISSING_DEPENDENCY ;;
30199    yum)
30200                yum_help     $MISSING_DEPENDENCY ;;
30201	port)
30202                port_help    $MISSING_DEPENDENCY ;;
30203	pkgutil)
30204                pkgutil_help $MISSING_DEPENDENCY ;;
30205	pkgadd)
30206                pkgadd_help  $MISSING_DEPENDENCY ;;
30207    * )
30208      break ;;
30209    esac
30210
30211    if test "x$PKGHANDLER_COMMAND" != x; then
30212        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30213    fi
30214
30215		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30216	fi
30217
30218        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30219            # AC_CHECK_LIB does not support use of cl.exe
30220            PREV_LDFLAGS="$LDFLAGS"
30221            LDFLAGS="$FREETYPE2_LIBS"
30222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30223$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30224if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30225  $as_echo_n "(cached) " >&6
30226else
30227  ac_check_lib_save_LIBS=$LIBS
30228LIBS="-lfreetype  $LIBS"
30229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30230/* end confdefs.h.  */
30231
30232/* Override any GCC internal prototype to avoid an error.
30233   Use char because int might match the return type of a GCC
30234   builtin and then its argument prototype would still apply.  */
30235#ifdef __cplusplus
30236extern "C"
30237#endif
30238char FT_Init_FreeType ();
30239int
30240main ()
30241{
30242return FT_Init_FreeType ();
30243  ;
30244  return 0;
30245}
30246_ACEOF
30247if ac_fn_cxx_try_link "$LINENO"; then :
30248  ac_cv_lib_freetype_FT_Init_FreeType=yes
30249else
30250  ac_cv_lib_freetype_FT_Init_FreeType=no
30251fi
30252rm -f core conftest.err conftest.$ac_objext \
30253    conftest$ac_exeext conftest.$ac_ext
30254LIBS=$ac_check_lib_save_LIBS
30255fi
30256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30257$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30258if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30259  FREETYPE2_FOUND=true
30260else
30261  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30262fi
30263
30264            LDFLAGS="$PREV_LDFLAGS"
30265        fi
30266fi
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276###############################################################################
30277#
30278# Check for alsa headers and libraries. Used on Linux/GNU systems.
30279#
30280
30281# Check whether --with-alsa was given.
30282if test "${with_alsa+set}" = set; then :
30283  withval=$with_alsa;
30284fi
30285
30286
30287# Check whether --with-alsa-include was given.
30288if test "${with_alsa_include+set}" = set; then :
30289  withval=$with_alsa_include;
30290fi
30291
30292
30293# Check whether --with-alsa-lib was given.
30294if test "${with_alsa_lib+set}" = set; then :
30295  withval=$with_alsa_lib;
30296fi
30297
30298
30299if test "x$ALSA_NOT_NEEDED" = xyes; then
30300	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30301		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30302$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30303	fi
30304	ALSA_CFLAGS=
30305	ALSA_LIBS=
30306else
30307	ALSA_FOUND=no
30308
30309	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30310	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30311	fi
30312
30313	if test "x${with_alsa}" != x; then
30314	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30315	    ALSA_CFLAGS="-I${with_alsa}/include"
30316	    ALSA_FOUND=yes
30317	fi
30318	if test "x${with_alsa_include}" != x; then
30319	    ALSA_CFLAGS="-I${with_alsa_include}"
30320	    ALSA_FOUND=yes
30321	fi
30322	if test "x${with_alsa_lib}" != x; then
30323	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30324	    ALSA_FOUND=yes
30325	fi
30326	if test "x$ALSA_FOUND" = xno; then
30327
30328
30329    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30330        # Source the builddeps file again, to make sure it uses the latest variables!
30331        . $builddepsfile
30332        # Look for a target and build machine specific resource!
30333        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30334        if test "x$resource" = x; then
30335            # Ok, lets instead look for a target specific resource
30336            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30337        fi
30338        if test "x$resource" = x; then
30339            # Ok, lets instead look for a build specific resource
30340            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30341        fi
30342        if test "x$resource" = x; then
30343            # Ok, lets instead look for a generic resource
30344            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30345            resource=${builddep_alsa}
30346        fi
30347        if test "x$resource" != x; then
30348            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30349$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30350	    # If the resource in the builddeps.conf file is an existing directory,
30351	    # for example /java/linux/cups
30352	    if test -d ${resource}; then
30353	       depdir=${resource}
30354	    else
30355
30356# alsa is for example mymodule
30357# $resource is for example libs/general/libmymod_1_2_3.zip
30358# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30359# $with_builddeps_dir is for example /localhome/builddeps
30360# depdir is the name of the variable into which we store the depdir, eg MYMOD
30361# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30362# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30363    filename=`basename $resource`
30364    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30365    filebase=${filename%%.*}
30366    extension=${filename#*.}
30367    installdir=$with_builddeps_dir/$filebase
30368    if test ! -f $installdir/$filename.unpacked; then
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30370$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30371        if test ! -d $installdir; then
30372            mkdir -p $installdir
30373        fi
30374        if test ! -d $installdir; then
30375            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30376        fi
30377        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30378        touch $tmpfile
30379        if test ! -f $tmpfile; then
30380            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30381        fi
30382
30383    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30384    # $tmpfile is the local file name for the downloaded file.
30385    VALID_TOOL=no
30386    if test "x$BDEPS_FTP" = xwget; then
30387       VALID_TOOL=yes
30388       wget -O $tmpfile $with_builddeps_server/$resource
30389    fi
30390    if test "x$BDEPS_FTP" = xlftp; then
30391       VALID_TOOL=yes
30392       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30393    fi
30394    if test "x$BDEPS_FTP" = xftp; then
30395        VALID_TOOL=yes
30396        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30397        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30398        FTPUSERPWD=${FTPSERVER%%@*}
30399        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30400            FTPUSER=${userpwd%%:*}
30401            FTPPWD=${userpwd#*@}
30402            FTPSERVER=${FTPSERVER#*@}
30403        else
30404            FTPUSER=ftp
30405            FTPPWD=ftp
30406        fi
30407        # the "pass" command does not work on some
30408        # ftp clients (read ftp.exe) but if it works,
30409        # passive mode is better!
30410        (\
30411            echo "user $FTPUSER $FTPPWD"        ;\
30412            echo "pass"                         ;\
30413            echo "bin"                          ;\
30414            echo "get $FTPPATH $tmpfile"              ;\
30415        ) | ftp -in $FTPSERVER
30416    fi
30417    if test "x$VALID_TOOL" != xyes; then
30418       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30419    fi
30420
30421        mv $tmpfile $installdir/$filename
30422        if test ! -s $installdir/$filename; then
30423            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30424        fi
30425        case "$extension" in
30426            zip)  echo "Unzipping $installdir/$filename..."
30427               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30428            ;;
30429            tar.gz) echo "Untaring $installdir/$filename..."
30430               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30431            ;;
30432            tgz) echo "Untaring $installdir/$filename..."
30433               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30434            ;;
30435            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30436            ;;
30437        esac
30438    fi
30439    if test -f $installdir/$filename.unpacked; then
30440        depdir=$installdir
30441    fi
30442
30443	    fi
30444            # Source the builddeps file again, because in the previous command, the depdir
30445            # was updated to point at the current build dependency install directory.
30446            . $builddepsfile
30447            # Now extract variables from the builddeps.conf files.
30448            theroot=${builddep_alsa_ROOT}
30449            thecflags=${builddep_alsa_CFLAGS}
30450            thelibs=${builddep_alsa_LIBS}
30451            if test "x$depdir" = x; then
30452                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30453            fi
30454            ALSA=$depdir
30455            if test "x$theroot" != x; then
30456               ALSA="$theroot"
30457            fi
30458            if test "x$thecflags" != x; then
30459               ALSA_CFLAGS="$thecflags"
30460            fi
30461            if test "x$thelibs" != x; then
30462               ALSA_LIBS="$thelibs"
30463            fi
30464            ALSA_FOUND=yes
30465            else ALSA_FOUND=no
30466
30467        fi
30468        else ALSA_FOUND=no
30469
30470    fi
30471
30472	fi
30473	if test "x$ALSA_FOUND" = xno; then
30474
30475pkg_failed=no
30476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30477$as_echo_n "checking for ALSA... " >&6; }
30478
30479if test -n "$ALSA_CFLAGS"; then
30480    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30481 elif test -n "$PKG_CONFIG"; then
30482    if test -n "$PKG_CONFIG" && \
30483    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30484  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30485  ac_status=$?
30486  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30487  test $ac_status = 0; }; then
30488  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30489else
30490  pkg_failed=yes
30491fi
30492 else
30493    pkg_failed=untried
30494fi
30495if test -n "$ALSA_LIBS"; then
30496    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30497 elif test -n "$PKG_CONFIG"; then
30498    if test -n "$PKG_CONFIG" && \
30499    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30500  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30501  ac_status=$?
30502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30503  test $ac_status = 0; }; then
30504  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30505else
30506  pkg_failed=yes
30507fi
30508 else
30509    pkg_failed=untried
30510fi
30511
30512
30513
30514if test $pkg_failed = yes; then
30515
30516if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30517        _pkg_short_errors_supported=yes
30518else
30519        _pkg_short_errors_supported=no
30520fi
30521        if test $_pkg_short_errors_supported = yes; then
30522	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30523        else
30524	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30525        fi
30526	# Put the nasty error message in config.log where it belongs
30527	echo "$ALSA_PKG_ERRORS" >&5
30528
30529	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30530$as_echo "no" >&6; }
30531                ALSA_FOUND=no
30532elif test $pkg_failed = untried; then
30533	ALSA_FOUND=no
30534else
30535	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30536	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30538$as_echo "yes" >&6; }
30539	ALSA_FOUND=yes
30540fi
30541	fi
30542	if test "x$ALSA_FOUND" = xno; then
30543	    for ac_header in alsa/asoundlib.h
30544do :
30545  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30546if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30547  cat >>confdefs.h <<_ACEOF
30548#define HAVE_ALSA_ASOUNDLIB_H 1
30549_ACEOF
30550 ALSA_FOUND=yes
30551	                      ALSA_CFLAGS=-Iignoreme
30552	                      ALSA_LIBS=-lasound
30553	                      DEFAULT_ALSA=yes
30554else
30555  ALSA_FOUND=no
30556fi
30557
30558done
30559
30560	fi
30561	if test "x$ALSA_FOUND" = xno; then
30562
30563    # Print a helpful message on how to acquire the necessary build dependency.
30564    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30565    MISSING_DEPENDENCY=alsa
30566    PKGHANDLER_COMMAND=
30567
30568    case $PKGHANDLER in
30569	apt-get)
30570                apt_help     $MISSING_DEPENDENCY ;;
30571    yum)
30572                yum_help     $MISSING_DEPENDENCY ;;
30573	port)
30574                port_help    $MISSING_DEPENDENCY ;;
30575	pkgutil)
30576                pkgutil_help $MISSING_DEPENDENCY ;;
30577	pkgadd)
30578                pkgadd_help  $MISSING_DEPENDENCY ;;
30579    * )
30580      break ;;
30581    esac
30582
30583    if test "x$PKGHANDLER_COMMAND" != x; then
30584        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30585    fi
30586
30587	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30588	fi
30589fi
30590
30591
30592
30593
30594
30595
30596
30597###############################################################################
30598#
30599# Check for the jpeg library
30600#
30601
30602USE_EXTERNAL_LIBJPEG=true
30603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30604$as_echo_n "checking for main in -ljpeg... " >&6; }
30605if ${ac_cv_lib_jpeg_main+:} false; then :
30606  $as_echo_n "(cached) " >&6
30607else
30608  ac_check_lib_save_LIBS=$LIBS
30609LIBS="-ljpeg  $LIBS"
30610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30611/* end confdefs.h.  */
30612
30613
30614int
30615main ()
30616{
30617return main ();
30618  ;
30619  return 0;
30620}
30621_ACEOF
30622if ac_fn_cxx_try_link "$LINENO"; then :
30623  ac_cv_lib_jpeg_main=yes
30624else
30625  ac_cv_lib_jpeg_main=no
30626fi
30627rm -f core conftest.err conftest.$ac_objext \
30628    conftest$ac_exeext conftest.$ac_ext
30629LIBS=$ac_check_lib_save_LIBS
30630fi
30631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30632$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30633if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30634  cat >>confdefs.h <<_ACEOF
30635#define HAVE_LIBJPEG 1
30636_ACEOF
30637
30638  LIBS="-ljpeg $LIBS"
30639
30640else
30641   USE_EXTERNAL_LIBJPEG=false
30642               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30643$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30644
30645fi
30646
30647
30648
30649###############################################################################
30650#
30651# Check for the gif library
30652#
30653
30654USE_EXTERNAL_LIBJPEG=true
30655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30656$as_echo_n "checking for main in -lgif... " >&6; }
30657if ${ac_cv_lib_gif_main+:} false; then :
30658  $as_echo_n "(cached) " >&6
30659else
30660  ac_check_lib_save_LIBS=$LIBS
30661LIBS="-lgif  $LIBS"
30662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30663/* end confdefs.h.  */
30664
30665
30666int
30667main ()
30668{
30669return main ();
30670  ;
30671  return 0;
30672}
30673_ACEOF
30674if ac_fn_cxx_try_link "$LINENO"; then :
30675  ac_cv_lib_gif_main=yes
30676else
30677  ac_cv_lib_gif_main=no
30678fi
30679rm -f core conftest.err conftest.$ac_objext \
30680    conftest$ac_exeext conftest.$ac_ext
30681LIBS=$ac_check_lib_save_LIBS
30682fi
30683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30684$as_echo "$ac_cv_lib_gif_main" >&6; }
30685if test "x$ac_cv_lib_gif_main" = xyes; then :
30686  cat >>confdefs.h <<_ACEOF
30687#define HAVE_LIBGIF 1
30688_ACEOF
30689
30690  LIBS="-lgif $LIBS"
30691
30692else
30693   USE_EXTERNAL_LIBGIF=false
30694               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30695$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30696
30697fi
30698
30699
30700
30701###############################################################################
30702#
30703# Check for the zlib library
30704#
30705
30706
30707# Check whether --with-zlib was given.
30708if test "${with_zlib+set}" = set; then :
30709  withval=$with_zlib;
30710fi
30711
30712
30713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30714$as_echo_n "checking for compress in -lz... " >&6; }
30715if ${ac_cv_lib_z_compress+:} false; then :
30716  $as_echo_n "(cached) " >&6
30717else
30718  ac_check_lib_save_LIBS=$LIBS
30719LIBS="-lz  $LIBS"
30720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30721/* end confdefs.h.  */
30722
30723/* Override any GCC internal prototype to avoid an error.
30724   Use char because int might match the return type of a GCC
30725   builtin and then its argument prototype would still apply.  */
30726#ifdef __cplusplus
30727extern "C"
30728#endif
30729char compress ();
30730int
30731main ()
30732{
30733return compress ();
30734  ;
30735  return 0;
30736}
30737_ACEOF
30738if ac_fn_cxx_try_link "$LINENO"; then :
30739  ac_cv_lib_z_compress=yes
30740else
30741  ac_cv_lib_z_compress=no
30742fi
30743rm -f core conftest.err conftest.$ac_objext \
30744    conftest$ac_exeext conftest.$ac_ext
30745LIBS=$ac_check_lib_save_LIBS
30746fi
30747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30748$as_echo "$ac_cv_lib_z_compress" >&6; }
30749if test "x$ac_cv_lib_z_compress" = xyes; then :
30750   ZLIB_FOUND=yes
30751else
30752   ZLIB_FOUND=no
30753fi
30754
30755
30756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30757$as_echo_n "checking for which zlib to use... " >&6; }
30758
30759DEFAULT_ZLIB=bundled
30760if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30761#
30762# On macosx default is system...on others default is
30763#
30764    DEFAULT_ZLIB=system
30765fi
30766
30767if test "x${ZLIB_FOUND}" != "xyes"; then
30768#
30769# If we don't find any system...set default to bundled
30770#
30771    DEFAULT_ZLIB=bundled
30772fi
30773
30774#
30775# If user didn't specify, use DEFAULT_ZLIB
30776#
30777if test "x${with_zlib}" = "x"; then
30778    with_zlib=${DEFAULT_ZLIB}
30779fi
30780
30781if test "x${with_zlib}" = "xbundled"; then
30782    USE_EXTERNAL_LIBZ=false
30783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30784$as_echo "bundled" >&6; }
30785elif test "x${with_zlib}" = "xsystem"; then
30786    if test "x${ZLIB_FOUND}" = "xyes"; then
30787        USE_EXTERNAL_LIBZ=true
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30789$as_echo "system" >&6; }
30790    else
30791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30792$as_echo "system not found" >&6; }
30793        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30794    fi
30795else
30796    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30797fi
30798
30799
30800
30801###############################################################################
30802LIBZIP_CAN_USE_MMAP=true
30803
30804
30805
30806###############################################################################
30807#
30808# Check if altzone exists in time.h
30809#
30810
30811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30812/* end confdefs.h.  */
30813#include <time.h>
30814int
30815main ()
30816{
30817return (int)altzone;
30818  ;
30819  return 0;
30820}
30821_ACEOF
30822if ac_fn_cxx_try_link "$LINENO"; then :
30823  has_altzone=yes
30824else
30825  has_altzone=no
30826fi
30827rm -f core conftest.err conftest.$ac_objext \
30828    conftest$ac_exeext conftest.$ac_ext
30829if test "x$has_altzone" = xyes; then
30830
30831$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30832
30833fi
30834
30835###############################################################################
30836#
30837# Check the maths library
30838#
30839
30840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30841$as_echo_n "checking for cos in -lm... " >&6; }
30842if ${ac_cv_lib_m_cos+:} false; then :
30843  $as_echo_n "(cached) " >&6
30844else
30845  ac_check_lib_save_LIBS=$LIBS
30846LIBS="-lm  $LIBS"
30847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30848/* end confdefs.h.  */
30849
30850/* Override any GCC internal prototype to avoid an error.
30851   Use char because int might match the return type of a GCC
30852   builtin and then its argument prototype would still apply.  */
30853#ifdef __cplusplus
30854extern "C"
30855#endif
30856char cos ();
30857int
30858main ()
30859{
30860return cos ();
30861  ;
30862  return 0;
30863}
30864_ACEOF
30865if ac_fn_cxx_try_link "$LINENO"; then :
30866  ac_cv_lib_m_cos=yes
30867else
30868  ac_cv_lib_m_cos=no
30869fi
30870rm -f core conftest.err conftest.$ac_objext \
30871    conftest$ac_exeext conftest.$ac_ext
30872LIBS=$ac_check_lib_save_LIBS
30873fi
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30875$as_echo "$ac_cv_lib_m_cos" >&6; }
30876if test "x$ac_cv_lib_m_cos" = xyes; then :
30877  cat >>confdefs.h <<_ACEOF
30878#define HAVE_LIBM 1
30879_ACEOF
30880
30881  LIBS="-lm $LIBS"
30882
30883else
30884
30885                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30886$as_echo "$as_me: Maths library was not found" >&6;}
30887
30888fi
30889
30890
30891
30892###############################################################################
30893#
30894# Check for libdl.so
30895
30896save_LIBS="$LIBS"
30897LIBS=""
30898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30899$as_echo_n "checking for dlopen in -ldl... " >&6; }
30900if ${ac_cv_lib_dl_dlopen+:} false; then :
30901  $as_echo_n "(cached) " >&6
30902else
30903  ac_check_lib_save_LIBS=$LIBS
30904LIBS="-ldl  $LIBS"
30905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30906/* end confdefs.h.  */
30907
30908/* Override any GCC internal prototype to avoid an error.
30909   Use char because int might match the return type of a GCC
30910   builtin and then its argument prototype would still apply.  */
30911#ifdef __cplusplus
30912extern "C"
30913#endif
30914char dlopen ();
30915int
30916main ()
30917{
30918return dlopen ();
30919  ;
30920  return 0;
30921}
30922_ACEOF
30923if ac_fn_cxx_try_link "$LINENO"; then :
30924  ac_cv_lib_dl_dlopen=yes
30925else
30926  ac_cv_lib_dl_dlopen=no
30927fi
30928rm -f core conftest.err conftest.$ac_objext \
30929    conftest$ac_exeext conftest.$ac_ext
30930LIBS=$ac_check_lib_save_LIBS
30931fi
30932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30933$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30934if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30935  cat >>confdefs.h <<_ACEOF
30936#define HAVE_LIBDL 1
30937_ACEOF
30938
30939  LIBS="-ldl $LIBS"
30940
30941fi
30942
30943LIBDL="$LIBS"
30944
30945LIBS="$save_LIBS"
30946
30947
30948
30949###############################################################################
30950#
30951# statically link libstdc++ before C++ ABI is stablized on Linux unless
30952# dynamic build is configured on command line.
30953#
30954
30955# Check whether --with-stdc++lib was given.
30956if test "${with_stdc__lib+set}" = set; then :
30957  withval=$with_stdc__lib;
30958    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30959        && test "x$with_stdc__lib" != xdefault; then
30960      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30961    fi
30962
30963else
30964  with_stdc__lib=default
30965
30966fi
30967
30968
30969if test "x$OPENJDK_TARGET_OS" = xlinux; then
30970    # Test if -lstdc++ works.
30971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30972$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30973    ac_ext=cpp
30974ac_cpp='$CXXCPP $CPPFLAGS'
30975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30978
30979    OLD_CXXFLAGS="$CXXFLAGS"
30980    CXXFLAGS="$CXXFLAGS -lstdc++"
30981    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30982/* end confdefs.h.  */
30983
30984int
30985main ()
30986{
30987return 0;
30988  ;
30989  return 0;
30990}
30991_ACEOF
30992if ac_fn_cxx_try_link "$LINENO"; then :
30993  has_dynamic_libstdcxx=yes
30994else
30995  has_dynamic_libstdcxx=no
30996fi
30997rm -f core conftest.err conftest.$ac_objext \
30998    conftest$ac_exeext conftest.$ac_ext
30999    CXXFLAGS="$OLD_CXXFLAGS"
31000    ac_ext=cpp
31001ac_cpp='$CXXCPP $CPPFLAGS'
31002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31005
31006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31007$as_echo "$has_dynamic_libstdcxx" >&6; }
31008
31009    # Test if stdc++ can be linked statically.
31010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31011$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31012    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31013    ac_ext=cpp
31014ac_cpp='$CXXCPP $CPPFLAGS'
31015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31018
31019    OLD_LIBS="$LIBS"
31020    OLD_CXX="$CXX"
31021    LIBS="$STATIC_STDCXX_FLAGS"
31022    CXX="$CC"
31023    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31024/* end confdefs.h.  */
31025
31026int
31027main ()
31028{
31029return 0;
31030  ;
31031  return 0;
31032}
31033_ACEOF
31034if ac_fn_cxx_try_link "$LINENO"; then :
31035  has_static_libstdcxx=yes
31036else
31037  has_static_libstdcxx=no
31038fi
31039rm -f core conftest.err conftest.$ac_objext \
31040    conftest$ac_exeext conftest.$ac_ext
31041    LIBS="$OLD_LIBS"
31042    CXX="$OLD_CXX"
31043    ac_ext=cpp
31044ac_cpp='$CXXCPP $CPPFLAGS'
31045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31048
31049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31050$as_echo "$has_static_libstdcxx" >&6; }
31051
31052    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31053        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31054    fi
31055
31056    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31057        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31058    fi
31059
31060    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31061        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31062    fi
31063
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31065$as_echo_n "checking how to link with libstdc++... " >&6; }
31066    # If dynamic was requested, it's available since it would fail above otherwise.
31067    # If dynamic wasn't requested, go with static unless it isn't available.
31068    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31069        LIBCXX="$LIBCXX -lstdc++"
31070        LDCXX="$CXX"
31071        STATIC_CXX_SETTING="STATIC_CXX=false"
31072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31073$as_echo "dynamic" >&6; }
31074    else
31075        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31076        LDCXX="$CC"
31077        STATIC_CXX_SETTING="STATIC_CXX=true"
31078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31079$as_echo "static" >&6; }
31080    fi
31081fi
31082
31083
31084# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31085if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31086    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31087fi
31088
31089# TODO better (platform agnostic) test
31090if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31091    LIBCXX="-lstdc++"
31092fi
31093
31094
31095
31096
31097
31098# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31099
31100# When using cygwin or msys, we need a wrapper binary that renames
31101# /cygdrive/c/ arguments into c:/ arguments and peeks into
31102# @files and rewrites these too! This wrapper binary is
31103# called fixpath.
31104FIXPATH=
31105if test "x$OPENJDK_BUILD_OS" = xwindows; then
31106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31107$as_echo_n "checking if fixpath can be created... " >&6; }
31108    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31109    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31110    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31111      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31112      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31113      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31114      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31115    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31116      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31117      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31118
31119      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31120      # @ was chosen as separator to minimize risk of other tools messing around with it
31121      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31122      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31123
31124      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31125    fi
31126    rm -f $OUTPUT_ROOT/fixpath*
31127    cd $OUTPUT_ROOT
31128    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31129    cd $CURDIR
31130
31131    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31133$as_echo "no" >&6; }
31134        cat $OUTPUT_ROOT/fixpath1.log
31135        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31136    fi
31137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31138$as_echo "yes" >&6; }
31139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31140$as_echo_n "checking if fixpath.exe works... " >&6; }
31141    cd $OUTPUT_ROOT
31142    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31143    cd $CURDIR
31144    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31146$as_echo "no" >&6; }
31147        cat $OUTPUT_ROOT/fixpath2.log
31148        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31149    fi
31150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31151$as_echo "yes" >&6; }
31152    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31153fi
31154
31155
31156
31157
31158###############################################################################
31159#
31160# We need to do some final tweaking, when everything else is done.
31161#
31162###############################################################################
31163
31164
31165HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31166
31167
31168# The name of the Service Agent jar.
31169SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31170if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31171  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31172fi
31173
31174
31175
31176
31177###############################################################################
31178#
31179# Configure parts of the build that only affect the build performance,
31180# not the result.
31181#
31182###############################################################################
31183
31184
31185# How many cores do we have on this build system?
31186
31187# Check whether --with-num-cores was given.
31188if test "${with_num_cores+set}" = set; then :
31189  withval=$with_num_cores;
31190fi
31191
31192if test "x$with_num_cores" = x; then
31193    # The number of cores were not specified, try to probe them.
31194
31195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31196$as_echo_n "checking for number of cores... " >&6; }
31197    NUM_CORES=1
31198    FOUND_CORES=no
31199
31200    if test -f /proc/cpuinfo; then
31201        # Looks like a Linux (or cygwin) system
31202        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31203        FOUND_CORES=yes
31204    elif test -x /usr/sbin/psrinfo; then
31205        # Looks like a Solaris system
31206        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31207        FOUND_CORES=yes
31208    elif test -x /usr/sbin/system_profiler; then
31209        # Looks like a MacOSX system
31210        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31211        FOUND_CORES=yes
31212    elif test -n "$NUMBER_OF_PROCESSORS"; then
31213        # On windows, look in the env
31214        NUM_CORES=$NUMBER_OF_PROCESSORS
31215        FOUND_CORES=yes
31216    fi
31217
31218    # For c/c++ code we run twice as many concurrent build
31219    # jobs than we have cores, otherwise we will stall on io.
31220    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31221
31222    if test "x$FOUND_CORES" = xyes; then
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31224$as_echo "$NUM_CORES" >&6; }
31225    else
31226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31227$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31229$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31230    fi
31231
31232
31233else
31234    NUM_CORES=$with_num_cores
31235    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31236fi
31237
31238
31239
31240
31241# How much memory do we have on this build system?
31242
31243# Check whether --with-memory-size was given.
31244if test "${with_memory_size+set}" = set; then :
31245  withval=$with_memory_size;
31246fi
31247
31248if test "x$with_memory_size" = x; then
31249    # The memory size was not specified, try to probe it.
31250
31251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31252$as_echo_n "checking for memory size... " >&6; }
31253    # Default to 1024 MB
31254    MEMORY_SIZE=1024
31255    FOUND_MEM=no
31256
31257    if test -f /proc/meminfo; then
31258        # Looks like a Linux (or cygwin) system
31259        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31260        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31261        FOUND_MEM=yes
31262    elif test -x /usr/sbin/prtconf; then
31263        # Looks like a Solaris system
31264        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31265        FOUND_MEM=yes
31266    elif test -x /usr/sbin/system_profiler; then
31267        # Looks like a MacOSX system
31268        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31269        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31270        FOUND_MEM=yes
31271    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31272        # Windows, but without cygwin
31273        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31274        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31275        FOUND_MEM=yes
31276    fi
31277
31278    if test "x$FOUND_MEM" = xyes; then
31279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31280$as_echo "$MEMORY_SIZE MB" >&6; }
31281    else
31282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31283$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31285$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31286    fi
31287
31288else
31289    MEMORY_SIZE=$with_memory_size
31290fi
31291
31292
31293
31294# Setup smart javac (after cores and memory have been setup)
31295
31296
31297# Check whether --with-sjavac-server-java was given.
31298if test "${with_sjavac_server_java+set}" = set; then :
31299  withval=$with_sjavac_server_java;
31300fi
31301
31302
31303if test "x$with_sjavac_server_java" != x; then
31304    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31305    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31306    if test "x$FOUND_VERSION" = x; then
31307        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31308    fi
31309else
31310    SJAVAC_SERVER_JAVA=""
31311    # Hotspot specific options.
31312
31313    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31314    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31315    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31316    FOUND_VERSION=`$JAVA -verbosegc -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 -verbosegc"
31319    fi
31320
31321    # JRockit specific options.
31322
31323    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31324    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31325    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31326    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31327    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31328        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31329    fi
31330
31331    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31332fi
31333
31334
31335
31336# Check whether --with-sjavac-server-cores was given.
31337if test "${with_sjavac_server_cores+set}" = set; then :
31338  withval=$with_sjavac_server_cores;
31339fi
31340
31341if test "x$with_sjavac_server_cores" != x; then
31342    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31343else
31344    if test "$NUM_CORES" -gt 16; then
31345        # We set this arbitrary limit because we want to limit the heap
31346        # size of the javac server.
31347        # In the future we will make the javac compilers in the server
31348        # share more and more state, thus enabling us to use more and
31349        # more concurrent threads in the server.
31350        SJAVAC_SERVER_CORES="16"
31351    else
31352        SJAVAC_SERVER_CORES="$NUM_CORES"
31353    fi
31354
31355    if test "$MEMORY_SIZE" -gt "17000"; then
31356        MAX_HEAP_MEM=10000
31357
31358    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31359    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31360    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31361    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31362    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31363        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31364    fi
31365
31366
31367    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31368    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31369    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31370    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31371    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31372        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31373    fi
31374
31375    elif test "$MEMORY_SIZE" -gt "10000"; then
31376        MAX_HEAP_MEM=6000
31377
31378    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31379    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31380    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31381    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31382    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31383        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31384    fi
31385
31386
31387    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31388    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31389    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31390    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31391    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31392        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31393    fi
31394
31395    elif test "$MEMORY_SIZE" -gt "5000"; then
31396        MAX_HEAP_MEM=3000
31397
31398    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31399    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31400    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31401    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31402    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31403        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31404    fi
31405
31406
31407    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31408    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31409    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31410    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31411    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31412        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31413    fi
31414
31415    elif test "$MEMORY_SIZE" -gt "3800"; then
31416        MAX_HEAP_MEM=2500
31417
31418    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31419    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31420    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31421    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31422    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31423        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31424    fi
31425
31426    elif test "$MEMORY_SIZE" -gt "1900"; then
31427        MAX_HEAP_MEM=1200
31428
31429    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31430    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31431    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31432    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31433    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31434        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31435    fi
31436
31437    elif test "$MEMORY_SIZE" -gt "1000"; then
31438        MAX_HEAP_MEM=900
31439
31440    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31441    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31442    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31443    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31444    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31445        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31446    fi
31447
31448    else
31449        MAX_HEAP_MEM=512
31450
31451    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31452    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31453    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31454    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31455    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31456        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31457    fi
31458
31459    fi
31460
31461
31462    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31463    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31464    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31465    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31466    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31467        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31468    fi
31469
31470
31471    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31472    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31473    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31474    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31475    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31476        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31477    fi
31478
31479
31480    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31481    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31482    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31483    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31484    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31485        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31486    fi
31487
31488
31489    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31490    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31492$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31493        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31495$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31496    fi
31497fi
31498
31499
31500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31501$as_echo_n "checking whether to use sjavac... " >&6; }
31502# Check whether --enable-sjavac was given.
31503if test "${enable_sjavac+set}" = set; then :
31504  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31505else
31506  ENABLE_SJAVAC='no'
31507fi
31508
31509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31510$as_echo "$ENABLE_SJAVAC" >&6; }
31511
31512
31513if test "x$ENABLE_SJAVAC" = xyes; then
31514    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31515else
31516    SJAVAC_SERVER_DIR=
31517fi
31518
31519
31520
31521
31522# Can the C/C++ compiler use precompiled headers?
31523
31524
31525###############################################################################
31526#
31527# Can the C/C++ compiler use precompiled headers?
31528#
31529# Check whether --enable-precompiled-headers was given.
31530if test "${enable_precompiled_headers+set}" = set; then :
31531  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31532else
31533  ENABLE_PRECOMPH=yes
31534fi
31535
31536
31537USE_PRECOMPILED_HEADER=1
31538if test "x$ENABLE_PRECOMPH" = xno; then
31539    USE_PRECOMPILED_HEADER=0
31540fi
31541
31542if test "x$ENABLE_PRECOMPH" = xyes; then
31543    # Check that the compiler actually supports precomp headers.
31544    if test "x$GCC" = xyes; then
31545         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31546$as_echo_n "checking that precompiled headers work... " >&6; }
31547         echo "int alfa();" > conftest.h
31548         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31549         if test ! -f conftest.hpp.gch; then
31550             USE_PRECOMPILED_HEADER=0
31551             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31552$as_echo "no" >&6; }
31553         else
31554             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31555$as_echo "yes" >&6; }
31556         fi
31557         rm -f conftest.h conftest.hpp.gch
31558    fi
31559fi
31560
31561
31562
31563
31564# Setup use of ccache, if available
31565
31566    # Check whether --enable-ccache was given.
31567if test "${enable_ccache+set}" = set; then :
31568  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31569else
31570  ENABLE_CCACHE=yes
31571fi
31572
31573    if test "x$ENABLE_CCACHE" = xyes; then
31574        # Extract the first word of "ccache", so it can be a program name with args.
31575set dummy ccache; ac_word=$2
31576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31577$as_echo_n "checking for $ac_word... " >&6; }
31578if ${ac_cv_path_CCACHE+:} false; then :
31579  $as_echo_n "(cached) " >&6
31580else
31581  case $CCACHE in
31582  [\\/]* | ?:[\\/]*)
31583  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31584  ;;
31585  *)
31586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31587for as_dir in $PATH
31588do
31589  IFS=$as_save_IFS
31590  test -z "$as_dir" && as_dir=.
31591    for ac_exec_ext in '' $ac_executable_extensions; do
31592  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31593    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31595    break 2
31596  fi
31597done
31598  done
31599IFS=$as_save_IFS
31600
31601  ;;
31602esac
31603fi
31604CCACHE=$ac_cv_path_CCACHE
31605if test -n "$CCACHE"; then
31606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31607$as_echo "$CCACHE" >&6; }
31608else
31609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31610$as_echo "no" >&6; }
31611fi
31612
31613
31614    else
31615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31616$as_echo_n "checking for ccache... " >&6; }
31617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31618$as_echo "explicitly disabled" >&6; }
31619        CCACHE=
31620    fi
31621
31622
31623
31624# Check whether --with-ccache-dir was given.
31625if test "${with_ccache_dir+set}" = set; then :
31626  withval=$with_ccache_dir;
31627fi
31628
31629
31630    if test "x$with_ccache_dir" != x; then
31631        # When using a non home ccache directory, assume the use is to share ccache files
31632        # with other users. Thus change the umask.
31633        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31634    fi
31635    CCACHE_FOUND=""
31636    if test "x$CCACHE" != x; then
31637
31638    if test "x$CCACHE" != x; then
31639        CCACHE_FOUND="true"
31640        # Only use ccache if it is 3.1.4 or later, which supports
31641        # precompiled headers.
31642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31643$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31644        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31645        if test "x$HAS_GOOD_CCACHE" = x; then
31646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31647$as_echo "no, disabling ccache" >&6; }
31648            CCACHE=
31649        else
31650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31651$as_echo "yes" >&6; }
31652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31653$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31654            PUSHED_FLAGS="$CXXFLAGS"
31655            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31656            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31657/* end confdefs.h.  */
31658
31659int
31660main ()
31661{
31662
31663  ;
31664  return 0;
31665}
31666_ACEOF
31667if ac_fn_cxx_try_compile "$LINENO"; then :
31668  CC_KNOWS_CCACHE_TRICK=yes
31669else
31670  CC_KNOWS_CCACHE_TRICK=no
31671fi
31672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31673            CXXFLAGS="$PUSHED_FLAGS"
31674            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31676$as_echo "yes" >&6; }
31677            else
31678                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31679$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31680                CCACHE=
31681            fi
31682        fi
31683    fi
31684
31685    if test "x$CCACHE" != x; then
31686        CCACHE_SLOPPINESS=time_macros
31687        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31688        CCACHE_FLAGS=-fpch-preprocess
31689
31690        if test "x$SET_CCACHE_DIR" != x; then
31691            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31692	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31693        fi
31694    fi
31695
31696    fi
31697
31698
31699###############################################################################
31700#
31701# And now the finish...
31702#
31703###############################################################################
31704
31705# Check for some common pitfalls
31706
31707  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31708    file_to_test="$SRC_ROOT/LICENSE"
31709    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31710      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
31711    fi
31712  fi
31713
31714
31715
31716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31717$as_echo_n "checking if build directory is on local disk... " >&6; }
31718
31719	# df -l lists only local disks; if the given directory is not found then
31720	# a non-zero exit code is given
31721  if test "x$DF" = x; then
31722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31723      # msys does not have df; use Windows "net use" instead.
31724      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31725      if test "x$IS_NETWORK_DISK" = x; then
31726        OUTPUT_DIR_IS_LOCAL="yes"
31727      else
31728        OUTPUT_DIR_IS_LOCAL="no"
31729      fi
31730    else
31731      # No df here, say it's local
31732      OUTPUT_DIR_IS_LOCAL="yes"
31733    fi
31734  else
31735    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31736      OUTPUT_DIR_IS_LOCAL="yes"
31737    else
31738      OUTPUT_DIR_IS_LOCAL="no"
31739    fi
31740  fi
31741
31742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31743$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31744
31745
31746
31747# Check if the user has any old-style ALT_ variables set.
31748FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31749
31750# Before generating output files, test if they exist. If they do, this is a reconfigure.
31751# Since we can't properly handle the dependencies for this, warn the user about the situation
31752if test -e $OUTPUT_ROOT/spec.gmk; then
31753  IS_RECONFIGURE=yes
31754else
31755  IS_RECONFIGURE=no
31756fi
31757
31758if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31759  HIDE_PERFORMANCE_HINTS=yes
31760else
31761  HIDE_PERFORMANCE_HINTS=no
31762  # Hide it the next time around...
31763  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31764fi
31765
31766
31767
31768# At the end, call the custom hook. (Dummy macro if no custom sources available)
31769
31770
31771# We're messing a bit with internal autoconf variables to put the config.status
31772# in the output directory instead of the current directory.
31773CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31774# Create the actual output files. Now the main work of configure is done.
31775cat >confcache <<\_ACEOF
31776# This file is a shell script that caches the results of configure
31777# tests run on this system so they can be shared between configure
31778# scripts and configure runs, see configure's option --config-cache.
31779# It is not useful on other systems.  If it contains results you don't
31780# want to keep, you may remove or edit it.
31781#
31782# config.status only pays attention to the cache file if you give it
31783# the --recheck option to rerun configure.
31784#
31785# `ac_cv_env_foo' variables (set or unset) will be overridden when
31786# loading this file, other *unset* `ac_cv_foo' will be assigned the
31787# following values.
31788
31789_ACEOF
31790
31791# The following way of writing the cache mishandles newlines in values,
31792# but we know of no workaround that is simple, portable, and efficient.
31793# So, we kill variables containing newlines.
31794# Ultrix sh set writes to stderr and can't be redirected directly,
31795# and sets the high bit in the cache file unless we assign to the vars.
31796(
31797  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31798    eval ac_val=\$$ac_var
31799    case $ac_val in #(
31800    *${as_nl}*)
31801      case $ac_var in #(
31802      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31803$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31804      esac
31805      case $ac_var in #(
31806      _ | IFS | as_nl) ;; #(
31807      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31808      *) { eval $ac_var=; unset $ac_var;} ;;
31809      esac ;;
31810    esac
31811  done
31812
31813  (set) 2>&1 |
31814    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31815    *${as_nl}ac_space=\ *)
31816      # `set' does not quote correctly, so add quotes: double-quote
31817      # substitution turns \\\\ into \\, and sed turns \\ into \.
31818      sed -n \
31819	"s/'/'\\\\''/g;
31820	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31821      ;; #(
31822    *)
31823      # `set' quotes correctly as required by POSIX, so do not add quotes.
31824      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31825      ;;
31826    esac |
31827    sort
31828) |
31829  sed '
31830     /^ac_cv_env_/b end
31831     t clear
31832     :clear
31833     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31834     t end
31835     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31836     :end' >>confcache
31837if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31838  if test -w "$cache_file"; then
31839    if test "x$cache_file" != "x/dev/null"; then
31840      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31841$as_echo "$as_me: updating cache $cache_file" >&6;}
31842      if test ! -f "$cache_file" || test -h "$cache_file"; then
31843	cat confcache >"$cache_file"
31844      else
31845        case $cache_file in #(
31846        */* | ?:*)
31847	  mv -f confcache "$cache_file"$$ &&
31848	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31849        *)
31850	  mv -f confcache "$cache_file" ;;
31851	esac
31852      fi
31853    fi
31854  else
31855    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31856$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31857  fi
31858fi
31859rm -f confcache
31860
31861test "x$prefix" = xNONE && prefix=$ac_default_prefix
31862# Let make expand exec_prefix.
31863test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31864
31865DEFS=-DHAVE_CONFIG_H
31866
31867ac_libobjs=
31868ac_ltlibobjs=
31869U=
31870for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31871  # 1. Remove the extension, and $U if already installed.
31872  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31873  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31874  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31875  #    will be set to the directory where LIBOBJS objects are built.
31876  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31877  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31878done
31879LIBOBJS=$ac_libobjs
31880
31881LTLIBOBJS=$ac_ltlibobjs
31882
31883
31884
31885: "${CONFIG_STATUS=./config.status}"
31886ac_write_fail=0
31887ac_clean_files_save=$ac_clean_files
31888ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31889{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31890$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31891as_write_fail=0
31892cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31893#! $SHELL
31894# Generated by $as_me.
31895# Run this file to recreate the current configuration.
31896# Compiler output produced by configure, useful for debugging
31897# configure, is in config.log if it exists.
31898
31899debug=false
31900ac_cs_recheck=false
31901ac_cs_silent=false
31902
31903SHELL=\${CONFIG_SHELL-$SHELL}
31904export SHELL
31905_ASEOF
31906cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31907## -------------------- ##
31908## M4sh Initialization. ##
31909## -------------------- ##
31910
31911# Be more Bourne compatible
31912DUALCASE=1; export DUALCASE # for MKS sh
31913if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31914  emulate sh
31915  NULLCMD=:
31916  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31917  # is contrary to our usage.  Disable this feature.
31918  alias -g '${1+"$@"}'='"$@"'
31919  setopt NO_GLOB_SUBST
31920else
31921  case `(set -o) 2>/dev/null` in #(
31922  *posix*) :
31923    set -o posix ;; #(
31924  *) :
31925     ;;
31926esac
31927fi
31928
31929
31930as_nl='
31931'
31932export as_nl
31933# Printing a long string crashes Solaris 7 /usr/bin/printf.
31934as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31935as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31936as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31937# Prefer a ksh shell builtin over an external printf program on Solaris,
31938# but without wasting forks for bash or zsh.
31939if test -z "$BASH_VERSION$ZSH_VERSION" \
31940    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31941  as_echo='print -r --'
31942  as_echo_n='print -rn --'
31943elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31944  as_echo='printf %s\n'
31945  as_echo_n='printf %s'
31946else
31947  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31948    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31949    as_echo_n='/usr/ucb/echo -n'
31950  else
31951    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31952    as_echo_n_body='eval
31953      arg=$1;
31954      case $arg in #(
31955      *"$as_nl"*)
31956	expr "X$arg" : "X\\(.*\\)$as_nl";
31957	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31958      esac;
31959      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31960    '
31961    export as_echo_n_body
31962    as_echo_n='sh -c $as_echo_n_body as_echo'
31963  fi
31964  export as_echo_body
31965  as_echo='sh -c $as_echo_body as_echo'
31966fi
31967
31968# The user is always right.
31969if test "${PATH_SEPARATOR+set}" != set; then
31970  PATH_SEPARATOR=:
31971  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31972    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31973      PATH_SEPARATOR=';'
31974  }
31975fi
31976
31977
31978# IFS
31979# We need space, tab and new line, in precisely that order.  Quoting is
31980# there to prevent editors from complaining about space-tab.
31981# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31982# splitting by setting IFS to empty value.)
31983IFS=" ""	$as_nl"
31984
31985# Find who we are.  Look in the path if we contain no directory separator.
31986as_myself=
31987case $0 in #((
31988  *[\\/]* ) as_myself=$0 ;;
31989  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31990for as_dir in $PATH
31991do
31992  IFS=$as_save_IFS
31993  test -z "$as_dir" && as_dir=.
31994    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31995  done
31996IFS=$as_save_IFS
31997
31998     ;;
31999esac
32000# We did not find ourselves, most probably we were run as `sh COMMAND'
32001# in which case we are not to be found in the path.
32002if test "x$as_myself" = x; then
32003  as_myself=$0
32004fi
32005if test ! -f "$as_myself"; then
32006  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32007  exit 1
32008fi
32009
32010# Unset variables that we do not need and which cause bugs (e.g. in
32011# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32012# suppresses any "Segmentation fault" message there.  '((' could
32013# trigger a bug in pdksh 5.2.14.
32014for as_var in BASH_ENV ENV MAIL MAILPATH
32015do eval test x\${$as_var+set} = xset \
32016  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32017done
32018PS1='$ '
32019PS2='> '
32020PS4='+ '
32021
32022# NLS nuisances.
32023LC_ALL=C
32024export LC_ALL
32025LANGUAGE=C
32026export LANGUAGE
32027
32028# CDPATH.
32029(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32030
32031
32032# as_fn_error STATUS ERROR [LINENO LOG_FD]
32033# ----------------------------------------
32034# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32035# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32036# script with STATUS, using 1 if that was 0.
32037as_fn_error ()
32038{
32039  as_status=$1; test $as_status -eq 0 && as_status=1
32040  if test "$4"; then
32041    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32042    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32043  fi
32044  $as_echo "$as_me: error: $2" >&2
32045  as_fn_exit $as_status
32046} # as_fn_error
32047
32048
32049# as_fn_set_status STATUS
32050# -----------------------
32051# Set $? to STATUS, without forking.
32052as_fn_set_status ()
32053{
32054  return $1
32055} # as_fn_set_status
32056
32057# as_fn_exit STATUS
32058# -----------------
32059# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32060as_fn_exit ()
32061{
32062  set +e
32063  as_fn_set_status $1
32064  exit $1
32065} # as_fn_exit
32066
32067# as_fn_unset VAR
32068# ---------------
32069# Portably unset VAR.
32070as_fn_unset ()
32071{
32072  { eval $1=; unset $1;}
32073}
32074as_unset=as_fn_unset
32075# as_fn_append VAR VALUE
32076# ----------------------
32077# Append the text in VALUE to the end of the definition contained in VAR. Take
32078# advantage of any shell optimizations that allow amortized linear growth over
32079# repeated appends, instead of the typical quadratic growth present in naive
32080# implementations.
32081if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32082  eval 'as_fn_append ()
32083  {
32084    eval $1+=\$2
32085  }'
32086else
32087  as_fn_append ()
32088  {
32089    eval $1=\$$1\$2
32090  }
32091fi # as_fn_append
32092
32093# as_fn_arith ARG...
32094# ------------------
32095# Perform arithmetic evaluation on the ARGs, and store the result in the
32096# global $as_val. Take advantage of shells that can avoid forks. The arguments
32097# must be portable across $(()) and expr.
32098if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32099  eval 'as_fn_arith ()
32100  {
32101    as_val=$(( $* ))
32102  }'
32103else
32104  as_fn_arith ()
32105  {
32106    as_val=`expr "$@" || test $? -eq 1`
32107  }
32108fi # as_fn_arith
32109
32110
32111if expr a : '\(a\)' >/dev/null 2>&1 &&
32112   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32113  as_expr=expr
32114else
32115  as_expr=false
32116fi
32117
32118if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32119  as_basename=basename
32120else
32121  as_basename=false
32122fi
32123
32124if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32125  as_dirname=dirname
32126else
32127  as_dirname=false
32128fi
32129
32130as_me=`$as_basename -- "$0" ||
32131$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32132	 X"$0" : 'X\(//\)$' \| \
32133	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32134$as_echo X/"$0" |
32135    sed '/^.*\/\([^/][^/]*\)\/*$/{
32136	    s//\1/
32137	    q
32138	  }
32139	  /^X\/\(\/\/\)$/{
32140	    s//\1/
32141	    q
32142	  }
32143	  /^X\/\(\/\).*/{
32144	    s//\1/
32145	    q
32146	  }
32147	  s/.*/./; q'`
32148
32149# Avoid depending upon Character Ranges.
32150as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32151as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32152as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32153as_cr_digits='0123456789'
32154as_cr_alnum=$as_cr_Letters$as_cr_digits
32155
32156ECHO_C= ECHO_N= ECHO_T=
32157case `echo -n x` in #(((((
32158-n*)
32159  case `echo 'xy\c'` in
32160  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32161  xy)  ECHO_C='\c';;
32162  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32163       ECHO_T='	';;
32164  esac;;
32165*)
32166  ECHO_N='-n';;
32167esac
32168
32169rm -f conf$$ conf$$.exe conf$$.file
32170if test -d conf$$.dir; then
32171  rm -f conf$$.dir/conf$$.file
32172else
32173  rm -f conf$$.dir
32174  mkdir conf$$.dir 2>/dev/null
32175fi
32176if (echo >conf$$.file) 2>/dev/null; then
32177  if ln -s conf$$.file conf$$ 2>/dev/null; then
32178    as_ln_s='ln -s'
32179    # ... but there are two gotchas:
32180    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32181    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32182    # In both cases, we have to default to `cp -p'.
32183    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32184      as_ln_s='cp -p'
32185  elif ln conf$$.file conf$$ 2>/dev/null; then
32186    as_ln_s=ln
32187  else
32188    as_ln_s='cp -p'
32189  fi
32190else
32191  as_ln_s='cp -p'
32192fi
32193rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32194rmdir conf$$.dir 2>/dev/null
32195
32196
32197# as_fn_mkdir_p
32198# -------------
32199# Create "$as_dir" as a directory, including parents if necessary.
32200as_fn_mkdir_p ()
32201{
32202
32203  case $as_dir in #(
32204  -*) as_dir=./$as_dir;;
32205  esac
32206  test -d "$as_dir" || eval $as_mkdir_p || {
32207    as_dirs=
32208    while :; do
32209      case $as_dir in #(
32210      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32211      *) as_qdir=$as_dir;;
32212      esac
32213      as_dirs="'$as_qdir' $as_dirs"
32214      as_dir=`$as_dirname -- "$as_dir" ||
32215$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32216	 X"$as_dir" : 'X\(//\)[^/]' \| \
32217	 X"$as_dir" : 'X\(//\)$' \| \
32218	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32219$as_echo X"$as_dir" |
32220    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32221	    s//\1/
32222	    q
32223	  }
32224	  /^X\(\/\/\)[^/].*/{
32225	    s//\1/
32226	    q
32227	  }
32228	  /^X\(\/\/\)$/{
32229	    s//\1/
32230	    q
32231	  }
32232	  /^X\(\/\).*/{
32233	    s//\1/
32234	    q
32235	  }
32236	  s/.*/./; q'`
32237      test -d "$as_dir" && break
32238    done
32239    test -z "$as_dirs" || eval "mkdir $as_dirs"
32240  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32241
32242
32243} # as_fn_mkdir_p
32244if mkdir -p . 2>/dev/null; then
32245  as_mkdir_p='mkdir -p "$as_dir"'
32246else
32247  test -d ./-p && rmdir ./-p
32248  as_mkdir_p=false
32249fi
32250
32251if test -x / >/dev/null 2>&1; then
32252  as_test_x='test -x'
32253else
32254  if ls -dL / >/dev/null 2>&1; then
32255    as_ls_L_option=L
32256  else
32257    as_ls_L_option=
32258  fi
32259  as_test_x='
32260    eval sh -c '\''
32261      if test -d "$1"; then
32262	test -d "$1/.";
32263      else
32264	case $1 in #(
32265	-*)set "./$1";;
32266	esac;
32267	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32268	???[sx]*):;;*)false;;esac;fi
32269    '\'' sh
32270  '
32271fi
32272as_executable_p=$as_test_x
32273
32274# Sed expression to map a string onto a valid CPP name.
32275as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32276
32277# Sed expression to map a string onto a valid variable name.
32278as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32279
32280
32281exec 6>&1
32282## ----------------------------------- ##
32283## Main body of $CONFIG_STATUS script. ##
32284## ----------------------------------- ##
32285_ASEOF
32286test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32287
32288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32289# Save the log message, to keep $0 and so on meaningful, and to
32290# report actual input values of CONFIG_FILES etc. instead of their
32291# values after options handling.
32292ac_log="
32293This file was extended by OpenJDK $as_me jdk8, which was
32294generated by GNU Autoconf 2.68.  Invocation command line was
32295
32296  CONFIG_FILES    = $CONFIG_FILES
32297  CONFIG_HEADERS  = $CONFIG_HEADERS
32298  CONFIG_LINKS    = $CONFIG_LINKS
32299  CONFIG_COMMANDS = $CONFIG_COMMANDS
32300  $ $0 $@
32301
32302on `(hostname || uname -n) 2>/dev/null | sed 1q`
32303"
32304
32305_ACEOF
32306
32307case $ac_config_files in *"
32308"*) set x $ac_config_files; shift; ac_config_files=$*;;
32309esac
32310
32311case $ac_config_headers in *"
32312"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32313esac
32314
32315
32316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32317# Files that config.status was made for.
32318config_files="$ac_config_files"
32319config_headers="$ac_config_headers"
32320
32321_ACEOF
32322
32323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32324ac_cs_usage="\
32325\`$as_me' instantiates files and other configuration actions
32326from templates according to the current configuration.  Unless the files
32327and actions are specified as TAGs, all are instantiated by default.
32328
32329Usage: $0 [OPTION]... [TAG]...
32330
32331  -h, --help       print this help, then exit
32332  -V, --version    print version number and configuration settings, then exit
32333      --config     print configuration, then exit
32334  -q, --quiet, --silent
32335                   do not print progress messages
32336  -d, --debug      don't remove temporary files
32337      --recheck    update $as_me by reconfiguring in the same conditions
32338      --file=FILE[:TEMPLATE]
32339                   instantiate the configuration file FILE
32340      --header=FILE[:TEMPLATE]
32341                   instantiate the configuration header FILE
32342
32343Configuration files:
32344$config_files
32345
32346Configuration headers:
32347$config_headers
32348
32349Report bugs to <build-dev@openjdk.java.net>.
32350OpenJDK home page: <http://openjdk.java.net>."
32351
32352_ACEOF
32353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32354ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32355ac_cs_version="\\
32356OpenJDK config.status jdk8
32357configured by $0, generated by GNU Autoconf 2.68,
32358  with options \\"\$ac_cs_config\\"
32359
32360Copyright (C) 2010 Free Software Foundation, Inc.
32361This config.status script is free software; the Free Software Foundation
32362gives unlimited permission to copy, distribute and modify it."
32363
32364ac_pwd='$ac_pwd'
32365srcdir='$srcdir'
32366AWK='$AWK'
32367test -n "\$AWK" || AWK=awk
32368_ACEOF
32369
32370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32371# The default lists apply if the user does not specify any file.
32372ac_need_defaults=:
32373while test $# != 0
32374do
32375  case $1 in
32376  --*=?*)
32377    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32378    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32379    ac_shift=:
32380    ;;
32381  --*=)
32382    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32383    ac_optarg=
32384    ac_shift=:
32385    ;;
32386  *)
32387    ac_option=$1
32388    ac_optarg=$2
32389    ac_shift=shift
32390    ;;
32391  esac
32392
32393  case $ac_option in
32394  # Handling of the options.
32395  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32396    ac_cs_recheck=: ;;
32397  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32398    $as_echo "$ac_cs_version"; exit ;;
32399  --config | --confi | --conf | --con | --co | --c )
32400    $as_echo "$ac_cs_config"; exit ;;
32401  --debug | --debu | --deb | --de | --d | -d )
32402    debug=: ;;
32403  --file | --fil | --fi | --f )
32404    $ac_shift
32405    case $ac_optarg in
32406    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32407    '') as_fn_error $? "missing file argument" ;;
32408    esac
32409    as_fn_append CONFIG_FILES " '$ac_optarg'"
32410    ac_need_defaults=false;;
32411  --header | --heade | --head | --hea )
32412    $ac_shift
32413    case $ac_optarg in
32414    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32415    esac
32416    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32417    ac_need_defaults=false;;
32418  --he | --h)
32419    # Conflict between --help and --header
32420    as_fn_error $? "ambiguous option: \`$1'
32421Try \`$0 --help' for more information.";;
32422  --help | --hel | -h )
32423    $as_echo "$ac_cs_usage"; exit ;;
32424  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32425  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32426    ac_cs_silent=: ;;
32427
32428  # This is an error.
32429  -*) as_fn_error $? "unrecognized option: \`$1'
32430Try \`$0 --help' for more information." ;;
32431
32432  *) as_fn_append ac_config_targets " $1"
32433     ac_need_defaults=false ;;
32434
32435  esac
32436  shift
32437done
32438
32439ac_configure_extra_args=
32440
32441if $ac_cs_silent; then
32442  exec 6>/dev/null
32443  ac_configure_extra_args="$ac_configure_extra_args --silent"
32444fi
32445
32446_ACEOF
32447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32448if \$ac_cs_recheck; then
32449  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32450  shift
32451  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32452  CONFIG_SHELL='$SHELL'
32453  export CONFIG_SHELL
32454  exec "\$@"
32455fi
32456
32457_ACEOF
32458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32459exec 5>>config.log
32460{
32461  echo
32462  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32463## Running $as_me. ##
32464_ASBOX
32465  $as_echo "$ac_log"
32466} >&5
32467
32468_ACEOF
32469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32470_ACEOF
32471
32472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32473
32474# Handling of arguments.
32475for ac_config_target in $ac_config_targets
32476do
32477  case $ac_config_target in
32478    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32479    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32480    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32481    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32482    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32483    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32484    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32485
32486  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32487  esac
32488done
32489
32490
32491# If the user did not use the arguments to specify the items to instantiate,
32492# then the envvar interface is used.  Set only those that are not.
32493# We use the long form for the default assignment because of an extremely
32494# bizarre bug on SunOS 4.1.3.
32495if $ac_need_defaults; then
32496  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32497  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32498fi
32499
32500# Have a temporary directory for convenience.  Make it in the build tree
32501# simply because there is no reason against having it here, and in addition,
32502# creating and moving files from /tmp can sometimes cause problems.
32503# Hook for its removal unless debugging.
32504# Note that there is a small window in which the directory will not be cleaned:
32505# after its creation but before its name has been assigned to `$tmp'.
32506$debug ||
32507{
32508  tmp= ac_tmp=
32509  trap 'exit_status=$?
32510  : "${ac_tmp:=$tmp}"
32511  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32512' 0
32513  trap 'as_fn_exit 1' 1 2 13 15
32514}
32515# Create a (secure) tmp directory for tmp files.
32516
32517{
32518  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32519  test -d "$tmp"
32520}  ||
32521{
32522  tmp=./conf$$-$RANDOM
32523  (umask 077 && mkdir "$tmp")
32524} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32525ac_tmp=$tmp
32526
32527# Set up the scripts for CONFIG_FILES section.
32528# No need to generate them if there are no CONFIG_FILES.
32529# This happens for instance with `./config.status config.h'.
32530if test -n "$CONFIG_FILES"; then
32531
32532
32533ac_cr=`echo X | tr X '\015'`
32534# On cygwin, bash can eat \r inside `` if the user requested igncr.
32535# But we know of no other shell where ac_cr would be empty at this
32536# point, so we can use a bashism as a fallback.
32537if test "x$ac_cr" = x; then
32538  eval ac_cr=\$\'\\r\'
32539fi
32540ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32541if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32542  ac_cs_awk_cr='\\r'
32543else
32544  ac_cs_awk_cr=$ac_cr
32545fi
32546
32547echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32548_ACEOF
32549
32550
32551{
32552  echo "cat >conf$$subs.awk <<_ACEOF" &&
32553  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32554  echo "_ACEOF"
32555} >conf$$subs.sh ||
32556  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32557ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32558ac_delim='%!_!# '
32559for ac_last_try in false false false false false :; do
32560  . ./conf$$subs.sh ||
32561    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32562
32563  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32564  if test $ac_delim_n = $ac_delim_num; then
32565    break
32566  elif $ac_last_try; then
32567    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32568  else
32569    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32570  fi
32571done
32572rm -f conf$$subs.sh
32573
32574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32575cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32576_ACEOF
32577sed -n '
32578h
32579s/^/S["/; s/!.*/"]=/
32580p
32581g
32582s/^[^!]*!//
32583:repl
32584t repl
32585s/'"$ac_delim"'$//
32586t delim
32587:nl
32588h
32589s/\(.\{148\}\)..*/\1/
32590t more1
32591s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32592p
32593n
32594b repl
32595:more1
32596s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32597p
32598g
32599s/.\{148\}//
32600t nl
32601:delim
32602h
32603s/\(.\{148\}\)..*/\1/
32604t more2
32605s/["\\]/\\&/g; s/^/"/; s/$/"/
32606p
32607b
32608:more2
32609s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32610p
32611g
32612s/.\{148\}//
32613t delim
32614' <conf$$subs.awk | sed '
32615/^[^""]/{
32616  N
32617  s/\n//
32618}
32619' >>$CONFIG_STATUS || ac_write_fail=1
32620rm -f conf$$subs.awk
32621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32622_ACAWK
32623cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32624  for (key in S) S_is_set[key] = 1
32625  FS = ""
32626
32627}
32628{
32629  line = $ 0
32630  nfields = split(line, field, "@")
32631  substed = 0
32632  len = length(field[1])
32633  for (i = 2; i < nfields; i++) {
32634    key = field[i]
32635    keylen = length(key)
32636    if (S_is_set[key]) {
32637      value = S[key]
32638      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32639      len += length(value) + length(field[++i])
32640      substed = 1
32641    } else
32642      len += 1 + keylen
32643  }
32644
32645  print line
32646}
32647
32648_ACAWK
32649_ACEOF
32650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32651if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32652  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32653else
32654  cat
32655fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32656  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32657_ACEOF
32658
32659# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32660# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32661# trailing colons and then remove the whole line if VPATH becomes empty
32662# (actually we leave an empty line to preserve line numbers).
32663if test "x$srcdir" = x.; then
32664  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32665h
32666s///
32667s/^/:/
32668s/[	 ]*$/:/
32669s/:\$(srcdir):/:/g
32670s/:\${srcdir}:/:/g
32671s/:@srcdir@:/:/g
32672s/^:*//
32673s/:*$//
32674x
32675s/\(=[	 ]*\).*/\1/
32676G
32677s/\n//
32678s/^[^=]*=[	 ]*$//
32679}'
32680fi
32681
32682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32683fi # test -n "$CONFIG_FILES"
32684
32685# Set up the scripts for CONFIG_HEADERS section.
32686# No need to generate them if there are no CONFIG_HEADERS.
32687# This happens for instance with `./config.status Makefile'.
32688if test -n "$CONFIG_HEADERS"; then
32689cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32690BEGIN {
32691_ACEOF
32692
32693# Transform confdefs.h into an awk script `defines.awk', embedded as
32694# here-document in config.status, that substitutes the proper values into
32695# config.h.in to produce config.h.
32696
32697# Create a delimiter string that does not exist in confdefs.h, to ease
32698# handling of long lines.
32699ac_delim='%!_!# '
32700for ac_last_try in false false :; do
32701  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32702  if test -z "$ac_tt"; then
32703    break
32704  elif $ac_last_try; then
32705    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32706  else
32707    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32708  fi
32709done
32710
32711# For the awk script, D is an array of macro values keyed by name,
32712# likewise P contains macro parameters if any.  Preserve backslash
32713# newline sequences.
32714
32715ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32716sed -n '
32717s/.\{148\}/&'"$ac_delim"'/g
32718t rset
32719:rset
32720s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32721t def
32722d
32723:def
32724s/\\$//
32725t bsnl
32726s/["\\]/\\&/g
32727s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32728D["\1"]=" \3"/p
32729s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32730d
32731:bsnl
32732s/["\\]/\\&/g
32733s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32734D["\1"]=" \3\\\\\\n"\\/p
32735t cont
32736s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32737t cont
32738d
32739:cont
32740n
32741s/.\{148\}/&'"$ac_delim"'/g
32742t clear
32743:clear
32744s/\\$//
32745t bsnlc
32746s/["\\]/\\&/g; s/^/"/; s/$/"/p
32747d
32748:bsnlc
32749s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32750b cont
32751' <confdefs.h | sed '
32752s/'"$ac_delim"'/"\\\
32753"/g' >>$CONFIG_STATUS || ac_write_fail=1
32754
32755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32756  for (key in D) D_is_set[key] = 1
32757  FS = ""
32758}
32759/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32760  line = \$ 0
32761  split(line, arg, " ")
32762  if (arg[1] == "#") {
32763    defundef = arg[2]
32764    mac1 = arg[3]
32765  } else {
32766    defundef = substr(arg[1], 2)
32767    mac1 = arg[2]
32768  }
32769  split(mac1, mac2, "(") #)
32770  macro = mac2[1]
32771  prefix = substr(line, 1, index(line, defundef) - 1)
32772  if (D_is_set[macro]) {
32773    # Preserve the white space surrounding the "#".
32774    print prefix "define", macro P[macro] D[macro]
32775    next
32776  } else {
32777    # Replace #undef with comments.  This is necessary, for example,
32778    # in the case of _POSIX_SOURCE, which is predefined and required
32779    # on some systems where configure will not decide to define it.
32780    if (defundef == "undef") {
32781      print "/*", prefix defundef, macro, "*/"
32782      next
32783    }
32784  }
32785}
32786{ print }
32787_ACAWK
32788_ACEOF
32789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32790  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32791fi # test -n "$CONFIG_HEADERS"
32792
32793
32794eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32795shift
32796for ac_tag
32797do
32798  case $ac_tag in
32799  :[FHLC]) ac_mode=$ac_tag; continue;;
32800  esac
32801  case $ac_mode$ac_tag in
32802  :[FHL]*:*);;
32803  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32804  :[FH]-) ac_tag=-:-;;
32805  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32806  esac
32807  ac_save_IFS=$IFS
32808  IFS=:
32809  set x $ac_tag
32810  IFS=$ac_save_IFS
32811  shift
32812  ac_file=$1
32813  shift
32814
32815  case $ac_mode in
32816  :L) ac_source=$1;;
32817  :[FH])
32818    ac_file_inputs=
32819    for ac_f
32820    do
32821      case $ac_f in
32822      -) ac_f="$ac_tmp/stdin";;
32823      *) # Look for the file first in the build tree, then in the source tree
32824	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32825	 # because $ac_f cannot contain `:'.
32826	 test -f "$ac_f" ||
32827	   case $ac_f in
32828	   [\\/$]*) false;;
32829	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32830	   esac ||
32831	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32832      esac
32833      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32834      as_fn_append ac_file_inputs " '$ac_f'"
32835    done
32836
32837    # Let's still pretend it is `configure' which instantiates (i.e., don't
32838    # use $as_me), people would be surprised to read:
32839    #    /* config.h.  Generated by config.status.  */
32840    configure_input='Generated from '`
32841	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32842	`' by configure.'
32843    if test x"$ac_file" != x-; then
32844      configure_input="$ac_file.  $configure_input"
32845      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32846$as_echo "$as_me: creating $ac_file" >&6;}
32847    fi
32848    # Neutralize special characters interpreted by sed in replacement strings.
32849    case $configure_input in #(
32850    *\&* | *\|* | *\\* )
32851       ac_sed_conf_input=`$as_echo "$configure_input" |
32852       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32853    *) ac_sed_conf_input=$configure_input;;
32854    esac
32855
32856    case $ac_tag in
32857    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32858      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32859    esac
32860    ;;
32861  esac
32862
32863  ac_dir=`$as_dirname -- "$ac_file" ||
32864$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32865	 X"$ac_file" : 'X\(//\)[^/]' \| \
32866	 X"$ac_file" : 'X\(//\)$' \| \
32867	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32868$as_echo X"$ac_file" |
32869    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32870	    s//\1/
32871	    q
32872	  }
32873	  /^X\(\/\/\)[^/].*/{
32874	    s//\1/
32875	    q
32876	  }
32877	  /^X\(\/\/\)$/{
32878	    s//\1/
32879	    q
32880	  }
32881	  /^X\(\/\).*/{
32882	    s//\1/
32883	    q
32884	  }
32885	  s/.*/./; q'`
32886  as_dir="$ac_dir"; as_fn_mkdir_p
32887  ac_builddir=.
32888
32889case "$ac_dir" in
32890.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32891*)
32892  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32893  # A ".." for each directory in $ac_dir_suffix.
32894  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32895  case $ac_top_builddir_sub in
32896  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32897  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32898  esac ;;
32899esac
32900ac_abs_top_builddir=$ac_pwd
32901ac_abs_builddir=$ac_pwd$ac_dir_suffix
32902# for backward compatibility:
32903ac_top_builddir=$ac_top_build_prefix
32904
32905case $srcdir in
32906  .)  # We are building in place.
32907    ac_srcdir=.
32908    ac_top_srcdir=$ac_top_builddir_sub
32909    ac_abs_top_srcdir=$ac_pwd ;;
32910  [\\/]* | ?:[\\/]* )  # Absolute name.
32911    ac_srcdir=$srcdir$ac_dir_suffix;
32912    ac_top_srcdir=$srcdir
32913    ac_abs_top_srcdir=$srcdir ;;
32914  *) # Relative name.
32915    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32916    ac_top_srcdir=$ac_top_build_prefix$srcdir
32917    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32918esac
32919ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32920
32921
32922  case $ac_mode in
32923  :F)
32924  #
32925  # CONFIG_FILE
32926  #
32927
32928_ACEOF
32929
32930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32931# If the template does not know about datarootdir, expand it.
32932# FIXME: This hack should be removed a few years after 2.60.
32933ac_datarootdir_hack=; ac_datarootdir_seen=
32934ac_sed_dataroot='
32935/datarootdir/ {
32936  p
32937  q
32938}
32939/@datadir@/p
32940/@docdir@/p
32941/@infodir@/p
32942/@localedir@/p
32943/@mandir@/p'
32944case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32945*datarootdir*) ac_datarootdir_seen=yes;;
32946*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32947  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32948$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32949_ACEOF
32950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32951  ac_datarootdir_hack='
32952  s&@datadir@&$datadir&g
32953  s&@docdir@&$docdir&g
32954  s&@infodir@&$infodir&g
32955  s&@localedir@&$localedir&g
32956  s&@mandir@&$mandir&g
32957  s&\\\${datarootdir}&$datarootdir&g' ;;
32958esac
32959_ACEOF
32960
32961# Neutralize VPATH when `$srcdir' = `.'.
32962# Shell code in configure.ac might set extrasub.
32963# FIXME: do we really want to maintain this feature?
32964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32965ac_sed_extra="$ac_vpsub
32966$extrasub
32967_ACEOF
32968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32969:t
32970/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32971s|@configure_input@|$ac_sed_conf_input|;t t
32972s&@top_builddir@&$ac_top_builddir_sub&;t t
32973s&@top_build_prefix@&$ac_top_build_prefix&;t t
32974s&@srcdir@&$ac_srcdir&;t t
32975s&@abs_srcdir@&$ac_abs_srcdir&;t t
32976s&@top_srcdir@&$ac_top_srcdir&;t t
32977s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32978s&@builddir@&$ac_builddir&;t t
32979s&@abs_builddir@&$ac_abs_builddir&;t t
32980s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32981$ac_datarootdir_hack
32982"
32983eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32984  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32985
32986test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32987  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32988  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
32989      "$ac_tmp/out"`; test -z "$ac_out"; } &&
32990  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32991which seems to be undefined.  Please make sure it is defined" >&5
32992$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32993which seems to be undefined.  Please make sure it is defined" >&2;}
32994
32995  rm -f "$ac_tmp/stdin"
32996  case $ac_file in
32997  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32998  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32999  esac \
33000  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33001 ;;
33002  :H)
33003  #
33004  # CONFIG_HEADER
33005  #
33006  if test x"$ac_file" != x-; then
33007    {
33008      $as_echo "/* $configure_input  */" \
33009      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33010    } >"$ac_tmp/config.h" \
33011      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33012    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33014$as_echo "$as_me: $ac_file is unchanged" >&6;}
33015    else
33016      rm -f "$ac_file"
33017      mv "$ac_tmp/config.h" "$ac_file" \
33018	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33019    fi
33020  else
33021    $as_echo "/* $configure_input  */" \
33022      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33023      || as_fn_error $? "could not create -" "$LINENO" 5
33024  fi
33025 ;;
33026
33027
33028  esac
33029
33030done # for ac_tag
33031
33032
33033as_fn_exit 0
33034_ACEOF
33035ac_clean_files=$ac_clean_files_save
33036
33037test $ac_write_fail = 0 ||
33038  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33039
33040
33041# configure is writing to config.log, and then calls config.status.
33042# config.status does its own redirection, appending to config.log.
33043# Unfortunately, on DOS this fails, as config.log is still kept open
33044# by configure, so config.status won't be able to write to it; its
33045# output is simply discarded.  So we exec the FD to /dev/null,
33046# effectively closing config.log, so it can be properly (re)opened and
33047# appended to by config.status.  When coming back to configure, we
33048# need to make the FD available again.
33049if test "$no_create" != yes; then
33050  ac_cs_success=:
33051  ac_config_status_args=
33052  test "$silent" = yes &&
33053    ac_config_status_args="$ac_config_status_args --quiet"
33054  exec 5>/dev/null
33055  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33056  exec 5>>config.log
33057  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33058  # would make configure fail if this is the last instruction.
33059  $ac_cs_success || as_fn_exit 1
33060fi
33061if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33062  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33063$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33064fi
33065
33066
33067# Make the compare script executable
33068$CHMOD +x $OUTPUT_ROOT/compare.sh
33069
33070# Finally output some useful information to the user
33071
33072# Finally output some useful information to the user
33073
33074if test "x$CCACHE_FOUND" != x; then
33075	if  test "x$HAS_GOOD_CCACHE" = x; then
33076		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33077		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33078	else
33079		CCACHE_STATUS="installed and in use"
33080	fi
33081else
33082	if test "x$GCC" = xyes; then
33083		CCACHE_STATUS="not installed (consider installing)"
33084		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33085	else
33086		CCACHE_STATUS="not available for your system"
33087	fi
33088fi
33089
33090printf "\n"
33091printf "====================================================\n"
33092printf "A new configuration has been successfully created in\n"
33093printf "$OUTPUT_ROOT\n"
33094if test "x$CONFIGURE_COMMAND_LINE" != x; then
33095	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33096else
33097	printf "using default settings.\n"
33098fi
33099
33100printf "\n"
33101printf "Configuration summary:\n"
33102printf "* Debug level:    $DEBUG_LEVEL\n"
33103printf "* JDK variant:    $JDK_VARIANT\n"
33104printf "* JVM variants:   $with_jvm_variants\n"
33105printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33106
33107printf "\n"
33108printf "Tools summary:\n"
33109if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33110  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33111fi
33112printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33113printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33114printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33115
33116printf "\n"
33117printf "Build performance summary:\n"
33118printf "* Cores to use:   $NUM_CORES\n"
33119printf "* Memory limit:   $MEMORY_SIZE MB\n"
33120printf "* ccache status:  $CCACHE_STATUS\n"
33121printf "\n"
33122
33123if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33124	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33125	printf "$CCACHE_HELP_MSG\n"
33126
33127    # Print a helpful message on how to acquire the necessary build dependency.
33128    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33129    MISSING_DEPENDENCY=ccache
33130    PKGHANDLER_COMMAND=
33131
33132    case $PKGHANDLER in
33133	apt-get)
33134                apt_help     $MISSING_DEPENDENCY ;;
33135    yum)
33136                yum_help     $MISSING_DEPENDENCY ;;
33137	port)
33138                port_help    $MISSING_DEPENDENCY ;;
33139	pkgutil)
33140                pkgutil_help $MISSING_DEPENDENCY ;;
33141	pkgadd)
33142                pkgadd_help  $MISSING_DEPENDENCY ;;
33143    * )
33144      break ;;
33145    esac
33146
33147    if test "x$PKGHANDLER_COMMAND" != x; then
33148        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33149    fi
33150
33151	printf "$HELP_MSG\n"
33152	printf "\n"
33153fi
33154
33155if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33156	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33157	printf "will result in longer build times.\n"
33158	printf "\n"
33159fi
33160
33161if test "x$FOUND_ALT_VARIABLES" != "x"; then
33162	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33163	printf "These are not respected, and will be ignored. It is recommended\n"
33164	printf "that you clean your environment. The following variables are set:\n"
33165	printf "$FOUND_ALT_VARIABLES\n"
33166	printf "\n"
33167fi
33168
33169if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33170	printf "WARNING: Your build output directory is not on a local disk.\n"
33171	printf "This will severely degrade build performance!\n"
33172	printf "It is recommended that you create an output directory on a local disk,\n"
33173	printf "and run the configure script again from that directory.\n"
33174	printf "\n"
33175fi
33176
33177if test "x$IS_RECONFIGURE" = "xyes"; then
33178	printf "WARNING: The result of this configuration has overridden an older\n"
33179	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33180	printf "proper build. Failure to do so might result in strange build problems.\n"
33181	printf "\n"
33182fi
33183
33184